diff options
author | Sergio Lopez <slp@redhat.com> | 2019-07-24 12:51:26 +0200 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2019-07-24 16:55:26 +0200 |
commit | 947bade3443facfb07f20ca10b4436bc9eb4ef27 (patch) | |
tree | 1479749ffff629b1ac1b8dd0b49e73cda835ed6d /main.c | |
parent | f8d4dd25732f518001bfbec1fae01902edabcb4b (diff) | |
download | qboot-947bade3443facfb07f20ca10b4436bc9eb4ef27.zip qboot-947bade3443facfb07f20ca10b4436bc9eb4ef27.tar.gz qboot-947bade3443facfb07f20ca10b4436bc9eb4ef27.tar.bz2 |
support machines without PCI
Instead of panicing when a PCI bus isn't found, continue booting
without PCI nor ACPI initialization.
Signed-off-by: Sergio Lopez <slp@redhat.com>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -79,10 +79,11 @@ static void extract_e820(void) int __attribute__ ((section (".text.startup"))) main(void) { + bool have_pci; #ifdef BENCHMARK_HACK outb(FW_EXIT_PORT, FW_START); #endif - setup_hw(); + have_pci = setup_hw(); // Only the 16-bit trampoline for vmlinuz and the 16-bit interrupt // handlers need to run from the F-segment, but keep things simple @@ -90,7 +91,9 @@ int __attribute__ ((section (".text.startup"))) main(void) asm("ljmp $0x8, $1f; 1:"); have_mmconfig = setup_mmconfig(); - setup_pci(); + if (have_pci) { + setup_pci(); + } setup_idt(); fw_cfg_setup(); extract_acpi(); |