From: Kevin O'Connor Date: Mon, 17 Dec 2018 15:23:49 +0000 (-0500) Subject: output: Avoid thunking to 16bit mode in printf() if no vgabios X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=29ba89e67ff39b7673912022bf54c8640ae113cd;p=people%2Fandrewcoop%2Fseabios.git 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 --- diff --git a/src/output.c b/src/output.c index ec51f5e..3c335cb 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;