Do PCI initialization before vga init.

The VGA init could depend on the PCI init.
diff --git a/src/pciinit.c b/src/pciinit.c
index 0d558a9..fffbd1e 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
@@ -77,7 +77,7 @@
 
         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 @@
 }
 
 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;
diff --git a/src/post.c b/src/post.c
index 0cedb08..e2569b0 100644
--- a/src/post.c
+++ b/src/post.c
@@ -171,6 +171,9 @@
     malloc_setup();
     pmm_setup();
 
+    pci_setup();
+    smm_init();
+
     pnp_setup();
     vga_setup();
 
@@ -179,9 +182,6 @@
     serial_setup();
     mouse_setup();
 
-    pci_bios_setup();
-    smm_init();
-
     init_bios_tables();
 
     boot_setup();
diff --git a/src/util.h b/src/util.h
index a8f75a3..c18fbba 100644
--- a/src/util.h
+++ b/src/util.h
@@ -205,7 +205,7 @@
 void make_bios_readonly();
 
 // pciinit.c
-void pci_bios_setup(void);
+void pci_setup(void);
 
 // smm.c
 void smm_init();