/Zephyr-latest/include/zephyr/sys/ |
D | sys_io.h | 1 /* Port and memory mapped registers I/O operations */ 6 * SPDX-License-Identifier: Apache-2.0 147 /* Memory mapped registers I/O functions */ 150 * @fn static inline void sys_write8(uint8_t data, mm_reg_t addr); 151 * @brief Write a byte to a memory mapped register 153 * This function writes a byte to the given memory mapped register. 156 * @param addr the memory mapped register address where to write the byte 160 * @fn static inline uint8_t sys_read8(mm_reg_t addr); 161 * @brief Read a byte from a memory mapped register 163 * This function reads a byte from the given memory mapped register. [all …]
|
/Zephyr-latest/tests/kernel/mem_protect/mem_map/src/ |
D | main.c | 4 * SPDX-License-Identifier: Apache-2.0 17 /* 32-bit IA32 page tables have no mechanism to restrict execution */ 25 /* k_mem_map_phys_bare() doesn't have alignment requirements, any oddly-sized buffer 26 * can get mapped. BUF_SIZE has a odd size to make sure the mapped buffer 39 printk("Caught system error -- reason %d\n", reason); 81 /* Initialize read-write buf with some bytes */ in ZTEST() 110 /* Check that the read-only mapped area contains the expected data. */ in ZTEST() 164 (uintptr_t)(__test_mem_map_end - __test_mem_map_start), in ZTEST() 173 (uintptr_t)(__test_mem_map_end - __test_mem_map_start), in ZTEST() 194 uint8_t *mapped; in ZTEST() local [all …]
|
/Zephyr-latest/drivers/mm/ |
D | mm_drv_common.h | 4 * SPDX-License-Identifier: Apache-2.0 18 * @brief Get the flags of mapped virtual address. 21 * a mapped virtual address. This is used internally for remapping. 26 * @param virt Page-aligned virtual address 27 * @param[out] flags flags of mapped virtual address 30 * @retval -EINVAL if invalid arguments are provided 31 * @retval -EFAULT if virtual address is not mapped 36 * @brief Test if address is page-aligned 38 * @param addr address to be tested 40 * @retval true if page-aligned [all …]
|
/Zephyr-latest/include/zephyr/kernel/internal/ |
D | mm.h | 4 * SPDX-License-Identifier: Apache-2.0 23 * This is the offset to subtract from a virtual address mapped in the 41 #define K_MEM_VIRT_OFFSET ((CONFIG_KERNEL_VM_BASE + CONFIG_KERNEL_VM_OFFSET) - \ 56 #define K_MEM_PHYS_ADDR(virt) ((virt) - K_MEM_VIRT_OFFSET) 71 * @brief Kernel is mapped in virtual memory if defined. 99 uintptr_t addr = (uintptr_t)virt; in k_mem_phys_addr() local 107 (addr >= CONFIG_KERNEL_VM_BASE) && in k_mem_phys_addr() 110 (addr < (CONFIG_KERNEL_VM_BASE + in k_mem_phys_addr() 117 /* Should be identity-mapped */ in k_mem_phys_addr() 120 (addr >= CONFIG_SRAM_BASE_ADDRESS) && in k_mem_phys_addr() [all …]
|
/Zephyr-latest/include/zephyr/kernel/ |
D | mm.h | 4 * SPDX-License-Identifier: Apache-2.0 36 /** Write-through caching. Used by certain drivers. */ 39 /** Full write-back caching. Any RAM mapped wants this. */ 48 #define K_MEM_CACHE_MASK (BIT(3) - 1) 55 * Default is read-only, no user, no exec 60 /** Region will have read/write access (and not read-only) */ 66 /** Region will be accessible to user mode (normally supervisor-only) */ 77 /** Region will be mapped to 1:1 virtual and physical address */ 98 * @brief The mapped region is not guaranteed to be zeroed. 111 * Such memory is guaranteed to never produce a page fault due to page-outs [all …]
|
/Zephyr-latest/dts/bindings/espi/ |
D | nuvoton,npcx-espi-taf.yaml | 2 # SPDX-License-Identifier: Apache-2.0 10 compatible = "nuvoton,npcx-espi-taf"; 13 mapped-addr = <0x68000000>; 14 max-read-sz = "NPCX_ESPI_TAF_MAX_READ_REQ_64B"; 15 erase-sz = "NPCX_ESPI_TAF_ERASE_BLOCK_SIZE_4KB"; 17 #address-cells = <1>; 18 #size-cells = <1>; 22 compatible: "nuvoton,npcx-espi-taf" 24 include: [espi-controller.yaml, pinctrl-device.yaml] 27 mapped-addr: [all …]
|
/Zephyr-latest/dts/bindings/flash_controller/ |
D | nuvoton,npcx-fiu-nor.yaml | 2 # SPDX-License-Identifier: Apache-2.0 10 compatible ="nuvoton,npcx-fiu-nor"; 14 qspi-flags = <NPCX_QSPI_SW_CS1>; 15 mapped-addr = <0x64000000>; 16 pinctrl-0 = <&int_flash_sl>; 17 pinctrl-names = "default"; 20 compatible: "nuvoton,npcx-fiu-nor" 22 include: [flash-controller.yaml, pinctrl-device.yaml, "jedec,spi-nor-common.yaml"] 24 on-bus: qspi 27 mapped-addr: [all …]
|
/Zephyr-latest/kernel/include/ |
D | mmu.h | 4 * SPDX-License-Identifier: Apache-2.0 16 #include <zephyr/linker/linker-defs.h> 36 /** Boot-time virtual start address of the kernel image. */ 39 /** Boot-time virtual end address of the kernel image. */ 42 /** Boot-time virtual address space size of the kernel image. */ 43 #define K_MEM_KERNEL_VIRT_SIZE (K_MEM_KERNEL_VIRT_END - K_MEM_KERNEL_VIRT_START) 51 ((CONFIG_KERNEL_VM_BASE + CONFIG_KERNEL_VM_OFFSET) - \ 65 #define K_MEM_BOOT_VIRT_TO_PHYS(virt) ((uintptr_t)(((uint8_t *)(virt)) - K_MEM_VM_OFFSET)) 88 * - If it is enabled, which means all physical memory are mapped in virtual 92 * - If it is disabled, K_MEM_VM_FREE_START is the same K_MEM_KERNEL_VIRT_END which [all …]
|
D | kernel_arch_interface.h | 4 * SPDX-License-Identifier: Apache-2.0 11 * Not all architecture-specific defines are here, APIs that are used 30 * @defgroup arch-timing Architecture timing APIs 35 * Architecture-specific implementation of busy-waiting 45 * @defgroup arch-threads Architecture thread APIs 46 * @ingroup arch-interface 50 /** Handle arch-specific logic for setting up new threads 52 * The stack and arch-specific thread state variables must be set up 64 * randomization and thread-local storage. 66 * Fields in thread->base will be initialized when this is called. [all …]
|
/Zephyr-latest/include/zephyr/arch/common/ |
D | sys_io.h | 5 * SPDX-License-Identifier: Apache-2.0 8 /* Memory mapped registers I/O functions in non-arch-specific C code */ 23 static ALWAYS_INLINE uint8_t sys_read8(mem_addr_t addr) in sys_read8() argument 25 return *(volatile uint8_t *)addr; in sys_read8() 28 static ALWAYS_INLINE void sys_write8(uint8_t data, mem_addr_t addr) in sys_write8() argument 30 *(volatile uint8_t *)addr = data; in sys_write8() 33 static ALWAYS_INLINE uint16_t sys_read16(mem_addr_t addr) in sys_read16() argument 35 return *(volatile uint16_t *)addr; in sys_read16() 38 static ALWAYS_INLINE void sys_write16(uint16_t data, mem_addr_t addr) in sys_write16() argument 40 *(volatile uint16_t *)addr = data; in sys_write16() [all …]
|
/Zephyr-latest/tests/kernel/mem_protect/stackprot/src/ |
D | mapped_stack.c | 4 * SPDX-License-Identifier: Apache-2.0 37 TC_PRINT("Mapped stack %p size %zu\n", mapped_stack_addr, mapped_stack_sz); in mapped_thread() 44 ptr -= CONFIG_MMU_PAGE_SIZE / 2; in mapped_thread() 74 zassert_true(mapped_thread_data.stack_info.mapped.addr != NULL); in create_thread() 76 /* Grab the mapped stack object address and size so we can calculate in create_thread() 79 mapped_stack_addr = (void *)mapped_thread_data.stack_info.mapped.addr; in create_thread() 80 mapped_stack_sz = mapped_thread_data.stack_info.mapped.sz; in create_thread()
|
/Zephyr-latest/kernel/ |
D | mmu.c | 4 * SPDX-License-Identifier: Apache-2.0 17 #include <zephyr/linker/linker-defs.h> 31 * - A page frame is a page-sized physical memory region in RAM. It is a 37 * - A data page is a page-sized region of data. It may exist in a page frame, 86 printk("-"); in page_frame_dump() 160 * +--------------+ <- K_MEM_VIRT_RAM_START 161 * | Undefined VM | <- May contain ancillary regions like x86_64's locore 162 * +--------------+ <- K_MEM_KERNEL_VIRT_START (often == K_MEM_VIRT_RAM_START) 168 * +--------------+ <- K_MEM_VM_FREE_START 173 * |..............| <- mapping_pos (grows downward as more mappings are made) [all …]
|
/Zephyr-latest/include/zephyr/arch/riscv/ |
D | sys_io.h | 4 * SPDX-License-Identifier: Apache-2.0 7 /* Memory mapped registers I/O functions in riscv arch C code */ 28 extern uint8_t z_soc_sys_read8(mem_addr_t addr); 29 extern void z_soc_sys_write8(uint8_t data, mem_addr_t addr); 30 extern uint16_t z_soc_sys_read16(mem_addr_t addr); 31 extern void z_soc_sys_write16(uint16_t data, mem_addr_t addr); 32 extern uint32_t z_soc_sys_read32(mem_addr_t addr); 33 extern void z_soc_sys_write32(uint32_t data, mem_addr_t addr); 34 extern uint64_t z_soc_sys_read64(mem_addr_t addr); 35 extern void z_soc_sys_write64(uint64_t data, mem_addr_t addr); [all …]
|
/Zephyr-latest/include/zephyr/arch/arm/cortex_a_r/ |
D | sys_io.h | 5 * SPDX-License-Identifier: Apache-2.0 8 /* "Arch" bit manipulation functions in non-arch-specific C code (uses some 25 /* Memory mapped registers I/O functions */ 27 static ALWAYS_INLINE uint8_t sys_read8(mem_addr_t addr) in sys_read8() argument 31 __asm__ volatile("ldrb %0, [%1]" : "=r" (val) : "r" (addr)); in sys_read8() 37 static ALWAYS_INLINE void sys_write8(uint8_t data, mem_addr_t addr) in sys_write8() argument 40 __asm__ volatile("strb %0, [%1]" : : "r" (data), "r" (addr)); in sys_write8() 43 static ALWAYS_INLINE uint16_t sys_read16(mem_addr_t addr) in sys_read16() argument 47 __asm__ volatile("ldrh %0, [%1]" : "=r" (val) : "r" (addr)); in sys_read16() 53 static ALWAYS_INLINE void sys_write16(uint16_t data, mem_addr_t addr) in sys_write16() argument [all …]
|
/Zephyr-latest/tests/kernel/device/src/ |
D | mmio.c | 4 * SPDX-License-Identifier: Apache-2.0 48 * DEVICE_MMIO_GET() is not NULL, indicating that the kernel mapped 52 * - If MMIO addresses are maintained in RAM, check that the ROM struct 54 * - If MMIO addresses are maintained in ROM, check that the DTS info, 78 /* The config info should just contain the addr/size from DTS. in ZTEST() 84 zassert_equal(rom->phys_addr, DT_INST_REG_ADDR(0), "bad phys_addr"); in ZTEST() 85 zassert_equal(rom->size, DT_INST_REG_SIZE(0), "bad size"); in ZTEST() 89 * In this configuration dev_data has nothing mmio-related in it in ZTEST() 91 zassert_equal(rom->addr, DT_INST_REG_ADDR(0), "bad addr"); in ZTEST() 92 zassert_equal(regs, rom->addr, "bad regs"); in ZTEST() [all …]
|
/Zephyr-latest/include/zephyr/arch/arm64/ |
D | sys_io.h | 5 * SPDX-License-Identifier: Apache-2.0 8 /* "Arch" bit manipulation functions in non-arch-specific C code (uses some 25 /* Memory mapped registers I/O functions */ 37 static ALWAYS_INLINE uint8_t sys_read8(mem_addr_t addr) in sys_read8() argument 41 __asm__ volatile("ldrb %w0, [%1]" : "=r" (val) : "r" (addr)); in sys_read8() 47 static ALWAYS_INLINE void sys_write8(uint8_t data, mem_addr_t addr) in sys_write8() argument 50 __asm__ volatile("strb %w0, [%1]" : : "r" (data), "r" (addr)); in sys_write8() 53 static ALWAYS_INLINE uint16_t sys_read16(mem_addr_t addr) in sys_read16() argument 57 __asm__ volatile("ldrh %w0, [%1]" : "=r" (val) : "r" (addr)); in sys_read16() 63 static ALWAYS_INLINE void sys_write16(uint16_t data, mem_addr_t addr) in sys_write16() argument [all …]
|
/Zephyr-latest/samples/subsys/edac/ |
D | README.rst | 1 .. zephyr:code-sample:: edac 3 :relevant-api: edac 19 .. zephyr-app-commands:: 20 :zephyr-app: samples/subsys/edac 21 :host-os: unix 39 .. code-block:: console 41 uart:~$ edac -h 42 edac - EDAC information 51 .. code-block:: console 53 uart:~$ edac info -h [all …]
|
/Zephyr-latest/dts/bindings/dma/ |
D | brcm,iproc-pax-dma-v1.yaml | 2 # SPDX-License-Identifier: Apache-2.0 4 description: Broadcom iProc PAX(PCIE<->AXI) DMA controller version 1 6 include: dma-controller.yaml 8 compatible: brcm,iproc-pax-dma-v1 13 Register space for the memory mapped PAX DMA controller registers, 17 bd-memory: 21 scr-addr-loc: 25 scr-size-loc: 32 pcie-ep:
|
D | brcm,iproc-pax-dma-v2.yaml | 2 # SPDX-License-Identifier: Apache-2.0 4 description: Broadcom iProc PAX(PCIE<->AXI) DMA controller version 2 6 include: dma-controller.yaml 8 compatible: brcm,iproc-pax-dma-v2 13 Register space for the memory mapped PAX DMA controller registers, 17 bd-memory: 21 scr-addr-loc: 25 scr-size-loc: 32 pcie-ep:
|
/Zephyr-latest/soc/mediatek/mt8xxx/ |
D | gen_img.py | 3 # SPDX-License-Identifier: Apache-2.0 31 # Returns the offset of a segment within the sram region, or -1 if it 32 # doesn't appear to be SRAM. SRAM is mapped differently for different 38 def sram_off(addr): argument 40 if addr < 0x40000000 or addr >= 0x50000000: 41 return -1 42 block = addr & ~0xFFFFF 46 off = addr - sram_block 53 def dram_off(addr): argument 54 if (addr >> 28 not in [6, 9]) or (addr & 0x0F000000 != 0): [all …]
|
/Zephyr-latest/dts/arm/nuvoton/ |
D | npcx4m3f.dtsi | 4 * SPDX-License-Identifier: Apache-2.0 20 compatible = "mmio-sram"; 24 soc-id { 25 device-id = <0x25>; 33 compatible ="nuvoton,npcx-fiu-nor"; 39 qspi-flags = <NPCX_QSPI_SW_CS0>; 40 mapped-addr = <0x60000000>;
|
D | npcx4m8f.dtsi | 4 * SPDX-License-Identifier: Apache-2.0 20 compatible = "mmio-sram"; 24 soc-id { 25 device-id = <0x23>; 33 compatible ="nuvoton,npcx-fiu-nor"; 39 qspi-flags = <NPCX_QSPI_SW_CS0>; 40 mapped-addr = <0x60000000>;
|
D | npcx9m3f.dtsi | 4 * SPDX-License-Identifier: Apache-2.0 20 compatible = "mmio-sram"; 24 soc-id { 25 device-id = <0x25>; 33 compatible ="nuvoton,npcx-fiu-nor"; 39 qspi-flags = <NPCX_QSPI_SW_CS1>; 40 mapped-addr = <0x64000000>; 41 pinctrl-0 = <&int_flash_sl>; 42 pinctrl-names = "default";
|
D | npcx9m6f.dtsi | 4 * SPDX-License-Identifier: Apache-2.0 20 compatible = "mmio-sram"; 24 soc-id { 25 device-id = <0x21>; 33 compatible ="nuvoton,npcx-fiu-nor"; 39 qspi-flags = <NPCX_QSPI_SW_CS1>; 40 mapped-addr = <0x64000000>; 41 pinctrl-0 = <&int_flash_sl>; 42 pinctrl-names = "default";
|
D | npcx9m7f.dtsi | 4 * SPDX-License-Identifier: Apache-2.0 20 compatible = "mmio-sram"; 24 soc-id { 25 device-id = <0x22>; 31 compatible ="nuvoton,npcx-fiu-nor"; 37 qspi-flags = <NPCX_QSPI_SW_CS1>; 38 mapped-addr = <0x64000000>; 39 pinctrl-0 = <&int_flash_sl>; 40 pinctrl-names = "default";
|