[coreboot] Some SeaBIOS timings

Kevin O'Connor kevin at koconnor.net
Thu Dec 3 04:03:39 CET 2009

I decided to rerun some timing tests on my epia-cn.

With some hacking, I've gotten the time from power-on to SeaBIOS boot
menu down to 850ms.  Of this time, 530ms is coreboot, 210ms is via vga
rom, 60ms is usb init (and other hardware probes), and 30ms is time to
copy and decompress vga rom from flash.

This rom is pretty small too (under 128K) - 20K for bootblock, 30K for
coreboot_ram, 33K for seabios, and 36K for via vga rom.

To get to these numbers I had to disconnect my ATA drive - it's spinup
time dominates startup otherwise (9 seconds from power on).  I'm
hopeful the times shown would be representative if I had an SSD drive.

I also needed to hack coreboot to improve caching.  I modified
entry16.inc to turn on caching of the rom as soon as possible, I
modified auto.c to make sure ram was cached prior to decompressing
coreboot_ram, and finally I modified the permanent mtrr setup to leave
the rom cached for seabios.

As an aside, I think coreboot could improve in this area.  It seems as
if each board is tasked with setting up caching - I'm sure epia-cn is
not the exception with unoptimized caches.

I'm attaching the serial output below.  The timing numbers quoted
above are from a program that times the serial responses.  This
program also takes into account the cost to send serial messages and
subtracts that time from the reports.  I believe the numbers shown are
representative of times had debugging been disabled.

My epia-cn seems to write a null byte to the serial port when I press
the power button - I'm using that to time the rest of the boot.  I
suspect much of the 400ms to the first coreboot message is due to
power stabilization prior to cpu execution.



00.000: <00>
00.008: <00>
00.399: 0
00.401: coreboot-2.0.0-r4967M-epiacn Wed Dec  2 20:01:30 EST 2009 starting...
00.426: Stage: loading fallback/coreboot_ram @ 0x4000 (114688 bytes), entry @ 0x4000
00.459: coreboot-2.0.0-r4967M-epiacn Wed Dec  2 20:01:30 EST 2009 booting...
00.479: clocks_per_usec: 1501
00.481: Enumerating buses...
00.481: Finding PCI configuration type.
00.484: done
00.483: Allocating resources...
00.481: Reading resources...
00.487: PNP: 002e.b missing read_resources
00.485: APIC: 00 missing read_resources
00.485: Done reading resources.
00.488: skipping PNP: 002e.1 at 74 fixed resource, size=0!
00.484: skipping PNP: 002e.b at 60 fixed resource, size=0!
00.489: Setting resources...
00.488: ERROR: PNP: 002e.3 74 drq size: 0x0000000001 not assigned
00.491: PNP: 002e.b missing set_resources
00.488: ERROR: PNP: 002e.4 60 io size: 0x0000000008 not assigned
00.491: ERROR: PNP: 002e.4 70 irq size: 0x0000000001 not assigned
00.489: ERROR: PNP: 002e.6 70 irq size: 0x0000000001 not assigned
00.490: Done setting resources.
00.490: Done allocating resources.
00.494: Enabling resources...
00.492: PCI: 00:00.3 missing enable_resources
00.491: PNP: 002e.b missing enable_resources
00.494: done.
00.493: Initializing devices...
00.493: Primary IDE interface enabled
00.497: Secondary IDE interface enabled
00.494: Initializing CPU #0
00.494: Detected VIA Model D C7-D
00.499: Voltage: 1084mV (min 1084mV; max 1084mV)
00.496: CPU multiplier: 15x (min 15x; max 15x)
00.495: Current voltage: 1084mV
00.500: Current CPU multiplier: 15x
00.497: Enabling cache
00.498: Running out of variable MTRRs!
00.501: Disabling local apic...done.
00.500: CPU #0 initialized
00.505: Devices initialized
00.503: Copying Interrupt Routing Table to 0x000f0000... done.
00.502: Copying Interrupt Routing Table to 0x3dff0400... done.
00.505: ACPI: Writing ACPI tables at 3dff1400...
00.503: ACPI: done.
00.503: Multiboot Information structure has been written.
00.537: Start bios (version pre-0.4.3-20091202_003935-morn.localdomain)
00.539: Found mainboard via epia-cn
00.540: Found CBFS header at 0xffffaae0
00.542: Ram Size=0x3dff0000
00.542: CPU Mhz=1501
00.543: No apic - only the main cpu is present.
00.545: Copying ACPI RSDP from 0x3dff1400 to 0x000fdc00
00.543: SMBIOS ptr=0x000fdbe0 table=0x3dfef800
00.548: Scan for VGA option rom
00.579: Running option rom at c000:0003
00.581: fail handle_155fXX:23(86):
00.582:    a=00005f0b  b=00010100  c=00000044  d=00000110 ds=0000 es=f000 ss=0000
00.583:   si=0000ab66 di=00000044 bp=00000000 sp=00006e82 cs=c000 ip=c996  f=0006
00.582: fail handle_155fXX:23(86):
00.584:    a=00005f01  b=00010100  c=00000044  d=00000110 ds=0000 es=f000 ss=0000
00.585:   si=0000ab66 di=00000044 bp=00000000 sp=00006e68 cs=c000 ip=c8c6  f=0002
00.768: fail handle_155fXX:23(86):
00.770:    a=00005f02  b=00010001  c=00000000  d=000003c2 ds=0000 es=f000 ss=0000
00.769:   si=00000001 di=00000044 bp=00000000 sp=00006e96 cs=c000 ip=c8f9  f=0002
00.773: fail handle_155fXX:23(86):
00.771:    a=00005f18  b=00010200  c=00000044  d=000003c2 ds=0000 es=f000 ss=0000
00.773:   si=00000000 di=00000044 bp=00000000 sp=00006e9c cs=c000 ip=ca89  f=0006
00.784: Turning on vga console
00.790: Starting SeaBIOS (version pre-0.4.3-20091202_003935-morn.localdomain)
00.790: ebda moved from 9f400 to 9f000
00.790: Found 1 lpt ports
00.794: Found 2 serial ports
00.792: ATA controller 0 at 24a0/24b0 (dev 78 prog_if 8f)
00.792: ATA controller 1 at 24a8/24b4 (dev 78 prog_if 8f)
00.792: ATA controller 2 at 1f0/3f0 (dev 79 prog_if 8a)
00.796: Got ps2 nak (status=d1); continuing
00.793: ATA controller 3 at 170/370 (dev 79 prog_if 8a)
00.827: config_usb: 0x000fdf94 1
00.851: Scan for option roms
00.853: Press F12 for boot menu.
03.390: Returned 28672 bytes of ZoneHigh
03.393: e820 map has 5 items:
03.394:   0: 0000000000000000 - 000000000009f000 = 1
03.394:   1: 000000000009f000 - 00000000000a0000 = 2
03.396:   2: 00000000000f0000 - 0000000000100000 = 2
03.396:   3: 0000000000100000 - 000000003dfe7000 = 1
03.397:   4: 000000003dfe7000 - 000000003e000000 = 2
03.398: enter handle_19:
03.398:   NULL


coreboot.final.rom: 1024 kB, bootblocksize 21248, romsize 1048576, offset 0x0
Alignment: 64 bytes

Name                           Offset     Type         Size
fallback/payload               0x0        payload      33364
fallback/coreboot_ram          0x82c0     stage        30820
pci1106,3344.rom.lzma          0xfb80     optionrom    36368
                               0x18a00    null         926392

More information about the coreboot mailing list