information by outputing strings in a special port present in the
IO space.
- config DEBUG_IO_PORT
- depends on DEBUG_IO
- hex "Debug IO port address"
- default 0x0402
- help
- Bochs uses the 0x0402 address by default, whereas Xen
- makes the 0xe9 IO address available for guests use.
endmenu
#define DEBUG_TIMEOUT 100000
+u16 DebugOutputPort VAR16VISIBLE = 0x402;
+
void
debug_serial_setup(void)
{
return;
if (CONFIG_DEBUG_IO)
// Send character to debug port.
- outb(c, CONFIG_DEBUG_IO_PORT);
+ outb(c, GET_GLOBAL(DebugOutputPort));
if (c == '\n')
debug_serial('\r');
debug_serial(c);
void check_preempt(void);
// output.c
+extern u16 DebugOutputPort;
void debug_serial_setup(void);
void panic(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2))) __noreturn;
dprintf(1, "Found hypervisor signature \"%s\" at %x\n",
signature, base);
if (strcmp(signature, "XenVMMXenVMM") == 0) {
+ /* Set debug_io_port first, so the following messages work. */
+ DebugOutputPort = 0xe9;
+ dprintf(1, "SeaBIOS (version %s)\n\n", VERSION);
+ dprintf(1, "Found Xen hypervisor signature at %x\n", base);
if ((eax - base) < 2)
panic("Insufficient Xen cpuid leaves. eax=%x at base %x\n",
eax, base);
break;
}
}
+ if (!xen_cpuid_base)
+ dprintf(1, "No Xen hypervisor found.\n");
}
static int hypercall_xen_version( int cmd, void *arg)