From a46bffee03170f9f38004ce996dd7b22343fe6f8 Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Fri, 5 Sep 2008 20:51:09 -0400 Subject: [PATCH] Take all board-specific code out of asm land --- aseg/aseg.asm | 12 ------------ aseg/counter.c | 5 +++++ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/aseg/aseg.asm b/aseg/aseg.asm index 93b61d7..b9ae424 100644 --- a/aseg/aseg.asm +++ b/aseg/aseg.asm @@ -36,18 +36,6 @@ noclear: mov eax, [dataptr+12] ; jump into C call eax - mov al, 0x40 ; ack the periodic IRQ - mov dx, 0x834 - out dx, al - - mov dx, 0x830 ; now ack the SMI itself - in al, dx - or al, 0x02 - and al, 0xBF - out dx, al - or al, 0x40 - out dx, al - rsm ; and leave SMM align 0x4 diff --git a/aseg/counter.c b/aseg/counter.c index de82574..61f9b6f 100644 --- a/aseg/counter.c +++ b/aseg/counter.c @@ -52,5 +52,10 @@ void __start (void) outl(0xCF8, pcisave); outb(0x3D4, vgasave); + + outb(0x834, 0x40); // ack the periodic IRQ + outb(0x830, (inb(0x830) | 0x2) & ~0x40); + outb(0x830, inb(0x830) | 0x40); + } -- 2.43.0