HelenOS sources
as 51 kernel/arch/abs32le/include/arch/mm/as.h #define as_constructor_arch(as, flags) ((void)as, (void)flags, EOK)
as 52 kernel/arch/abs32le/include/arch/mm/as.h #define as_destructor_arch(as) ((void)as, 0)
as 53 kernel/arch/abs32le/include/arch/mm/as.h #define as_create_arch(as, flags) ((void)as, (void)flags, EOK)
as 54 kernel/arch/abs32le/include/arch/mm/as.h #define as_install_arch(as)
as 55 kernel/arch/abs32le/include/arch/mm/as.h #define as_deinstall_arch(as)
as 56 kernel/arch/abs32le/include/arch/mm/as.h #define as_invalidate_translation_cache(as, page, cnt)
as 49 kernel/arch/amd64/include/arch/mm/as.h #define as_constructor_arch(as, flags) ((void)as, (void)flags, EOK)
as 50 kernel/arch/amd64/include/arch/mm/as.h #define as_destructor_arch(as) ((void)as, 0)
as 51 kernel/arch/amd64/include/arch/mm/as.h #define as_create_arch(as, flags) ((void)as, (void)flags, EOK)
as 53 kernel/arch/amd64/include/arch/mm/as.h #define as_install_arch(as)
as 54 kernel/arch/amd64/include/arch/mm/as.h #define as_deinstall_arch(as)
as 55 kernel/arch/amd64/include/arch/mm/as.h #define as_invalidate_translation_cache(as, page, cnt)
as 52 kernel/arch/arm32/include/arch/mm/as.h #define as_constructor_arch(as, flags) ((void)as, (void)flags, EOK)
as 53 kernel/arch/arm32/include/arch/mm/as.h #define as_destructor_arch(as) ((void)as, 0)
as 54 kernel/arch/arm32/include/arch/mm/as.h #define as_create_arch(as, flags) ((void)as, (void)flags, EOK)
as 55 kernel/arch/arm32/include/arch/mm/as.h #define as_deinstall_arch(as)
as 56 kernel/arch/arm32/include/arch/mm/as.h #define as_invalidate_translation_cache(as, page, cnt)
as 53 kernel/arch/arm32/src/mm/as.c void as_install_arch(as_t *as)
as 52 kernel/arch/arm64/include/arch/mm/as.h #define as_constructor_arch(as, flags) ((void)as, (void)flags, EOK)
as 53 kernel/arch/arm64/include/arch/mm/as.h #define as_destructor_arch(as) ((void)as, 0)
as 54 kernel/arch/arm64/include/arch/mm/as.h #define as_create_arch(as, flags) ((void)as, (void)flags, EOK)
as 55 kernel/arch/arm64/include/arch/mm/as.h #define as_deinstall_arch(as)
as 56 kernel/arch/arm64/include/arch/mm/as.h #define as_invalidate_translation_cache(as, page, cnt)
as 61 kernel/arch/arm64/src/mm/as.c void as_install_arch(as_t *as)
as 65 kernel/arch/arm64/src/mm/as.c val = (uint64_t) as->genarch.page_table;
as 66 kernel/arch/arm64/src/mm/as.c if (as->asid != ASID_KERNEL) {
as 67 kernel/arch/arm64/src/mm/as.c val |= (uint64_t) as->asid << TTBR0_ASID_SHIFT;
as 51 kernel/arch/ia32/include/arch/mm/as.h #define as_constructor_arch(as, flags) ((void)as, (void)flags, EOK)
as 52 kernel/arch/ia32/include/arch/mm/as.h #define as_destructor_arch(as) ((void)as, 0)
as 53 kernel/arch/ia32/include/arch/mm/as.h #define as_create_arch(as, flags) ((void)as, (void)flags, EOK)
as 54 kernel/arch/ia32/include/arch/mm/as.h #define as_install_arch(as)
as 55 kernel/arch/ia32/include/arch/mm/as.h #define as_deinstall_arch(as)
as 56 kernel/arch/ia32/include/arch/mm/as.h #define as_invalidate_translation_cache(as, page, cnt)
as 51 kernel/arch/ia64/include/arch/mm/as.h #define as_constructor_arch(as, flags) ((void)as, (void)flags, EOK)
as 52 kernel/arch/ia64/include/arch/mm/as.h #define as_destructor_arch(as) ((void)as, 0)
as 53 kernel/arch/ia64/include/arch/mm/as.h #define as_create_arch(as, flags) ((void)as, (void)flags, EOK)
as 54 kernel/arch/ia64/include/arch/mm/as.h #define as_deinstall_arch(as)
as 55 kernel/arch/ia64/include/arch/mm/as.h #define as_invalidate_translation_cache(as, page, cnt)
as 56 kernel/arch/ia64/src/mm/as.c void as_install_arch(as_t *as)
as 61 kernel/arch/ia64/src/mm/as.c assert(as->asid != ASID_INVALID);
as 73 kernel/arch/ia64/src/mm/as.c rr.map.rid = ASID2RID(as->asid, i);
as 430 kernel/arch/ia64/src/mm/tlb.c dtc_mapping_insert(t->page, t->as->asid, entry);
as 433 kernel/arch/ia64/src/mm/tlb.c vhpt_mapping_insert(t->page, t->as->asid, entry);
as 459 kernel/arch/ia64/src/mm/tlb.c itc_mapping_insert(t->page, t->as->asid, entry);
as 462 kernel/arch/ia64/src/mm/tlb.c vhpt_mapping_insert(t->page, t->as->asid, entry);
as 557 kernel/arch/ia64/src/mm/tlb.c dtc_mapping_insert(page, TASK->as->asid, entry);
as 590 kernel/arch/ia64/src/mm/tlb.c as_t *as = AS;
as 600 kernel/arch/ia64/src/mm/tlb.c as = AS_KERNEL;
as 605 kernel/arch/ia64/src/mm/tlb.c bool found = page_mapping_find(as, va, true, &t);
as 649 kernel/arch/ia64/src/mm/tlb.c as_t *as = AS;
as 654 kernel/arch/ia64/src/mm/tlb.c as = AS_KERNEL;
as 656 kernel/arch/ia64/src/mm/tlb.c bool found = page_mapping_find(as, va, true, &t);
as 668 kernel/arch/ia64/src/mm/tlb.c page_mapping_update(as, va, true, &t);
as 717 kernel/arch/ia64/src/mm/tlb.c as_t *as = AS;
as 722 kernel/arch/ia64/src/mm/tlb.c as = AS_KERNEL;
as 724 kernel/arch/ia64/src/mm/tlb.c bool found = page_mapping_find(as, va, true, &t);
as 736 kernel/arch/ia64/src/mm/tlb.c page_mapping_update(as, va, true, &t);
as 51 kernel/arch/mips32/include/arch/mm/as.h #define as_constructor_arch(as, flags) ((void)as, (void)flags, EOK)
as 52 kernel/arch/mips32/include/arch/mm/as.h #define as_destructor_arch(as) ((void)as, 0)
as 53 kernel/arch/mips32/include/arch/mm/as.h #define as_create_arch(as, flags) ((void)as, (void)flags, EOK)
as 54 kernel/arch/mips32/include/arch/mm/as.h #define as_deinstall_arch(as)
as 55 kernel/arch/mips32/include/arch/mm/as.h #define as_invalidate_translation_cache(as, page, cnt)
as 57 kernel/arch/mips32/src/mm/as.c void as_install_arch(as_t *as)
as 66 kernel/arch/mips32/src/mm/as.c hi.asid = as->asid;
as 53 kernel/arch/ppc32/include/arch/mm/as.h #define as_constructor_arch(as, flags) ((void)as, (void)flags, EOK)
as 54 kernel/arch/ppc32/include/arch/mm/as.h #define as_destructor_arch(as) ((void)as, 0)
as 55 kernel/arch/ppc32/include/arch/mm/as.h #define as_create_arch(as, flags) ((void)as, (void)flags, EOK)
as 56 kernel/arch/ppc32/include/arch/mm/as.h #define as_deinstall_arch(as)
as 58 kernel/arch/ppc32/include/arch/mm/as.h #define as_invalidate_translation_cache(as, page, cnt) \
as 59 kernel/arch/ppc32/include/arch/mm/as.h pht_invalidate((as), (page), (cnt))
as 42 kernel/arch/ppc32/include/arch/mm/pht.h struct as;
as 46 kernel/arch/ppc32/include/arch/mm/pht.h extern void pht_invalidate(struct as *, uintptr_t, size_t);
as 55 kernel/arch/ppc32/src/mm/as.c void as_install_arch(as_t *as)
as 61 kernel/arch/ppc32/src/mm/as.c sr_set(0x6000, as->asid, sr);
as 65 kernel/arch/ppc32/src/mm/as.c sr_set(0x4000, as->asid, sr);
as 57 kernel/arch/ppc32/src/mm/pht.c static bool find_mapping_and_check(as_t *as, uintptr_t badvaddr, int access,
as 63 kernel/arch/ppc32/src/mm/pht.c bool found = page_mapping_find(as, badvaddr, true, pte);
as 80 kernel/arch/ppc32/src/mm/pht.c found = page_mapping_find(as, badvaddr, true, pte);
as 200 kernel/arch/ppc32/src/mm/pht.c void pht_invalidate(as_t *as, uintptr_t page, size_t pages)
as 54 kernel/arch/riscv64/include/arch/mm/as.h #define as_constructor_arch(as, flags) ((void)as, (void)flags, EOK)
as 55 kernel/arch/riscv64/include/arch/mm/as.h #define as_destructor_arch(as) ((void)as, 0)
as 56 kernel/arch/riscv64/include/arch/mm/as.h #define as_create_arch(as, flags) ((void)as, (void)flags, EOK)
as 57 kernel/arch/riscv64/include/arch/mm/as.h #define as_deinstall_arch(as)
as 58 kernel/arch/riscv64/include/arch/mm/as.h #define as_invalidate_translation_cache(as, page, cnt)
as 48 kernel/arch/riscv64/src/mm/as.c void as_install_arch(as_t *as)
as 84 kernel/arch/sparc64/include/arch/mm/sun4u/as.h #define as_invalidate_translation_cache(as, page, cnt) \
as 85 kernel/arch/sparc64/include/arch/mm/sun4u/as.h tsb_invalidate((as), (page), (cnt))
as 87 kernel/arch/sparc64/include/arch/mm/sun4u/as.h #define as_invalidate_translation_cache(as, page, cnt)
as 166 kernel/arch/sparc64/include/arch/mm/sun4u/tsb.h struct as;
as 169 kernel/arch/sparc64/include/arch/mm/sun4u/tsb.h extern void tsb_invalidate(struct as *as, uintptr_t page, size_t pages);
as 90 kernel/arch/sparc64/include/arch/mm/sun4v/as.h #define as_invalidate_translation_cache(as, page, cnt) \
as 91 kernel/arch/sparc64/include/arch/mm/sun4v/as.h tsb_invalidate((as), (page), (cnt))
as 93 kernel/arch/sparc64/include/arch/mm/sun4v/as.h #define as_invalidate_translation_cache(as, page, cnt)
as 70 kernel/arch/sparc64/include/arch/mm/sun4v/tsb.h struct as;
as 73 kernel/arch/sparc64/include/arch/mm/sun4v/tsb.h extern void tsb_invalidate(struct as *as, uintptr_t page, size_t pages);
as 62 kernel/arch/sparc64/src/mm/sun4u/as.c errno_t as_constructor_arch(as_t *as, unsigned int flags)
as 73 kernel/arch/sparc64/src/mm/sun4u/as.c as->arch.itsb = tsb;
as 74 kernel/arch/sparc64/src/mm/sun4u/as.c as->arch.dtsb = tsb + ITSB_ENTRY_COUNT;
as 80 kernel/arch/sparc64/src/mm/sun4u/as.c int as_destructor_arch(as_t *as)
as 83 kernel/arch/sparc64/src/mm/sun4u/as.c frame_free(KA2PA((uintptr_t) as->arch.itsb), TSB_FRAMES);
as 91 kernel/arch/sparc64/src/mm/sun4u/as.c errno_t as_create_arch(as_t *as, unsigned int flags)
as 94 kernel/arch/sparc64/src/mm/sun4u/as.c tsb_invalidate(as, 0, (size_t) -1);
as 107 kernel/arch/sparc64/src/mm/sun4u/as.c void as_install_arch(as_t *as)
as 127 kernel/arch/sparc64/src/mm/sun4u/as.c ctx.context = as->asid;
as 133 kernel/arch/sparc64/src/mm/sun4u/as.c assert(as->arch.itsb);
as 134 kernel/arch/sparc64/src/mm/sun4u/as.c assert(as->arch.dtsb);
as 136 kernel/arch/sparc64/src/mm/sun4u/as.c uintptr_t tsb = (uintptr_t) as->arch.itsb;
as 159 kernel/arch/sparc64/src/mm/sun4u/as.c tsb_base_reg.base = ((uintptr_t) as->arch.itsb) >> MMU_PAGE_WIDTH;
as 161 kernel/arch/sparc64/src/mm/sun4u/as.c tsb_base_reg.base = ((uintptr_t) as->arch.dtsb) >> MMU_PAGE_WIDTH;
as 192 kernel/arch/sparc64/src/mm/sun4u/as.c void as_deinstall_arch(as_t *as)
as 205 kernel/arch/sparc64/src/mm/sun4u/as.c assert(as->arch.itsb);
as 206 kernel/arch/sparc64/src/mm/sun4u/as.c assert(as->arch.dtsb);
as 208 kernel/arch/sparc64/src/mm/sun4u/as.c uintptr_t tsb = (uintptr_t) as->arch.itsb;
as 141 kernel/arch/sparc64/src/mm/sun4u/tlb.c tag.context = t->as->asid;
as 178 kernel/arch/sparc64/src/mm/sun4u/tlb.c tag.context = t->as->asid;
as 240 kernel/arch/sparc64/src/mm/sun4u/tlb.c as_t *as = AS;
as 253 kernel/arch/sparc64/src/mm/sun4u/tlb.c as = AS_KERNEL;
as 259 kernel/arch/sparc64/src/mm/sun4u/tlb.c bool found = page_mapping_find(as, page_16k, true, &t);
as 272 kernel/arch/sparc64/src/mm/sun4u/tlb.c page_mapping_update(as, page_16k, true, &t);
as 293 kernel/arch/sparc64/src/mm/sun4u/tlb.c as_t *as = AS;
as 300 kernel/arch/sparc64/src/mm/sun4u/tlb.c as = AS_KERNEL;
as 302 kernel/arch/sparc64/src/mm/sun4u/tlb.c bool found = page_mapping_find(as, page_16k, true, &t);
as 314 kernel/arch/sparc64/src/mm/sun4u/tlb.c (as == AS_KERNEL) ? TLB_DEMAP_PRIMARY : TLB_DEMAP_SECONDARY,
as 320 kernel/arch/sparc64/src/mm/sun4u/tlb.c page_mapping_update(as, page_16k, true, &t);
as 54 kernel/arch/sparc64/src/mm/sun4u/tsb.c void tsb_invalidate(as_t *as, uintptr_t page, size_t pages)
as 60 kernel/arch/sparc64/src/mm/sun4u/tsb.c assert(as->arch.itsb);
as 61 kernel/arch/sparc64/src/mm/sun4u/tsb.c assert(as->arch.dtsb);
as 71 kernel/arch/sparc64/src/mm/sun4u/tsb.c as->arch.itsb[(i0 + i) & ITSB_ENTRY_MASK].tag.invalid = true;
as 72 kernel/arch/sparc64/src/mm/sun4u/tsb.c as->arch.dtsb[(i0 + i) & DTSB_ENTRY_MASK].tag.invalid = true;
as 83 kernel/arch/sparc64/src/mm/sun4u/tsb.c as_t *as;
as 89 kernel/arch/sparc64/src/mm/sun4u/tsb.c as = t->as;
as 91 kernel/arch/sparc64/src/mm/sun4u/tsb.c tte = &as->arch.itsb[entry];
as 104 kernel/arch/sparc64/src/mm/sun4u/tsb.c tte->tag.context = as->asid;
as 127 kernel/arch/sparc64/src/mm/sun4u/tsb.c as_t *as;
as 133 kernel/arch/sparc64/src/mm/sun4u/tsb.c as = t->as;
as 135 kernel/arch/sparc64/src/mm/sun4u/tsb.c tte = &as->arch.dtsb[entry];
as 148 kernel/arch/sparc64/src/mm/sun4u/tsb.c tte->tag.context = as->asid;
as 65 kernel/arch/sparc64/src/mm/sun4v/as.c errno_t as_constructor_arch(as_t *as, unsigned int flags)
as 75 kernel/arch/sparc64/src/mm/sun4v/as.c as->arch.tsb_description.page_size = PAGESIZE_8K;
as 76 kernel/arch/sparc64/src/mm/sun4v/as.c as->arch.tsb_description.associativity = 1;
as 77 kernel/arch/sparc64/src/mm/sun4v/as.c as->arch.tsb_description.num_ttes = TSB_ENTRY_COUNT;
as 78 kernel/arch/sparc64/src/mm/sun4v/as.c as->arch.tsb_description.pgsize_mask = 1 << PAGESIZE_8K;
as 79 kernel/arch/sparc64/src/mm/sun4v/as.c as->arch.tsb_description.tsb_base = tsb_base;
as 80 kernel/arch/sparc64/src/mm/sun4v/as.c as->arch.tsb_description.reserved = 0;
as 81 kernel/arch/sparc64/src/mm/sun4v/as.c as->arch.tsb_description.context = 0;
as 89 kernel/arch/sparc64/src/mm/sun4v/as.c int as_destructor_arch(as_t *as)
as 92 kernel/arch/sparc64/src/mm/sun4v/as.c frame_free(as->arch.tsb_description.tsb_base, TSB_FRAMES);
as 100 kernel/arch/sparc64/src/mm/sun4v/as.c errno_t as_create_arch(as_t *as, unsigned int flags)
as 103 kernel/arch/sparc64/src/mm/sun4v/as.c tsb_invalidate(as, 0, (size_t) -1);
as 117 kernel/arch/sparc64/src/mm/sun4v/as.c void as_install_arch(as_t *as)
as 119 kernel/arch/sparc64/src/mm/sun4v/as.c mmu_secondary_context_write(as->asid);
as 124 kernel/arch/sparc64/src/mm/sun4v/as.c assert(as->arch.tsb_description.tsb_base);
as 125 kernel/arch/sparc64/src/mm/sun4v/as.c uintptr_t tsb = PA2KA(as->arch.tsb_description.tsb_base);
as 138 kernel/arch/sparc64/src/mm/sun4v/as.c __hypercall_fast2(MMU_TSB_CTXNON0, 1, KA2PA(&as->arch.tsb_description));
as 150 kernel/arch/sparc64/src/mm/sun4v/as.c void as_deinstall_arch(as_t *as)
as 163 kernel/arch/sparc64/src/mm/sun4v/as.c assert(as->arch.tsb_description.tsb_base);
as 165 kernel/arch/sparc64/src/mm/sun4v/as.c uintptr_t tsb = PA2KA(as->arch.tsb_description.tsb_base);
as 182 kernel/arch/sparc64/src/mm/sun4v/tlb.c t->page, t->as->asid, data.value, MMU_FLAG_DTLB, 0, MMU_MAP_ADDR);
as 207 kernel/arch/sparc64/src/mm/sun4v/tlb.c t->page, t->as->asid, data.value, MMU_FLAG_ITLB, 0, MMU_MAP_ADDR);
as 252 kernel/arch/sparc64/src/mm/sun4v/tlb.c as_t *as = AS;
as 260 kernel/arch/sparc64/src/mm/sun4v/tlb.c as = AS_KERNEL;
as 266 kernel/arch/sparc64/src/mm/sun4v/tlb.c bool found = page_mapping_find(as, va, true, &t);
as 279 kernel/arch/sparc64/src/mm/sun4v/tlb.c page_mapping_update(as, va, true, &t);
as 299 kernel/arch/sparc64/src/mm/sun4v/tlb.c as_t *as = AS;
as 302 kernel/arch/sparc64/src/mm/sun4v/tlb.c as = AS_KERNEL;
as 304 kernel/arch/sparc64/src/mm/sun4v/tlb.c bool found = page_mapping_find(as, va, true, &t);
as 320 kernel/arch/sparc64/src/mm/sun4v/tlb.c page_mapping_update(as, va, true, &t);
as 56 kernel/arch/sparc64/src/mm/sun4v/tsb.c void tsb_invalidate(as_t *as, uintptr_t page, size_t pages)
as 62 kernel/arch/sparc64/src/mm/sun4v/tsb.c assert(as->arch.tsb_description.tsb_base);
as 71 kernel/arch/sparc64/src/mm/sun4v/tsb.c tsb = (tsb_entry_t *) PA2KA(as->arch.tsb_description.tsb_base);
as 82 kernel/arch/sparc64/src/mm/sun4v/tsb.c as_t *as;
as 87 kernel/arch/sparc64/src/mm/sun4v/tsb.c as = t->as;
as 90 kernel/arch/sparc64/src/mm/sun4v/tsb.c tsb = (tsb_entry_t *) PA2KA(as->arch.tsb_description.tsb_base);
as 129 kernel/arch/sparc64/src/mm/sun4v/tsb.c as_t *as;
as 134 kernel/arch/sparc64/src/mm/sun4v/tsb.c as = t->as;
as 136 kernel/arch/sparc64/src/mm/sun4v/tsb.c tsb = (tsb_entry_t *) PA2KA(as->arch.tsb_description.tsb_base);
as 45 kernel/genarch/include/genarch/mm/as_ht.h struct as;
as 49 kernel/genarch/include/genarch/mm/as_ht.h struct as *as; /**< Address space. */
as 105 kernel/genarch/src/mm/as_ht.c void ht_lock(as_t *as, bool lock)
as 108 kernel/genarch/src/mm/as_ht.c mutex_lock(&as->lock);
as 120 kernel/genarch/src/mm/as_ht.c void ht_unlock(as_t *as, bool unlock)
as 123 kernel/genarch/src/mm/as_ht.c mutex_unlock(&as->lock);
as 133 kernel/genarch/src/mm/as_ht.c bool ht_locked(as_t *as)
as 135 kernel/genarch/src/mm/as_ht.c return mutex_locked(&as->lock);
as 125 kernel/genarch/src/mm/as_pt.c void pt_lock(as_t *as, bool lock)
as 128 kernel/genarch/src/mm/as_pt.c mutex_lock(&as->lock);
as 140 kernel/genarch/src/mm/as_pt.c void pt_unlock(as_t *as, bool unlock)
as 143 kernel/genarch/src/mm/as_pt.c mutex_unlock(&as->lock);
as 153 kernel/genarch/src/mm/as_pt.c bool pt_locked(as_t *as)
as 155 kernel/genarch/src/mm/as_pt.c return mutex_locked(&as->lock);
as 78 kernel/genarch/src/mm/asid.c as_t *as;
as 103 kernel/genarch/src/mm/asid.c as = list_get_instance(tmp, as_t, inactive_as_with_asid_link);
as 109 kernel/genarch/src/mm/asid.c asid = as->asid;
as 116 kernel/genarch/src/mm/asid.c as->asid = ASID_INVALID;
as 123 kernel/genarch/src/mm/asid.c as_invalidate_translation_cache(as, 0, (size_t) -1);
as 105 kernel/genarch/src/mm/page_ht.c hash = hash_combine(hash, (uintptr_t) pte->as);
as 125 kernel/genarch/src/mm/page_ht.c return (key[KEY_AS] == (uintptr_t) pte->as) &&
as 153 kernel/genarch/src/mm/page_ht.c void ht_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame,
as 157 kernel/genarch/src/mm/page_ht.c [KEY_AS] = (uintptr_t) as,
as 161 kernel/genarch/src/mm/page_ht.c assert(page_table_locked(as));
as 178 kernel/genarch/src/mm/page_ht.c pte->as = as;
as 204 kernel/genarch/src/mm/page_ht.c void ht_mapping_remove(as_t *as, uintptr_t page)
as 207 kernel/genarch/src/mm/page_ht.c [KEY_AS] = (uintptr_t) as,
as 211 kernel/genarch/src/mm/page_ht.c assert(page_table_locked(as));
as 224 kernel/genarch/src/mm/page_ht.c static pte_t *ht_mapping_find_internal(as_t *as, uintptr_t page, bool nolock)
as 227 kernel/genarch/src/mm/page_ht.c [KEY_AS] = (uintptr_t) as,
as 231 kernel/genarch/src/mm/page_ht.c assert(nolock || page_table_locked(as));
as 249 kernel/genarch/src/mm/page_ht.c bool ht_mapping_find(as_t *as, uintptr_t page, bool nolock, pte_t *pte)
as 253 kernel/genarch/src/mm/page_ht.c pte_t *t = ht_mapping_find_internal(as, page, nolock);
as 269 kernel/genarch/src/mm/page_ht.c void ht_mapping_update(as_t *as, uintptr_t page, bool nolock, pte_t *pte)
as 273 kernel/genarch/src/mm/page_ht.c pte_t *t = ht_mapping_find_internal(as, page, nolock);
as 277 kernel/genarch/src/mm/page_ht.c assert(pte->as == t->as);
as 79 kernel/genarch/src/mm/page_pt.c void pt_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame,
as 82 kernel/genarch/src/mm/page_pt.c pte_t *ptl0 = (pte_t *) PA2KA((uintptr_t) as->genarch.page_table);
as 84 kernel/genarch/src/mm/page_pt.c assert(page_table_locked(as));
as 160 kernel/genarch/src/mm/page_pt.c void pt_mapping_remove(as_t *as, uintptr_t page)
as 162 kernel/genarch/src/mm/page_pt.c assert(page_table_locked(as));
as 168 kernel/genarch/src/mm/page_pt.c pte_t *ptl0 = (pte_t *) PA2KA((uintptr_t) as->genarch.page_table);
as 294 kernel/genarch/src/mm/page_pt.c static pte_t *pt_mapping_find_internal(as_t *as, uintptr_t page, bool nolock)
as 296 kernel/genarch/src/mm/page_pt.c assert(nolock || page_table_locked(as));
as 298 kernel/genarch/src/mm/page_pt.c pte_t *ptl0 = (pte_t *) PA2KA((uintptr_t) as->genarch.page_table);
as 340 kernel/genarch/src/mm/page_pt.c bool pt_mapping_find(as_t *as, uintptr_t page, bool nolock, pte_t *pte)
as 342 kernel/genarch/src/mm/page_pt.c pte_t *t = pt_mapping_find_internal(as, page, nolock);
as 355 kernel/genarch/src/mm/page_pt.c void pt_mapping_update(as_t *as, uintptr_t page, bool nolock, pte_t *pte)
as 357 kernel/genarch/src/mm/page_pt.c pte_t *t = pt_mapping_find_internal(as, page, nolock);
as 66 kernel/generic/include/arch.h struct as;
as 81 kernel/generic/include/arch.h struct as *as; /**< Current address space. */
as 52 kernel/generic/include/mm/as.h #define AS CURRENT->as
as 257 kernel/generic/include/mm/as.h as_t *as;
as 73 kernel/generic/include/mm/asid.h extern void asid_install(as_t *as);
as 83 kernel/generic/include/proc/task.h as_t *as;
as 219 kernel/generic/src/ddi/ddi.c if (!as_area_create(TASK->as, flags, FRAMES2SIZE(pages),
as 248 kernel/generic/src/ddi/ddi.c return as_area_destroy(TASK->as, virt);
as 452 kernel/generic/src/ddi/ddi.c if (!as_area_create(TASK->as, map_flags, size,
as 469 kernel/generic/src/ddi/ddi.c return as_area_destroy(TASK->as, virt);
as 100 kernel/generic/src/debug/panic.c CURRENT->thread, CURRENT->task, CURRENT->cpu, CURRENT->as, CURRENT->magic);
as 47 kernel/generic/src/ipc/ops/sharein.c as_t *as = answer->sender->as;
as 52 kernel/generic/src/ipc/ops/sharein.c ipc_get_arg1(olddata), as, ipc_get_arg2(&answer->data),
as 63 kernel/generic/src/ipc/ops/shareout.c as_t *as = answer->sender->as;
as 67 kernel/generic/src/ipc/ops/shareout.c rc = as_area_share(as, ipc_get_arg1(olddata),
as 63 kernel/generic/src/lib/elf.c errno_t elf_load(elf_header_t *header, as_t *as)
as 101 kernel/generic/src/lib/elf.c errno_t rc = load_segment(seghdr, header, as);
as 118 kernel/generic/src/lib/elf.c errno_t load_segment(elf_segment_header_t *entry, elf_header_t *elf, as_t *as)
as 153 kernel/generic/src/lib/elf.c as_area_t *area = as_area_create(as, flags, mem_sz,
as 131 kernel/generic/src/mm/as.c as_t *as = (as_t *) obj;
as 133 kernel/generic/src/mm/as.c link_initialize(&as->inactive_as_with_asid_link);
as 134 kernel/generic/src/mm/as.c mutex_initialize(&as->lock, MUTEX_PASSIVE);
as 136 kernel/generic/src/mm/as.c return as_constructor_arch(as, flags);
as 171 kernel/generic/src/mm/as.c as_t *as = (as_t *) slab_alloc(as_cache, FRAME_ATOMIC);
as 172 kernel/generic/src/mm/as.c if (!as)
as 175 kernel/generic/src/mm/as.c (void) as_create_arch(as, 0);
as 177 kernel/generic/src/mm/as.c odict_initialize(&as->as_areas, as_areas_getkey, as_areas_cmp);
as 180 kernel/generic/src/mm/as.c as->asid = ASID_KERNEL;
as 182 kernel/generic/src/mm/as.c as->asid = ASID_INVALID;
as 184 kernel/generic/src/mm/as.c refcount_init(&as->refcount);
as 185 kernel/generic/src/mm/as.c as->cpu_refcount = 0;
as 188 kernel/generic/src/mm/as.c as->genarch.page_table = page_table_create(flags);
as 193 kernel/generic/src/mm/as.c return as;
as 206 kernel/generic/src/mm/as.c static void as_destroy(as_t *as)
as 210 kernel/generic/src/mm/as.c assert(as != AS);
as 211 kernel/generic/src/mm/as.c assert(refcount_unique(&as->refcount));
as 239 kernel/generic/src/mm/as.c if ((as->asid != ASID_INVALID) && (as != AS_KERNEL)) {
as 240 kernel/generic/src/mm/as.c if (as->cpu_refcount == 0)
as 241 kernel/generic/src/mm/as.c list_remove(&as->inactive_as_with_asid_link);
as 243 kernel/generic/src/mm/as.c asid_put(as->asid);
as 254 kernel/generic/src/mm/as.c as_area_t *area = as_area_first(as);
as 260 kernel/generic/src/mm/as.c as_area_destroy(as, area->base);
as 261 kernel/generic/src/mm/as.c area = as_area_first(as);
as 264 kernel/generic/src/mm/as.c odict_finalize(&as->as_areas);
as 267 kernel/generic/src/mm/as.c page_table_destroy(as->genarch.page_table);
as 272 kernel/generic/src/mm/as.c slab_free(as_cache, as);
as 283 kernel/generic/src/mm/as.c _NO_TRACE void as_hold(as_t *as)
as 285 kernel/generic/src/mm/as.c refcount_up(&as->refcount);
as 296 kernel/generic/src/mm/as.c _NO_TRACE void as_release(as_t *as)
as 298 kernel/generic/src/mm/as.c if (refcount_down(&as->refcount))
as 299 kernel/generic/src/mm/as.c as_destroy(as);
as 308 kernel/generic/src/mm/as.c as_area_t *as_area_first(as_t *as)
as 310 kernel/generic/src/mm/as.c odlink_t *odlink = odict_first(&as->as_areas);
as 325 kernel/generic/src/mm/as.c odlink_t *odlink = odict_next(&cur->las_areas, &cur->as->as_areas);
as 382 kernel/generic/src/mm/as.c _NO_TRACE static bool check_area_conflicts(as_t *as, uintptr_t addr,
as 386 kernel/generic/src/mm/as.c assert(mutex_locked(&as->lock));
as 408 kernel/generic/src/mm/as.c odlink_t *odlink = odict_find_leq(&as->as_areas, &addr, NULL);
as 424 kernel/generic/src/mm/as.c odlink = odict_next(odlink, &as->as_areas);
as 432 kernel/generic/src/mm/as.c odlink = odict_first(&as->as_areas);
as 476 kernel/generic/src/mm/as.c _NO_TRACE static uintptr_t as_get_unmapped_area(as_t *as, uintptr_t bound,
as 479 kernel/generic/src/mm/as.c assert(mutex_locked(&as->lock));
as 508 kernel/generic/src/mm/as.c if (check_area_conflicts(as, addr, pages, guarded, NULL))
as 513 kernel/generic/src/mm/as.c as_area_t *area = as_area_first(as);
as 529 kernel/generic/src/mm/as.c (check_area_conflicts(as, addr, pages, guarded, area)));
as 743 kernel/generic/src/mm/as.c as_area_t *as_area_create(as_t *as, unsigned int flags, size_t size,
as 761 kernel/generic/src/mm/as.c mutex_lock(&as->lock);
as 764 kernel/generic/src/mm/as.c *base = as_get_unmapped_area(as, bound, size, guarded);
as 766 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 772 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 776 kernel/generic/src/mm/as.c if (!check_area_conflicts(as, *base, pages, guarded, NULL)) {
as 777 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 783 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 789 kernel/generic/src/mm/as.c area->as = as;
as 814 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 829 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 839 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 847 kernel/generic/src/mm/as.c odict_insert(&area->las_areas, &as->as_areas, NULL);
as 849 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 863 kernel/generic/src/mm/as.c _NO_TRACE static as_area_t *find_area_and_lock(as_t *as, uintptr_t va)
as 865 kernel/generic/src/mm/as.c assert(mutex_locked(&as->lock));
as 867 kernel/generic/src/mm/as.c odlink_t *odlink = odict_find_leq(&as->as_areas, &va, NULL);
as 895 kernel/generic/src/mm/as.c errno_t as_area_resize(as_t *as, uintptr_t address, size_t size, unsigned int flags)
as 900 kernel/generic/src/mm/as.c mutex_lock(&as->lock);
as 905 kernel/generic/src/mm/as.c as_area_t *area = find_area_and_lock(as, address);
as 907 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 916 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 928 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 939 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 951 kernel/generic/src/mm/as.c page_table_lock(as, false);
as 958 kernel/generic/src/mm/as.c as->asid, area->base + P2SZ(pages),
as 1009 kernel/generic/src/mm/as.c bool found = page_mapping_find(as,
as 1024 kernel/generic/src/mm/as.c page_mapping_remove(as, ptr + P2SZ(i));
as 1033 kernel/generic/src/mm/as.c tlb_invalidate_pages(as->asid,
as 1041 kernel/generic/src/mm/as.c as_invalidate_translation_cache(as,
as 1046 kernel/generic/src/mm/as.c page_table_unlock(as, false);
as 1059 kernel/generic/src/mm/as.c if (!check_area_conflicts(as, address, pages, guarded, area)) {
as 1061 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 1069 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 1077 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 1090 kernel/generic/src/mm/as.c errno_t as_area_destroy(as_t *as, uintptr_t address)
as 1092 kernel/generic/src/mm/as.c mutex_lock(&as->lock);
as 1094 kernel/generic/src/mm/as.c as_area_t *area = find_area_and_lock(as, address);
as 1096 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 1103 kernel/generic/src/mm/as.c page_table_lock(as, false);
as 1107 kernel/generic/src/mm/as.c ipl_t ipl = tlb_shootdown_start(TLB_INVL_PAGES, as->asid, area->base,
as 1119 kernel/generic/src/mm/as.c bool found = page_mapping_find(as,
as 1134 kernel/generic/src/mm/as.c page_mapping_remove(as, ptr + P2SZ(size));
as 1145 kernel/generic/src/mm/as.c tlb_invalidate_pages(as->asid, area->base, area->pages);
as 1151 kernel/generic/src/mm/as.c as_invalidate_translation_cache(as, area->base, area->pages);
as 1154 kernel/generic/src/mm/as.c page_table_unlock(as, false);
as 1169 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 1363 kernel/generic/src/mm/as.c errno_t as_area_change_flags(as_t *as, unsigned int flags, uintptr_t address)
as 1368 kernel/generic/src/mm/as.c mutex_lock(&as->lock);
as 1370 kernel/generic/src/mm/as.c as_area_t *area = find_area_and_lock(as, address);
as 1372 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 1379 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 1388 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 1398 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 1402 kernel/generic/src/mm/as.c page_table_lock(as, false);
as 1407 kernel/generic/src/mm/as.c ipl_t ipl = tlb_shootdown_start(TLB_INVL_PAGES, as->asid, area->base,
as 1423 kernel/generic/src/mm/as.c bool found = page_mapping_find(as, ptr + P2SZ(size),
as 1434 kernel/generic/src/mm/as.c page_mapping_remove(as, ptr + P2SZ(size));
as 1444 kernel/generic/src/mm/as.c tlb_invalidate_pages(as->asid, area->base, area->pages);
as 1450 kernel/generic/src/mm/as.c as_invalidate_translation_cache(as, area->base, area->pages);
as 1453 kernel/generic/src/mm/as.c page_table_unlock(as, false);
as 1473 kernel/generic/src/mm/as.c page_table_lock(as, false);
as 1476 kernel/generic/src/mm/as.c page_mapping_insert(as, ptr + P2SZ(size),
as 1479 kernel/generic/src/mm/as.c page_table_unlock(as, false);
as 1488 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 1789 kernel/generic/src/mm/as.c _NO_TRACE void page_table_lock(as_t *as, bool lock)
as 1794 kernel/generic/src/mm/as.c as_operations->page_table_lock(as, lock);
as 1803 kernel/generic/src/mm/as.c _NO_TRACE void page_table_unlock(as_t *as, bool unlock)
as 1808 kernel/generic/src/mm/as.c as_operations->page_table_unlock(as, unlock);
as 1818 kernel/generic/src/mm/as.c _NO_TRACE bool page_table_locked(as_t *as)
as 1823 kernel/generic/src/mm/as.c return as_operations->page_table_locked(as);
as 2170 kernel/generic/src/mm/as.c as_area_info_t *as_get_area_info(as_t *as, size_t *osize)
as 2172 kernel/generic/src/mm/as.c mutex_lock(&as->lock);
as 2175 kernel/generic/src/mm/as.c size_t area_cnt = odict_count(&as->as_areas);
as 2180 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 2188 kernel/generic/src/mm/as.c as_area_t *area = as_area_first(as);
as 2202 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 2213 kernel/generic/src/mm/as.c void as_print(as_t *as)
as 2215 kernel/generic/src/mm/as.c mutex_lock(&as->lock);
as 2218 kernel/generic/src/mm/as.c as_area_t *area = as_area_first(as);
as 2230 kernel/generic/src/mm/as.c mutex_unlock(&as->lock);
as 115 kernel/generic/src/mm/backend_anon.c assert(mutex_locked(&area->as->lock));
as 133 kernel/generic/src/mm/backend_anon.c page_table_lock(area->as, false);
as 134 kernel/generic/src/mm/backend_anon.c found = page_mapping_find(area->as, base + P2SZ(j),
as 144 kernel/generic/src/mm/backend_anon.c page_table_unlock(area->as, false);
as 277 kernel/generic/src/mm/backend_anon.c assert(page_table_locked(area->as));
as 159 kernel/generic/src/mm/backend_elf.c assert(mutex_locked(&area->as->lock));
as 204 kernel/generic/src/mm/backend_elf.c page_table_lock(area->as, false);
as 205 kernel/generic/src/mm/backend_elf.c found = page_mapping_find(area->as,
as 216 kernel/generic/src/mm/backend_elf.c page_table_unlock(area->as, false);
as 422 kernel/generic/src/mm/backend_elf.c assert(page_table_locked(area->as));
as 97 kernel/generic/src/mm/backend_phys.c assert(mutex_locked(&area->as->lock));
as 166 kernel/generic/src/mm/backend_user.c assert(page_table_locked(area->as));
as 97 kernel/generic/src/mm/page.c _NO_TRACE void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame,
as 100 kernel/generic/src/mm/page.c assert(page_table_locked(as));
as 105 kernel/generic/src/mm/page.c page_mapping_operations->mapping_insert(as, ALIGN_DOWN(page, PAGE_SIZE),
as 122 kernel/generic/src/mm/page.c _NO_TRACE void page_mapping_remove(as_t *as, uintptr_t page)
as 124 kernel/generic/src/mm/page.c assert(page_table_locked(as));
as 129 kernel/generic/src/mm/page.c page_mapping_operations->mapping_remove(as,
as 146 kernel/generic/src/mm/page.c _NO_TRACE bool page_mapping_find(as_t *as, uintptr_t page, bool nolock,
as 149 kernel/generic/src/mm/page.c assert(nolock || page_table_locked(as));
as 154 kernel/generic/src/mm/page.c return page_mapping_operations->mapping_find(as,
as 167 kernel/generic/src/mm/page.c _NO_TRACE void page_mapping_update(as_t *as, uintptr_t page, bool nolock,
as 170 kernel/generic/src/mm/page.c assert(nolock || page_table_locked(as));
as 175 kernel/generic/src/mm/page.c page_mapping_operations->mapping_update(as,
as 61 kernel/generic/src/proc/current.c the->as = NULL;
as 73 kernel/generic/src/proc/program.c errno_t program_create(as_t *as, uspace_addr_t entry_addr, char *name, program_t *prg)
as 80 kernel/generic/src/proc/program.c prg->task = task_create(as, name);
as 95 kernel/generic/src/proc/program.c as_area_t *area = as_area_create(as,
as 116 kernel/generic/src/proc/program.c as_area_destroy(as, virt);
as 143 kernel/generic/src/proc/program.c as_t *as = as_create(0);
as 144 kernel/generic/src/proc/program.c if (!as)
as 147 kernel/generic/src/proc/program.c prg->loader_status = elf_load((elf_header_t *) image_addr, as);
as 149 kernel/generic/src/proc/program.c as_release(as);
as 155 kernel/generic/src/proc/program.c errno_t rc = program_create(as, ((elf_header_t *) image_addr)->e_entry,
as 177 kernel/generic/src/proc/program.c as_t *as = as_create(0);
as 178 kernel/generic/src/proc/program.c if (!as)
as 183 kernel/generic/src/proc/program.c as_release(as);
as 189 kernel/generic/src/proc/program.c prg->loader_status = elf_load((elf_header_t *) program_loader, as);
as 191 kernel/generic/src/proc/program.c as_release(as);
as 197 kernel/generic/src/proc/program.c return program_create(as, ((elf_header_t *) program_loader)->e_entry,
as 198 kernel/generic/src/proc/scheduler.c as_t *new_as = task->as;
as 197 kernel/generic/src/proc/task.c task_t *task_create(as_t *as, const char *name)
as 207 kernel/generic/src/proc/task.c task->as = as;
as 244 kernel/generic/src/proc/task.c task->as = NULL;
as 288 kernel/generic/src/proc/task.c as_release(task->as);
as 633 kernel/generic/src/proc/task.c task->name, task->container, task, task->as,
as 644 kernel/generic/src/proc/task.c task->taskid, task->name, task->container, task, task->as);
as 139 kernel/generic/src/sysinfo/stats.c static size_t get_task_virtmem(as_t *as)
as 148 kernel/generic/src/sysinfo/stats.c if (mutex_trylock(&as->lock) != EOK)
as 154 kernel/generic/src/sysinfo/stats.c as_area_t *area = as_area_first(as);
as 164 kernel/generic/src/sysinfo/stats.c mutex_unlock(&as->lock);
as 176 kernel/generic/src/sysinfo/stats.c static size_t get_task_resmem(as_t *as)
as 185 kernel/generic/src/sysinfo/stats.c if (mutex_trylock(&as->lock) != EOK)
as 191 kernel/generic/src/sysinfo/stats.c as_area_t *area = as_area_first(as);
as 201 kernel/generic/src/sysinfo/stats.c mutex_unlock(&as->lock);
as 221 kernel/generic/src/sysinfo/stats.c stats_task->virtmem = get_task_virtmem(task->as);
as 222 kernel/generic/src/sysinfo/stats.c stats_task->resmem = get_task_resmem(task->as);
HelenOS homepage, sources at GitHub