Files | |
file | as.h |
file | asid.h |
file | frame.h |
file | memory_init.h |
file | page.h |
file | tlb.h |
file | as.c |
file | frame.c |
file | page.c |
file | tlb.c |
Data Structures | |
union | entry_lo |
struct | pte |
union | entry_hi |
union | page_mask |
union | index |
Defines | |
#define | KERNEL_ADDRESS_SPACE_SHADOWED_ARCH 0 |
#define | KERNEL_ADDRESS_SPACE_START_ARCH (unsigned long) 0x80000000 |
#define | KERNEL_ADDRESS_SPACE_END_ARCH (unsigned long) 0xffffffff |
#define | USER_ADDRESS_SPACE_START_ARCH (unsigned long) 0x00000000 |
#define | USER_ADDRESS_SPACE_END_ARCH (unsigned long) 0x7fffffff |
#define | USTACK_ADDRESS_ARCH (0x80000000-PAGE_SIZE) |
#define | ASID_MAX_ARCH 255 |
#define | FRAME_WIDTH 14 |
#define | FRAME_SIZE (1<<FRAME_WIDTH) |
#define | get_memory_size() CONFIG_MEMORY_SIZE |
#define | PAGE_WIDTH FRAME_WIDTH |
#define | PAGE_SIZE FRAME_SIZE |
#define | KA2PA(x) (((__address) (x)) - 0x80000000) |
#define | PA2KA(x) (((__address) (x)) + 0x80000000) |
#define | TLB_ENTRY_COUNT 48 |
#define | TLB_WIRED 1 |
#define | TLB_KSTACK_WIRED_INDEX 0 |
#define | TLB_PAGE_MASK_16K (0x3<<13) |
#define | PAGE_UNCACHED 2 |
#define | PAGE_CACHEABLE_EXC_WRITE 5 |
#define | tlb_invalidate(asid) tlb_invalidate_asid(asid) |
Typedefs | |
typedef __u8 | asid_t |
typedef entry_lo | entry_lo_t |
typedef entry_hi | entry_hi_t |
typedef page_mask | page_mask_t |
typedef index | tlb_index_t |
Functions | |
void | as_arch_init (void) |
static void | tlbp (void) |
static void | tlbr (void) |
static void | tlbwi (void) |
static void | tlbwr (void) |
void | tlb_invalid (istate_t *istate) |
void | tlb_refill (istate_t *istate) |
void | tlb_modified (istate_t *istate) |
void | as_install_arch (as_t *as) |
void | frame_arch_init (void) |
void | page_arch_init (void) |
__address | hw_map (__address physaddr, size_t size) |
static void | tlb_refill_fail (istate_t *istate) |
static void | tlb_invalid_fail (istate_t *istate) |
static void | tlb_modified_fail (istate_t *istate) |
static pte_t * | find_mapping_and_check (__address badvaddr, int access, istate_t *istate, int *pfrc) |
static void | prepare_entry_lo (entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, __address pfn) |
static void | prepare_entry_hi (entry_hi_t *hi, asid_t asid, __address addr) |
void | tlb_arch_init (void) |
void | tlb_print (void) |
void | tlb_invalidate_all (void) |
void | tlb_invalidate_asid (asid_t asid) |
void | tlb_invalidate_pages (asid_t asid, __address page, count_t cnt) |
|
|
|
Definition at line 39 of file frame.h. Referenced by anon_page_fault(), arc_frame_init(), elf_frame_free(), elf_page_fault(), phys_page_fault(), and sys_physmem_map(). |
|
Definition at line 38 of file frame.h. Referenced by ADDR2PFN(), PFN2ADDR(), and SIZE2FRAMES(). |
|
Definition at line 43 of file memory_init.h. Referenced by main_bsp(). |
|
Definition at line 44 of file page.h. Referenced by frame_init(), obj2slab(), pt_mapping_insert(), ptl0_create(), return_config_frames(), slab_space_alloc(), slab_space_free(), thr_destructor(), and zone_create(). |
|
|
|
|
|
|
|
Definition at line 45 of file page.h. Referenced by anon_page_fault(), clock_counter_init(), cpu_init(), fb_init(), klog_init(), pt_mapping_find(), pt_mapping_insert(), pt_mapping_remove(), ptl0_create(), slab_space_alloc(), thr_constructor(), and zone_merge(). |
|
Definition at line 53 of file tlb.h. Referenced by prepare_entry_lo(). |
|
|
Definition at line 52 of file tlb.h. Referenced by prepare_entry_lo(). |
|
Definition at line 40 of file page.h. Referenced by as_area_resize(), elf_frame_free(), and elf_page_fault(). |
|
Definition at line 44 of file tlb.h. Referenced by tlb_arch_init(), tlb_invalidate_all(), tlb_invalidate_asid(), and tlb_print(). |
|
|
|
|
|
Definition at line 50 of file tlb.h. Referenced by tlb_arch_init(), tlb_invalid(), tlb_modified(), and tlb_refill(). |
|
Definition at line 47 of file tlb.h. Referenced by tlb_invalidate_all(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Architecture dependent address space init. Definition at line 45 of file as.c. References as_operations, as_pt_operations, and asid_fifo_init(). Referenced by as_init(). Here is the call graph for this function: ![]() |
|
Install address space. Install ASID.
Definition at line 57 of file as.c. References entry_hi::asid, interrupts_disable(), interrupts_restore(), spinlock_lock, spinlock_unlock(), and entry_hi::value. Referenced by as_switch(). Here is the call graph for this function: ![]() |
|
Try to find PTE for faulting address Try to find PTE for faulting address. The AS->lock must be held on entry to this function.
Definition at line 386 of file tlb.c. References AS, as_page_fault(), entry_hi::asid, ASSERT, NULL, pte::p, page_mapping_find(), page_table_lock(), page_table_unlock(), panic, printf(), and entry_hi::value. Referenced by tlb_invalid(), tlb_modified(), and tlb_refill(). Here is the call graph for this function: ![]() |
|
Create memory zones If ARC is known, read information from ARC, otherwise assume some defaults.
Definition at line 46 of file frame.c. References ADDR2PFN(), arc_enabled(), arc_frame_init(), config, frame_mark_unavailable(), config_t::memory_size, and zone_create(). Referenced by frame_init(). Here is the call graph for this function: ![]() |
|
Map device into kernel space
Definition at line 48 of file page.c. Referenced by fb_init(). |
|
Definition at line 39 of file page.c. References pt_mapping_operations. Referenced by page_init(). |
|
Definition at line 458 of file tlb.c. References ALIGN_DOWN, entry_hi::asid, PAGE_SIZE, and entry_hi::value. Referenced by tlb_invalid(), tlb_invalidate_pages(), tlb_modified(), and tlb_refill(). |
|
Definition at line 448 of file tlb.c. References entry_lo::c, entry_lo::d, entry_lo::g, PAGE_CACHEABLE_EXC_WRITE, PAGE_UNCACHED, entry_lo::pfn, entry_lo::v, and entry_lo::value. Referenced by tlb_invalid(), tlb_modified(), and tlb_refill(). |
|
Initialize TLB Initialize TLB. Invalidate all entries and mark wired entries. Definition at line 64 of file tlb.c. References TLB_ENTRY_COUNT, TLB_PAGE_MASK_16K, and tlbwi(). Referenced by tlb_init(). Here is the call graph for this function: ![]() |
|
Process TLB Invalid Exception Process TLB Invalid Exception.
Definition at line 166 of file tlb.c. References pte::a, AS, entry_hi::asid, badvaddr, pte::cacheable, pte::d, find_mapping_and_check(), pte::g, pte::p, index::p, PAGE_SIZE, page_table_lock(), page_table_unlock(), panic, PF_ACCESS_READ, pte::pfn, prepare_entry_hi(), prepare_entry_lo(), printf(), tlb_invalid_fail(), TLB_PAGE_MASK_16K, tlbp(), tlbr(), tlbwi(), entry_lo::value, index::value, and entry_hi::value. Referenced by tlbinv_exception(). Here is the call graph for this function: ![]() |
|
Definition at line 352 of file tlb.c. References istate::epc, fault_if_from_uspace, get_symtab_entry(), and panic. Referenced by tlb_invalid(). Here is the call graph for this function: ![]() |
|
Invalidate all not wired TLB entries. Definition at line 494 of file tlb.c. References interrupts_disable(), TLB_ENTRY_COUNT, TLB_WIRED, tlbr(), tlbwi(), entry_lo::v, entry_lo::value, and entry_hi::value. Referenced by tlb_shootdown_ipi_recv(). Here is the call graph for this function: ![]() |
|
Invalidate all TLB entries belonging to specified address space.
Definition at line 528 of file tlb.c. References entry_hi::asid, ASID_INVALID, ASSERT, interrupts_disable(), TLB_ENTRY_COUNT, tlbr(), tlbwi(), entry_lo::v, entry_lo::value, and entry_hi::value. Referenced by asid_get(), and tlb_shootdown_ipi_recv(). Here is the call graph for this function: ![]() |
|
Invalidate TLB entries for specified page range belonging to specified address space.
Definition at line 570 of file tlb.c. References ASID_INVALID, ASSERT, interrupts_disable(), index::p, PAGE_SIZE, prepare_entry_hi(), tlbp(), tlbr(), tlbwi(), entry_lo::v, entry_lo::value, index::value, and entry_hi::value. Referenced by tlb_shootdown_ipi_recv(). Here is the call graph for this function: ![]() |
|
Process TLB Modified Exception Process TLB Modified Exception.
Definition at line 250 of file tlb.c. References pte::a, AS, entry_hi::asid, badvaddr, pte::cacheable, pte::d, find_mapping_and_check(), pte::g, pte::p, index::p, PAGE_SIZE, page_table_lock(), page_table_unlock(), panic, PF_ACCESS_WRITE, pte::pfn, prepare_entry_hi(), prepare_entry_lo(), printf(), tlb_modified_fail(), TLB_PAGE_MASK_16K, tlbp(), tlbr(), tlbwi(), entry_lo::value, index::value, entry_hi::value, and pte::w. Referenced by tlbmod_exception(). Here is the call graph for this function: ![]() |
|
Definition at line 363 of file tlb.c. References istate::epc, fault_if_from_uspace, get_symtab_entry(), and panic. Referenced by tlb_modified(). Here is the call graph for this function: ![]() |
|
Print contents of TLB. Definition at line 465 of file tlb.c. References entry_hi::asid, entry_lo::c, entry_lo::d, entry_lo::g, page_mask::mask, entry_lo::pfn, printf(), TLB_ENTRY_COUNT, tlbr(), entry_lo::v, entry_lo::value, page_mask::value, entry_hi::value, and entry_hi::vpn2. Referenced by cmd_tlb(). Here is the call graph for this function: ![]() |
|
Process TLB Refill Exception Process TLB Refill Exception.
Definition at line 94 of file tlb.c. References pte::a, AS, badvaddr, pte::cacheable, pte::d, find_mapping_and_check(), pte::g, pte::p, PAGE_SIZE, page_table_lock(), page_table_unlock(), panic, PF_ACCESS_READ, pte::pfn, prepare_entry_hi(), prepare_entry_lo(), spinlock_lock, spinlock_unlock(), TLB_PAGE_MASK_16K, tlb_refill_fail(), tlbwr(), entry_lo::value, and entry_hi::value. Here is the call graph for this function: ![]() |
|
Definition at line 335 of file tlb.c. References istate::epc, fault_if_from_uspace, get_symtab_entry(), panic, and istate::ra. Referenced by tlb_refill(). Here is the call graph for this function: ![]() |
|
Probe TLB for Matching Entry Probe TLB for Matching Entry. Definition at line 143 of file tlb.h. Referenced by tlb_invalid(), tlb_invalidate_pages(), and tlb_modified(). |
|
Read Indexed TLB Entry Read Indexed TLB Entry. Definition at line 153 of file tlb.h. Referenced by tlb_invalid(), tlb_invalidate_all(), tlb_invalidate_asid(), tlb_invalidate_pages(), tlb_modified(), and tlb_print(). |
|
Write Indexed TLB Entry Write Indexed TLB Entry. Definition at line 162 of file tlb.h. Referenced by tlb_arch_init(), tlb_invalid(), tlb_invalidate_all(), tlb_invalidate_asid(), tlb_invalidate_pages(), and tlb_modified(). |
|
Write Random TLB Entry Write Random TLB Entry. Definition at line 171 of file tlb.h. Referenced by tlb_refill(). |