M3 Boot Loader – Version 1

OK – version one of the M3 boot loader is complete. The boot loader will copy the kernel from disk to memory, enable the A20 gate, and get the processor into protected mode. It doesn’t yet jump to the kernel code – I’m having a bit of a problem in that the virtual machine totally hangs when I try that. I need to examine the code and figure out what’s going on.

I created my boot loader by using bits and pieces of other boot loader examples that I found around the ‘net. I’m not going to lie and say that there’s anything original here. I’m totally standing on the shoulders of those that have come before me, and I appreciate the work that they have done. In the source code, I’ve attributed the references that I used for each particular section. I have changed a few things here and there to reflect my personal preferences and coding style, but the bulk of the code is from other people.

My goal is to get to the really interesting stuff – the kernel – as soon as possible. I really don’t want to reinvent the wheel when it comes to boot loader code.

It was far less work to get into protected mode than I thought it would be. I will detail this procedure in a separate tutorial post soon.

Once I figure out the problem with jumping to my small meaningless kernel written in assembly, I will post the code to the boot loader and describe things in detail.