Page 1 of 1

A20

Posted: Wed Jan 16, 2002 12:00 am
by Kernel Panic
I enable A20 using the code like this (in asm):
while (inb(K_STATUS) & K_IBUF_FUL);
while (inb(K_STATUS) & K_OBUF_FUL) (void)inb(K_RDWR);
outb(K_CMD, KC_CMD_WOUT);
while (inb(K_STATUS) & K_IBUF_FUL);
outb(K_RDWR, KB_A20);
while (inb(K_STATUS) & K_IBUF_FUL);
(it's from FreeBSD's bootcode).
But when I write to an odd megabyte, I still see
the corresponding location in the even megabyte
change. No matter if I enable A20 before entering
protected mode or after. It only works if the
program is run 2 times, or if I do a wbinvd after
enabling A20.
Has anyone encountered this?