aboutsummaryrefslogtreecommitdiff
path: root/src/fw
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2018-12-02 14:10:13 +0100
committerKevin O'Connor <kevin@koconnor.net>2018-12-10 22:03:30 -0500
commit75b42835134553c96f113e5014072c0caf99d092 (patch)
treea22ca8b72057f3dc489c1653eca093c42304f498 /src/fw
parent628b2e6b0e390e26d59b3c5db07a4226175b6f8a (diff)
downloadseabios-hppa-75b42835134553c96f113e5014072c0caf99d092.zip
seabios-hppa-75b42835134553c96f113e5014072c0caf99d092.tar.gz
seabios-hppa-75b42835134553c96f113e5014072c0caf99d092.tar.bz2
qemu: avoid debug prints if debugcon is not enabled
In order to speed up the boot phase, we can check the QEMU debugcon device, and disable the writes if it is not recognized. This patch allow us to save around 10 msec (time measured between SeaBIOS entry point and "linuxboot" entry point) when CONFIG_DEBUG_LEVEL=1 and debugcon is not enabled. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/fw')
-rw-r--r--src/fw/paravirt.c3
-rw-r--r--src/fw/paravirt.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c
index 0770c47..4fcd8f5 100644
--- a/src/fw/paravirt.c
+++ b/src/fw/paravirt.c
@@ -75,6 +75,9 @@ static void qemu_detect(void)
if (!CONFIG_QEMU_HARDWARE)
return;
+ // Setup QEMU debug output port
+ qemu_debug_preinit();
+
// check northbridge @ 00:00.0
u16 v = pci_config_readw(0, PCI_VENDOR_ID);
if (v == 0x0000 || v == 0xffff)
diff --git a/src/fw/paravirt.h b/src/fw/paravirt.h
index a14d83e..f7e1d4c 100644
--- a/src/fw/paravirt.h
+++ b/src/fw/paravirt.h
@@ -49,6 +49,9 @@ static inline int runningOnKVM(void) {
// QEMU_CFG_DMA ID bit
#define QEMU_CFG_VERSION_DMA 2
+// QEMU debugcon read value
+#define QEMU_DEBUGCON_READBACK 0xe9
+
int qemu_cfg_enabled(void);
int qemu_cfg_dma_enabled(void);
void qemu_preinit(void);