Skip to content

Commit cabc5d1

Browse files
committed
docs
1 parent ef692ad commit cabc5d1

5 files changed

Lines changed: 195 additions & 148 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ All notable changes to the XDV Kernel are documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.1] - 2026-02-20
9+
10+
### Added
11+
12+
- Added `docs/` documentation set:
13+
- `docs/README.md`
14+
- `docs/boot_runtime_flow.md`
15+
- `docs/sector_reference.md`
16+
17+
### Changed
18+
19+
- Refreshed `README.md` to align with current repository behavior:
20+
- clarified kernel runtime entry profiles (`kernel.ds` and `kernel_runtime_shell.asm`),
21+
- clarified integration contract with `xdv-boot` and `xdv-os`,
22+
- updated documentation and related-project references.
23+
824
## [0.2.0] - 2026-02-12 (DPL v0.2)
925

1026
### Added
@@ -78,4 +94,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7894

7995
---
8096

81-
Copyright © 2026 Dust LLC
97+
Copyright © 2026 Dust LLC

README.md

Lines changed: 55 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,56 @@
1-
# XDV Kernel v0.2
1+
# XDV Kernel
22

3-
A Cross-Domain Virtualizer operating system kernel for x86-64, written entirely in the Dust Programming Language (DPL).
3+
Version: 0.2.x
4+
Language: Dust Programming Language (DPL)
45

5-
For `xdv-os` bare-metal image boot/runtime, the kernel sector also provides
6-
`sector/xdv_kernel/src/kernel_runtime_shell.asm`, which implements the runtime
7-
keyboard (US layout), command buffer, and builtin shell dispatch profile used by VirtualBox validation.
6+
The XDV kernel is the x64 kernel component for XDV OS. It provides the
7+
K-Domain runtime and defines hardware-gated Q-Domain and Phi-Domain service
8+
surfaces.
89

9-
## Overview
10+
## Runtime Paths
1011

11-
XDV v0.2 is a multi-domain operating system kernel that supports three computational domains:
12+
The repository currently contains two kernel runtime entry profiles:
1213

13-
- **K-Domain (Classical)**: Traditional von Neumann computing on x64 (FULL SUPPORT)
14-
- **Q-Domain (Quantum)**: Hardware-gated quantum services (returns ERR_DOMAIN_NOT_AVAILABLE when unavailable)
15-
- **Φ-Domain (Phase-Native)**: Hardware-gated phase services (returns ERR_DOMAIN_NOT_AVAILABLE when unavailable)
14+
- `sector/xdv_kernel/src/kernel.ds`
15+
Dust kernel entry (`kernel_start`) and core runtime boot sequence.
16+
- `sector/xdv_kernel/src/kernel_runtime_shell.asm`
17+
bare-metal runtime shell profile (US keyboard layout, command buffer,
18+
dispatcher, and console command execution path used in VM bring-up flows).
1619

17-
The kernel runs on classical x86-64 hardware with full K-Domain functionality.
20+
## Domain Model
1821

19-
## Dependencies
22+
- `K-Domain`: classical x64 execution path (active on supported hardware).
23+
- `Q-Domain`: hardware-gated quantum domain interfaces.
24+
- `Phi-Domain`: hardware-gated phase-native interfaces.
2025

21-
- **dustlib**: Core types (Result, Option, Str)
22-
- **dustlib_k**: Memory allocation, threading, I/O operations
26+
When Q/Phi hardware is not present, domain probes and operations are expected
27+
to report domain-not-available behavior.
2328

24-
## Kernel Sectors
29+
## Sectors
2530

26-
The kernel is organized into 13 sectors:
31+
The workspace defines 13 sectors:
2732

