Support PC engines WRAP (From OpenBSD)
This commit is contained in:
parent
2fdb742bc5
commit
9a51ea013a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gatea20.c,v 1.5 2002/08/12 14:27:34 thorpej Exp $ */
|
||||
/* $NetBSD: gatea20.c,v 1.6 2005/06/24 13:00:01 manu Exp $ */
|
||||
|
||||
/* extracted from freebsd:sys/i386/boot/biosboot/io.c */
|
||||
|
||||
|
@ -41,20 +41,29 @@ void gateA20()
|
|||
#ifdef SUPPORT_PS2
|
||||
biosmca_ps2model == 0xf82 ||
|
||||
#endif
|
||||
/* XXX How to check for AMD Elan SC520? */
|
||||
0) {
|
||||
outb(0x92, 0x2);
|
||||
(inb(K_STATUS) == 0xff && inb(K_RDWR) == 0xff)) {
|
||||
int data;
|
||||
|
||||
data = inb(0x92);
|
||||
outb(0x92, data | 0x2);
|
||||
} else {
|
||||
while (inb(K_STATUS) & K_IBUF_FUL);
|
||||
|
||||
while (inb(K_STATUS) & K_OBUF_FUL)
|
||||
(void)inb(K_RDWR);
|
||||
|
||||
outb(K_CMD, KC_CMD_WOUT);
|
||||
|
||||
delay(100);
|
||||
while (inb(K_STATUS) & K_IBUF_FUL);
|
||||
|
||||
outb(K_RDWR, x_20);
|
||||
|
||||
delay(100);
|
||||
while (inb(K_STATUS) & K_IBUF_FUL);
|
||||
|
||||
while (inb(K_STATUS) & K_OBUF_FUL)
|
||||
(void)inb(K_RDWR);
|
||||
}
|
||||
__asm("popfl");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue