aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-11-28 11:56:37 -0500
committerKevin O'Connor <kevin@koconnor.net>2008-11-28 11:56:37 -0500
commitcf89e66e88cc9e6cdb03a9d296827bd7d246a412 (patch)
tree3d29e716e39d9d3678333bcfa0a4833f2aa5234f /src
parentd21c089acf7016bb22ab81a96c5e20ca8075e3ea (diff)
downloadseabios-hppa-cf89e66e88cc9e6cdb03a9d296827bd7d246a412.zip
seabios-hppa-cf89e66e88cc9e6cdb03a9d296827bd7d246a412.tar.gz
seabios-hppa-cf89e66e88cc9e6cdb03a9d296827bd7d246a412.tar.bz2
Fix bug - bios writes must be enabled before max PCI bus detected.
The max pci bus is stored in the bios segment, so it must be writable. So, use a default max size (1 pci bus) for the initial write enable device scan and then do the full max bus check after write is enabled.
Diffstat (limited to 'src')
-rw-r--r--src/pci.c2
-rw-r--r--src/post.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pci.c b/src/pci.c
index f586886..91a7ca5 100644
--- a/src/pci.c
+++ b/src/pci.c
@@ -49,7 +49,7 @@ u8 pci_config_readb(u16 bdf, u32 addr)
}
#if MODE16
-int MaxBDF VISIBLE16;
+int MaxBDF VISIBLE16 = 0x0100;
#endif
// Find the maximum bus number.
diff --git a/src/post.c b/src/post.c
index 6f407d9..03049ee 100644
--- a/src/post.c
+++ b/src/post.c
@@ -195,6 +195,8 @@ post()
timer_setup();
mathcp_setup();
+ pci_bus_setup();
+
memmap_setup();
ram_probe();
@@ -276,8 +278,6 @@ _start()
debug_serial_setup();
dprintf(1, "Start bios\n");
- pci_bus_setup();
-
// Setup for .bss and .data sections
make_bios_writable();
clear_bss();