Fault finding

I have spent most of the time that I have been working on Symmetry trying to find a bug that was causing a General Page Fault (or GPF) at startup. The fault would be raised when I tried to create a heap, so I thought it would therefore be something wrong with the paging or heap management code. After a week or two, it occured to me that there might be a problem with the GDT entries being wrong, and sure enough, it turned out that there was an error setting up the gates, making the whole memory not work as expected. It turned out that this was also causing another GPF in the ACPI initialisation.

So now I am able to test in Bochs and on real machines, instead of just in VirtualBox and QEMU like before. Now I can finish off the heap management (I just have to finish deallocation) and then I’ll move on to multitasking and user mode. I’ve already started to write an ELF executable parser, and once I have those things finished, hopefully I can get Newlib ported to my OS, and then compile apps for it!

Leave a Reply