From 9701a97e3f68c2a5f0d887da31fef76199a90d1d Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 21 May 2015 15:19:41 +0200 Subject: benchmarking hack --- linuxboot.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/linuxboot.c b/linuxboot.c index 7ce07bc..cc64811 100644 --- a/linuxboot.c +++ b/linuxboot.c @@ -1,5 +1,6 @@ #include "bios.h" #include "linuxboot.h" +#include "ioport.h" #include "string.h" #include "stdio.h" @@ -110,6 +111,12 @@ bool parse_bzimage(struct linuxboot_args *args) void boot_bzimage(struct linuxboot_args *args) { memcpy(args->setup_addr, args->header, sizeof(args->header)); +#ifdef BENCHMARK_HACK + /* Exit just before getting to vmlinuz, so that it is easy + * to time/profile the firmware. + */ + outb(0xf4, 1); +#endif asm volatile( "ljmp $0x18, $pm16_boot_linux - 0xf0000" : : -- cgit v1.1