[SeaBIOS] SeaBIOS and Bochs?

Kevin O'Connor kevin at koconnor.net
Wed Feb 15 03:21:20 CET 2012

On Tue, Feb 14, 2012 at 08:44:59PM +0100, Bernd Blaauw wrote:
> I'm stuck with a few questions about applying SeaBIOS to Bochs
> (Windows), hoping someone is willing to give out some helpful hints.
> 1) Can the downloadable v1.6.3 binary directly be used in Bochs, or
> is a recompile needed? Thought I read some docs about MTRR config
> options.

I think you may need to change some config options.  Try enabling
the latest version of Bochs may no longer need one or both of these,
but I'm not sure.  Sebastian may know.

> 2) What minimal system requirements does SeaBIOS put on a virtual
> machine? 80586, 2MB, PCI ? 80386, 1MB, ISA ?

SeaBIOS should work okay with 1MB.  This seems to fail in recent QEMU
versions, but I think that is specific to QEMU.

Retesting seabios with qemu-0.13 - it looks like some regressions made
it into seabios - see attached patch for a fix.  (With patch below, it
works okay for me with qemu-0.13 with "-m 1" option.)

The latest SeaBIOS tip will work on 80386 - the 1.6.3 version requires
a 80586.  I think PCI may be required (to unlock ram).

> 3) Is there an opensource BIOS, usable in Bochs and QEMU, that does
> work with only 1MB RAM assigned to the VM? SeaBIOS fails this.

SeaBIOS should work.  If there are SeaBIOS issues, they should be


diff --git a/src/acpi.c b/src/acpi.c
index 107469f..7bc662d 100644
--- a/src/acpi.c
+++ b/src/acpi.c
@@ -496,6 +496,10 @@ static void* build_pcihp(void)
     int i;
     u8 *ssdt = malloc_high(sizeof ssdp_pcihp_aml);
+    if (!ssdt) {
+        warn_noalloc();
+        return NULL;
+    }
     memcpy(ssdt, ssdp_pcihp_aml, sizeof ssdp_pcihp_aml);
     /* Runtime patching of EJ0: to disable hotplug for a slot,
diff --git a/src/pmm.c b/src/pmm.c
index 82a0b1d..c649fd8 100644
--- a/src/pmm.c
+++ b/src/pmm.c
@@ -214,7 +214,8 @@ malloc_fixupreloc(void)
     int i;
     for (i=0; i<ARRAY_SIZE(Zones); i++) {
         struct zone_s *zone = Zones[i];
-        zone->info->pprev = &zone->info;
+        if (zone->info)
+            zone->info->pprev = &zone->info;
     // Add space free'd during relocation in f-segment to ZoneFSeg

More information about the SeaBIOS mailing list