Verify that option roms don't try to move the ebda block.
diff --git a/src/post.c b/src/post.c
index ab7f069..f8b12a5 100644
--- a/src/post.c
+++ b/src/post.c
@@ -175,8 +175,13 @@
if (checksum(rom, len) != 0)
continue;
p = (u8*)(((u32)p + len) / 2048 * 2048);
+ dprintf(1, "Running option rom at %p\n", rom+3);
callrom(FARPTR_TO_SEG(rom), FARPTR_TO_OFFSET(rom + 3));
+ if (GET_BDA(ebda_seg) != SEG_EBDA)
+ BX_PANIC("Option rom at %p attempted to move ebda from %x to %x\n"
+ , rom, SEG_EBDA, GET_BDA(ebda_seg));
+
// Look at the ROM's PnP Expansion header. Properly, we're supposed
// to init all the ROMs and then go back and build an IPL table of
// all the bootable devices, but we can get away with one pass.