ax_cpu/trap/fault.rs
1//! Machine-reported memory access faults.
2
3bitflags::bitflags! {
4 /// Access information reported by a CPU page-fault trap.
5 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6 pub struct PageFaultFlags: usize {
7 /// The faulting access was a read.
8 const READ = 1 << 0;
9 /// The faulting access was a write.
10 const WRITE = 1 << 1;
11 /// The faulting access was an instruction fetch.
12 const EXECUTE = 1 << 2;
13 /// The fault came from a less-privileged user context.
14 const USER = 1 << 3;
15 }
16}