E.6.1 checksum algorithm, E.6.2 boot image flags, E.6.1 checksum algorithm e.6.2 boot image flags – Artesyn MOTLoad Firmware Package User's Manual (February 2015) User Manual
Page 275: Table e-1, Motload image flags, Safe start and alternate boot image

Safe Start and Alternate Boot Image
MOTLoad Firmware Package User’s Manual (6806800C24D)
275
E.6.1
Checksum Algorithm
The checksum algorithm is a simple unsigned word addition; that is, 4-byte addition, of each
word location in the image. The image must be word aligned. The content of the checksum
location in the header is not part of the checksum calculation. 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);
}
E.6.2
Boot Image Flags
The image flags define various bit options that control how the boot loader executes the
image. These bit definitions are defined in the following table.
ImageOffset
unsigned integer
1
Offset from header start to
entry
ImageFlags
unsigned integer
1
Refer to
ImageVersion
unsigned integer
1
User defined
Reserved
unsigned integer
8
Reserved for expansion
Name
Type
Size
Notes
Table E-1 MOTLoad Image Flags
Name
Value
Interpretation
COPY_TO_RAM
0x00000001
Copy image to RAM at
ImageRamAddress
before execution