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.
Im tring to read from my boot cdrom, but its always responding 0xFF , and I've checked and i think that all the logic is right, can anyone help me have a look? thanks!
Octocontrabass wrote:Does your virtual machine's debug log show that you're accessing the hardware? Bochs is very talkative if you enable debug messages.
Nope, no messages after the 00035981151i[BIOS ] Booting from 07c0:0000 message
0xFF is the open bus value. You seem to think it was 0, but no, if no hardware is there, you get all 1-bits. Unfortunately, for some hardware ports, 0xFF is also a valid register value. Anyway, you do not seem to be detecting ATA, but are just assuming an ATA controller to be at a predetermined address.
0xFF being the open-bus value is also why most A20 enabling code using the keyboard controller is wrong on systems that don't have a keyboard controller. But that is a question for another time.
nullplan wrote:0xFF is the open bus value. You seem to think it was 0, but no, if no hardware is there, you get all 1-bits. Unfortunately, for some hardware ports, 0xFF is also a valid register value. Anyway, you do not seem to be detecting ATA, but are just assuming an ATA controller to be at a predetermined address.
0xFF being the open-bus value is also why most A20 enabling code using the keyboard controller is wrong on systems that don't have a keyboard controller. But that is a question for another time.
I think that shouldn't be the case, it reports 0xff for all 4 ports, but atleast one should have something since i've got a cdrom connected
And now I just used changed it to use a pointer, but now it gets 0 out of the pointer when using -O2, but -O1 and -O0 works. Is there some kind of UB that im overlooking?
You should figure out a way to automatically load the correct number of sectors. Otherwise, you'll keep running into problems whenever your kernel outgrows your bootloader.