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
11554dust check sector/xdv_boot/src
11655dust check sector/xdv_memory/src
11756dust check sector/xdv_cpu/src
@@ -127,60 +66,29 @@ dust check sector/xdv_sdbm/src
12766dust 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 ` .
0 commit comments