/Zephyr-latest/include/zephyr/kernel/internal/ |
D | mm.h | 67 #define K_MEM_VIRT_ADDR(phys) ((phys) + K_MEM_VIRT_OFFSET) argument 150 static inline void *k_mem_virt_addr(uintptr_t phys) in k_mem_virt_addr() argument 153 __ASSERT(sys_mm_is_phys_addr_in_range(phys), in k_mem_virt_addr() 154 "physical address 0x%lx not in RAM", (unsigned long)phys); in k_mem_virt_addr() 158 (phys >= CONFIG_SRAM_BASE_ADDRESS) && in k_mem_virt_addr() 161 (phys < (CONFIG_SRAM_BASE_ADDRESS + in k_mem_virt_addr() 166 "physical address 0x%lx not in RAM", (unsigned long)phys); in k_mem_virt_addr() 173 return (void *)K_MEM_VIRT_ADDR(phys); in k_mem_virt_addr() 224 void k_mem_map_phys_bare(uint8_t **virt_ptr, uintptr_t phys, size_t size, 304 void *k_mem_map_phys_guard(uintptr_t phys, size_t size, uint32_t flags, bool is_anon);
|
/Zephyr-latest/kernel/include/ |
D | mmu.h | 78 #define K_MEM_BOOT_PHYS_TO_VIRT(phys) ((uint8_t *)(((uintptr_t)(phys)) + K_MEM_VM_OFFSET)) argument 254 static inline void k_mem_assert_phys_aligned(uintptr_t phys) in k_mem_assert_phys_aligned() argument 256 __ASSERT(phys % CONFIG_MMU_PAGE_SIZE == 0U, in k_mem_assert_phys_aligned() 257 "physical address 0x%lx is not page-aligned", phys); in k_mem_assert_phys_aligned() 258 (void)phys; in k_mem_assert_phys_aligned() 277 static inline bool k_mem_is_page_frame(uintptr_t phys) in k_mem_is_page_frame() argument 279 k_mem_assert_phys_aligned(phys); in k_mem_is_page_frame() 280 return IN_RANGE(phys, (uintptr_t)K_MEM_PHYS_RAM_START, in k_mem_is_page_frame() 284 static inline struct k_mem_page_frame *k_mem_phys_to_page_frame(uintptr_t phys) in k_mem_phys_to_page_frame() argument 286 __ASSERT(k_mem_is_page_frame(phys), in k_mem_phys_to_page_frame() [all …]
|
D | kernel_arch_interface.h | 316 void arch_mem_map(void *virt, uintptr_t phys, size_t size, uint32_t flags); 367 int arch_page_phys_get(void *virt, uintptr_t *phys); 419 void arch_mem_page_in(void *addr, uintptr_t phys); 435 void arch_mem_scratch(uintptr_t phys);
|
/Zephyr-latest/arch/xtensa/core/ |
D | mem_manage.c | 13 __weak bool sys_mm_is_phys_addr_in_range(uintptr_t phys) in sys_mm_is_phys_addr_in_range() argument 16 uintptr_t cached = (uintptr_t)sys_cache_cached_ptr_get((void *)phys); in sys_mm_is_phys_addr_in_range() 18 valid = ((phys >= CONFIG_SRAM_BASE_ADDRESS) && in sys_mm_is_phys_addr_in_range() 19 (phys < (CONFIG_SRAM_BASE_ADDRESS + (CONFIG_SRAM_SIZE * 1024UL)))); in sys_mm_is_phys_addr_in_range()
|
/Zephyr-latest/include/zephyr/devicetree/ |
D | can.h | 75 COND_CODE_1(DT_NODE_HAS_PROP(node_id, phys), \ 76 MAX(DT_PROP_OR(DT_PHANDLE(node_id, phys), min_bitrate, 0), min), \ 118 COND_CODE_1(DT_NODE_HAS_PROP(node_id, phys), \ 119 MIN(DT_PROP(DT_PHANDLE(node_id, phys), max_bitrate), max), \
|
/Zephyr-latest/tests/arch/arm64/arm64_mmu/src/ |
D | main.c | 91 uintptr_t phys = TEST_PHYS_ADDR; in ZTEST() local 94 int tables_used = mem_map_test(virt, phys, size); in ZTEST() 109 uintptr_t phys = TEST_PHYS_ADDR & ~(block_size - 1); in ZTEST() local 111 int tables_used = mem_map_test(virt, phys, block_size); in ZTEST() 127 uintptr_t phys = TEST_PHYS_ADDR & ~(block_size - 1); in ZTEST() local 130 int tables_used = mem_map_test(virt, phys, size); in ZTEST() 146 uintptr_t phys = (TEST_PHYS_ADDR & ~(block_size - 1)) - CONFIG_MMU_PAGE_SIZE; in ZTEST() local 149 int tables_used = mem_map_test(virt, phys, size); in ZTEST() 162 uintptr_t phys = TEST_PHYS_ADDR & ~(block_size - 1); in ZTEST() local 165 arch_mem_map((void *)virt, phys, size, K_MEM_ARM_NORMAL_NC); in ZTEST()
|
/Zephyr-latest/kernel/ |
D | mmu.c | 479 static int virt_to_page_frame(void *virt, uintptr_t *phys) in virt_to_page_frame() argument 489 if (phys != NULL) { in virt_to_page_frame() 490 *phys = k_mem_page_frame_to_phys(pf); in virt_to_page_frame() 523 uintptr_t phys; in map_anon_page() local 551 phys = k_mem_page_frame_to_phys(pf); in map_anon_page() 552 arch_mem_map(addr, phys, CONFIG_MMU_PAGE_SIZE, flags); in map_anon_page() 564 LOG_DBG("memory mapping anon page %p -> 0x%lx", addr, phys); in map_anon_page() 569 void *k_mem_map_phys_guard(uintptr_t phys, size_t size, uint32_t flags, bool is_anon) in k_mem_map_phys_guard() argument 662 arch_mem_map(dst, phys, size, flags); in k_mem_map_phys_guard() 680 uintptr_t phys; in k_mem_unmap_phys_guard() local [all …]
|
/Zephyr-latest/include/zephyr/drivers/mm/ |
D | system_mm.h | 110 int sys_mm_drv_map_page(void *virt, uintptr_t phys, uint32_t flags); 133 int sys_mm_drv_map_region(void *virt, uintptr_t phys, 157 int sys_mm_drv_map_array(void *virt, uintptr_t *phys, 403 int sys_mm_drv_page_phys_get(void *virt, uintptr_t *phys);
|
/Zephyr-latest/boards/sifive/hifive_unleashed/support/ |
D | openocd_hifive_unleashed.cfg | 20 $_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 21 $_TARGETNAME.1 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 22 $_TARGETNAME.2 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 23 $_TARGETNAME.3 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 24 $_TARGETNAME.4 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
|
/Zephyr-latest/boards/sifive/hifive_unmatched/support/ |
D | openocd_hifive_unmatched.cfg | 20 $_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 21 $_TARGETNAME.1 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 22 $_TARGETNAME.2 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 23 $_TARGETNAME.3 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1 24 $_TARGETNAME.4 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
|
/Zephyr-latest/lib/posix/options/ |
D | mmap.c | 52 uintptr_t phys; in mmap() local 86 phys = POINTER_TO_UINT(addr); in mmap() 87 k_mem_map_phys_bare((uint8_t **)&virt, phys, (size_t)ROUND_UP(len, _page_size), in mmap() 121 uintptr_t phys = 0; in munmap() local 123 if (arch_page_phys_get(addr, &phys) == 0) { in munmap()
|
/Zephyr-latest/drivers/mm/ |
D | mm_drv_intel_adsp_tlb.c | 67 int sys_mm_drv_map_page(void *virt, uintptr_t phys, uint32_t flags) in sys_mm_drv_map_page() argument 82 uintptr_t pa = POINTER_TO_UINT(sys_cache_cached_ptr_get(UINT_TO_POINTER(phys))); in sys_mm_drv_map_page() 144 int sys_mm_drv_map_region(void *virt, uintptr_t phys, in sys_mm_drv_map_region() argument 149 return sys_mm_drv_simple_map_region(va, phys, size, flags); in sys_mm_drv_map_region() 152 int sys_mm_drv_map_array(void *virt, uintptr_t *phys, in sys_mm_drv_map_array() argument 157 return sys_mm_drv_simple_map_array(va, phys, cnt, flags); in sys_mm_drv_map_array() 209 int sys_mm_drv_page_phys_get(void *virt, uintptr_t *phys) in sys_mm_drv_page_phys_get() argument 235 if (phys != NULL) { in sys_mm_drv_page_phys_get() 236 *phys = (ent & TLB_PADDR_MASK) * CONFIG_MM_DRV_PAGE_SIZE + L2_SRAM_BASE; in sys_mm_drv_page_phys_get()
|
D | mm_drv_common.h | 134 int sys_mm_drv_simple_map_region(void *virt, uintptr_t phys, 160 int sys_mm_drv_simple_map_array(void *virt, uintptr_t *phys,
|
D | mm_drv_intel_adsp_mtl_tlb.c | 171 int sys_mm_drv_map_page(void *virt, uintptr_t phys, uint32_t flags) in sys_mm_drv_map_page() argument 187 uintptr_t pa = POINTER_TO_UINT(sys_cache_cached_ptr_get(UINT_TO_POINTER(phys))); in sys_mm_drv_map_page() 209 if (UINT_TO_POINTER(phys) == NULL) { in sys_mm_drv_map_page() 285 int sys_mm_drv_map_region(void *virt, uintptr_t phys, in sys_mm_drv_map_region() argument 294 CHECKIF(!sys_mm_drv_is_addr_aligned(phys) || in sys_mm_drv_map_region() 302 pa = phys; in sys_mm_drv_map_region() 315 if (phys != 0) { in sys_mm_drv_map_region() 326 int sys_mm_drv_map_array(void *virt, uintptr_t *phys, in sys_mm_drv_map_array() argument 331 return sys_mm_drv_simple_map_array(va, phys, cnt, flags); in sys_mm_drv_map_array() 513 int sys_mm_drv_page_phys_get(void *virt, uintptr_t *phys) in sys_mm_drv_page_phys_get() argument [all …]
|
D | mm_drv_common.c | 116 int sys_mm_drv_simple_map_region(void *virt, uintptr_t phys, in sys_mm_drv_simple_map_region() argument 123 CHECKIF(!sys_mm_drv_is_addr_aligned(phys) || in sys_mm_drv_simple_map_region() 134 uintptr_t pa = phys + offset; in sys_mm_drv_simple_map_region() 161 int sys_mm_drv_simple_map_array(void *virt, uintptr_t *phys, in sys_mm_drv_simple_map_array() argument 168 CHECKIF(!sys_mm_drv_is_addr_array_aligned(phys, cnt) || in sys_mm_drv_simple_map_array() 181 ret = sys_mm_drv_map_page(va, phys[idx], flags); in sys_mm_drv_simple_map_array() 184 __ASSERT(false, "cannot map 0x%lx to %p\n", phys[idx], va); in sys_mm_drv_simple_map_array()
|
D | mm_drv_ti_rat.c | 98 int sys_mm_drv_page_phys_get(void *virt, uintptr_t *phys) in sys_mm_drv_page_phys_get() argument 104 uintptr_t *va = phys; in sys_mm_drv_page_phys_get()
|
/Zephyr-latest/subsys/demand_paging/eviction/ |
D | nru.c | 29 uintptr_t phys; in nru_periodic_update() local 33 K_MEM_PAGE_FRAME_FOREACH(phys, pf) { in nru_periodic_update() 131 void k_mem_paging_eviction_accessed(uintptr_t phys) in k_mem_paging_eviction_accessed() argument 133 ARG_UNUSED(phys); in k_mem_paging_eviction_accessed()
|
/Zephyr-latest/arch/x86/include/ |
D | x86_mmu.h | 158 static inline void z_x86_cr3_set(uintptr_t phys) in z_x86_kpti_is_access_ok() 160 __ASSERT((phys & PTABLES_ALIGN) == 0U, "unaligned page tables"); in z_x86_kpti_is_access_ok() 162 __asm__ volatile("movq %0, %%cr3\n\t" : : "r" (phys) : "memory"); in z_x86_kpti_is_access_ok() 164 __asm__ volatile("movl %0, %%cr3\n\t" : : "r" (phys) : "memory"); in z_x86_kpti_is_access_ok()
|
/Zephyr-latest/tests/bluetooth/controller/ctrl_min_used_chans/src/ |
D | main.c | 71 struct pdu_data_llctrl_min_used_chans_ind local_muc_ind = { .phys = 1, in ZTEST() 74 struct pdu_data_llctrl_min_used_chans_ind remote_muc_ind = { .phys = 1, in ZTEST() 133 struct pdu_data_llctrl_min_used_chans_ind remote_muc_ind = { .phys = 1, in ZTEST()
|
/Zephyr-latest/include/zephyr/kernel/mm/ |
D | demand_paging.h | 264 void k_mem_paging_eviction_accessed(uintptr_t phys); 278 static inline void k_mem_paging_eviction_accessed(uintptr_t phys) in k_mem_paging_eviction_accessed() argument 280 ARG_UNUSED(phys); in k_mem_paging_eviction_accessed()
|
/Zephyr-latest/arch/arm64/core/ |
D | mmu.c | 739 uintptr_t phys, uintptr_t virt, size_t size, uint32_t attrs) in __add_map() argument 745 name, virt, phys, size, desc, in __add_map() 747 __ASSERT(((virt | phys | size) & (CONFIG_MMU_PAGE_SIZE - 1)) == 0, in __add_map() 749 desc |= phys; in __add_map() 754 uintptr_t phys, uintptr_t virt, size_t size, uint32_t attrs) in add_map() argument 760 ret = __add_map(ptables, name, phys, virt, size, attrs); in add_map() 1045 static int __arch_mem_map(void *virt, uintptr_t phys, size_t size, uint32_t flags) in __arch_mem_map() argument 1109 return add_map(ptables, "generic", phys, (uintptr_t)virt, size, entry_flags); in __arch_mem_map() 1112 void arch_mem_map(void *virt, uintptr_t phys, size_t size, uint32_t flags) in arch_mem_map() argument 1114 int ret = __arch_mem_map(virt, phys, size, flags); in arch_mem_map() [all …]
|
/Zephyr-latest/arch/x86/core/ |
D | x86_mmu.c | 587 uintptr_t phys = get_entry_phys(entry, level); in print_entries() local 593 if (phys == virt) { in print_entries() 596 } else if (phys + K_MEM_VIRT_OFFSET == virt) { in print_entries() 617 phys = get_entry_phys(entry, level); in print_entries() 618 if (phys == virt) { in print_entries() 1095 static int range_map_ptables(pentry_t *ptables, void *virt, uintptr_t phys, in range_map_ptables() argument 1102 CHECKIF(!is_addr_aligned(phys) || !is_size_aligned(size)) { in range_map_ptables() 1125 entry_val = (pentry_t)(phys + offset) | entry_flags; in range_map_ptables() 1167 static int range_map(void *virt, uintptr_t phys, size_t size, in range_map() argument 1173 PRI_ENTRY " opt 0x%x", __func__, phys, virt, size, in range_map() [all …]
|
/Zephyr-latest/include/zephyr/sys/ |
D | mem_manage.h | 38 bool sys_mm_is_phys_addr_in_range(uintptr_t phys);
|
/Zephyr-latest/boards/digilent/arty_a7/support/ |
D | openocd_arty_a7_arm_designstart.cfg | 6 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
|
/Zephyr-latest/dts/arm/st/f7/ |
D | stm32f723.dtsi | 20 phys = <&usbphyc>;
|