| |||
Home > Memory Management Unit > TLB match process |
The Virtualization Extensions and the Security Extensions provide for multiple virtual address spaces that are translated differently. The TLB entries store all the required context information to facilitate a match and avoid the requirement for a TLB flush on a context or virtual machine switch. Each TLB entry contains a virtual address, page size, physical address, and a set of memory properties that include the memory type and access permissions. Each entry is marked as being associated with a particular ASID, or as global for all application spaces. The TLB entry also contains a field to store the VMID that brought in the entry, applicable to accesses made from the Non-secure state, as defined by the Virtualization Extensions. There is also a bit that records whether that TLB entry is allocated on a Hyp mode request. A TLB entry match occurs when the following conditions are met:
Its virtual address, moderated by the page size such as the virtual address bits[31:N], where N is log2 of the page size for that translation stored in the TLB entry, matches that of the requested address.
The Non-secure TLB ID, NSTID, matches the Secure or Non-secure state of the requests.
The Hyp mode bit matches whether the request was made from Hyp mode.
The ASID matches the current ASID held in the CONTEXTIDR, TTBR0, or TTBR1 register or the entry is marked global.
The VMID matches the current VMID held in the VTTBR register.
For a request originating from Hyp mode, the ASID and VMID match are ignored.
For a request originating from Secure state, the VMID match is ignored.