Motorola MVME6100 manual Valid Boot Images, Checksum Algorithm, Name Type Size

Models: MVME6100

1 90
Download 90 pages 50.02 Kb
Page 41
Image 41

Chapter 3 MOTLoad Firmware

Valid Boot Images

Valid boot images whether POST, USER, or MCG, are located on 1MB boundaries within flash. The image may exceed 1MB in size. An image is determined valid through the presence of two "valid image keys" and other sanity checks. A valid boot image begins with a structure as defined in the following table:

Name

Type

Size

Notes

UserDefined

unsigned integer

8

User defined

 

 

 

 

ImageKey 1

unsigned integer

1

0x414c5420

 

 

 

 

ImageKey 2

unsigned integer

1

0x424f4f54

 

 

 

 

ImageChecksum

unsigned integer

1

Image checksum

 

 

 

 

ImageSize

unsigned integer

1

Must be a multiple of 4

 

 

 

 

ImageName

unsigned character

32

User defined

 

 

 

 

ImageRamAddress

unsigned integer

1

RAM address

 

 

 

 

ImageOffset

unsigned integer

1

Offset from header start to entry

 

 

 

 

ImageFlags

unsigned integer

1

Refer to MOTLoad Image Flags on page 32

 

 

 

 

ImageVersion

unsigned integer

1

User defined

 

 

 

 

Reserved

unsigned integer

8

Reserved for expansion

 

 

 

 

Checksum Algorithm

The checksum algorithm is a simple unsigned word add of each word (4 byte) location in the image. The image must be a multiple of 4 bytes in length (word-aligned). The content of the checksum location in the header is not part of the checksum calculation. The calculation assumes the location to be zero. The algorithm is implemented using the following code:

Unsigned int checksum(

Unsigned int *startPtr,/* starting address */

Unsigned int endPtr/* ending address */

) {

unsigned int checksum=0; while (startPtr < endPtr) {

checksum += *startPtr; startPtr++;

}

return(checksum);

}

MVME6100 Installation and Use (V6100A/IH2)

31

Page 41
Image 41
Motorola MVME6100 manual Valid Boot Images, Checksum Algorithm, Name Type Size