AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
pmap.h File Reference

Go to the source code of this file.

Data Structures

struct  pmap
 An address space's page tables, on x86. More...

Functions

void tlb_shootdown (struct pmap *pmap, vaddr_t sva, vaddr_t eva, int leave)
 Flushes a range of an address space from every TLB that may have it cached, after its mappings changed (every CPU's, for the kernel's half).
void pmap_loaded (struct pmap *from, struct pmap *to)
 Records that this CPU switched page tables, so that TLB flushes go to the CPUs that may have a mapping cached.
void x86_tlb_ipi (void)
 Does the pending request if it is for the running CPU.

Function Documentation

◆ pmap_loaded()

void pmap_loaded ( struct pmap * from,
struct pmap * to )

Records that this CPU switched page tables, so that TLB flushes go to the CPUs that may have a mapping cached.

Parameters
fromthe page tables it had loaded, or NULL if none
tothe page tables it loaded

Definition at line 157 of file pmap.c.

◆ tlb_shootdown()

void tlb_shootdown ( struct pmap * pmap,
vaddr_t sva,
vaddr_t eva,
int leave )

Flushes a range of an address space from every TLB that may have it cached, after its mappings changed (every CPU's, for the kernel's half).

Each architecture implements it, in its mm code.

Parameters
pmapthe page tables that changed
svathe range's start
evaits end
leaveinstead of flushing, make the CPUs that have pmap loaded switch to the kernel's page tables, because it is going away

Definition at line 130 of file pmap.c.

◆ x86_tlb_ipi()

void x86_tlb_ipi ( void )

Does the pending request if it is for the running CPU.

It is called from the TLB IPI's handler, and while waiting for the kernel lock.

Definition at line 87 of file tlb.c.

References request, request_do(), and x86_tlb_ipi().

Referenced by __x86_irq_handler(), arch_lock_spin(), and x86_tlb_ipi().