Hi,
Note: All these tests are done with CONFIG_DEBUG_LEVEL=0, using CONFIG_DEBUG_LEVEL=1 the boot time grows up to 24 ms, maybe we should put CONFIG_DEBUG_LEVEL=0 in the SeaBIOS configuration used in QEMU.
I think the main seabios binary should have CONFIG_DEBUG_LEVEL=1 as it helps with debug reports. I suppose an additional binary could be made for those looking for the fastest possible speed. (The sole cost of the debugging is the additional hardware accesses that results from those debug messages.)
The qemu debugcon (CONFIG_DEBUG_IO) is detecable at runtime, it returns 0xe9 on port reads. So we should be able to skip that too. IIRC it isn't *that* straightforward as seabios is initially mapped read/only so a simple probe-on-first-putchar, then cache the result in a variable doesn't work. We could probe after make_bios_writable though which should still avoid printing most of the messages.
cheers, Gerd