From a6c525a7d5ad0dedc31dcc9719be6bc5fbc743dd Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Wed, 16 Apr 2014 09:43:40 +0300 Subject: AMD AGESA cimx/sb700: Drop APIC_ID_OFFSET and MAX_PHYSICAL_CPUS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Following boards use cimx/sb700: amd/dinar supermicro/h8qgi supermicro/h8scm tyan/s8226 Only amd/dinar had APIC_ID_OFFSET defined, thus all had 0x0. There was a nonsense preprocessor directive (MAX_CPUS * MAX_PHYSICAL_CPUS >= 1). Except for tyan, (MAX_CPUS * MAX_PHYSICAL_CPUS) % 256 == 0. Together with documented 4-bit restriction for APIC ID field, this APIC ID programming matches with MP tables and ACPI tables. I believe this would also fix cases of cimx/sb700 with MAX_CPUS<16, which we do not have in the tree. Change-Id: If8d65e95788ba02fc8d331a7af03a4d0d8cf5c69 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/5539 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc --- src/mainboard/tyan/s8226/Kconfig | 4 ---- src/mainboard/tyan/s8226/acpi_tables.c | 11 +++++------ src/mainboard/tyan/s8226/mptable.c | 9 ++++----- 3 files changed, 9 insertions(+), 15 deletions(-) (limited to 'src/mainboard/tyan') diff --git a/src/mainboard/tyan/s8226/Kconfig b/src/mainboard/tyan/s8226/Kconfig index 68ce152869..e8d2f88b8b 100644 --- a/src/mainboard/tyan/s8226/Kconfig +++ b/src/mainboard/tyan/s8226/Kconfig @@ -54,10 +54,6 @@ config MAX_CPUS int default 64 -config MAX_PHYSICAL_CPUS - int - default 2 - config HW_MEM_HOLE_SIZE_AUTO_INC bool default n diff --git a/src/mainboard/tyan/s8226/acpi_tables.c b/src/mainboard/tyan/s8226/acpi_tables.c index 0cac9148c9..fde10f182a 100644 --- a/src/mainboard/tyan/s8226/acpi_tables.c +++ b/src/mainboard/tyan/s8226/acpi_tables.c @@ -72,12 +72,11 @@ unsigned long acpi_fill_madt(unsigned long current) * For systems with < 16 APICs, put the Local-APICs at 0..n and * put the IO-APICs at (n + 1)..z */ -#if CONFIG_MAX_CPUS >= 16 - apicid_sp5100 = 0x0; -#else - apicid_sp5100 = CONFIG_MAX_CPUS + 1 -#endif - apicid_sr5650 = apicid_sp5100 + 1; + if (CONFIG_MAX_CPUS >= 16) + apicid_sp5100 = 0x0; + else + apicid_sp5100 = CONFIG_MAX_CPUS + 1; + apicid_sr5650 = apicid_sp5100 + 1; /* create all subtables for processors */ current = acpi_create_madt_lapics(current); diff --git a/src/mainboard/tyan/s8226/mptable.c b/src/mainboard/tyan/s8226/mptable.c index c10a21950d..0365ae6611 100644 --- a/src/mainboard/tyan/s8226/mptable.c +++ b/src/mainboard/tyan/s8226/mptable.c @@ -58,11 +58,10 @@ static void *smp_write_config_table(void *v) * For systems with < 16 APICs, put the Local-APICs at 0..n and * put the IO-APICs at (n + 1)..z */ -#if CONFIG_MAX_CPUS >= 16 - apicid_sp5100 = 0x0; -#else - apicid_sp5100 = CONFIG_MAX_CPUS + 1 -#endif + if (CONFIG_MAX_CPUS >= 16) + apicid_sp5100 = 0x0; + else + apicid_sp5100 = CONFIG_MAX_CPUS + 1; apicid_sr5650 = apicid_sp5100 + 1; dev = dev_find_slot(0, PCI_DEVFN(sbdn_sp5100 + 0x14, 0)); -- cgit v1.2.3