diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2009-10-12 09:27:45 -0400 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2009-12-07 13:14:27 -0500 |
commit | e97f8bb8ce5611a855c5a0dba949706ec37d4155 (patch) | |
tree | 4cf8e1a9060b4c5d2622208112d46a28db92849b /drivers/edac/amd64_edac.c | |
parent | 72381bd55e4ce2aaed8660551e8f56a2c959c11f (diff) |
amd64_edac: make DRAM regions output more human-readable
Do not shift the TOP_MEM and TOP_MEM2 values by 23 but rather save the
whole 64-bit value read from the MSR. Although the TOP_MEM/TOP_MEM2 bits
are only a subset of the 64bit register, the values are correct since
the remaining bits are Read-As-Zero and no shifting is needed.
Also, cleanup DRAM base/limit debug output.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.c')
-rw-r--r-- | drivers/edac/amd64_edac.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 0252a61f3d26..3408b94b1181 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
@@ -2399,16 +2399,14 @@ static void amd64_read_mc_registers(struct amd64_pvt *pvt) | |||
2399 | * Retrieve TOP_MEM and TOP_MEM2; no masking off of reserved bits since | 2399 | * Retrieve TOP_MEM and TOP_MEM2; no masking off of reserved bits since |
2400 | * those are Read-As-Zero | 2400 | * those are Read-As-Zero |
2401 | */ | 2401 | */ |
2402 | rdmsrl(MSR_K8_TOP_MEM1, msr_val); | 2402 | rdmsrl(MSR_K8_TOP_MEM1, pvt->top_mem); |
2403 | pvt->top_mem = msr_val >> 23; | 2403 | debugf0(" TOP_MEM: 0x%016llx\n", pvt->top_mem); |
2404 | debugf0(" TOP_MEM=0x%08llx\n", pvt->top_mem); | ||
2405 | 2404 | ||
2406 | /* check first whether TOP_MEM2 is enabled */ | 2405 | /* check first whether TOP_MEM2 is enabled */ |
2407 | rdmsrl(MSR_K8_SYSCFG, msr_val); | 2406 | rdmsrl(MSR_K8_SYSCFG, msr_val); |
2408 | if (msr_val & (1U << 21)) { | 2407 | if (msr_val & (1U << 21)) { |
2409 | rdmsrl(MSR_K8_TOP_MEM2, msr_val); | 2408 | rdmsrl(MSR_K8_TOP_MEM2, pvt->top_mem2); |
2410 | pvt->top_mem2 = msr_val >> 23; | 2409 | debugf0(" TOP_MEM2: 0x%016llx\n", pvt->top_mem2); |
2411 | debugf0(" TOP_MEM2=0x%08llx\n", pvt->top_mem2); | ||
2412 | } else | 2410 | } else |
2413 | debugf0(" TOP_MEM2 disabled.\n"); | 2411 | debugf0(" TOP_MEM2 disabled.\n"); |
2414 | 2412 | ||
@@ -2434,13 +2432,12 @@ static void amd64_read_mc_registers(struct amd64_pvt *pvt) | |||
2434 | * debug output block away. | 2432 | * debug output block away. |
2435 | */ | 2433 | */ |
2436 | if (pvt->dram_rw_en[dram] != 0) { | 2434 | if (pvt->dram_rw_en[dram] != 0) { |
2437 | debugf1(" DRAM_BASE[%d]: 0x%8.08x-%8.08x " | 2435 | debugf1(" DRAM-BASE[%d]: 0x%016llx " |
2438 | "DRAM_LIMIT: 0x%8.08x-%8.08x\n", | 2436 | "DRAM-LIMIT: 0x%016llx\n", |
2439 | dram, | 2437 | dram, |
2440 | (u32)(pvt->dram_base[dram] >> 32), | 2438 | pvt->dram_base[dram], |
2441 | (u32)(pvt->dram_base[dram] & 0xFFFFFFFF), | 2439 | pvt->dram_limit[dram]); |
2442 | (u32)(pvt->dram_limit[dram] >> 32), | 2440 | |
2443 | (u32)(pvt->dram_limit[dram] & 0xFFFFFFFF)); | ||
2444 | debugf1(" IntlvEn=%s %s %s " | 2441 | debugf1(" IntlvEn=%s %s %s " |
2445 | "IntlvSel=%d DstNode=%d\n", | 2442 | "IntlvSel=%d DstNode=%d\n", |
2446 | pvt->dram_IntlvEn[dram] ? | 2443 | pvt->dram_IntlvEn[dram] ? |