summaryrefslogtreecommitdiff
path: root/src/northbridge/amd
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/amd')
-rw-r--r--src/northbridge/amd/pi/00630F01/northbridge.c18
-rw-r--r--src/northbridge/amd/pi/00660F01/northbridge.c14
-rw-r--r--src/northbridge/amd/pi/00730F01/northbridge.c18
-rw-r--r--src/northbridge/amd/pi/Kconfig4
4 files changed, 16 insertions, 38 deletions
diff --git a/src/northbridge/amd/pi/00630F01/northbridge.c b/src/northbridge/amd/pi/00630F01/northbridge.c
index 40d3e0577c..6bb121707e 100644
--- a/src/northbridge/amd/pi/00630F01/northbridge.c
+++ b/src/northbridge/amd/pi/00630F01/northbridge.c
@@ -27,7 +27,6 @@
#include <cpu/cpu.h>
#include <Porting.h>
#include <AGESA.h>
-#include <FieldAccessors.h>
#include <Topology.h>
#include <cpu/x86/lapic.h>
#include <cpu/amd/msr.h>
@@ -798,21 +797,12 @@ static void cpu_bus_scan(struct device *dev)
int siblings = 0;
unsigned int family;
u32 modules = 0;
- VOID* modules_ptr = &modules;
- BUILD_OPT_CFG* options = NULL;
int ioapic_count = 0;
- // TODO Remove the printk's.
- printk(BIOS_SPEW, "KaveriPI Debug: Grabbing the AMD Topology Information.\n");
- AmdGetValue(AMD_GLOBAL_USER_OPTIONS, (VOID**)&options, sizeof(options));
- AmdGetValue(AMD_GLOBAL_NUM_MODULES, &modules_ptr, sizeof(modules));
- modules = *(u32*)modules_ptr;
- ASSERT(modules > 0);
- ASSERT(options);
- ioapic_count = (int)options->CfgPlatNumIoApics;
- ASSERT(ioapic_count > 0);
- printk(BIOS_SPEW, "KaveriPI Debug: AMD Topology Number of Modules (@0x%p) is %d\n", modules_ptr, modules);
- printk(BIOS_SPEW, "KaveriPI Debug: AMD Topology Number of IOAPICs (@0x%p) is %d\n", options, (int)(options->CfgPlatNumIoApics));
+ /* For binaryPI there is no multiprocessor configuration, the number of
+ * modules will always be 1. */
+ modules = 1;
+ ioapic_count = CONFIG_NUM_OF_IOAPICS;
dev_mc = pcidev_on_root(DEV_CDB, 0);
if (!dev_mc) {
diff --git a/src/northbridge/amd/pi/00660F01/northbridge.c b/src/northbridge/amd/pi/00660F01/northbridge.c
index 533b651427..723e6f474d 100644
--- a/src/northbridge/amd/pi/00660F01/northbridge.c
+++ b/src/northbridge/amd/pi/00660F01/northbridge.c
@@ -27,7 +27,6 @@
#include <cpu/cpu.h>
#include <Porting.h>
#include <AGESA.h>
-#include <FieldAccessors.h>
#include <Topology.h>
#include <cpu/x86/lapic.h>
#include <cpu/amd/msr.h>
@@ -796,17 +795,12 @@ static void cpu_bus_scan(struct device *dev)
int siblings = 0;
unsigned int family;
u32 modules = 0;
- VOID* modules_ptr = &modules;
- BUILD_OPT_CFG* options = NULL;
int ioapic_count = 0;
- AmdGetValue(AMD_GLOBAL_USER_OPTIONS, (VOID**)&options, sizeof(options));
- AmdGetValue(AMD_GLOBAL_NUM_MODULES, &modules_ptr, sizeof(modules));
- modules = (*(u32 *)modules_ptr) & ((1ull << (sizeof(modules) * 8)) - 1);
- ASSERT(modules > 0);
- ASSERT(options);
- ioapic_count = (int)options->CfgPlatNumIoApics;
- ASSERT(ioapic_count > 0);
+ /* For binaryPI there is no multiprocessor configuration, the number of
+ * modules will always be 1. */
+ modules = 1;
+ ioapic_count = CONFIG_NUM_OF_IOAPICS;
dev_mc = pcidev_on_root(DEV_CDB, 0);
if (!dev_mc) {
diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c
index 27e14f5df5..3d7b883d17 100644
--- a/src/northbridge/amd/pi/00730F01/northbridge.c
+++ b/src/northbridge/amd/pi/00730F01/northbridge.c
@@ -29,7 +29,6 @@
#include <cpu/cpu.h>
#include <Porting.h>
#include <AGESA.h>
-#include <FieldAccessors.h>
#include <Topology.h>
#include <cpu/x86/lapic.h>
#include <cpu/amd/msr.h>
@@ -1031,21 +1030,12 @@ static void cpu_bus_scan(struct device *dev)
int siblings = 0;
unsigned int family;
u32 modules = 0;
- VOID* modules_ptr = &modules;
- BUILD_OPT_CFG* options = NULL;
int ioapic_count = 0;
- // TODO Remove the printk's.
- printk(BIOS_SPEW, "MullinsPI Debug: Grabbing the AMD Topology Information.\n");
- AmdGetValue(AMD_GLOBAL_USER_OPTIONS, (VOID**)&options, sizeof(options));
- AmdGetValue(AMD_GLOBAL_NUM_MODULES, &modules_ptr, sizeof(modules));
- modules = *(u32*)modules_ptr;
- ASSERT(modules > 0);
- ASSERT(options);
- ioapic_count = (int)options->CfgPlatNumIoApics;
- ASSERT(ioapic_count > 0);
- printk(BIOS_SPEW, "MullinsPI Debug: AMD Topology Number of Modules (@0x%p) is %d\n", modules_ptr, modules);
- printk(BIOS_SPEW, "MullinsPI Debug: AMD Topology Number of IOAPICs (@0x%p) is %d\n", options, (int)options->CfgPlatNumIoApics);
+ /* For binaryPI there is no multiprocessor configuration, the number of
+ * modules will always be 1. */
+ modules = 1;
+ ioapic_count = CONFIG_NUM_OF_IOAPICS;
dev_mc = pcidev_on_root(DEV_CDB, 0);
if (!dev_mc) {
diff --git a/src/northbridge/amd/pi/Kconfig b/src/northbridge/amd/pi/Kconfig
index 4fbcd4aad4..167d957268 100644
--- a/src/northbridge/amd/pi/Kconfig
+++ b/src/northbridge/amd/pi/Kconfig
@@ -54,4 +54,8 @@ config HEAP_SIZE
hex
default 0xc0000
+config NUM_OF_IOAPICS
+ int
+ default 3
+
endif # NORTHBRIDGE_AMD_PI