[SeaBIOS] [PATCH 1/4] add guest hint variable

Gerd Hoffmann posted 4 patches 1 week ago
[SeaBIOS] [PATCH 1/4] add guest hint variable
Posted by Gerd Hoffmann 1 week ago
This holds the hint whenever the guest is 32-bit or 64-bit, so
seabios can optimize the memory layout (pci bar placement)
accordingly.

Default is '32' for best backward compatibility.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 src/fw/paravirt.h | 1 +
 src/fw/paravirt.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/fw/paravirt.h b/src/fw/paravirt.h
index 62a2cd075d2b..cf28528e0261 100644
--- a/src/fw/paravirt.h
+++ b/src/fw/paravirt.h
@@ -33,6 +33,7 @@ extern u64 RamSizeOver4G;
 extern int PlatformRunningOn;
 extern u8 CPUPhysBits;
 extern u8 CPULongMode;
+extern u8 GuestHint;
 
 static inline int runningOnQEMU(void) {
     return CONFIG_QEMU || (
diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c
index e5d4eca0cb5a..fbd00f1c072f 100644
--- a/src/fw/paravirt.c
+++ b/src/fw/paravirt.c
@@ -36,6 +36,8 @@ u64 RamSizeOver4G;
 u8 CPUPhysBits;
 // 64bit processor
 u8 CPULongMode;
+// memory layout hint (32bit or 64bit guests).
+u8 GuestHint = 32;
 // Type of emulator platform.
 int PlatformRunningOn VARFSEG;
 // cfg enabled
-- 
2.47.0

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org