aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/amd/family_10h-family_15h/init_cpus.c
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineeringinc.com>2015-08-02 21:06:39 -0500
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-11-20 20:32:19 +0100
commit0f1553b89a226d368f2accd443911a443b8d3a75 (patch)
tree8b295c2951f44906fdae9ef10ec168b29ae2b43a /src/cpu/amd/family_10h-family_15h/init_cpus.c
parent5ff2502151d55349cd8d9c565d3bf5b14f91afa5 (diff)
nb/amd/amdfam10: Add HyperTransport probe filter support
All modern Opteron processors support the HT probe filter, which helps to increase coherent fabric performance by reducing the number of HT transactions per cache probe. AMD recommends that the probe filter be enabled on all systems with more than two nodes, and it does not hurt to enable it on systems with 2 nodes. Change-Id: I00a27a828260be8685ae622cfa5a4995add95a8e Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-on: http://review.coreboot.org/12021 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/cpu/amd/family_10h-family_15h/init_cpus.c')
-rw-r--r--src/cpu/amd/family_10h-family_15h/init_cpus.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/cpu/amd/family_10h-family_15h/init_cpus.c b/src/cpu/amd/family_10h-family_15h/init_cpus.c
index 14d8642083..530ffd2c6f 100644
--- a/src/cpu/amd/family_10h-family_15h/init_cpus.c
+++ b/src/cpu/amd/family_10h-family_15h/init_cpus.c
@@ -347,9 +347,11 @@ static void STOP_CAR_AND_CPU(uint8_t skip_sharedc_config, uint32_t apicid)
static u32 init_cpus(u32 cpu_init_detectedx, struct sys_info *sysinfo)
{
- u32 bsp_apicid = 0;
- u32 apicid;
+ uint32_t bsp_apicid = 0;
+ uint32_t apicid;
+ uint32_t dword;
uint8_t set_mtrrs;
+ uint8_t node_count;
struct node_core_id id;
/* Please refer to the calculations and explaination in cache_as_ram.inc before modifying these values */
@@ -441,6 +443,18 @@ static u32 init_cpus(u32 cpu_init_detectedx, struct sys_info *sysinfo)
cpuSetAMDMSR(id.nodeid);
+ /* Set up HyperTransport probe filter support */
+ if (is_gt_rev_d()) {
+ dword = pci_read_config32(NODE_PCI(id.nodeid, 0), 0x60);
+ node_count = ((dword >> 4) & 0x7) + 1;
+
+ if (node_count > 1) {
+ msr_t msr = rdmsr(BU_CFG2_MSR);
+ msr.hi |= 1 << (42 - 32);
+ wrmsr(BU_CFG2_MSR, msr);
+ }
+ }
+
#if CONFIG_SET_FIDVID
#if CONFIG_LOGICAL_CPUS && CONFIG_SET_FIDVID_CORE0_ONLY
// Run on all AP for proper FID/VID setup.