On 04-Sep-2003 [EMAIL PROTECTED] wrote:
> In <[EMAIL PROTECTED]>, on 09/04/03 
>    at 09:12 AM, Peter Pentchev <[EMAIL PROTECTED]> said:
> 
>>I haven't kept quite up to date on my x86 hardware lately (read: in the
>>past five to ten years), but I distinctly remember a time when everyone
>>referred to x86's NMI as a joke: a non-maskable interrupt that anyone
>>could mask using a simple CLI instruction.  Not sure if this is still the
>>case, others would have to say if today's processors still may get so
>>wedged that a NMI request would simply be ignored.
> 
> CLI doesn't stop an NMI, but you can mask off NMI in the CMOS RAM.  On
> standard PC-AT platforms anyway.

The bug is probably in FreeBSD in that we mask the NMI LVT entry in the
local APIC on all the APs and only leave it enabled in the BSP.  Thus,
if your NMI gets sent to one of the APs, it is effectively ignored.  You
can try fixing this in mpapic.c like so:

Index: mpapic.c
===================================================================
RCS file: /usr/cvs/src/sys/i386/i386/mpapic.c,v
retrieving revision 1.64
diff -u -r1.64 mpapic.c
--- mpapic.c    25 Aug 2003 09:48:47 -0000      1.64
+++ mpapic.c    4 Sep 2003 18:40:47 -0000
@@ -74,7 +74,9 @@
        /* setup LVT2 as NMI, masked till later... */
        temp = lapic.lvt_lint1;
        temp &= ~(APIC_LVT_M | APIC_LVT_TM | APIC_LVT_IIPP | APIC_LVT_DM);
-       temp |= 0x00010400;             /* masked, edge trigger, active hi */
+       temp |= 0x00000400;             /* edge trigger, active hi */
+       if (PCPU_GET(cpuid) == 0)
+               temp |= APIC_LVT_MSET;  /* masked till later */
 
        lapic.lvt_lint1 = temp;

-- 

John Baldwin <[EMAIL PROTECTED]>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to