Hobby Operating System
Go to file
Drew Galbraith f26fd73116 [Zion][Denali] Move to MSI for AHCI devices.
This will allow us to properly do interrupts for XHCI devices in the
future.

Also move PCI device header parsing to a shared library.

Get rid of the old irq register format which supplied an irq number and
instead pass the appropriate irq number back out to the caller.
2025-05-05 23:14:01 -07:00
lib Fix build after removing a bunch of stuff. 2025-05-05 21:04:42 -07:00
rust [Zion][Denali] Move to MSI for AHCI devices. 2025-05-05 23:14:01 -07:00
scripts [VFS] Move victoria falls to rust. (Breaks voyageurs) 2025-05-05 19:37:53 -07:00
sys Fix build after removing a bunch of stuff. 2025-05-05 21:04:42 -07:00
sysroot [Voyageurs] Add a basic ps/2 keyboard driver. 2023-11-25 13:08:30 -08:00
toolchain Build GCC/Binutils toolchain in tree. (#1) 2023-06-15 18:39:14 -04:00
usr [Zion] Add a thread sleep call. 2023-12-07 00:20:03 -08:00
yunq [VFS] Move victoria falls to rust. (Breaks voyageurs) 2025-05-05 19:37:53 -07:00
zion [Zion][Denali] Move to MSI for AHCI devices. 2025-05-05 23:14:01 -07:00
.ccls Specify our target in .ccls 2023-06-16 23:15:41 -07:00
.clang-format Add a clang format spec 2023-05-17 20:30:15 -07:00
.gdbinit Add a kernel ELF module and load it in a new process. 2023-05-29 00:32:54 -07:00
.gitignore Add ccls cache to gitignore. 2025-05-03 14:48:42 -07:00
CMakeLists.txt Bump cmake version. 2025-05-03 14:44:55 -07:00
LICENSE Add LICENSE and README 2023-05-31 00:03:44 -07:00
README.md Update README. 2023-12-05 17:02:16 -08:00
RELEASES.md Draft 0.1.1 release notes added with work so far. 2024-01-11 20:53:31 -08:00
init-dbg.sh [Zion] Enable SSE instructions at the start of boot. 2023-11-20 16:40:07 -08:00

README.md

AcadiaOS

AcadiaOS is a hobby operating system I use to explore and learn about OS development.

It is built on top of a small capability-based microkernel that provides memory management, process scheduling, and hardware access.

Directory Structure

The subdirectories of the project are as follows:

  • zion: Contains kernel code as well as a couple headers that user space uses to interface with the kernel.
  • lib: Library code used by the kernel and user space.
  • sys: System services.
  • sysroot: Files that are copied to the root filesystem.
  • toolchain and scripts: Contain tooling for the cross-compile environment.
  • yunq: Contains the El Yunque IDL used for IPC between processes in userspace.

Where available, further documentation about each of these components can be found in the README fi les in each respective subdirectory.

Building AcadiaOS

Run ./scripts/build_toolchain.sh to build a gcc cross-compile toolchain for the project. This step may take a long time (~5 mins on my new laptop, ~45 mins on my 2013 laptop).

Run ./init-dbg.sh to initialize the CMake project.

Run ./scripts/qemu.sh to build and run AcadiaOS in a VM. I usually run this from the builddbg directory so it is easier to run ninja clean when necessary (for instance when updating yunq files).

System Dependencies

On arch linux I require the following packages to build this project:

base-devel limine dosfstools parted cmake ninja qemu-desktop qemu-system-x86

Boot Process

AcadiaOS uses the limine bootloader to enter into a 64-bit kernel in the negative 2GB address space (mcmodel kernel).

The Zion kernel then sets up interrupts, scheduling, and memory management before passing off control to the Yellowstone process.

The kernel passes capabilities to the Denali and VictoriaFalls binaries to the Yellowstone process to allow it to manage the rest of the boot process.

The Yellowstone, Denali, and VictoriaFalls processes are all passed at boot using limine modules, however any subsequent processes are loaded off disk.