pub static FIXED_PAT: PageAttributeTable
Expand description

Theseus’s fixed PageAttributeTable has slots that align with the default meaning of page table entry bits on x86_64.

Bit PositionIf Clear (0)If Set (1)
0 (LSB)write backwrite through
1 (middle)cache enabledcache disabled
2 (MSB)N/AN/A

Thus, the following slots are chosen to align with those bits:

The following slots are available for custom use, and Theseus currently sets them up as such:

Currently, the difference between Uncacheable and UncachedMinus is not clear, so we offer slots for both.

Usage

You cannot and do not need to use this type directly, as it is pre-set up statically for you. Instead, use MemoryCachingType::pat_slot_index() to obtain the index of the PAT slot that has been set up for whatever MemoryCachingType you need.