pub struct Entry {
pub page_mask: u32,
pub vpn2: u64,
pub asid: u8,
pub global: bool,
pub region: u8,
pub lo0: PageEntry,
pub lo1: PageEntry,
}Expand description
One JTLB entry: a VPN2 tag plus the even and odd page it maps.
Fields§
§page_mask: u32PageMask, selecting the page size.
vpn2: u64The pair’s tag: VA(39:13) with every bit PageMask covers cleared,
held in place rather than divided down.
Storing the masked address rather than address / pair_size matters
because PageMask need not be contiguous: a canonicalized mask can have
a hole (0b11_11_11_11_00 covers bits 22:15 and leaves 14:13 alone), and
division only ever clears the low bits. The two agree for every legal
page size and diverge exactly on the masks n64-systemtest writes to check
the read-back.
asid: u8Address-space identifier.
global: boolGlobal: ignore ASID when matching.
Derived on write as EntryLo0.G AND EntryLo1.G (UM Fig. 5-10, p. 145),
which is why it lives on the entry rather than per-page.
region: u8The R field (bits 63:62 of EntryHi) — the 64-bit address region.
lo0: PageEntryEven page: EntryLo0.
lo1: PageEntryOdd page: EntryLo1.