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

create_shadow_tables

Function create_shadow_tables 

Source
pub fn create_shadow_tables(kernel_cr3: u64) -> Result<u64, KernelError>
Expand description

Create shadow page tables from the kernel’s L4 table.

Allocates a new L4 frame and:

  1. Copies all user-space entries (L4[0..255]) from the kernel table.
  2. Leaves kernel-space entries (L4[256..510]) empty (unmapped).
  3. Maps a single trampoline page at L4[511] for syscall transitions.

Returns the physical address of the shadow L4 table.