flush_all is called when all TLB entries should be flushed. If keep_global_entries is set, then TLB entries with their global bit set should not be flushed.
flush_page is invoked when pages containing laddr are to be removed from the TLB.
lookup is used by the CPU when a memory access misses the STC. It returns the matching TLB entry if the memory operation specified in mem_tr hits the TLB and does not raise an exception. Otherwise NULL is returned. The mode, linear_address, and type fields in mem_tr need to be valid when the method is invoked. The other fields passed through mem_tr are not to be used by the method and can carry any value. If the method returns true, the s.physical_address, pat_type, and mtrr_type fields of mem_tr must be updated by lookup.
Pages are added to the TLB with add. The supervisor_access field in attrs argument specifies the allowed access types in supervisor mode and user_access in attrs specifies the allowed access types in user mode.
itlb_lookup is a simplified version of lookup used only for instruction TLB lookups. If the lookup is successful valid and paddr should be set, otherwise valid should be cleared.
The class implementing the interface must make sure that only addresses mapped in the TLB are present in the STCs.