Skip to content
Ian Seyler edited this page Aug 10, 2024 · 13 revisions

Architecture

BareMetal OS is a exokernel-based single address space operating system.

It is written in assembly to achieve high-performance computing with a minimal footprint and a "just enough operating system” approach.

The operating system is primarily targeted towards physical and virtualized environments for cloud computing, or HPC clusters. It could also be used as a unikernel.

“Do not try to do everything. Do one thing well.” — Steve Jobs

The premise of the OS is to "do one thing well" and that is to execute a program with zero overhead.

Minimum requirements

  • A physical or virtual 64-bit x86-based system (AMD/Intel)
  • 8 MiB of RAM
  • A NVMe, AHCI (SATA), Virtio-Block, or IDE storage device

Notes on the minimum requirements

  • The kernel uses the first 4MiB of RAM. The kernel itself is only 16,384 bytes and the rest of the 4MiB is used for the various memory structures needed for 64-bit operation (GDT, IDT, PML4), buffers, and CPU stacks.
  • All other available memory is mapped to the higher half of memory. This memory is only for the running application.

Startup

The system will boot via BIOS or UEFI. This boot process will load Pure64, BareMetal, and Monitor to memory. PXE boot via BIOS is also possible.

Pure64 starts as soon as the BIOS or UEFI boot loader is finished.

A grid of squares is displayed in the center of the screen to show the startup progress:

These squares represent the following (starting at the top left moving across):

Top row (Pure64):

  • Pure64 has entered 64-bit mode
  • Pure64 has transitioned to using its final page map
  • Pure64 has built the interrupt map, parsed the ACPI information, and configured the BSP
  • Pure64 has started all other CPU cores and built the info map for the kernel

Bottom row (BareMetal):

  • The kernel has completed architecture-specific initialization
  • The kernel has completed bus initialization
  • The kernel has completed storage initialization
  • The kernel has completed network initialization

If a square is missing it means that the step it represents did not complete. Please open an issue with the details of your system if this is the case.

Command Prompt

On successful system initialization you will be presented with the BareMetal Monitor:

Some basic details about the system will be displayed (Core count and speed, memory available, network MAC address). You can enter the help command to see what other commands are available.

  • help - List the commands that are available
  • dir - List the files that are on storage
  • load - Load a file from storage into memory
  • exec - Execute the program that was loaded into memory
  • peek, poke, dump - Commands for reading and writing memory

The "rolling" command prompt

The Monitor has a "rolling" command prompt - which is somewhat unusual. This means the screen will not scroll as you enter more commands - it will instead "rollover" back to the top of the screen. The Yellow/Orange line delineates the current bottom of the screen. This was done for performance and memory reasons. A 1024x768x32bpp frame buffer would require 3MiB of RAM. 1920x1080x32bpp would require 8MiB.

Clone this wiki locally