patch-2.4.25 linux-2.4.25/arch/x86_64/kernel/bluesmoke.c
Next file: linux-2.4.25/arch/x86_64/kernel/e820.c
Previous file: linux-2.4.25/arch/x86_64/kernel/acpi.c
Back to the patch index
Back to the overall index
- Lines: 132
- Date:
2004-02-18 05:36:31.000000000 -0800
- Orig file:
linux-2.4.24/arch/x86_64/kernel/bluesmoke.c
- Orig date:
2003-11-28 10:26:19.000000000 -0800
diff -urN linux-2.4.24/arch/x86_64/kernel/bluesmoke.c linux-2.4.25/arch/x86_64/kernel/bluesmoke.c
@@ -25,14 +25,6 @@
static int banks;
static unsigned long ignored_banks, disabled_banks;
-/* Machine Check on everything dubious. This is a good setting
- for device driver testing. */
-#define K8_DRIVER_DEBUG ((1<<13)-1)
-/* Report RAM errors and Hyper Transport Problems, but ignore Device
- aborts and GART errors. */
-#define K8_NORMAL_OP 0xff
-static u32 k8_nb_flags __initdata = K8_NORMAL_OP;
-
static void generic_machine_check(struct pt_regs * regs, long error_code)
{
int recover=1;
@@ -201,53 +193,48 @@
if (header)
printk(KERN_ERR "CPU %d: Silent Northbridge MCE\n", smp_processor_id());
- printk(KERN_ERR "Northbridge status %08x%08x\n",
+ printk(KERN_ERR "Northbridge status %08x:%08x\n",
statushigh,statuslow);
+ printk(KERN_ERR " Error %s\n", extendederr[(statuslow >> 16) & 0xf]);
+
unsigned short errcode = statuslow & 0xffff;
- switch (errcode >> 8) {
- case 0:
+ switch ((statuslow >> 16) & 0xF) {
+ case 5:
printk(KERN_ERR " GART TLB error %s %s\n",
transaction[(errcode >> 2) & 3],
cachelevel[errcode & 3]);
break;
- case 1:
- if (errcode & (1<<11)) {
- printk(KERN_ERR " bus error %s %s %s %s %s\n",
- partproc[(errcode >> 10) & 0x3],
- timeout[(errcode >> 9) & 1],
+ case 8:
+ printk(KERN_ERR " ECC error syndrome %x\n",
+ (((statuslow >> 24) & 0xff) << 8) | ((statushigh >> 15) & 0x7f));
+ /*FALL THROUGH*/
+ default:
+ printk(KERN_ERR " bus error %s, %s\n %s\n %s, %s\n",
+ partproc[(errcode >> 9) & 0x3],
+ timeout[(errcode >> 8) & 1],
memtrans[(errcode >> 4) & 0xf],
memoryio[(errcode >> 2) & 0x3],
cachelevel[(errcode & 0x3)]);
- } else if (errcode & (1<<8)) {
- printk(KERN_ERR " memory error %s %s %s\n",
- memtrans[(errcode >> 4) & 0xf],
- transaction[(errcode >> 2) & 0x3],
- cachelevel[(errcode & 0x3)]);
- } else {
- printk(KERN_ERR " unknown error code %x\n", errcode);
- }
+ /* should only print when it was a HyperTransport related error. */
+ printk(KERN_ERR " link number %x\n", (statushigh >> 4) & 3);
break;
}
- if (statushigh & ((1<<14)|(1<<13)))
- printk(KERN_ERR " ECC syndrome bits %x\n",
- (((statuslow >> 24) & 0xff) << 8) | ((statushigh >> 15) & 0x7f));
- errcode = (statuslow >> 16) & 0xf;
- printk(KERN_ERR " extended error %s\n", extendederr[(statuslow >> 16) & 0xf]);
- /* should only print when it was a HyperTransport related error. */
- printk(KERN_ERR " link number %x\n", (statushigh >> 4) & 3);
int i;
- for (i = 0; i < 32; i++)
+ for (i = 0; i < 32; i++) {
+ if (i == 26 || i == 28)
+ continue;
if (highbits[i] && (statushigh & (1<<i)))
printk(KERN_ERR " %s\n", highbits[i]);
+ }
if (statushigh & (1<<26)) {
u32 addrhigh, addrlow;
pci_read_config_dword(nb, 0x54, &addrhigh);
pci_read_config_dword(nb, 0x50, &addrlow);
- printk(KERN_ERR " error address %08x%08x\n", addrhigh,addrlow);
+ printk(KERN_ERR " NB error address %08x%08x\n", addrhigh,addrlow);
}
statushigh &= ~(1<<31);
pci_write_config_dword(nb, 0x4c, statushigh);
@@ -293,9 +280,6 @@
wrmsrl(MSR_IA32_MC0_STATUS+4*4, 0);
wrmsrl(MSR_IA32_MCG_STATUS, 0);
- if (regs && (status & (1<<1)))
- printk(KERN_EMERG "MCE at EIP %lx ESP %lx\n", regs->rip, regs->rsp);
-
others:
generic_machine_check(regs, error_code);
}
@@ -353,12 +337,13 @@
machine_check_vector = k8_machine_check;
for (i = 0; i < banks; i++) {
u64 val = ((1UL<<i) & disabled_banks) ? 0 : ~0UL;
- if (val && i == 4)
- val = k8_nb_flags;
wrmsrl(MSR_IA32_MC0_CTL+4*i, val);
wrmsrl(MSR_IA32_MC0_STATUS+4*i,0);
}
+ if (cap & (1<<8))
+ wrmsrl(MSR_IA32_MCG_CTL, 0xffffffffffffffffULL);
+
set_in_cr4(X86_CR4_MCE);
if (mcheck_interval && (smp_processor_id() == 0)) {
@@ -455,7 +440,6 @@
mce=nok8 disable k8 specific features
mce=disable<NUMBER> disable bank NUMBER
mce=enable<NUMBER> enable bank number
- mce=device Enable device driver test reporting in NB
mce=NUMBER mcheck timer interval number seconds.
Can be also comma separated in a single mce= */
static int __init mcheck_enable(char *str)
@@ -472,8 +456,6 @@
disabled_banks |= ~(1<<simple_strtol(p+7,NULL,0));
else if (!strcmp(p,"nok8"))
nok8 = 1;
- else if (!strcmp(p,"device"))
- k8_nb_flags = K8_DRIVER_DEBUG;
}
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)