On Fri, 2013-02-08 at 14:45 +0000, Ian Campbell wrote:
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,
Except Xen is entering via handle_post not handle_elf, so it does change something, specifically xen_preinit() isn't called before make_bios_writable so the usingXen in there doesn't trigger. Xen (actually hvmloader) launches SeaBIOS with "ljmp $0xf000,$0xfff0" so I think handle_post is the expected landing point.
The patch below fixes this issue for me, however even with that and CONFIG_DEBUG_LEVEL=2 I still don't see the expected "Using pmtimer" message. Full messages are below, SeaBIOS starts at "Invoking SeaBIOS ..."
Linux does see the PM-Timer: ACPI: PM-Timer IO Port: 0xb008 Although it doesn't use it because it prefers the Xen virtual timers.
The patch:
diff --git a/src/post.c b/src/post.c index ae5e923..78ef4b1 100644 --- a/src/post.c +++ b/src/post.c @@ -315,9 +315,6 @@ dopost(void) // Make sure legacy DMA isn't running. dma_preinit();
- // Check if we are running under Xen. - xen_preinit(); - // Detect ram and setup internal malloc. qemu_cfg_preinit(); if (CONFIG_COREBOOT) @@ -357,6 +354,9 @@ handle_post(void) { debug_splash();
+ // Check if we are running under Xen. + xen_preinit(); + // Allow writes to modify bios area (0xf0000) make_bios_writable();
Logs:
(XEN) HVM164: HVM Loader (XEN) HVM164: Detected Xen v4.3-unstable (XEN) HVM164: Xenbus rings @0xfeffc000, event channel 4 (XEN) HVM164: System requested SeaBIOS (XEN) HVM164: CPU speed is 2400 MHz (XEN) HVM164: PCI-ISA link 0 routed to IRQ5 (XEN) HVM164: PCI-ISA link 1 routed to IRQ10 (XEN) HVM164: PCI-ISA link 2 routed to IRQ11 (XEN) HVM164: PCI-ISA link 3 routed to IRQ5 (XEN) HVM164: pci dev 01:3 INTA->IRQ10 (XEN) HVM164: pci dev 03:0 INTA->IRQ5 (XEN) HVM164: pci dev 04:0 INTA->IRQ5 (XEN) HVM164: pci dev 02:0 bar 10 size lx: 02000000 (XEN) HVM164: pci dev 03:0 bar 14 size lx: 01000000 (XEN) HVM164: pci dev 04:0 bar 10 size lx: 00020000 (XEN) HVM164: pci dev 04:0 bar 30 size lx: 00020000 (XEN) HVM164: pci dev 02:0 bar 30 size lx: 00010000 (XEN) HVM164: pci dev 02:0 bar 14 size lx: 00001000 (XEN) HVM164: pci dev 03:0 bar 10 size lx: 00000100 (XEN) HVM164: pci dev 04:0 bar 14 size lx: 00000040 (XEN) HVM164: pci dev 01:1 bar 20 size lx: 00000010 (XEN) HVM164: Multiprocessor initialisation: (XEN) HVM164: - CPU0 ... 36-bit phys ... fixed MTRRs ... var MTRRs [2/8] ... done. (XEN) HVM164: - CPU1 ... 36-bit phys ... fixed MTRRs ... var MTRRs [2/8] ... done. (XEN) HVM164: Testing HVM environment: (XEN) HVM164: - REP INSB across page boundaries ... passed (XEN) HVM164: - GS base MSRs and SWAPGS ... passed (XEN) HVM164: Passed 2 of 2 tests (XEN) HVM164: Writing SMBIOS tables ... (XEN) HVM164: Loading SeaBIOS ... (XEN) HVM164: Creating MP tables ... (XEN) HVM164: Loading ACPI ... (XEN) HVM164: vm86 TSS at fc00a080 (XEN) HVM164: BIOS map: (XEN) HVM164: 10000-100d3: Scratch space (XEN) HVM164: e0000-fffff: Main BIOS (XEN) HVM164: E820 table: (XEN) HVM164: [00]: 00000000:00000000 - 00000000:000a0000: RAM (XEN) HVM164: HOLE: 00000000:000a0000 - 00000000:000e0000 (XEN) HVM164: [01]: 00000000:000e0000 - 00000000:00100000: RESERVED (XEN) HVM164: [02]: 00000000:00100000 - 00000000:07800000: RAM (XEN) HVM164: HOLE: 00000000:07800000 - 00000000:fc000000 (XEN) HVM164: [03]: 00000000:fc000000 - 00000001:00000000: RESERVED (XEN) HVM164: Invoking SeaBIOS ... (XEN) HVM164: SeaBIOS (version rel-1.7.2-18-g6ca0460-dirty-20130208_144531-cosworth) (XEN) HVM164: (XEN) HVM164: Found Xen hypervisor signature at 40000000 (XEN) HVM164: xen: copy e820... (XEN) HVM164: Ram Size=0x07800000 (0x0000000000000000 high) (XEN) HVM164: Relocating low data from 0x000e1b60 to 0x000ef740 (size 2164) (XEN) HVM164: Relocating init from 0x000e23d4 to 0x077e22f0 (size 56296) (XEN) HVM164: CPU Mhz=2402 (XEN) HVM164: Found 7 PCI devices (max PCI bus is 00) (XEN) HVM164: Allocated Xen hypercall page at 77ff000 (XEN) HVM164: Detected Xen v4.3-unstable (XEN) HVM164: Found 2 cpu(s) max supported 2 cpu(s) (XEN) HVM164: xen: copy BIOS tables... (XEN) HVM164: Copying SMBIOS entry point from 0x00010010 to 0x000fdb10 (XEN) HVM164: Copying MPTABLE from 0xfc001170/fc001180 to 0x000fda10 (XEN) HVM164: Copying PIR from 0x00010030 to 0x000fd990 (XEN) HVM164: Copying ACPI RSDP from 0x000100b0 to 0x000fd960 (XEN) HVM164: Scan for VGA option rom (XEN) HVM164: Running option rom at c000:0003 (XEN) HVM164: Turning on vga text mode console (XEN) HVM164: SeaBIOS (version rel-1.7.2-18-g6ca0460-dirty-20130208_144531-cosworth) (XEN) HVM164: Machine UUID 5f1a6b33-97ac-4503-b38a-5ee17030e4fd (XEN) HVM164: /077e0000\ Start thread (XEN) HVM164: Found 1 lpt ports (XEN) HVM164: Found 1 serial ports (XEN) HVM164: Searching bootorder for: /pci@i0cf8/isa@1/fdc@03f0/floppy@0 (XEN) HVM164: ATA controller 1 at 1f0/3f4/c140 (irq 14 dev 9) (XEN) HVM164: /077df000\ Start thread (XEN) HVM164: ATA controller 2 at 170/374/c148 (irq 15 dev 9) (XEN) HVM164: /077de000\ Start thread (XEN) HVM164: |077df000| ata0-0: QEMU HARDDISK ATA-7 Hard-Disk (8192 MiBytes) (XEN) HVM164: |077df000| Searching bootorder for: /pci@i0cf8/*@1,1/drive@0/disk@0 (XEN) HVM164: \077df000/ End thread (XEN) HVM164: |077de000| DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD] (XEN) HVM164: |077de000| Searching bootorder for: /pci@i0cf8/*@1,1/drive@1/disk@0 (XEN) HVM164: \077de000/ End thread (XEN) HVM164: |077e0000| PS2 keyboard initialized (XEN) HVM164: \077e0000/ End thread (XEN) HVM164: All threads complete. (XEN) HVM164: Scan for option roms (XEN) HVM164: Running option rom at c900:0003 (XEN) HVM164: pmm call arg1=1 (XEN) HVM164: pmm call arg1=0 (XEN) HVM164: pmm call arg1=1 (XEN) HVM164: pmm call arg1=0 (XEN) HVM164: Searching bootorder for: /pci@i0cf8/*@4 (XEN) HVM164: (XEN) HVM164: Press F12 for boot menu. (XEN) HVM164: (XEN) HVM164: Searching bootorder for: HALT (XEN) HVM164: drive 0x000fd8e0: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=16777216 (XEN) HVM164: (XEN) HVM164: Space available for UMB: 000ca000-000ee800 (XEN) HVM164: Returned 61440 bytes of ZoneHigh (XEN) HVM164: e820 map has 6 items: (XEN) HVM164: 0: 0000000000000000 - 000000000009fc00 = 1 RAM (XEN) HVM164: 1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED (XEN) HVM164: 2: 00000000000f0000 - 0000000000100000 = 2 RESERVED (XEN) HVM164: 3: 0000000000100000 - 00000000077ff000 = 1 RAM (XEN) HVM164: 4: 00000000077ff000 - 0000000007800000 = 2 RESERVED (XEN) HVM164: 5: 00000000fc000000 - 0000000100000000 = 2 RESERVED (XEN) HVM164: enter handle_19: (XEN) HVM164: NULL (XEN) HVM164: Booting from ROM... (XEN) HVM164: Booting from c900:0372 (XEN) HVM164: enter handle_12: (XEN) HVM164: a=dced0200 b=00000030 c=00030000 d=00090027 ds=0000 es=0000 ss=9cf2 (XEN) HVM164: si=00002e10 di=0000b7b6 bp=00032ca2 sp=00002ca2 cs=0000 ip=7eef f=0246 (XEN) HVM164: unimplemented handle_16XX:231: (XEN) HVM164: a=00000305 b=00000000 c=00000000 d=00000000 ds=3000 es=3000 ss=3000 (XEN) HVM164: si=00000000 di=00000000 bp=00000000 sp=0000f70c cs=3000 ip=05f0 f=0003 (XEN) HVM164: unimplemented handle_15XX:338: (XEN) HVM164: a=0000e980 b=00000000 c=00000000 d=47534943 ds=3000 es=3000 ss=3000 (XEN) HVM164: si=00000000 di=00000000 bp=00000000 sp=0000f70c cs=3000 ip=05f0 f=0003