28-
| Sector | Purpose | Status |
29-
|--------|---------|--------|
30-
| `xdv_boot` | Boot and early initialization ||
31-
| `xdv_memory` | Physical and virtual memory management ||
32-
| `xdv_cpu` | CPU management, interrupts, exceptions ||
33-
| `xdv_drivers` | Device drivers (VGA, keyboard, storage, network) ||
34-
| `xdv_kernel` | Core kernel functionality and main loop ||
35-
| `xdv_dal` | Domain Abstraction Layer - unified domain interfaces ||
36-
| `xdv_qdomain` | Quantum domain subsystem (hardware-gated) ||
37-
| `xdv_phidomain` | Phase-Native domain subsystem (hardware-gated) ||
38-
| `xdv_cds` | Cross-Domain Scheduler ||
39-
| `xdv_umf` | Unified Memory Fabric ||
40-
| `xdv_hypervisor` | Domain Hypervisor ||
41-
| `xdv_sdbm` | Secure Domain Boundary Manager ||
42-
| `xdv_odt` | Observability & Deterministic Trace Layer ||
33+
- `xdv_boot`
34+
- `xdv_memory`
35+
- `xdv_cpu`
36+
- `xdv_drivers`
37+
- `xdv_kernel`
38+
- `xdv_dal`
39+
- `xdv_qdomain`
40+
- `xdv_phidomain`
41+
- `xdv_cds`
42+
- `xdv_umf`
43+
- `xdv_hypervisor`
44+
- `xdv_sdbm`
45+
- `xdv_odt`
4346

44-
## Directory Structure
47+
Each sector contains `src/*.ds` and sector tests (`*_tests.ds`).
4548

46-
```
47-
xdv-kernel/
48-
├── State.toml
49-
├── README.md
50-
├── LICENSE
51-
├── sector/
52-
│ ├── xdv_boot/ # Boot sector
53-
│ │ ├── boot.ds
54-
│ │ └── boot_tests.ds
55-
│ ├── xdv_memory/ # Memory management
56-
│ │ ├── memory.ds
57-
│ │ └── memory_tests.ds
58-
│ ├── xdv_cpu/ # CPU management
59-
│ │ ├── cpu.ds
60-
│ │ └── cpu_tests.ds
61-
│ ├── xdv_drivers/ # Device drivers
62-
│ │ ├── drivers.ds
63-
│ │ └── drivers_tests.ds
64-
│ ├── xdv_kernel/ # Core kernel
65-
│ │ ├── kernel.ds
66-
│ │ ├── kernel_runtime_shell.asm
67-
│ │ └── kernel_tests.ds
68-
│ ├── xdv_dal/ # Domain Abstraction Layer
69-
│ │ ├── dal.ds
70-
│ │ └── dal_tests.ds
71-
│ ├── xdv_qdomain/ # Quantum domain (hardware-gated)
72-
│ │ ├── qdomain.ds
73-
│ │ └── qdomain_tests.ds
74-
│ ├── xdv_phidomain/ # Phase-native domain (hardware-gated)
75-
│ │ ├── phidomain.ds
76-
│ │ └── phidomain_tests.ds
77-
│ ├── xdv_cds/ # Cross-Domain Scheduler
78-
│ │ ├── cds.ds
79-
│ │ └── cds_tests.ds
80-
│ ├── xdv_umf/ # Unified Memory Fabric
81-
│ │ ├── umf.ds
82-
│ │ └── umf_tests.ds
83-
│ ├── xdv_hypervisor/ # Domain Hypervisor
84-
│ │ ├── hypervisor.ds
85-
│ │ └── hypervisor_tests.ds
86-
│ ├── xdv_sdbm/ # Secure Domain Boundary Manager
87-
│ │ ├── sdbm.ds
88-
│ │ └── sdbm_tests.ds
89-
│ └── xdv_odt/ # Observability & Trace
90-
│ ├── odt.ds
91-
│ └── odt_tests.ds
92-
```
93-
94-
## Domain Support
95-
96-
### K-Domain (Classical) - FULL
97-
Traditional computing on x86-64 architecture with full kernel support:
98-
- Process scheduling and management
99-
- Virtual memory with page tables
100-
- Device I/O
101-
- System calls
49+
## Build and Validation
10250

103-
### Q-Domain (Quantum) - HARDWARE GATED
104-
Operations return ERR_DOMAIN_NOT_AVAILABLE (100) when quantum hardware is not detected.
105-
- Check availability: `q_available()` returns 0
106-
107-
### Φ-Domain (Phase-Native) - HARDWARE GATED
108-
Operations return ERR_DOMAIN_NOT_AVAILABLE (100) when phase-native hardware is not detected.
109-
- Check availability: `phi_available()` returns 0
110-
111-
## Building
51+
Validate all sector source directories:
11252

