version 1.2, 1997/10/29 00:32:49 |
version 1.3, 2000/05/11 16:11:54 |
|
|
/* |
/* |
* Gate A20 for high memory |
* Gate A20 for high memory |
*/ |
*/ |
|
#ifndef IBM_L40 |
static unsigned char x_20 = KB_A20; |
static unsigned char x_20 = KB_A20; |
|
#endif |
void gateA20() |
void gateA20() |
{ |
{ |
__asm("pushfl ; cli"); |
__asm("pushfl ; cli"); |
#ifdef IBM_L40 |
#ifdef IBM_L40 |
outb(0x92, 0x2); |
outb(0x92, 0x2); |
#else IBM_L40 |
#else /* !IBM_L40 */ |
while (inb(K_STATUS) & K_IBUF_FUL); |
while (inb(K_STATUS) & K_IBUF_FUL); |
while (inb(K_STATUS) & K_OBUF_FUL) |
while (inb(K_STATUS) & K_OBUF_FUL) |
(void)inb(K_RDWR); |
(void)inb(K_RDWR); |
|
|
outb(K_RDWR, x_20); |
outb(K_RDWR, x_20); |
delay(100); |
delay(100); |
while (inb(K_STATUS) & K_IBUF_FUL); |
while (inb(K_STATUS) & K_IBUF_FUL); |
#endif IBM_L40 |
#endif /* IBM_L40 */ |
__asm("popfl"); |
__asm("popfl"); |
} |
} |