Skip to content

Hobby simple kernel (x86-64) and bootloader (UEFI) written in C++.

Notifications You must be signed in to change notification settings

Print3M/printOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

printOS

How to setup

Requirements

  • NASM
  • gcc && g++
  • Qemu (sudo apt install qemu qemu-utils qemu-system-x86 qemu-system-gui)

Start development

  1. Download a GNU-EFI source code. Place it in the bootloader/gnuefi directory.
  2. ./init.sh

Run OS

Tool chain: ./recompile.sh && ./build-img.sh && ./run.sh

Kernel

64-bit simple hobby kernel written in C++ for educational purpose and fun. Kernel info

Features

  • CPUID - state and features checking
  • Framebuffer (double-buffering) driver, writing output, colors
  • Basic read-only console (+ auto-scroll)
  • GDT - flat model
  • Physical memory allocator
  • Virtual memory - 64-bit paging
  • IDT - basic interrupts
  • Very basic libc (it will be written further if needed)
  • Kernel panic && asserts
  • ACPI support
  • Local APIC and I/O APIC support
  • High Precision Event Timer (HPET): one-shot and periodic mode
  • Heap (kmalloc & free)
  • PS/2 driver (keyboard support)
  • All x86 exceptions
  • Uniprocessor multitasking
  • User mode
  • Virtual relocation over 0xFFFFFFFF

Bootloader (UEFI)

My GNU-EFI (UEFI) bootloader written in C for fun and education. Bootloader info

Features

  • Reading kernel file from drive
  • ELF kernel parsing and loading into memory
  • Framebuffer initialization
  • Memory map gathering
  • Psf font loading
  • ACPI support
  • Error checking
  • Jumping into kernel

Documentation & specifications abbreviations used in comments

  • IM3 - Intel Manual, vol. 3
  • EFI - UEFI Specification
  • ACP - ACPI Documentation
  • APC - APIC Specification
  • IOA - IO APIC Documentation
  • HPT - HPET Documentation