Page 1 of 1
Does Bochs Enable A20?
Posted: Mon Jul 28, 2008 10:15 am
by azurfire
I had a nice, long post to make before accidently pressing a macro key on the side of my keyboard which was bound to F5. I really don't want to type it all again, so I'lll make this short:
Does Bochs enable A20 or is my code to check whether it is enabled flawed?
Code: Select all
PUSH DS
MOV BX, 0x0000
MOV DS, BX
MOV AX, [7DFEh]
MOV BX, 0xffff
MOV DS, BX
MOV BX, [7E0Eh]
POP DS
CMP AX, BX
JE OK
(It doesn't jump, so 0000:7DFE and FFFF:7E0E aren't equal)
I am testing A20 using the method here:
http://wiki.osdev.org/A20_Line
Thanks

Re: Does Bochs Enable A20?
Posted: Mon Jul 28, 2008 10:39 am
by -m32
Yes, Bochs enables A20 - so, draw your own conclusions

Re: Does Bochs Enable A20?
Posted: Mon Jul 28, 2008 10:48 am
by bewing
It is a little more correct to say that, in it's default config, bochs "sets" and ignores A20.
If you recompile bochs with a modified config file, then it will leave A20 unset and handle all A20 stuff -- but bochs has to check whether A20 is set or not on every single simulated mem access, so it runs much slower then.
Re: Does Bochs Enable A20?
Posted: Mon Jul 28, 2008 10:53 am
by -m32
Whoops... I'm not paying attention today... i read and even typed "Bochs", but was thinking of Grub

Re: Does Bochs Enable A20?
Posted: Mon Jul 28, 2008 10:55 am
by Korona
GRUB also sets the A20 flag.
Re: Does Bochs Enable A20?
Posted: Tue Jul 29, 2008 7:59 am
by jal
Korona wrote:GRUB also sets the A20 flag.
In fact, it must, because it loads your kernel above 1MB (or at, to be precise).
JAL
Re: Does Bochs Enable A20?
Posted: Thu Jul 31, 2008 8:03 am
by xlq
Grub loads your kernel to whatever address is specified in the multiboot header, which must be no lower than 1 MiB. (Most people choose to link and load their kernel at 1 MiB for convenience though)