Notes on hobby os development
From Ggl's wiki
Reading Tanenbaum's books and others about actual implementations (linux, freebsd, opensolaris, mac os x and even windows) is great but it does not replace practice. This notes following my journey in the writing of the hobby os.
Where to begin? The journey started from Bare Bone at OSDev.org. First step: boot a dummy kernel using grub on a floppy.
A common roadmap for a kernel is:
- Initialize processor
- Switch in protected mode
- Jump to the entry point
- Install ISR (Interrupt Vector)
The target architecture is Intel IA32. Then grub initializes the processor, switches to protected mode and maps the kernel elf32 binary. Once the kernel is executing we need to install some core structures: GDT (Global Descriptor Table) and IDT (Interrupt Descriptor Table).
What we want to do?
Let begin by a basic echo command line. Thus we want to get input from the keyboard (using a custom ps/2 driver) and write it on the screen.
To catch the keycode from the keyboard we need to install an interrupt handler (also called an Interrupt Service Routine). The PIC (Programmable Interrupt Controller) maps the keyboard on interrupt (IRQ) 1.

