From: Joshua Wise Date: Sat, 6 Sep 2008 00:51:09 +0000 (-0400) Subject: Take all board-specific code out of asm land X-Git-Url: http://git.joshuawise.com/netwatch.git/commitdiff_plain/a46bffee03170f9f38004ce996dd7b22343fe6f8?hp=--cc Take all board-specific code out of asm land --- a46bffee03170f9f38004ce996dd7b22343fe6f8 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); + }