compute checksum for roms bigger than a segment
commitb5c99e96655e8dc938f801e1ac0dbdf2d6dfba37
authorGlauber Costa <glommer@redhat.com>
Wed, 24 Jun 2009 13:31:41 +0000 (24 14:31 +0100)
committerMark McLoughlin <markmc@redhat.com>
Mon, 28 Sep 2009 07:22:29 +0000 (28 08:22 +0100)
tree36e9a63bb4c0706563b7732857399ecf41d4e35f
parentb6fffd0208b8aa80ce271e5ab7efc50f7236ba40
compute checksum for roms bigger than a segment

Some option roms (e1000 provided by gpxe project as an example)
are bigger than a segment. The current algorithm to compute the
checksum fails in such case. To proper compute the checksum, this
patch deals with the possibility of the rom's size crossing a
segment border.

We don't need to worry about it crossing more than one segment
border, since the option roms format only save one byte to store
the image size (thus, maximum size = 0xff = 128k = 2 segments)

[ including improvements suggested by malc ]

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Fedora-patch: qemu-bios-bigger-roms.patch
kvm/bios/rombios.c