⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Crate veridian_kernel

Crate veridian_kernel 

Source
Expand description

VeridianOS Kernel Library

This library provides the core functionality for the VeridianOS kernel and exports necessary items for testing.

Re-exports§

pub use mm::FrameNumber;
pub use mm::MemoryRegion;
pub use mm::FRAME_SIZE;
pub use sched::Priority;
pub use sched::SchedClass;
pub use sched::Task;

Modules§

arch
Architecture abstraction layer for VeridianOS.
audio
Audio subsystem for VeridianOS
bench
Benchmarking framework for VeridianOS kernel
bootstrap
Bootstrap module for kernel initialization
browser
Web Browser Engine for VeridianOS
crypto
Cryptographic Infrastructure
debug
Kernel Debug Infrastructure
desktop
Desktop subsystem
devtools
Developer Tools
drivers
Device drivers module
elf
ELF64 Binary Loader
error
Comprehensive error types for VeridianOS kernel
fs
Virtual Filesystem (VFS) Layer
graphics
Graphics and GUI subsystem
ipc
Inter-Process Communication (IPC) subsystem for VeridianOS
irq
Architecture-independent IRQ abstraction layer
log_service
Structured kernel log service
media
Media codecs and processing for VeridianOS
mm
Memory management subsystem
net
Network stack for VeridianOS
perf
Performance optimization and monitoring
phase2_validation
Phase 2 Complete Validation
pkg
Package Management System
power
Power management subsystem for VeridianOS
print
Kernel printing macros.
print_capture
Output capture buffer for redirecting println! output.
process
Process management module
raii
RAII (Resource Acquisition Is Initialization) patterns for kernel resources
sched
Process and thread scheduling module
security
Security infrastructure for VeridianOS This module provides comprehensive security features including:
serial
Generic serial interface for kernel console output.
services
System services module
stdlib
Standard Library Foundation
sync
Synchronization Primitives
sysfs
Virtual sysfs filesystem for VeridianOS.
test_tasks
Test tasks for verifying context switching functionality
thread_api
Thread Management APIs
timer
High-resolution timer management for VeridianOS.
userland
Userland Module
userspace
User-space support module
utils
Kernel utilities
verification
Formal Verification Module
video
Video framework for VeridianOS
virt
Virtualization subsystem - VMX hypervisor, EPT memory, containers

Macros§

benchmark
boot_print_num
Number printing (legacy - prefer kprint_num!)
boot_println
Bootstrap-safe println (legacy - prefer kprintln!)
defer
Macro to create RAII scope guards
define_bootstrap_stages
Macro to generate the 12 bootstrap stage tracking functions.
early_print
Early print macro for debugging
early_println
Early println macro for debugging
kernel_assert
Assertion macros for kernel tests
kernel_assert_eq
kernel_assert_ne
kernel_bench
Macro for creating benchmarks
kernel_error
kernel_test
Macro to define kernel tests
kprint
Print a string literal to the kernel console (all architectures). For formatted output, works on x86_64 and RISC-V only; no-op on AArch64.
kprint_num
Print a literal prefix followed by a number on all architectures. On AArch64, uses direct_uart assembly-based number printing.
kprint_rt
Print a runtime &str expression (not just a literal) on all architectures. On AArch64, uses direct_uart; on x86_64/RISC-V, uses serial print.
kprint_u64
Print a u64 number without newline on all architectures. On AArch64, uses direct_uart assembly; on x86_64/RISC-V, uses serial.
kprintln
Print a string literal followed by newline (all architectures). For formatted output, works on x86_64 and RISC-V only; no-op on AArch64.
print
println
register_test
require_capability
Capability check macro for system calls
serial_print
serial_println
test_module
Helper macro for creating test modules
test_timeout
trace
Convenience macro for recording trace events with zero overhead when disabled.

Structs§

BenchmarkRunner
Benchmark runner

Enums§

QemuExitCode

Traits§

Testable
Trait that all testable functions must implement

Functions§

cycles_to_ns
Convert CPU cycles to nanoseconds (approximate)
exit_qemu
Exit QEMU with a specific exit code
get_allocator
Get a reference to the global allocator
read_timestamp
Get current timestamp in nanoseconds (architecture-specific).
test_panic_handler
Panic handler for test mode