Int 13h AH=42h hanging system
Posted: Mon Nov 06, 2023 1:32 pm
Hello,
I have started picking OSDev back up and ran into a very strange issue when testing my bootloader on real hardware. When booting my OS from a USB flash drive, the MBR / VBR load up the main protected mode bootloader just fine. However, when the bootloader attempts to read a sector from the boot drive, it hangs during int 13h. I suspected stack issues, but when trying any other drive in the system, things work fine. I also made this code be the only part of the bootloader ran to limit the potential amount of corruption issues, but the problem was still there. I suspect that it's probably some BIOS oddity of some sort. The PC I tested it on is a Dell Optiplex 780 from about 2008. I also tested it on a Dell Optiplex 380 from 2009, and that worked fine.
I suspect it could be something in the pmode BIOS layer. That file is at https://github.com/nexos-dev/nexnix/blo ... oscall.asm. The main entry point is at https://github.com/nexos-dev/nexnix/blo ... src/main.c
The repo with the code is at https://github.com/nexos-dev/nexnix.git
I have started picking OSDev back up and ran into a very strange issue when testing my bootloader on real hardware. When booting my OS from a USB flash drive, the MBR / VBR load up the main protected mode bootloader just fine. However, when the bootloader attempts to read a sector from the boot drive, it hangs during int 13h. I suspected stack issues, but when trying any other drive in the system, things work fine. I also made this code be the only part of the bootloader ran to limit the potential amount of corruption issues, but the problem was still there. I suspect that it's probably some BIOS oddity of some sort. The PC I tested it on is a Dell Optiplex 780 from about 2008. I also tested it on a Dell Optiplex 380 from 2009, and that worked fine.
I suspect it could be something in the pmode BIOS layer. That file is at https://github.com/nexos-dev/nexnix/blo ... oscall.asm. The main entry point is at https://github.com/nexos-dev/nexnix/blo ... src/main.c
The repo with the code is at https://github.com/nexos-dev/nexnix.git