From f65b3b8fbf47e2afee9dcbc1821333c27e9504aa Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 12 Jan 2007 16:33:41 +0000 Subject: [PATCH] Use bitwise not instead of logical not on PIE flag when disabling periodic interrupts to avoid clobbering register B. This seems to have fixed the corrupting-CMOS bug when enabling profiling. --- kernel/arch/i386/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/arch/i386/system.c b/kernel/arch/i386/system.c index 72d28b8b7..2f96901d8 100644 --- a/kernel/arch/i386/system.c +++ b/kernel/arch/i386/system.c @@ -89,7 +89,7 @@ PUBLIC void arch_stop_profile_clock(void) outb(RTC_INDEX, RTC_REG_B); r = inb(RTC_IO); outb(RTC_INDEX, RTC_REG_B); - outb(RTC_IO, r & !RTC_B_PIE); + outb(RTC_IO, r & ~RTC_B_PIE); } PUBLIC void arch_ack_profile_clock(void) -- 2.44.0