wire / wire-format / tlb-entry
A TLB entry caches a virtual-to-physical address translation. Format (x86-64): VPN (virtual page number, 36-48 bits), PFN (physical frame number, 40 bits), flags (valid, dirty, accessed, global, ASID/PCID, permissions). TLB is fully associative or set-associative. On miss: page table walk (4 levels, ~100 cycles). On hit: ~1 cycle.
aka: TLB (Translation Lookaside Buffer) entry
spec: TLB (Translation Lookaside Buffer)
A TLB entry caches a virtual-to-physical address translation. Format (x86-64): VPN (virtual page number, 36-48 bits), PFN (physical frame number, 40 bits), flags (valid, dirty, accessed, global, ASID/PCID, permissions). TLB is fully associative or set-associative. On miss: page table walk (4 levels, ~100 cycles). On hit: ~1 cycle.
| field | size | meaning |
|---|---|---|
| Virtual Page Number (VPN) | 36-48 bits | High bits of the virtual address (page number). |
| Physical Frame Number (PFN) | 40 bits | High bits of the physical address (frame number). |
| Valid | 1 bit | 1 = entry is valid. |
| Dirty | 1 bit | 1 = page has been written to. |
| Accessed | 1 bit | 1 = page has been accessed. |
| Global | 1 bit | 1 = global page (not flushed on CR3 reload). Requires CR4.PGE. |
| ASID/PCID | 12 bits (PCID) | Process-Context ID. Tags TLB entries to avoid flushes on context switch. |
| Permissions | 3 bits | R/W/X (read/write/execute). Checked on every access. |
| Page size | encoding | 4KB, 2MB, or 1GB. Encoded in the TLB entry or determined by page table level. |
example:
00 00 00 00 00 00 00 00
TLB entry (placeholder)
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/tlb-entry
or /wire-format/tlb-entry.json