On Fri, 2013-02-08 at 10:33 +0000, David Woodhouse wrote:
On Fri, 2013-02-08 at 09:51 +0000, Ian Campbell wrote:
I've not been following this thread all that closely, what specifically should I be testing on Xen? Just starting a guest which uses pmtimer under latest SeaBIOS git and checking it works OK?
It's not merged yet; it's at http:// and git://git.infradead.org/users/dwmw2/seabios.git
Thanks I ran a build with this and I had to select between "Coreboot", "Qemu" or "CSM". Xen depends on !Coreboot so I probably ought to select the Qemu option but it seems like the Qemu option is misnamed, unless there are other things under the Qemu umbrella perhaps "Virtualised (Qemu or Xen)"?
Specifically commit 5ba80fac ("Add find_pmtimer() function") and 56014611 ("Use find_pmtimer() after copying Xen ACPI tables").
Previously, SeaBIOS wouldn't use the pmtimer for its own timing purposes unless it actually set it up for itself and created its *own* ACPI tables.
I've made it look through the ACPI tables which are provided to it by Coreboot/Xen/CSM and *find* the pmtimer there, and use it.
So with debug enabled you should see a line something like 'Using pmtimer, ioport 0xb008, freq 3579 kHz' and then lots of 'pmtimer: 0:16408743' as it actually gets read, and the debug statement in pmtimer_get() gets invoked.
Running with your HEAD (1c78b74) I get: XEN) HVM51: Invoking SeaBIOS ... (XEN) io.c:201:d51 MMIO emulation failed @ 0008:ffff1474: 00 80 2d c0 c4 82 ff ff 18 7a (XEN) hvm.c:1237:d51 Triple fault on VCPU0 - invoking HVM system reset.
I don't see this with rel-1.7.2. Bisecting fingers commit 6ca0460fbb8ecfa5d42c8928b7ee71f20d0cffdb Author: Kevin O'Connor kevin@koconnor.net Date: Mon Jan 21 11:38:49 2013 -0500
POST: Reorganize post entry and "preinit" functions.
But it doesn't look like this changes the order of anything,
I'm not quite sure what address ffff1474 is, if it corresponds to address f1474 in SeaBIOS then it corresponds to: 000f1474 <__make_bios_writable_intel>: f1474: 55 push %ebp f1475: 57 push %edi f1476: 56 push %esi f1477: 53 push %ebx f1478: 83 ec 0c sub $0xc,%esp f147b: 89 d3 mov %edx,%ebx f147d: 0f b7 e8 movzwl %ax,%ebp f1480: c1 e5 08 shl $0x8,%ebp
but that doesn't correspond to the instruction stream bytes in the emu failed message, I also wouldn't expect a stack push to result in MMIO but stranger things have happened ;-). Lastly that call seems to be after the SeaBIOS banner should have been printed.
But, I can't find those bytes anywhere else in the objdump. 00 80 2d seems to be an add of ax and [bx] + 0x2d
And clock stuff should work correctly.
Clock stuff in SeaBIOS or in the eventual kernel?
Ian.
Logs, SeaBIOS starts after "Invoking SeaBIOS ..."