lkml.org 
[lkml]   [2010]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectWhat reassert_nmi() in default_do_nmi() is for?
From
Date
Hi, All,

When reading NMI handler code, I find there is reassert_nmi() in the end
of default_do_nmi(). And it is only called if the reason & 0xc0 != 0
(reason = inb(0x61)).

The comments for it is as follow:

/*
* Reassert NMI in case it became active meanwhile
* as it's edge-triggered:
*/
reassert_nmi();

The implementation of reassert_nmi is as follow:

static inline void reassert_nmi(void)
{
int old_reg = -1;

if (do_i_have_lock_cmos())
old_reg = current_lock_cmos_reg();
else
lock_cmos(0); /* register doesn't matter here */
outb(0x8f, 0x70);
inb(0x71); /* dummy */
outb(0x0f, 0x70);
inb(0x71); /* dummy */
if (old_reg >= 0)
outb(old_reg, 0x70);
else
unlock_cmos();
}

I can not understand the code and the logic. Can anyone explain it in
more detail?

Thanks,
Huang Ying




\
 
 \ /
  Last update: 2010-08-30 10:59    [W:0.114 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site