beautypg.com

1 checksum algorithm, Motload firmware – Artesyn MVME7100ET Single Board Computer Installation and Use (June 2014) User Manual

Page 107

background image

MOTLoad Firmware

MVME7100ET Single Board Computer Installation and Use (6806800K87E)

107

6.7.1

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

}

ImageRamAddress

unsigned integer

1

RAM address

ImageOffset

unsigned integer

1

Offset from header start to entry

ImageFlags

unsigned integer

1

Refer to

Image Flags

on page 108

ImageVersion

unsigned integer

1

User defined

Reserved

unsigned integer

8

Reserved for expansion

Name

Type

Size

Notes