/kokos

An operating system. Its main goal? Readable code, developer experience and documentation.

Primary LanguageC

The kokos operating system (VERY WIP)

Striking features:

  • ✔ Readable code and developer experience, see below.
  • ⏳ Per application managed resource access.

Development tools

The main goal of this operating system is simplicity and developer experience, custom built tools are used to increase productivity and enhance experience:

  • Kokos documentor can be used to generate reference links to put in source code. For example, this immediately show interrupt controller information from the AMD manual.
  • More to come...

Dependencies

Required for development.

sudo apt install build-essential nasm grub-pc-bin grub-common xorriso

Required for building cross-compiler.

sudo apt-get install -y wget gcc libgmp3-dev libmpfr-dev libisl-dev libcloog-isl-dev libmpc-dev texinfo bison flex make bzip2 patch build-essential

You can build the cross compiler using the build_cross_compiler.sh script. This compiler is required to build the operating system.

Notes

Things I learned/noticed

  • The hlt instruction only stops execution until an interrupt is fired. It continues where it left off after the interrupt. It places the processor in a paused state.
  • A Global System Interrupt or GSI is the same as an IRQ.
  • Local processor APIC's ids can be 8 bit instead of 4 bit in some cases (tested on hardware), all the manuals state that the upper 4 bits of the APIC id register are reserved, maybe I only found old manuals. You can assume that the APIC id register and the IO APIC physical destination register are 8 bits instead of 4 bits. (Tested on 4 different systems with different age)