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.pidan...@gmail.com>
---
 vgasrc/vgabios.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index 58e467d..c1b10c1 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -1255,6 +1255,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);
 }
-- 
Julian Pidancet


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios

Reply via email to