[OpenBIOS] FCode-utils 1.0.2 toke checksum issue
asif.haswarey at qlogic.com
Thu Jan 28 04:37:55 CET 2010
We have run into an issue with our FCodes tokenized using FCode-utils 1.0.2 toke,
on specific SPARC (Enterprise) platforms: M4000, M9000.
Power-up device probe yields the following warning message on the console:
WARNING: /pci at 20,600000/...: FCode checksum error; expected: 280d result: 2837
After looking at the OBP sources, I found that the routine:
fcode-sum-ok? : obp/dev/pci/fcode-rom.fth
calculates the checksum by adding every FCode image (excluding header) byte and doing:
lwsplit + lwsplit + h# ffff and
on the sum. The
lwsplit + lwsplit +
apparently breaks the OpenFirmware spec.
OpenFirmware-1275 section 220.127.116.11 describes the checksum algorithm as:
Checksum is the doublet size sum of the bytes of the program body (i.e.,
excluding the header), calculated using two's complement addition and
FCode-utils 1.0.2 toke calculates the checksum in function:
finish_fcodehdr : toke/emit.c
as described in the spec.
How do we deal with this?
Thanks for any response(s)!
More information about the OpenBIOS