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 /hwsetup.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 'hwsetup.c')
-rw-r--r-- | hwsetup.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -94,7 +94,7 @@ void setup_pam(int bdf, int pambase) pci_config_writeb(bdf, pambase, 0x30); } -void setup_hw(void) +bool setup_hw(void) { const int bdf = 0; const uint8_t *bios_start = (void *)((uintptr_t)&stext + 0xfff00000); @@ -112,8 +112,9 @@ void setup_hw(void) setup_ich9(); setup_ich9_pm(); pambase = Q35_HOST_BRIDGE_PAM0; - } else - panic(); + } else { + return false; + } // Make ram from 0xc0000-0xf0000 read-write rom_check_value = rom_check; @@ -126,6 +127,8 @@ void setup_hw(void) memcpy(&sinit, init_start, &einit - &sinit); setup_pic(); + + return true; } #define Q35_HOST_BRIDGE_PCIEXBAREN 1 |