On Wed, Jul 22, 2015 at 05:01:02PM +0200, Marc MarĂ wrote:
On Tue, 21 Jul 2015 12:47:47 -0400 "Kevin O'Connor" kevin@koconnor.net wrote:
On Tue, Jul 21, 2015 at 06:06:09PM +0200, Marc MarĂ wrote:
These patches, with the support in QEMU (patches in the QEMU mailing list) make the Linux kernel setup and boot approximately 10x faster.
Thanks. How do the timings with this support compare with the qboot and seabios+cbfs runs?
The boot time for a standard SeaBIOS (with the default configuration options) is this:
QEMU startup time: .032 BIOS startup time: .154 fw_cfg setup time: .375 Total time: .562
The boot time for a standard SeaBIOS with the CBFS patch is this:
QEMU startup time: .036 BIOS startup time: .184 Kernel setup time: .003 Total time: .223
The boot time for a standard SeaBIOS with the fw_cfg DMA interface patch is this:
QEMU startup time: .036 BIOS startup time: .140 Kernel setup time: .026 Total time: .202
Thanks. In case anyone is curious, if your runs are similar to my runs then the standard SeaBIOS time is likely:
100ms - ps2port reset wait (see ugly patch below to get around it) ~18ms - vga init (can avoid by adding "-device VGA,romfile=" to qemu) ~12ms - shadow ram enable/lock ~10ms - debug writes (avoid with seabios CONFIG_DEBUG_LEVEL=0) ~4ms - pci init 2ms - cpu timestamp counter calibration
-Kevin
--- a/src/hw/ps2port.c +++ b/src/hw/ps2port.c @@ -6,6 +6,7 @@ // This file may be distributed under the terms of the GNU LGPLv3 license.
#include "biosvar.h" // GET_LOW +#include "fw/paravirt.h" // runningOnQEMU #include "output.h" // dprintf #include "pic.h" // pic_eoi1 #include "ps2port.h" // ps2_kbd_command @@ -481,7 +482,8 @@ ps2_keyboard_setup(void *data) int spinupdelay = romfile_loadint("etc/ps2-keyboard-spinup", 0); u32 end = timer_calc(spinupdelay); for (;;) { - ret = ps2_kbd_command(ATKBD_CMD_RESET_BAT, param); + int cmd = runningOnQEMU() ? ATKBD_CMD_RESET_BAT1 : ATKBD_CMD_RESET_BAT; + ret = ps2_kbd_command(cmd, param); if (!ret) break; if (timer_check(end)) { diff --git a/src/hw/ps2port.h b/src/hw/ps2port.h index dc0e430..2748624 100644 --- a/src/hw/ps2port.h +++ b/src/hw/ps2port.h @@ -27,6 +27,7 @@ #define ATKBD_CMD_ENABLE 0x00f4 #define ATKBD_CMD_RESET_DIS 0x00f5 #define ATKBD_CMD_RESET_BAT 0x02ff +#define ATKBD_CMD_RESET_BAT1 0x01ff
// Mouse commands #define PSMOUSE_CMD_SETSCALE11 0x00e6