You are browsing as a guest. Sign up (or log in) to start making projects!

4h 9m 13s logged

Kernel Refactor

One of the biggest changes in this update was reorganising the kernel into individual components rather than keeping everything inside a single source file.The project now contains dedicated modules for:
VGA text output
Interrupt Descriptor Table (IDT)
Interrupt Service Routines (ISR)
Hardware Interrupt Requests (IRQ)
Programmable Interrupt Controller (PIC)
Programmable Interval Timer (PIT)
Keyboard driver
Low-level I/O helpers

Interrupt Descriptor Table

The kernel now builds and installs a complete Interrupt Descriptor Table (IDT) containing all 256 entries. CPU exceptions (ISR 0-31) are fully registered, while IRQs from the Programmable Interrupt Controller occupy vectors 32-47 after remapping. Once the IDT has been loaded using lidt, the kernel is capable of safely responding to both processor exceptions and hardware interrupts.

CPU Exception Handling

Proper exception handling has now been implemented. Instead of the CPU immediately crashing with no feedback, exceptions are caught and displayed on screen with useful debugging information including:
Exception name
Interrupt number
Error codeInstruction pointer (EIP)
Code segment
CPU flags
After reporting the error the kernel safely halts, making debugging much easier during development.

Programmable Interrupt Controller (PIC)

The legacy PIC is now fully initialised and remapped away from the CPU exception vectors .Support has also been added for:
Sending End Of Interrupt (EOI) commands
Masking individual IRQ lines
Unmasking IRQs when drivers are ready

Programmable Interval Timer (PIT)

The PIT has now been configured as the kernel’s first hardware timer. It generates periodic interrupts at a configurable frequency and maintains a continuously increasing tick counter. While simple for now, this timer will eventually become the basis for delays

Keyboard Driver

Perhaps the most noticeable improvement in this update is the addition of the first real hardware driver. The keyboard driver:
Receives hardware interrupts on IRQ1
Reads raw PS/2 scancodes
Translates scancodes into ASCII characters
Buffers incoming keystrokes
Allows the kernel to read characters without directly accessing hardware every time

Improved VGA Terminal

The VGA text driver has also been rewritten into its own module.
I added Cursor updates, Automatic scrolling, Backspace support, Colour control, Decimal output and Hexadecimal output

0
1

Comments 0

No comments yet. Be the first!