Chapter 3 MOTLoad Firmware

...

MVME3100>

Valid Boot Images

Valid boot images whether POST, USER, or Alternate MOTLoad, 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

20

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);

}

MVME3100 Single-Board Computer Installation and Use (V3100A/IH1)

31

Page 43
Image 43
Motorola MVME3100 manual Valid Boot Images, Checksum Algorithm, Name Type Size