diff --git a/src/cpu/amd/dualcore/dualcore_id.c b/src/cpu/amd/dualcore/dualcore_id.c index c8c8d8d443..67beb94dd5 100644 --- a/src/cpu/amd/dualcore/dualcore_id.c +++ b/src/cpu/amd/dualcore/dualcore_id.c @@ -47,8 +47,9 @@ static inline unsigned get_core_num(void) return (cpuid_ecx(0x80000008) & 0xff); } -static inline struct node_core_id get_node_core_id_x(void) { +static inline struct node_core_id get_node_core_id_x(void) +{ - return get_node_core_id( read_nb_cfg_54() ); // for pre_e0() nb_cfg_54 always be 0 + return get_node_core_id(read_nb_cfg_54()); // for pre_e0() nb_cfg_54 always be 0 } diff --git a/src/cpu/amd/quadcore/quadcore_id.c b/src/cpu/amd/quadcore/quadcore_id.c index 4597f6b70d..c4eab24a80 100644 --- a/src/cpu/amd/quadcore/quadcore_id.c +++ b/src/cpu/amd/quadcore/quadcore_id.c @@ -72,8 +72,8 @@ static u32 get_core_num(void) return (cpuid_ecx(0x80000008) & 0xff); } -static struct node_core_id get_node_core_id_x(void) { - - return get_node_core_id( read_nb_cfg_54() ); +static struct node_core_id get_node_core_id_x(void) +{ + return get_node_core_id(read_nb_cfg_54()); } diff --git a/src/mainboard/amd/serengeti_cheetah/apc_auto.c b/src/mainboard/amd/serengeti_cheetah/apc_auto.c index a69ae164e1..63a8a085eb 100644 --- a/src/mainboard/amd/serengeti_cheetah/apc_auto.c +++ b/src/mainboard/amd/serengeti_cheetah/apc_auto.c @@ -62,6 +62,11 @@ static void post_code(uint8_t value) { #include "northbridge/amd/amdk8/amdk8_f_pci.c" #include "northbridge/amd/amdk8/raminit_f_dqs.c" +static inline unsigned get_nodes(void) +{ + return ((pci_read_config32(PCI_DEV(0, 0x18, 0), 0x60)>>4) & 7) + 1; +} + #include "cpu/amd/dualcore/dualcore.c" void hardwaremain(int ret_addr) diff --git a/src/mainboard/supermicro/h8dme/apc_auto.c b/src/mainboard/supermicro/h8dme/apc_auto.c index b514715e3f..6e8f301626 100644 --- a/src/mainboard/supermicro/h8dme/apc_auto.c +++ b/src/mainboard/supermicro/h8dme/apc_auto.c @@ -82,6 +82,11 @@ static void post_code(uint8_t value) { #include "northbridge/amd/amdk8/amdk8_f_pci.c" #include "northbridge/amd/amdk8/raminit_f_dqs.c" +static inline unsigned get_nodes(void) +{ + return ((pci_read_config32(PCI_DEV(0, 0x18, 0), 0x60)>>4) & 7) + 1; +} + #include "cpu/amd/dualcore/dualcore.c" void hardwaremain(int ret_addr) diff --git a/src/mainboard/supermicro/h8dmr/apc_auto.c b/src/mainboard/supermicro/h8dmr/apc_auto.c index b514715e3f..6e8f301626 100644 --- a/src/mainboard/supermicro/h8dmr/apc_auto.c +++ b/src/mainboard/supermicro/h8dmr/apc_auto.c @@ -82,6 +82,11 @@ static void post_code(uint8_t value) { #include "northbridge/amd/amdk8/amdk8_f_pci.c" #include "northbridge/amd/amdk8/raminit_f_dqs.c" +static inline unsigned get_nodes(void) +{ + return ((pci_read_config32(PCI_DEV(0, 0x18, 0), 0x60)>>4) & 7) + 1; +} + #include "cpu/amd/dualcore/dualcore.c" void hardwaremain(int ret_addr)