Skip to content

adamsitar/x86_32bit_kernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

x86 32-bit Bare Metal Kernel

A hobby 32-bit x86 kernel developed in C and NASM assembly, with the goal of exploring low-level system programming, virtual memory/segmentation, interrupt handling and general OS functionalities

Technologies Used

  • C
  • x86 Assembly (NASM)
  • GNU Toolchain
  • QEMU
  • GRUB & Multiboot specification

Key Features

Memory Management System

  • Physical frame allocator (PFA) using bitmap-based tracking for 4GB address space
  • Support for dynamic allocation/deallocation with memory map parsing from multiboot bootloader
  • Virtual memory allocator (VMA) with page directory/page table management
  • Manual page table creation with recursive page directory mapping for virtual-to-physical translation
  • Proper TLB invalidation handling

Interrupt Handling Infrastructure

  • Interrupt Descriptor Table setup
  • Assembly stubs for stack frame management and End-of-Interrupt signaling
  • Exception handlers for page faults, double faults, and other CPU exceptions
  • PIC (Programmable Interrupt Controller) configuration and remapping
  • Hardware interrupt support including keyboard input handling

Memory-Safe Kernel Architecture

  • Higher-half kernel mapping (0xC0000000+) for protected memory space
  • Stack management and protection
  • Reservation of system memory regions (BIOS areas, VGA memory, kernel space)

Low-Level System Initialization

  • GDT (Global Descriptor Table) setup with multiple privilege levels
  • Paging implementation with both identity mapping and higher-half mapping
  • Transition from assembly bootloader to C execution environment

Development Period

July - August 2025

Feature examples

Post initialization screen

os_post_init_screen

Basic allocation

os_example_allocation

Build instructions

Run the default make target

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published