]> xenbits.xensource.com Git - seabios.git/commitdiff
output: Avoid thunking to 16bit mode in printf() if no vgabios
authorKevin O'Connor <kevin@koconnor.net>
Mon, 17 Dec 2018 15:23:49 +0000 (10:23 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 17 Dec 2018 15:23:49 +0000 (10:23 -0500)
It is not necessary to call the vgabios if no vgabios has been
installed.  This reduces the amount of hardware accesses on qemu when
the bios is not initializing the display hardware, and it can reduce
the boot time by a couple of milliseconds.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/output.c

index ec51f5e2f6ecf012825e9069e43ccde8232f947e..3c335cbb28e2383c6c94474437626c804b405904 100644 (file)
@@ -74,6 +74,9 @@ static struct putcinfo debuginfo = { debug_putc };
 static void
 screenc(char c)
 {
+    if (!MODESEGMENT && GET_IVT(0x10).segoff == FUNC16(entry_10).segoff)
+        // No need to thunk to 16bit mode if vgabios is not present
+        return;
     struct bregs br;
     memset(&br, 0, sizeof(br));
     br.flags = F_IF;