FreeBSD/sys/x86/x86/mca.c
/* Called when a machine check exception fires. */
Called when a machine check exception fires.
Called when a machine check exception fires .
void
mca_intr(void)
{
	uint64_t mcg_status;
	int old_count, recoverable;
	if (!(cpu_feature & CPUID_MCA)) {
		printf("MC Type: 0x%jx  Address: 0x%jx\n",
		    (uintmax_t)rdmsr(MSR_P5_MC_TYPE),
		    (uintmax_t)rdmsr(MSR_P5_MC_ADDR));
		panic("Machine check");
	}
	old_count = mca_count;
	recoverable = mca_scan(MCE);
	mcg_status = rdmsr(MSR_MCG_STATUS);
	if (!(mcg_status & MCG_STATUS_RIPV))
		recoverable = 0;
	if (!recoverable) {
		while (mca_count == old_count)
			cpu_spinwait();
		panic("Unrecoverable machine check exception");
	}
	wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP);
}
void mca_intr ( void ) { uint64_t mcg_status ; int old_count , recoverable ; if ( ! ( cpu_feature & CPUID_MCA ) ) { printf ( " \n " , ( uintmax_t ) rdmsr ( MSR_P5_MC_TYPE ) , ( uintmax_t ) rdmsr ( MSR_P5_MC_ADDR ) ) ; panic ( " " ) ; } old_count = mca_count ; recoverable = mca_scan ( MCE ) ; mcg_status = rdmsr ( MSR_MCG_STATUS ) ; if ( ! ( mcg_status & MCG_STATUS_RIPV ) ) recoverable = 0 ; if ( ! recoverable ) { while ( mca_count == old_count ) cpu_spinwait ( ) ; panic ( " " ) ; } wrmsr ( MSR_MCG_STATUS , mcg_status & ~ MCG_STATUS_MCIP ) ; }
Called when a machine check exception fires.
Called when a machine check exception fires .
/*
		 * Just print the values of the old Pentium registers
		 * and panic.
		 */ /* Scan the banks and check for any non-recoverable errors. */ /*
		 * Wait for at least one error to be logged before
		 * panic'ing.  Some errors will assert a machine check
		 * on all CPUs, but only certain CPUs will find a valid
		 * bank to log.
		 */ /* Clear MCIP. */