Qemu error at boot
Posted: Tue Mar 10, 2020 6:47 am
Hi, first of all, I'd like to apologize since I'm sure that issues like this one have been published before but I've been working on it sometime and still cannot find a solution.
So some weeks ago I started writing a bootloader for fun to a FAT16 file system for HDD that you can find in this repo https://github.com/Onelio/SysBoot and I got to the point where it enters the second stage(I don’t have a second stage so it essentially boots to a dummy file called “kernel.bin”) without problem after setting the A20 line (I will relay the Protected Mode setup to the second stage so the first stage just has to load the file and enable the a20 to load it into 0xF7C0:8400) and everything works fine under Bochs but whenever I try it on Qemu it just fails with the error “Trying to execute code outside RAM or ROM at 0x545136dc”
After a lot of searching and testing I found out that the problem is with the enabling of the A20 line here https://github.com/Onelio/SysBoot/blob/ ... io.asm#L83 that seems to not work on Qemu so I came here to ask for guidance and maybe advice. I know that I lack the keyboard enabling attempt but aside for the bios one which it's only supported by some bios the other one should work properly for what I've read.
Here is how I call Qemu:
Thanks for your time.
So some weeks ago I started writing a bootloader for fun to a FAT16 file system for HDD that you can find in this repo https://github.com/Onelio/SysBoot and I got to the point where it enters the second stage(I don’t have a second stage so it essentially boots to a dummy file called “kernel.bin”) without problem after setting the A20 line (I will relay the Protected Mode setup to the second stage so the first stage just has to load the file and enable the a20 to load it into 0xF7C0:8400) and everything works fine under Bochs but whenever I try it on Qemu it just fails with the error “Trying to execute code outside RAM or ROM at 0x545136dc”
After a lot of searching and testing I found out that the problem is with the enabling of the A20 line here https://github.com/Onelio/SysBoot/blob/ ... io.asm#L83 that seems to not work on Qemu so I came here to ask for guidance and maybe advice. I know that I lack the keyboard enabling attempt but aside for the bios one which it's only supported by some bios the other one should work properly for what I've read.
Here is how I call Qemu:
Code: Select all
qemu-system-i386 bin/system.iso -monitor stdio