Lines Matching refs:mapped

194 	uint8_t *mapped;  in ZTEST()  local
202 k_mem_map_phys_bare(&mapped, k_mem_phys_addr(test_page), in ZTEST()
210 mapped[0] = 42; in ZTEST()
223 uint8_t *mapped; in ZTEST() local
228 k_mem_map_phys_bare(&mapped, k_mem_phys_addr(test_page), in ZTEST()
232 mapped[0] = 42; in ZTEST()
235 k_mem_unmap_phys_bare(mapped, sizeof(test_page)); in ZTEST()
239 mapped[0] = 42; in ZTEST()
251 uint8_t *mapped, *mapped_old; in ZTEST() local
255 k_mem_map_phys_bare(&mapped, k_mem_phys_addr(buf), in ZTEST()
258 printk("Mapped (1st time): %p\n", mapped); in ZTEST()
261 mapped_old = mapped; in ZTEST()
269 k_mem_unmap_phys_bare(mapped, BUF_SIZE); in ZTEST()
276 k_mem_map_phys_bare(&mapped, k_mem_phys_addr(buf), BUF_SIZE, BASE_FLAGS); in ZTEST()
278 printk("Mapped (2nd time): %p\n", mapped); in ZTEST()
280 zassert_equal(mapped, mapped_old, "Virtual memory region not reclaimed!"); in ZTEST()
291 char *mapped, *last_mapped; in ZTEST() local
303 mapped = k_mem_map(CONFIG_MMU_PAGE_SIZE, K_MEM_PERM_RW); in ZTEST()
304 zassert_not_null(mapped, "failed to map memory"); in ZTEST()
305 printk("mapped a page to %p\n", mapped); in ZTEST()
308 zassert_equal(mapped, last_mapped, in ZTEST()
311 last_mapped = mapped; in ZTEST()
314 sys_cache_data_flush_and_invd_range((void *)mapped, CONFIG_MMU_PAGE_SIZE); in ZTEST()
319 zassert_equal(mapped[i], '\x00', "page not zeroed"); in ZTEST()
328 (void)memset(mapped, '\xFF', CONFIG_MMU_PAGE_SIZE); in ZTEST()
331 sys_cache_data_flush_and_invd_range((void *)mapped, CONFIG_MMU_PAGE_SIZE); in ZTEST()
335 zassert_true(mapped[i] == '\xFF', in ZTEST()
337 mapped[i], i); in ZTEST()
340 k_mem_unmap(mapped, CONFIG_MMU_PAGE_SIZE); in ZTEST()
350 mapped[0] = 42; in ZTEST()
362 uint8_t *mapped; in ZTEST() local
366 mapped = k_mem_map(CONFIG_MMU_PAGE_SIZE, K_MEM_PERM_RW); in ZTEST()
367 zassert_not_null(mapped, "failed to map memory"); in ZTEST()
368 printk("mapped a page: %p - %p\n", mapped, in ZTEST()
369 mapped + CONFIG_MMU_PAGE_SIZE); in ZTEST()
372 mapped[0] = 42; in ZTEST()
376 mapped -= sizeof(void *); in ZTEST()
378 printk("trying to access %p\n", mapped); in ZTEST()
380 mapped[0] = 42; in ZTEST()
390 uint8_t *mapped; in ZTEST() local
394 mapped = k_mem_map(CONFIG_MMU_PAGE_SIZE, K_MEM_PERM_RW); in ZTEST()
395 zassert_not_null(mapped, "failed to map memory"); in ZTEST()
396 printk("mapped a page: %p - %p\n", mapped, in ZTEST()
397 mapped + CONFIG_MMU_PAGE_SIZE); in ZTEST()
400 mapped[0] = 42; in ZTEST()
404 mapped += CONFIG_MMU_PAGE_SIZE + sizeof(void *); in ZTEST()
406 printk("trying to access %p\n", mapped); in ZTEST()
408 mapped[0] = 42; in ZTEST()
513 K_APP_DMEM(default_part) uint8_t *mapped; in K_APP_DMEM()
517 mapped[0] = 42;
542 k_mem_map_phys_bare(&mapped, k_mem_phys_addr(test_page), sizeof(test_page), in ZTEST()
545 printk("mapped a page: %p - %p (with K_MEM_PERM_USER)\n", mapped, in ZTEST()
546 mapped + CONFIG_MMU_PAGE_SIZE); in ZTEST()
547 printk("trying to access %p from userspace\n", mapped); in ZTEST()
555 k_mem_unmap_phys_bare(mapped, sizeof(test_page)); in ZTEST()
563 k_mem_map_phys_bare(&mapped, k_mem_phys_addr(test_page), sizeof(test_page), in ZTEST()
566 printk("mapped a page: %p - %p (without K_MEM_PERM_USER)\n", mapped, in ZTEST()
567 mapped + CONFIG_MMU_PAGE_SIZE); in ZTEST()
568 printk("trying to access %p from userspace\n", mapped); in ZTEST()