Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
27802b8
feat: 📦 Fix all cargo-make commands - replace them with one Justfile
berkus Feb 9, 2026
535d9fc
wip: work on mmu setup ⬆️
berkus Jan 17, 2026
f9e6a70
wip: better MMU init
berkus May 8, 2022
f277ba8
wip: call mmu init from boot code
berkus Oct 19, 2025
1fd35f1
wip: ❌ delete me
berkus May 18, 2024
927aa67
wip: buildable
berkus Jan 18, 2026
1404f85
wip: boot init-thread in EL2 - make compile
berkus Jan 19, 2026
5cf2e08
wip: early_print crash in qemu
berkus Jan 21, 2026
9bc93e0
wip: new linker script prototype
berkus Jan 21, 2026
1e077ae
wip: move nucleus to kernel before split
berkus Jan 22, 2026
c5cbcf4
wip: move impl from kernel-embed-prototype
berkus Jan 23, 2026
ac1cb89
wip: split nucleus + init_thread = kernel
berkus Jan 23, 2026
d55fcc4
wip: libmemory
berkus Feb 22, 2026
4653d47
wip: generate kernel meta from template
berkus Jan 24, 2026
8a9220a
wip: debug qemu semihosting output
berkus Jan 24, 2026
f1ae781
wip: run mapping and drop to EL1
berkus Jan 25, 2026
b125803
wip: working syscall EL1-to-EL1 (temporary?)
berkus Jan 25, 2026
93bba3a
wip: panic handler
berkus Jan 25, 2026
aaf6554
wip: add kernel api
berkus Jan 13, 2026
e4cafd9
wip: enter and return from syscall
berkus Jan 25, 2026
d79cdda
wip: 🚧 Run the init_thread to map kernel high, prep caps and create a…
berkus Oct 28, 2025
be8ed6b
wip: make it compile temporarily
berkus Jan 25, 2026
b7a5bcc
wip: parse DTB ⬆️
berkus Jan 25, 2026
66e54e9
docs: 📖 Add annotated DTB specs
berkus Aug 3, 2021
d0e6771
wip: Add wrapper for fdt-rs crate, bootup with DTB
berkus May 12, 2022
f4ac2b6
wip: Add more dtbs for the boards I have
berkus Feb 12, 2022
7e69227
wip: chainloader must pass through the DTB
berkus Jun 12, 2022
ce783ef
wip: add payload iter tests - @todo finish them
berkus Jun 21, 2022
7eaf888
wip: add dump of entire live FDT from the board
berkus Jun 21, 2022
3d170eb
wip: parse DTB ⬇️
berkus Jan 25, 2026
472599e
wip: convert QEMU write0 call argument to CStr for stronger type guar…
berkus Jan 26, 2026
477398e
wip: Dump FDT
berkus Jan 26, 2026
ef85a7d
wip: exit qemu automatically
berkus Jan 26, 2026
63d112e
wip: update plan progress
berkus Jan 26, 2026
b2f7bd9
wip: boot_info ⬆️
berkus Feb 22, 2026
3f0f7da
wip: move new version of boot_info aside, prior to merging the old one
berkus Jan 26, 2026
ee74b27
wip: Add boot memory regions info
berkus Jun 28, 2022
a5f3b0c
wip: Switch to usize for alignment checks
berkus Jun 28, 2022
225c464
wip: messing with memregions
berkus Aug 3, 2021
4db647f
wip: update BOOT_INFO struct with available mem info
berkus Jun 28, 2022
3a3b8aa
wip: print some region info
berkus Jun 28, 2022
ca8b8f7
wip: refactor and fix compile
berkus Jun 29, 2022
3d85ba6
wip: make bootinfo bss-initializable by default
berkus Jul 3, 2022
13f7c5c
wip: add InvalidRegion error code
berkus Jul 3, 2022
df0e6e0
wip: enable testing of dependency crates (not working yet)
berkus Jul 10, 2022
8e53ade
wip: add docs and stuff
berkus Jul 16, 2022
6aa951d
wip: refactor boot_info blocks
berkus Jul 16, 2022
03f3327
wip: boot_info ⬇️
berkus Jan 26, 2026
269cac3
wip: compile fixes
berkus Jan 26, 2026
3b36248
wip: add Key types and simplest DebugConsole capability invocation
berkus Jan 29, 2026
bb59857
wip: 🚧 arch-specific key types
berkus Jan 29, 2026
f9016c8
wip: 🚧 two-phase arch-key dispatch
berkus Jan 29, 2026
cdc19bc
refactor: arch objects
berkus Jan 29, 2026
657bf66
refactor: #2 - untypeds
berkus Jan 29, 2026
ca3a7b2
wip: add libobject - split into user-space part, invocation handler a…
berkus Jan 30, 2026
9a06b77
wip: debug console trial
berkus Feb 1, 2026
b8f5103
fix: compile fixes #6
berkus Feb 1, 2026
c43eae7
wip: Domain pages and DCB user-space view
berkus Feb 1, 2026
72c31a7
fix: Compile fixes #7
berkus Feb 1, 2026
96a0b51
wip: Make a capability call demo work with DebugConsole
berkus Feb 1, 2026
e80eb93
fix: Cleanup exception context, return values from syscall
berkus Feb 5, 2026
3101b30
wip: update plan progress
berkus Feb 6, 2026
bff2aa9
wip: clean up exceptions code
berkus Feb 6, 2026
606f1d5
wip: clean up boot code
berkus Feb 6, 2026
2a6ab6c
wip: clean up old init thread code, split to userspace
berkus Feb 6, 2026
a7fd69d
wip: split libmemory into libaddress and libpaging (or libmmu?)
berkus Feb 6, 2026
b52cd2d
wip: extract liballoc
berkus Feb 8, 2026
9ad736d
refactor: ♻️ Flatten libplatform
berkus Feb 8, 2026
6b8bdbd
refactor: ♻️ Flatten and clean up libmemory
berkus Feb 8, 2026
f6d6057
refactor: ♻️ Split libmemory to libmmu, liballoc, libmapping, libmmio
berkus Feb 8, 2026
62c97e1
wip: Claude's idea for how libmemory could look like, lets test
berkus Feb 8, 2026
9b106c2
wip: Add x86_64
berkus Feb 9, 2026
2224776
wip: Add RISC-V64
berkus Feb 9, 2026
745b128
wip: Add PowerPC
berkus Feb 9, 2026
f0965ad
wip: Improve DeviceTree cells iteration
berkus Feb 9, 2026
1b7e532
wip: List DTB entries with mem regions
berkus Feb 9, 2026
c8e5de7
wip: Collect and sort memory regions for mmio devices
berkus Feb 9, 2026
6f3dfa9
wip: Add list of DTB drivers in order of implementation potentially
berkus Feb 10, 2026
634e044
wip: Clean up boot_info and prep for DTB filling in, print mem map
berkus Feb 10, 2026
fd10e24
wip: Add 16K and 64K granules for aarch64
berkus Feb 10, 2026
af4f305
wip: update boot_info for better region management
berkus Feb 10, 2026
4a1b6e0
wip: Make Init_Thread an overlay region with all it's allocated memory
berkus Feb 10, 2026
923a074
wip: Give names to allocated kernel regions
berkus Feb 11, 2026
fdd90e3
wip: Add (Drop) flag to temporary allocations
berkus Feb 11, 2026
1d99abb
wip: todos and misc
berkus Feb 14, 2026
fff6921
wip: Inline untyped cap into the key_table
berkus Feb 11, 2026
82fdcc8
wip: Inline frame type into the key_table
berkus Feb 14, 2026
8930797
wip: cargo machete some unused deps
berkus Feb 15, 2026
0fd2356
wip: local qemu exit code, without deps
berkus Feb 15, 2026
653c265
fix: [sq] Init_thread SP should stay in low identity-mapped area
berkus Feb 15, 2026
b31791b
fix: [sq] Set deterministic SP at boot
berkus Feb 15, 2026
f96b9df
wip: Clean up semihosting exit code and make qemu return with correct…
berkus Feb 15, 2026
6408ecf
wip: Split test command, make it work
berkus Feb 17, 2026
3062e68
wip: enable doctests (without running)
berkus Feb 20, 2026
95bf39a
wip: Make kernel changes build
berkus Feb 21, 2026
bfa2e52
wip: add cocogitto check step (the bot didn't support cog.toml)
berkus Feb 21, 2026
dbbe448
wip: work on clippy complaints
berkus Feb 21, 2026
5f13cfb
wip: [sq] github workflows precise versions
berkus Feb 27, 2026
a747517
sq: correctly handle qemu feature
berkus Mar 3, 2026
c6a72bb
fix: clippy complaints
berkus Mar 3, 2026
ced2223
wip: Rename init_thread to kickstart
berkus Mar 3, 2026
6e661a7
wip: Rename vesper libs for potentially unlocking publishing
berkus Feb 21, 2026
2ae63ef
wip: Update deps
berkus Mar 5, 2026
68daa93
wip: re-enable tests
berkus Mar 5, 2026
0f60dbb
wip: Switch from ux to arbitrary-int
berkus Mar 7, 2026
1373c46
wip: Switch from bitfield-struct to bitbybit
berkus Mar 10, 2026
ace8e45
wip: Add Justfile alias t for test
berkus Mar 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
pipelining = true

[target.aarch64-metta-none-eabi]
runner = "cargo make qemu-test-runner"
runner = "just _test-runner"
7 changes: 7 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
21 changes: 0 additions & 21 deletions .github/dependabot.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/shared/qemu/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "QEMU"
description: "Install QEMU for particular platform"
runs:
using: "composite"
steps:
- name: Install QEMU (Linux)
if: runner.os == 'Linux'
shell: "bash"
run: |
sudo apt-get update
sudo apt-get install --fix-missing qemu-system-aarch64

- name: Install QEMU (macOS)
if: runner.os == 'macOS'
shell: "bash"
run: brew install qemu
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1

- name: Install Scoop (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Invoke-WebRequest -UseBasicParsing get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
echo "$HOME\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Add custom Scoop bucket for QEMU (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
scoop bucket add scoop-for-ci https://github.com/metta-systems/scoop-for-ci

- name: Install QEMU (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: scoop install qemu-1010

- name: "Print QEMU Version"
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
run: qemu-system-aarch64 --version
30 changes: 30 additions & 0 deletions .github/shared/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Prepare"
description: "Prepare Rust build environment and dependencies"
runs:
using: "composite"
steps:
- name: "Install nightly Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1.15.2
with:
rustflags: ""
- name: "Install Just"
uses: "taiki-e/install-action@just"
- name: "Print Rust Version"
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
run: |
rustc -Vv
cargo -Vv
- name: "Install build tools"
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
run: cargo install cargo-binutils
- name: "Validate rust-lld"
if: runner.os == 'macOS'
shell: "bash"
run: |
which rust-lld || echo "Not found"
otool -L ~/.cargo/bin/rust-lld
- name: "Print Tools Versions"
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
run: |
just --version
cargo objcopy --version
52 changes: 52 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build

on:
push:
branches:
- "*"
pull_request:

jobs:
check_formatting:
name: "Check Formatting"
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: "Checkout Repository"
uses: actions/checkout@v6.0.2
- uses: "./.github/shared/setup"
- run: just fmt-check

clippy:
name: "Clippy"
needs: check_formatting
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
timeout-minutes: 10
steps:
- name: "Checkout Repository"
uses: actions/checkout@v6.0.2
- uses: "./.github/shared/setup"
- run: just clippy

test:
name: Test
needs: check_formatting
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
timeout-minutes: 30
steps:
- name: "Checkout Repository"
uses: actions/checkout@v6.0.2
- uses: "./.github/shared/setup"
- uses: "./.github/shared/qemu"
- name: "Build kernel"
run: just build
- name: "Run tests"
run: just test
130 changes: 0 additions & 130 deletions .github/workflows/build.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/cog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Cocogitto check

on:
pull_request:

jobs:
cog:
name: "Check conventional commits"
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: "Checkout Repository"
uses: actions/checkout@v6.0.2
with:
fetch-tags: true
fetch-depth: 0
# pick the pr HEAD instead of the merge commit
ref: ${{github.event.pull_request.head.sha}}
- name: Conventional commit check
uses: cocogitto/cocogitto-action@v4.1.0
with:
command: check
args: ${{github.event.pull_request.base.sha}}..${{github.event.pull_request.head.sha}}
39 changes: 28 additions & 11 deletions .zed/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,34 @@
"lsp": {
"rust-analyzer": {
"initialization_options": {
"cargo": {
"target": "/Users/berkus/Projects/Metta/vesper/targets/aarch64-metta-none-eabi.json", // $ZED_WORKTREE_ROOT
"extraArgs": [
"-Zbuild-std=compiler_builtins,core,alloc",
"-Zbuild-std-features=compiler-builtins-mem"
]
"rust": {
"analyzerTargetDir": true,
},
// "checkOnSave": {
// "enable": true,
// "command": "clippy",
// "target": "/Users/berkus/Projects/Metta/vesper/targets/aarch64-metta-none-eabi.json", // $ZED_WORKTREE_ROOT
// "extraArgs": [
// "-Zbuild-std=compiler_builtins,core,alloc",
// "-Zbuild-std-features=compiler-builtins-mem",
// "-Zmacro-backtrace",
// "--cfg board_rpi3",
// "-Ctarget-cpu=cortex-a53",
// "--features qemu",
// ],
// },
// "cargo": {
// "target": "/Users/berkus/Projects/Metta/vesper/targets/aarch64-metta-none-eabi.json", // $ZED_WORKTREE_ROOT
// "allTargets": false,
// "extraArgs": [
// "-Zbuild-std=compiler_builtins,core,alloc",
// "-Zbuild-std-features=compiler-builtins-mem",
// ],
// },
"rustfmt": {
"extraArgs": ["+nightly"]
}
}
}
}
"extraArgs": ["+nightly"],
},
},
},
},
}
Loading
Loading