11353
```bash
114-
# Check all kernel sectors
11554
dust check sector/xdv_boot/src
11655
dust check sector/xdv_memory/src
11756
dust check sector/xdv_cpu/src
@@ -127,60 +66,29 @@ dust check sector/xdv_sdbm/src
12766
dust check sector/xdv_odt/src
12867
```
12968

130-
## CI/CD
131-
132-
The kernel uses GitHub Actions for continuous integration:
133-
134-
```yaml
135-
# .github/workflows/ci.yml
136-
jobs:
137-
build:
138-
runs-on: ubuntu-latest
139-
steps:
140-
- uses: actions/checkout@v4
141-
- name: Clone dust compiler
142-
run: git clone --depth 1 https://github.com/dustlang/dust.git ../dust
143-
- name: Build Dust compiler
144-
run: cd ../dust && cargo build --workspace
145-
- name: Check all kernel sectors
146-
run: |
147-
for sector in xdv_boot xdv_memory xdv_cpu xdv_drivers xdv_kernel xdv_dal xdv_qdomain xdv_phidomain xdv_cds xdv_umf xdv_hypervisor xdv_sdbm xdv_odt; do
148-
dust check "sector/$sector/src"
149-
done
150-
```
69+
## Integration Notes
15170

152-
## Features
71+
- `xdv-boot` is responsible for loading `kernel.bin` and transferring control.
72+
- `xdv-os` image build composes `boot.bin` + `kernel.bin` into the xdvfs image.
73+
- kernel runtime output should be validated in VirtualBox against the expected
74+
boot contract chain.
15375

154-
### Memory Management
155-
- Physical memory allocator (buddy system)
156-
- Virtual memory with page tables
157-
- Domain-specific memory protections
158-
- Unified Memory Fabric
159-
160-
### Cross-Domain Scheduling
161-
- Unified scheduler for K, Q, and Φ domains
162-
- Priority-based and round-robin scheduling
163-
- Coherence-aware scheduling
164-
165-
### Security
166-
- Capability-based access control
167-
- Domain isolation enforcement
168-
- Cross-domain message validation
169-
170-
### Observability
171-
- Domain-specific telemetry collection
172-
- System health monitoring
173-
- Deterministic tracing
174-
175-
## Related Components
76+
## Documentation
17677

177-
- [xdv-boot](../xdv-boot) - Bootloader
178-
- [xdv-xdvfs](../xdv-xdvfs) - Native file system
78+
- `docs/README.md`
79+
- `docs/boot_runtime_flow.md`
80+
- `docs/sector_reference.md`
81+
- `spec/XDV-Kernel-v0.2-Specification.md`
82+
- `xdv-kernel_white_paper.md`
83+
- `CHANGELOG.md`
17984

180-
## Documentation
85+
## Related Projects
18186

182-
- [Specification](./spec/XDV-Kernel-v0.2-Specification.md) - Full kernel specification
87+
- [xdv-os](../xdv-os)
88+
- [xdv-boot](../xdv-boot)
89+
- [xdv-runtime](../xdv-runtime)
90+
- [xdv-xdvfs](../xdv-xdvfs)
18391

18492
## License
18593

186-
Copyright © 2026 Dust LLC - See LICENSE file
94+
Copyright (c) 2026 Dust LLC. See `LICENSE`.

docs/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# XDV Kernel Docs
2+
3+
This directory documents current `xdv-kernel` behavior and integration
4+
contracts.
5+
6+
## Files
7+
8+
- `boot_runtime_flow.md`: kernel boot/runtime flow and handoff contract.
9+
- `sector_reference.md`: sector-by-sector source map.
10+
11+
For broader architecture and rationale, also see:
12+
13+
- `../xdv-kernel_white_paper.md`
14+
- `../spec/XDV-Kernel-v0.2-Specification.md`

