diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-06-01 11:00:29 +0100 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2011-06-13 07:57:03 -0400 |
commit | 74c78786719b202557d4f177bd290ddd98e979fe (patch) | |
tree | 5518c906c2ddaa6f9b50d5f26da077a9972fda3b /src/post.c | |
parent | 1442c31529b951d4a2b90bdcf1adbd32d1ceffa8 (diff) | |
download | seabios-74c78786719b202557d4f177bd290ddd98e979fe.tar.gz |
Add support for use as Xen HVM BIOS.
SeaBIOS is called by Xen's hvmloader which does the basic platform
setup (PCI, APIC, etc) and provides the various BIOS tables. Therefore
avoid re-doing that setup and copy out the tables as necessary. A
simple data structure is defined to pass the addresses of these
tables.
This patch also establishes the basic infrastructure to make
hypercalls, although it currently only uses it to query the hypervisor
version.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'src/post.c')
-rw-r--r-- | src/post.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -23,6 +23,7 @@ #include "usb.h" // usb_setup #include "smbios.h" // smbios_init #include "paravirt.h" // qemu_cfg_port_probe +#include "xen.h" // xen_probe_hvm_info #include "ps2port.h" // ps2port_setup #include "virtio-blk.h" // virtio_blk_setup @@ -101,6 +102,8 @@ ram_probe(void) dprintf(3, "Find memory size\n"); if (CONFIG_COREBOOT) { coreboot_setup(); + } else if (usingXen()) { + xen_setup(); } else { // On emulators, get memory size from nvram. u32 rs = ((inb_cmos(CMOS_MEM_EXTMEM2_LOW) << 16) @@ -158,6 +161,10 @@ init_bios_tables(void) coreboot_copy_biostable(); return; } + if (usingXen()) { + xen_copy_biostables(); + return; + } create_pirtable(); @@ -380,6 +387,9 @@ _start(void) // This is a soft reboot - invoke a hard reboot. tryReboot(); + // Check if we are running under Xen. + xen_probe(); + // Allow writes to modify bios area (0xf0000) make_bios_writable(); HaveRunPost = 1; |