Do PCI initialization before vga init.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 13 Sep 2009 14:46:57 +0000 (10:46 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 13 Sep 2009 14:46:57 +0000 (10:46 -0400)
The VGA init could depend on the PCI init.

src/pciinit.c
src/post.c
src/util.h

index 0d558a98ee91d407f816ee13dc2b943674a13390..fffbd1e6dbdbdf26011ec111e3f96f96a8f3e791 100644 (file)
@@ -77,7 +77,7 @@ static void pci_bios_init_bridges(u16 bdf)
 
         elcr[0] = 0x00;
         elcr[1] = 0x00;
-        for(i = 0; i < 4; i++) {
+        for (i = 0; i < 4; i++) {
             irq = pci_irqs[i];
             /* set to trigger level */
             elcr[irq >> 3] |= (1 << (irq & 7));
@@ -188,12 +188,14 @@ static void pci_bios_init_device(u16 bdf)
 }
 
 void
-pci_bios_setup(void)
+pci_setup(void)
 {
     if (CONFIG_COREBOOT)
         // Already done by coreboot.
         return;
 
+    dprintf(3, "pci setup\n");
+
     pci_bios_io_addr = 0xc000;
     pci_bios_mem_addr = 0xc0000000;
     pci_bios_bigmem_addr = RamSize;
index 0cedb08c89848e96da7cceb75b015462cef2b7d2..e2569b0cd770fae25734a562b25b278498e365cc 100644 (file)
@@ -171,6 +171,9 @@ post()
     malloc_setup();
     pmm_setup();
 
+    pci_setup();
+    smm_init();
+
     pnp_setup();
     vga_setup();
 
@@ -179,9 +182,6 @@ post()
     serial_setup();
     mouse_setup();
 
-    pci_bios_setup();
-    smm_init();
-
     init_bios_tables();
 
     boot_setup();
index a8f75a3caee18f063be507290d311b6b60f4d0cf..c18fbbaa9763b620a3f93b9dbc2f90270c2bf16c 100644 (file)
@@ -205,7 +205,7 @@ void make_bios_writable();
 void make_bios_readonly();
 
 // pciinit.c
-void pci_bios_setup(void);
+void pci_setup(void);
 
 // smm.c
 void smm_init();