aboutsummaryrefslogtreecommitdiffstats
path: root/src/output.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-12-17 10:23:49 -0500
committerKevin O'Connor <kevin@koconnor.net>2018-12-17 10:23:49 -0500
commit29ba89e67ff39b7673912022bf54c8640ae113cd (patch)
tree253e5655b9a8a68bd61d33c023b5eb535ad7e976 /src/output.c
parent75b42835134553c96f113e5014072c0caf99d092 (diff)
downloadseabios-29ba89e67ff39b7673912022bf54c8640ae113cd.tar.gz
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 <kevin@koconnor.net>
Diffstat (limited to 'src/output.c')
-rw-r--r--src/output.c3
1 files changed, 3 insertions, 0 deletions
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;