Skip to content

xrarch/mintia

Repository files navigation

MINTIA

MINTIA is a custom operating system written in a custom programming language, as part of a half-decade personal project to create a fully from-scratch RISC workstation computer called XR/station.

Its kernel design pays homage to the Windows NT operating system. In particular the virtual memory manager has been written with similar goals, with the capability to swap to disk not only user pages but also kernel stacks, page tables, and even ~50% of its own kernel code and heap.

MINTIA aims to be something that might have come off of a weird workstation computer made by a doomed company in 1989, and that might have been considered a pretty strong system at the time. It is also very portable to other 32-bit architectures, with a finished port to the unrelated fox32 fantasy computer and planned future ports to other architectures as well.

Running

Supported Architectures

Building

As with all XR/station projects, the sdk should be in a directory ../sdk relative to this repository.

Running make in this repository should then place a MINTIA distribution image at build/mintia-XRstation-fre.img. Windows users should use WSL as Cygwin seems to have problems with the SDK. Multi-core builds are encouraged with the make -jN argument, where N is the number of cores on your machine.

To build for fox32, type make PLATFORM=fox32 and the distribution image should be placed at build/mintia-fox32-fre.img.

Testing

With the XR/station emulator (./xremu/) and MINTIA repository (./mintia/) in your current directory, run this command:

./xremu/graphical.sh -dks ./mintia/build/mintia-XRstation-fre.img

If it doesn't boot automatically, type this command at the firmware prompt:

boot /disks/0/a

MINTIA should boot to the username: prompt.

Logging in as guest has no password, and the default password for root is mintia.

Features

  • Targets a 2MB RAM minimum for headless use, 4MB for graphical.

Kernel

  • Dynamically-linked kernel.
  • Priority-based preemptive multitasking with wait boosting.
  • Waiting on multiple objects simultaneously.
  • Nested interrupts, managed by IPLs (analogous to Windows IRQLs); DPCs and APCs.
  • Kernel-mode debugger with stack tracing.
  • Swappable kernel code and heap.
  • Layered design model.

Executive

  • An object manager for centralized resource tracking.
  • Port-based IPC.
  • Unix-like permissions model.
  • Sophisticated memory manager.
  • Support for native and MBR partition table formats.
  • Fully asynchronous, iteratively layered I/O model.
  • Fully asynchronous PTY, filesystem, and disk drivers.

Memory Management

  • File page cache.
  • Memory mapped files: supporting both fully shared and private (via copy-on-write), writable, and read-only mappings.
  • Demand paging.
  • Up to 16 pagefiles that can dynamically grow and shrink with the needs of the system.
  • Dynamic working set management.
  • Extensive swapping: all user pages, along with kernel stacks, page tables, and 50% of the kernel itself, can be swapped to disk to free memory.

Userspace

  • Userspace dynamic linking.
  • Command-line interface over TTY.
  • Fully multi-user.

Filesystems

  • AisixFS custom filesystem.
  • FAT12/16/32 read-write with long filename support.

TODO

  • Window system.
  • Self-hosting with a fully native toolchain.
  • Networking.