]> xenbits.xensource.com Git - seabios.git/commitdiff
rtc: Disable NMI in rtc_mask()
authorKevin O'Connor <kevin@koconnor.net>
Tue, 1 Sep 2015 23:43:08 +0000 (19:43 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 1 Sep 2015 23:43:08 +0000 (19:43 -0400)
The rtc_mask() function should make sure the NMI disable bit is set
(just as rtc_read() and rtc_write() do).

Reported-by: Tim Shearer <tim.shearer@overturenetworks.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/hw/rtc.c

index 570a3ad0952a245e3bbaa66991e7f5eca32f7388..9649a5a793a7d0c90e3aad3c03f7129fac5a9d01 100644 (file)
@@ -30,6 +30,7 @@ rtc_write(u8 index, u8 val)
 void
 rtc_mask(u8 index, u8 off, u8 on)
 {
+    index |= NMI_DISABLE_BIT;
     outb(index, PORT_CMOS_INDEX);
     u8 val = inb(PORT_CMOS_DATA);
     outb((val & ~off) | on, PORT_CMOS_DATA);