A20

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Kernel Panic

A20

Post 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?
Post Reply