Hey everyone,
I was updating my bootloader to add more flexibility and content. Everything was going smooth, until I started running into random memory problems.
I was certain bochs enabled a20 by default, so never thought much about it. However, everything I tried either caused a double fault exception from bochs, or cause VirtualPC to give an error.
Then I decided to re-enable a20--and it works fine now and both emulators. This brings me here to ask the following:
Is a20 enabled by default in bochs? I was certain that it was... Can someone please confirm this?
Thanks
Bochs and a20
Bochs and a20
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
I highly, highly doubt Bochs would start with A20 enabled. The purpose of A20 being maskable is for backwards compatibility with real-mode programs that assume a 20-bit address space. It allows for the 0x100000-0 rollover some of these programs expect. Unless the Bochs developers decided to not have true PC-compatibility for DOS, A20 will be disabled at boot.
Normally A20 IS enabled in bochs. Because bochs runs a lot faster if it doesn't have to check the A20 enabled bit on every single simulated memory access.
However, the option is there to turn it off.
It is done at COMPILE time. If you even have the ability to turn A20 off, then you need to recompile yourself a new version of bochs -- and I think you will be happy with how much faster it runs!
However, the option is there to turn it off.
It is done at COMPILE time. If you even have the ability to turn A20 off, then you need to recompile yourself a new version of bochs -- and I think you will be happy with how much faster it runs!