|
ginnOS
The reference: libc, the libraries and the kernel
|
TLB shootdown (tlb.h). More...
#include "kernel/memory/tlb.h"#include "arch/arch.h"#include "arch/arch_cpu.h"#include "kernel/memory/user_space.h"#include "kernel/panic.h"#include "kernel/sync/spinlock.h"Macros | |
| #define | WAIT_LIMIT (1u << 28) |
Functions | |
| void | tlb_init (void) |
| set up the shootdown. | |
| void | tlb_shootdown_user (user_space_t *space, uintptr_t start, uintptr_t end) |
| flush [start, end) of a user space on the other cores that have it loaded, and wait until they have flushed. | |
| void | tlb_shootdown_kernel (uintptr_t start, uintptr_t end) |
| flush [start, end) of the kernel half on all the other cores, and wait until they have flushed. | |
| void | tlb_do_pending (void) |
| do the flush that another core asks of this core, if there is one. | |
TLB shootdown (tlb.h).
| #define WAIT_LIMIT (1u << 28) |
| void tlb_init | ( | void | ) |
set up the shootdown.
call once on the boot core, before the other cores start.
| void tlb_shootdown_user | ( | struct user_space * | space, |
| uintptr_t | start, | ||
| uintptr_t | end ) |
flush [start, end) of a user space on the other cores that have it loaded, and wait until they have flushed.
call it after the change to the page tables and before the frames are freed. any context; interrupts can be on or off.
| space | the user space whose page tables changed. |
| start | the first address, page-aligned. |
| end | the address after the range. |
flush [start, end) of the kernel half on all the other cores, and wait until they have flushed.
| start | the first address, page-aligned. |
| end | the address after the range. |
| void tlb_do_pending | ( | void | ) |
do the flush that another core asks of this core, if there is one.
the IPI handler calls it. call it with interrupts off.