aboutsummaryrefslogtreecommitdiff
path: root/vgasrc/vgabios.c
diff options
context:
space:
mode:
authorJulian Pidancet <julian.pidancet@gmail.com>2012-03-05 14:20:45 +0000
committerKevin O'Connor <kevin@koconnor.net>2012-03-06 07:18:38 -0500
commita23a95141631af7d24ac2fdbcb5dfbf27ad6dbb0 (patch)
treef5eedea24055aeb253c25ac2262bc79dd647b544 /vgasrc/vgabios.c
parent35f42dc4ae4f582a49565bf106902136ab7a3d80 (diff)
downloadseabios-hppa-a23a95141631af7d24ac2fdbcb5dfbf27ad6dbb0.zip
seabios-hppa-a23a95141631af7d24ac2fdbcb5dfbf27ad6dbb0.tar.gz
seabios-hppa-a23a95141631af7d24ac2fdbcb5dfbf27ad6dbb0.tar.bz2
vgabios: Fetch _rom_header_size from the global segment when computing the ROM's checksum
Otherwise, checksum_far is getting called with zero as the length parameter, and the ROM checksum in the header end up beeing zero after vga_post() is called. Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Diffstat (limited to 'vgasrc/vgabios.c')
-rw-r--r--vgasrc/vgabios.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index faf57b1..d80cd53 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -1260,6 +1260,7 @@ vga_post(struct bregs *regs)
// Fixup checksum
extern u8 _rom_header_size, _rom_header_checksum;
SET_VGA(_rom_header_checksum, 0);
- u8 sum = -checksum_far(get_global_seg(), 0, _rom_header_size * 512);
+ u8 sum = -checksum_far(get_global_seg(), 0,
+ GET_GLOBAL(_rom_header_size) * 512);
SET_VGA(_rom_header_checksum, sum);
}