Skip to main content

Crate ruvix_aarch64

Crate ruvix_aarch64 

Source
Expand description

AArch64 architecture support for RuVix Cognition Kernel

This crate provides low-level AArch64 support including:

  • Boot sequence and early initialization
  • Memory Management Unit (MMU) configuration
  • Exception handling (sync, IRQ, FIQ, SError)
  • System register access

§Memory Layout

0x0000_0000_0000_0000 - 0x0000_FFFF_FFFF_FFFF: User space (TTBR0_EL1)
0xFFFF_0000_0000_0000 - 0xFFFF_FFFF_FFFF_FFFF: Kernel space (TTBR1_EL1)

§Boot Sequence

  1. Assembly entry point (_start) disables interrupts
  2. Stack pointer initialized
  3. BSS section cleared
  4. early_init() called to set up MMU
  5. Exception vectors configured
  6. Jump to kernel_main()

Re-exports§

pub use boot::early_init;
pub use boot::kernel_main;
pub use mmu::Mmu;
pub use registers::*;

Modules§

boot
Boot sequence and early initialization for AArch64
exception
AArch64 exception handling
mmu
AArch64 Memory Management Unit (MMU) implementation
registers
AArch64 system register accessors

Constants§

KERNEL_VIRT_BASE
Kernel virtual base address (upper half)
PAGE_SHIFT
AArch64 page shift (log2 of page size)
PAGE_SIZE
AArch64 page size (4KB)
PHYS_RAM_BASE
VECTOR_ALIGNMENT
Exception vector alignment requirement (2KB = 0x800)

Functions§

phys_to_virt
Convert physical address to virtual (simple offset for identity mapping)
virt_to_phys
Convert virtual address to physical (simple offset for identity mapping)