Patchwork [01/16] Port persimmon r6572 to e350m1: I/O APIC ID

login
register
about
Submitter mbuschman@lucidmachines.com
Date 2011-06-04 06:10:29
Message ID <1307167844-13392-1-git-send-email-mbuschman@lucidmachines.com>
Download mbox | patch
Permalink /patch/3021/
State Accepted
Headers show

Comments

mbuschman@lucidmachines.com - 2011-06-04 06:10:29
From: Scott Duplichan <scott@notabs.org>

1) Set I/O APIC ID according to BKDG recommendation
2) Correct I/O APIC ID reported by mptable

Signed-off-by: Marshall Buschman <mbuschman@lucidmachines.com>
---
 src/mainboard/asrock/e350m1/acpi_tables.c  |    2 +-
 src/mainboard/asrock/e350m1/get_bus_conf.c |    2 +-
 src/mainboard/asrock/e350m1/mptable.c      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Peter Stuge - 2011-06-04 15:54:26
mbuschman@lucidmachines.com wrote:
> From: Scott Duplichan <scott@notabs.org>
> 
> 1) Set I/O APIC ID according to BKDG recommendation
> 2) Correct I/O APIC ID reported by mptable
> 
> Signed-off-by: Marshall Buschman <mbuschman@lucidmachines.com>

All are either

Acked-by: Peter Stuge <peter@stuge.se>

or

Acked-by: Marshall Buschman <mbuschman@lucidmachines.com>

per IRC. Committed as r6621 to r6636.

Many thanks to Scott for these fixes to amd/persimmon, and to
Marshall for working on getting them over to asrock/e350m1, which
should now be functionally equivalent to amd/persimmon, as has also
been tested by Marshall.


//Peter
Scott - 2011-06-05 07:38:47
Peter Stuge wrote:

]All are either
]
]Acked-by: Peter Stuge <peter@stuge.se>
]
]or
]
]Acked-by: Marshall Buschman <mbuschman@lucidmachines.com>
]
]per IRC. Committed as r6621 to r6636.
]
]Many thanks to Scott for these fixes to amd/persimmon, and to
]Marshall for working on getting them over to asrock/e350m1, which
]should now be functionally equivalent to amd/persimmon, as has also
]been tested by Marshall.
]
]
]//Peter

Thank you Peter and Marshall. I will keep my e350m1 board around
for future testing and experiments.

Thanks,
Scott

Patch

diff --git a/src/mainboard/asrock/e350m1/acpi_tables.c b/src/mainboard/asrock/e350m1/acpi_tables.c
index 292aaad..20b0dc2 100644
--- a/src/mainboard/asrock/e350m1/acpi_tables.c
+++ b/src/mainboard/asrock/e350m1/acpi_tables.c
@@ -64,7 +64,7 @@  unsigned long acpi_fill_madt(unsigned long current)
   current = acpi_create_madt_lapics(current);
 
   /* Write SB800 IOAPIC, only one */
-  current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 2,
+  current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, CONFIG_MAX_CPUS,
              IO_APIC_ADDR, 0);
 
   current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
diff --git a/src/mainboard/asrock/e350m1/get_bus_conf.c b/src/mainboard/asrock/e350m1/get_bus_conf.c
index 9e148d0..5f48498 100644
--- a/src/mainboard/asrock/e350m1/get_bus_conf.c
+++ b/src/mainboard/asrock/e350m1/get_bus_conf.c
@@ -138,7 +138,7 @@  void get_bus_conf(void)
 
   /* I/O APICs:   APIC ID Version State   Address */
   bus_isa = 10;
-  apicid_base = CONFIG_MAX_PHYSICAL_CPUS;
+  apicid_base = CONFIG_MAX_CPUS;
 //#if CONFIG_LOGICAL_CPUS==1
 //  apicid_base = get_apicid_base(1);
 //#endif
diff --git a/src/mainboard/asrock/e350m1/mptable.c b/src/mainboard/asrock/e350m1/mptable.c
index 78eec6a..e286e6f 100644
--- a/src/mainboard/asrock/e350m1/mptable.c
+++ b/src/mainboard/asrock/e350m1/mptable.c
@@ -69,7 +69,7 @@  static void *smp_write_config_table(void *v)
   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);
+  smp_write_ioapic(mc, apicid_sb800, 0x21, dword);
 
   for (byte = 0x0; byte < sizeof(intr_data); byte ++) {
     outb(byte | 0x80, 0xC00);