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

from_x86_64

Function from_x86_64 

Source
pub fn from_x86_64(error_code: u64, cr2: u64, rip: u64) -> PageFaultInfo
Expand description

Build a PageFaultInfo from an x86_64 page fault error code and CR2.

Error code bits (from Intel SDM):

  • Bit 0 (P): 0 = not-present, 1 = protection violation
  • Bit 1 (W/R): 0 = read, 1 = write
  • Bit 2 (U/S): 0 = supervisor, 1 = user
  • Bit 4 (I/D): 1 = instruction fetch