Expand description
This crate defines the structure of page table entry (PTE) flags on x86_64 and aarch64.
This crate offers two main types:
PteFlags
: the set of bit flags that apply to all architectures.PteFlagsX86_64
orPteFlagsAarch64
: the arch-specific set of bit flags that apply to only the given platform.- This crate also exports
PteFlagsArch
, an alias for the currently-active arch-specific type above (eitherPteFlagsX86_64
orPteFlagsAarch64
).
Type conversions
Notably, you can convert to and from these architecture-specific types
and architecture-generic type easily.
PteFlags
can be losslessly converted into PteFlagsX86_64
or PteFlagsAarch64
,
with the typical From
and Into
traits.
This makes it possible to set general architecture-indepedent flags first,
and then convert it in order to set more architecture-specific flags.
You can also convert PteFlagsX86_64
or PteFlagsAarch64
into PteFlags
,
but it may be lossy as only the bit flags defined in PteFlags
are preserved.
aarch64 considerations
When converting from PteFlags
to PteFlagsAarch64
,
certain bits will be set by default;
see PteFlagsAarch64::from()
for more information.
See the docs for PteFlagsAarch64
for its assumptions about system configuration.
Structs
- Common, architecture-independent flags for a page table entry (PTE) that define how a page is mapped.
- PteFlagsAarch64AArch64Page table entry (PTE) flags on aarch64.
- PteFlagsArchx86-64Page table entry (PTE) flags on x86_64.
- PteFlagsX86_64x86-64Page table entry (PTE) flags on x86_64.
Constants
- A mask for the bits of a page table entry that contain the physical frame address.