This series bears witness to my extreme cluelessness. With it I'm only asking if we can move the hypervisor/platform detection logic to SRCBOTH code, so that it sets up "PlatformRunningOn" for all of CSM, vgabios, and "normal" SeaBIOS. The motivation is that running on qemu is now a requirement for logging to the qemu debug port, and logging to that port would be nice in all flavors & parts.
The series applies to f8c70b87 ("Add UmbStart,UmbEnd fields to EFI_COMPATIBILITY16_TABLE") in git://git.infradead.org/users/dwmw2/seabios.git, which is basically 53d2ddd6 ("Minor - move definitions to paravirt.c from paravirt.h") from git://github.com/KevinOConnor/seabios.git plus the following patches from David:
eff724e Make Xen one of the top-level build target choices 60258aa Clean up Kconfig options for CSM 87f4dca Enable VGA output when settings bochs-specific mode 5b5356d Fix rom_reserve()/rom_confirm() for CSM oprom dispatch 6cca1bf Don't calibrate TSC if PMTIMER is already set up 2468d84 Move find_pmtimer() to ACPI table setup where it logically belongs 9d8ecac Use find_pmtimer() after copying Xen ACPI tables 7d95992 Use find_pmtimer() after copying coreboot ACPI tables 70ac823 Initialise BIOS tables (and hence PMTIMER) early for Coreboot and Xen b41a46f Reject non-compliant PCI option ROMs with unaligned PCIR structure 5c87ddb Unify return path for CSM to go via csm_return() f8c70b8 Add UmbStart,UmbEnd fields to EFI_COMPATIBILITY16_TABLE
I got the messages that I wanted, but I probably broke everything in the process. Another approach would be to replace the runtime runningOnQEMU() check in putc_debug() with the build-time constant
(CONFIG_QEMU || (CONFIG_CSM && CONFIG_QEMU_HARDWARE) || CONFIG_XEN)
condition.
Laszlo Ersek (5): add .config for CSM testing move hypervisor detection to "util.c" (SRCBOTH) vga_post(): detect hypervisors for the qemu debug port's sake Legacy16InitializeYourself(): detect hypervisors for the qemu debug port's sake make QEMU_HARDWARE mean "assume virtual hardware"
src/paravirt.h | 22 ------------- src/util.h | 29 +++++++++++++++++ src/misc.c | 2 - src/paravirt.c | 29 +---------------- src/xen.c | 30 +---------------- src/util.c | 66 ++++++++++++++++++++++++++++++++++++++ src/apm.c | 1 - src/esp-scsi.c | 1 - src/lsi-scsi.c | 1 - src/output.c | 1 - .config | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 - src/Kconfig | 9 +++-- src/csm.c | 3 ++ vgasrc/vgabios.c | 2 + 15 files changed, 201 insertions(+), 88 deletions(-) create mode 100644 .config