remove trailing whitespace
[coreboot.git] / src / mainboard / asrock / e350m1 / mptable.c
index 78eec6a14a73b0153a880396f31a01af577f8fd1..960c2c86f1892bfc298d913645cf4c2d7d0eb339 100644 (file)
@@ -24,6 +24,7 @@
 #include <arch/io.h>
 #include <string.h>
 #include <stdint.h>
+#include <SBPLATFORM.h>
 
 extern u8 bus_sb800[2];
 
@@ -59,17 +60,14 @@ static void *smp_write_config_table(void *v)
   mptable_write_buses(mc, NULL, &bus_isa);
 
   /* I/O APICs:   APIC ID Version State   Address */
-  
+
   device_t dev;
   u32 dword;
   u8 byte;
-    
-  dword = 0;
-  dword = pm_ioread(0x34) & 0xF0;
-  dword |= (pm_ioread(0x35) & 0xFF) << 8;
-  dword |= (pm_ioread(0x36) & 0xFF) << 16;
-  dword |= (pm_ioread(0x37) & 0xFF) << 24;
-  smp_write_ioapic(mc, apicid_sb800, 0x11, dword);
+
+  ReadPMIO(SB_PMIOA_REG34, AccWidthUint32, &dword);
+  dword &= 0xFFFFFFF0;
+  smp_write_ioapic(mc, apicid_sb800, 0x21, dword);
 
   for (byte = 0x0; byte < sizeof(intr_data); byte ++) {
     outb(byte | 0x80, 0xC00);
@@ -110,7 +108,7 @@ static void *smp_write_config_table(void *v)
   /* PCI_INT(0x0, 0x14, 0x2, 0x12); */
 
   /* on board NIC & Slot PCIE.  */
-  
+
   /* PCI slots */
   /* PCI_SLOT 0. */
   PCI_INT(bus_sb800[1], 0x5, 0x0, 0x14);
@@ -149,17 +147,12 @@ static void *smp_write_config_table(void *v)
   /* There is no extension information... */
 
   /* Compute the checksums */
-  mc->mpe_checksum =
-      smp_compute_checksum(smp_next_mpc_entry(mc), mc->mpe_length);
-  mc->mpc_checksum = smp_compute_checksum(mc, mc->mpc_length);
-  printk(BIOS_DEBUG, "Wrote the mp table end at: %p - %p\n",
-         mc, smp_next_mpe_entry(mc));
-  return smp_next_mpe_entry(mc);
+  return mptable_finalize(mc);
 }
 
 unsigned long write_smp_table(unsigned long addr)
 {
   void *v;
-  v = smp_write_floating_table(addr);
+  v = smp_write_floating_table(addr, 0);
   return (unsigned long)smp_write_config_table(v);
 }