docs/boot_runtime_flow.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Boot and Runtime Flow
2+
3+
This document describes the current kernel runtime flow used in XDV OS bring-up.
4+
5+
## Boot Contract Boundary
6+
7+
1. `xdv-os` stage0 loads `boot.bin`.
8+
2. `xdv-boot` locates and loads `kernel.bin`.
9+
3. `xdv-boot` transfers control to kernel entry.
10+
4. `xdv-kernel` starts runtime path.
11+
12+
`xdv-kernel` assumes loader handoff is complete and begins kernel/runtime
13+
initialization from its entry profile.
14+
15+
## Kernel Entry Profiles
16+
17+
## Dust entry (`kernel.ds`)
18+
19+
- File: `sector/xdv_kernel/src/kernel.ds`
20+
- Primary routine: `kernel_start()`
21+
- High-level steps:
22+
1. print boot/banner messages,
23+
2. apply boot contract initialization hooks,
24+
3. load runtime bridge,
25+
4. start userspace bootstrap,
26+
5. enter kernel main loop.
27+
28+
## Bare-metal shell profile (`kernel_runtime_shell.asm`)
29+
30+
- File: `sector/xdv_kernel/src/kernel_runtime_shell.asm`
31+
- Provides:
32+
- VGA console output path,
33+
- PS/2 keyboard input (US layout, set-1 mapping),
34+
- command line buffer parsing,
35+
- shell command dispatch for xdv-shell, xdv-core, and xdv-xdvfs-utils
36+
bring-up command sets,
37+
- runtime status/metrics output used during VM validation.
38+
39+
## Runtime Signals
40+
41+
The kernel/runtime log stream includes:
42+
43+
- loader handoff confirmation,
44+
- kernel initialization banner and build date,
45+
- runtime bridge and userspace bootstrap status,
46+
- shell bridge/dispatcher status when shell path is active.
47+
48+
## Validation
49+
50+
Recommended checks:
51+
52+
```bash
53+
dust check sector/xdv_kernel/src
54+
dust check sector/xdv_memory/src
55+
dust check sector/xdv_cpu/src
56+
```
57+
58+
and integration boot validation through the `xdv-os` build and VM run path.

docs/sector_reference.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Sector Reference
2+
3+
The kernel workspace is split into sectors under `sector/`.
4+
5+
## Core sectors
6+
7+
- `sector/xdv_boot/src/boot.ds`
8+
- early boot/kernel bootstrap sector logic.
9+
- `sector/xdv_kernel/src/kernel.ds`
10+
- kernel top-level start path and runtime initialization.
11+
- `sector/xdv_kernel/src/kernel_runtime_shell.asm`
12+
- bare-metal runtime shell command/input path.
13+
14+
## Platform/runtime sectors
15+
16+
- `sector/xdv_memory/src/memory.ds`
17+
- memory model interfaces.
18+
- `sector/xdv_cpu/src/cpu.ds`
19+
- CPU/interrupt model interfaces.
20+
- `sector/xdv_drivers/src/drivers.ds`
21+
- core driver abstraction and bring-up interfaces.
22+
23+
## Cross-domain sectors
24+
25+
- `sector/xdv_dal/src/dal.ds`
26+
- domain abstraction layer.
27+
- `sector/xdv_qdomain/src/qdomain.ds`
28+
- Q-Domain model and hardware-gated interfaces.
29+
- `sector/xdv_phidomain/src/phidomain.ds`
30+
- Phi-Domain model and hardware-gated interfaces.
31+
- `sector/xdv_cds/src/cds.ds`
32+
- cross-domain scheduler model.
33+
- `sector/xdv_umf/src/umf.ds`
34+
- unified memory fabric model.
35+
- `sector/xdv_hypervisor/src/hypervisor.ds`
36+
- domain hypervisor model.
37+
- `sector/xdv_sdbm/src/sdbm.ds`
38+
- secure domain boundary management model.
39+
- `sector/xdv_odt/src/odt.ds`
40+
- observability and deterministic trace model.
41+
42+
## Tests
43+
44+
Each sector includes matching test modules, for example:
45+
46+
- `sector/xdv_kernel/src/kernel_tests.ds`
47+
- `sector/xdv_memory/src/memory_tests.ds`
48+
- `sector/xdv_cpu/src/cpu_tests.ds`
49+
50+
Use `dust check` over each sector `src` directory to validate parser/type
51+
coverage in CI and local workflows.

0 commit comments

Comments
 (0)