From 29ba89e67ff39b7673912022bf54c8640ae113cd Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 17 Dec 2018 10:23:49 -0500 Subject: output: Avoid thunking to 16bit mode in printf() if no vgabios 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 --- src/output.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/output.c b/src/output.c index ec51f5e2..3c335cbb 100644 --- a/src/output.c +++ b/src/output.c @@ -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; -- cgit