/Zephyr-latest/subsys/llext/ |
D | llext_load.c | 42 const void *llext_loaded_sect_ptr(struct llext_loader *ldr, struct llext *ext, unsigned int sh_ndx) in llext_loaded_sect_ptr() argument 44 enum llext_mem mem_idx = ldr->sect_map[sh_ndx].mem_idx; in llext_loaded_sect_ptr() 50 return (const uint8_t *)ext->mem[mem_idx] + ldr->sect_map[sh_ndx].offset; in llext_loaded_sect_ptr() 57 static int llext_load_elf_data(struct llext_loader *ldr, struct llext *ext) in llext_load_elf_data() argument 63 ret = llext_seek(ldr, 0); in llext_load_elf_data() 69 ret = llext_read(ldr, &ldr->hdr, sizeof(ldr->hdr)); in llext_load_elf_data() 76 if (memcmp(ldr->hdr.e_ident, ELF_MAGIC, sizeof(ELF_MAGIC)) != 0) { in llext_load_elf_data() 77 LOG_HEXDUMP_ERR(ldr->hdr.e_ident, 16, "Invalid ELF, magic does not match"); in llext_load_elf_data() 81 switch (ldr->hdr.e_type) { in llext_load_elf_data() 91 LOG_ERR("Unsupported ELF file type %x", ldr->hdr.e_type); in llext_load_elf_data() [all …]
|
D | llext_mem.c | 61 static int llext_copy_section(struct llext_loader *ldr, struct llext *ext, in llext_copy_section() argument 66 if (!ldr->sects[mem_idx].sh_size) { in llext_copy_section() 69 ext->mem_size[mem_idx] = ldr->sects[mem_idx].sh_size; in llext_copy_section() 72 if (ldr->sects[mem_idx].sh_type != SHT_NOBITS) { in llext_copy_section() 74 ext->mem[mem_idx] = llext_peek(ldr, ldr->sects[mem_idx].sh_offset); in llext_copy_section() 77 ldr->sects[mem_idx].sh_size); in llext_copy_section() 101 const uintptr_t sect_alloc = ROUND_UP(ldr->sects[mem_idx].sh_size, LLEXT_PAGE_SIZE); in llext_copy_section() 106 while (sect_alloc < ldr->sects[mem_idx].sh_size) { in llext_copy_section() 122 if (ldr->sects[mem_idx].sh_type == SHT_NOBITS) { in llext_copy_section() 123 memset(ext->mem[mem_idx], 0, ldr->sects[mem_idx].sh_size); in llext_copy_section() [all …]
|
D | llext_link.c | 35 __weak void arch_elf_relocate_local(struct llext_loader *ldr, struct llext *ext, in arch_elf_relocate_local() argument 41 __weak void arch_elf_relocate_global(struct llext_loader *ldr, struct llext *ext, in arch_elf_relocate_global() argument 51 static size_t llext_file_offset(struct llext_loader *ldr, size_t offset) in llext_file_offset() argument 56 if (ldr->sects[i].sh_addr <= offset && in llext_file_offset() 57 ldr->sects[i].sh_addr + ldr->sects[i].sh_size > offset) { in llext_file_offset() 58 return offset - ldr->sects[i].sh_addr + ldr->sects[i].sh_offset; in llext_file_offset() 145 static void llext_link_plt(struct llext_loader *ldr, struct llext *ext, elf_shdr_t *shdr, in llext_link_plt() argument 156 (void *)llext_string(ldr, ext, LLEXT_MEM_SHSTRTAB, shdr->sh_name), in llext_link_plt() 159 const elf_shdr_t *sym_shdr = ldr->sects + LLEXT_MEM_SYMTAB; in llext_link_plt() 165 int ret = llext_seek(ldr, shdr->sh_offset + i * shdr->sh_entsize); in llext_link_plt() [all …]
|
D | llext_priv.h | 22 int llext_copy_strings(struct llext_loader *ldr, struct llext *ext); 23 int llext_copy_regions(struct llext_loader *ldr, struct llext *ext, 53 int do_llext_load(struct llext_loader *ldr, struct llext *ext, 56 static inline const char *llext_string(struct llext_loader *ldr, struct llext *ext, in llext_string() argument 66 int llext_link(struct llext_loader *ldr, struct llext *ext,
|
D | llext.c | 26 int llext_get_section_header(struct llext_loader *ldr, struct llext *ext, const char *search_name, in llext_get_section_header() argument 35 const char *name = llext_peek(ldr, in llext_get_section_header() 36 ldr->sects[LLEXT_MEM_SHSTRTAB].sh_offset + in llext_get_section_header() 52 ssize_t llext_find_section(struct llext_loader *ldr, const char *search_name) in llext_find_section() argument 58 for (i = 0, pos = ldr->hdr.e_shoff; in llext_find_section() 59 i < ldr->hdr.e_shnum; in llext_find_section() 60 i++, pos += ldr->hdr.e_shentsize) { in llext_find_section() 61 shdr = llext_peek(ldr, pos); in llext_find_section() 67 const char *name = llext_peek(ldr, in llext_find_section() 68 ldr->sects[LLEXT_MEM_SHSTRTAB].sh_offset + in llext_find_section() [all …]
|
/Zephyr-latest/arch/arm/core/ |
D | userspace.S | 51 ldr r0, =_kernel 52 ldr r0, [r0, #_kernel_offset_to_current] 56 ldr r1, =_thread_offset_to_priv_stack_start 57 ldr r0, [r0, r1] /* priv stack ptr */ 58 ldr r1, =CONFIG_PRIVILEGED_STACK_SIZE 63 ldr r0, [r0, #_thread_offset_to_priv_stack_start] /* priv stack ptr */ 64 ldr ip, =CONFIG_PRIVILEGED_STACK_SIZE 67 ldr r0, [r0, #_thread_offset_to_priv_stack_start] /* priv stack ptr */ 68 ldr ip, =CONFIG_PRIVILEGED_STACK_SIZE 71 ldr ip, =_kernel [all …]
|
/Zephyr-latest/soc/nxp/mcx/mcxw/ |
D | mcxw71_platform_init.S | 24 ldr r0, =0x14000000 25 ldr r1, =.ram_init_ctcm01 30 ldr r0, =0x14000000 31 ldr r1, =0x14004000 32 ldr r2, =0 33 ldr r3, =0 34 ldr r4, =0 35 ldr r5, =0 41 ldr r0, =0x30000000 42 ldr r1, =0x30010000 [all …]
|
/Zephyr-latest/arch/arm/core/cortex_a_r/ |
D | vector_table.S | 22 ldr pc, =z_arm_reset /* offset 0 */ 23 ldr pc, =z_arm_undef_instruction /* undef instruction offset 4 */ 24 ldr pc, =z_arm_svc /* svc offset 8 */ 25 ldr pc, =z_arm_prefetch_abort /* prefetch abort offset 0xc */ 26 ldr pc, =z_arm_data_abort /* data abort offset 0x10 */ 29 ldr pc, =_isr_wrapper /* IRQ offset 0x18 */ 31 ldr pc, =z_irq_spurious 34 ldr pc, =z_arm_nmi /* FIQ offset 0x1c */ 36 ldr pc,=z_irq_spurious
|
D | swap_helper.S | 55 ldr r2, [r1, #___cpu_t_current_OFFSET] 63 ldr r0, =_thread_offset_to_callee_saved 85 ldr r0, [r1, #___cpu_t_fp_ctx_OFFSET] 114 ldr r3, =_kernel 115 ldr r2, [r3, #_kernel_offset_to_ready_q_cache] 121 ldr r4, =_thread_offset_to_tls 123 ldr r0, [r4] 140 ldr r0, [r2, #_thread_offset_to_basepri] 145 ldr r0, =_thread_offset_to_callee_saved 218 ldr r0, [r0, #___cpu_t_current_OFFSET] [all …]
|
D | reset.S | 67 ldr r0, =HACTLR_INIT 76 ldr r0, =EL1_Reset_Handler 207 ldr r0, =IMP_CSCTLR(CONFIG_CPU_CORTEX_R52_ICACHE_FLASH_WAY, 212 ldr r0, =arm_cpu_boot_params 230 ldr r3, [r0, #BOOT_PARAM_MPID_OFFSET] 256 ldr r3, [r0, #BOOT_PARAM_MPID_OFFSET] 264 ldr r2, [r0, #BOOT_PARAM_MPID_OFFSET] 269 ldr r4, =arch_secondary_cpu_init 270 ldr r5, [r0, #BOOT_PARAM_FIQ_SP_OFFSET] 271 ldr r6, [r0, #BOOT_PARAM_IRQ_SP_OFFSET] [all …]
|
D | isr_wrapper.S | 63 ldr r0, [r0, #___cpu_t_current_OFFSET] 70 ldr sp, [r0, #_thread_offset_to_priv_stack_end] /* priv stack end */ 114 ldr r0, [r2, #___cpu_t_fp_ctx_OFFSET] 145 ldr r0, [r2, #___cpu_t_nested_OFFSET] 164 ldr r2, =_kernel 166 ldr r0, [r2, #_kernel_offset_to_idle] 207 ldr r1, =_sw_isr_table 230 ldr r1, =z_arm_int_exit 251 ldr r0, [r2, #___cpu_t_nested_OFFSET] 277 ldr r2, =_kernel [all …]
|
D | exc_exit.S | 57 ldr r0, [r0, #___cpu_t_current_OFFSET] 59 ldr sp, [r0, #_thread_offset_to_sp_usr] /* sp_usr */ 73 ldr r1, [r2, #___cpu_t_fp_ctx_OFFSET] 145 ldr r0, [r3, #___cpu_t_nested_OFFSET] 149 ldr r1, [r3, #___cpu_t_current_OFFSET] 150 ldr r2, =_kernel 151 ldr r0, [r2, #_kernel_offset_to_ready_q_cache] 159 ldr r0, [r2, #___cpu_t_nested_OFFSET] 213 ldr r1, [r3, #___cpu_t_nested_OFFSET] 245 ldr r0, [r3, #___cpu_t_nested_OFFSET] [all …]
|
D | switch.S | 38 ldr r2, =_thread_offset_to_callee_saved 63 ldr r3, [r0, #_thread_offset_to_tls] 72 ldr r2, =_thread_offset_to_callee_saved 112 ldr r1, [lr, #-2] 134 ldr r3, [r2, #___cpu_t_nested_OFFSET]
|
/Zephyr-latest/soc/ti/lm3s6965/ |
D | reboot.S | 22 ldr r1, =0xe000e000 25 ldr r0, [r0, #4] 32 ldr r0, =_SCS_ICSR_RETTOBASE 33 ldr r1, =_SCS_ICSR 34 ldr r1, [r1] 48 ldr ip, =z_interrupt_stacks 50 ldr r1, =0xfffffffe 53 ldr r2, =0x01000000
|
/Zephyr-latest/soc/nxp/lpc/lpc54xxx/gcc/ |
D | startup_LPC54114_cm4.S | 38 ldr r6, =rel_vals 50 ldr r0, [r6, #0] 51 ldr r1, [r0] /* r1 = CPU ID status */ 63 ldr r0, [r6, #4] 64 ldr r3, [r0] /* r3 = SYSCON co-processor CPU control status */ 78 ldr r0, [r6, #8] 79 ldr r2, [r0] /* r1 = SYSCON co-processor boot address */ 84 ldr r0, [r6, #12] 85 ldr r1, [r0] /* r5 = SYSCON co-processor stack address */
|
/Zephyr-latest/soc/nxp/s32/s32k3/ |
D | s32k3xx_startup.S | 31 ldr r1, =MC_RGM_BASE 32 ldr r2, [r1, MC_RGM_DES] 35 ldr r2, [r1, MC_RGM_FES] 40 ldr r1, = DT_REG_ADDR(DT_CHOSEN(zephyr_sram)) 41 ldr r2, = DT_REG_SIZE(DT_CHOSEN(zephyr_sram)) 59 ldr r1, = DT_REG_ADDR(DT_CHOSEN(zephyr_itcm)) 60 ldr r2, = DT_REG_SIZE(DT_CHOSEN(zephyr_itcm)) 72 ldr r1, = DT_REG_ADDR(DT_CHOSEN(zephyr_dtcm)) 73 ldr r2, = DT_REG_SIZE(DT_CHOSEN(zephyr_dtcm))
|
/Zephyr-latest/arch/arm/core/cortex_m/ |
D | swap_helper.S | 70 ldr r1, =_kernel 71 ldr r2, [r1, #_kernel_offset_to_current] 79 ldr r0, =_thread_offset_to_callee_saved 138 ldr r7, =_SCS_ICSR 139 ldr r6, =_SCS_ICSR_UNPENDSV 144 ldr r2, [r1, #_kernel_offset_to_ready_q_cache] 162 ldr r4, =_thread_offset_to_tls 164 ldr r0, [r4] 170 ldr r4, =z_arm_tls_ptr 187 ldr r4, =_thread_offset_to_basepri [all …]
|
D | reset.S | 74 ldr r1, =z_sys_post_kernel 104 ldr r1, =_SCS_MPU_CTRL 108 ldr r0, =z_main_stack + CONFIG_MAIN_STACK_SIZE 139 ldr r0, =z_interrupt_stacks 140 ldr r1, =0xaa 141 ldr r2, =CONFIG_ISR_STACK_SIZE + MPU_GUARD_ALIGN_AND_SIZE 149 ldr r0, =z_interrupt_stacks 150 ldr r1, =CONFIG_ISR_STACK_SIZE + MPU_GUARD_ALIGN_AND_SIZE
|
/Zephyr-latest/arch/xtensa/core/ |
D | elf.c | 35 static void xtensa_elf_relocate(struct llext_loader *ldr, struct llext *ext, in xtensa_elf_relocate() argument 59 *got_entry += (uintptr_t)llext_loaded_sect_ptr(ldr, ext, sh_ndx) - in xtensa_elf_relocate() 76 int ret = llext_seek(ldr, ldr->sects[LLEXT_MEM_SYMTAB].sh_offset + in xtensa_elf_relocate() 80 ret = llext_read(ldr, &rsym, sizeof(elf_sym_t)); in xtensa_elf_relocate() 93 uintptr_t link_addr = (uintptr_t)llext_loaded_sect_ptr(ldr, ext, rsym.st_shndx) + in xtensa_elf_relocate() 131 void arch_elf_relocate_local(struct llext_loader *ldr, struct llext *ext, const elf_rela_t *rel, in arch_elf_relocate_local() argument 144 shdr->sh_addr : (uintptr_t)llext_loaded_sect_ptr(ldr, ext, sym->st_shndx); in arch_elf_relocate_local() 146 sh_addr = ldr->sects[LLEXT_MEM_TEXT].sh_addr; in arch_elf_relocate_local() 149 xtensa_elf_relocate(ldr, ext, rel, sh_addr, rel_addr, type, ELF_ST_BIND(sym->st_info)); in arch_elf_relocate_local() 155 void arch_elf_relocate_global(struct llext_loader *ldr, struct llext *ext, const elf_rela_t *rel, in arch_elf_relocate_global() argument [all …]
|
/Zephyr-latest/arch/arm64/core/ |
D | isr_wrapper.S | 37 ldr w1, [x0, #___cpu_t_nested_OFFSET] 43 ldr x1, [x0, #___cpu_t_irq_stack_OFFSET] 88 ldr x1, =_sw_isr_table 118 ldr w1, [x0, #___cpu_t_nested_OFFSET] 124 ldr x1, [sp] 128 ldr x1, [x0, #___cpu_t_current_OFFSET] 132 ldr x2, [x1, #_thread_offset_to_stack_limit] 144 ldr x1, [sp], #16
|
D | reset.S | 48 ldr w0, =(SCTLR_EL3_RES1 | SCTLR_I_BIT | SCTLR_SA_BIT) 133 ldr x0, =arm64_cpu_boot_params 146 ldr x3, [x0, #BOOT_PARAM_MPID_OFFSET] 172 ldr x3, [x0, #BOOT_PARAM_MPID_OFFSET] 180 ldr x2, [x0, #BOOT_PARAM_MPID_OFFSET] 185 ldr x24, [x0, #BOOT_PARAM_SP_OFFSET] 186 ldr x25, =z_arm64_secondary_prep_c 192 ldr x24, =(z_interrupt_stacks + __z_interrupt_stack_SIZEOF) 193 ldr x25, =z_prep_c
|
D | userspace.S | 104 ldr x8, [sp, ___esf_t_x8_x9_OFFSET] 107 ldr x9, =K_SYSCALL_LIMIT 113 ldr x8, =K_SYSCALL_BAD 116 ldr x9, =_k_syscall_table 117 ldr x9, [x9, x8, lsl #3]
|
/Zephyr-latest/include/zephyr/llext/ |
D | fs_loader.h | 40 int llext_fs_prepare(struct llext_loader *ldr); 41 int llext_fs_read(struct llext_loader *ldr, void *buf, size_t len); 42 int llext_fs_seek(struct llext_loader *ldr, size_t pos); 43 void llext_fs_finalize(struct llext_loader *ldr);
|
D | loader.h | 50 int (*prepare)(struct llext_loader *ldr); 64 int (*read)(struct llext_loader *ldr, void *out, size_t len); 77 int (*seek)(struct llext_loader *ldr, size_t pos); 89 void *(*peek)(struct llext_loader *ldr, size_t pos); 96 void (*finalize)(struct llext_loader *ldr);
|
D | buf_loader.h | 39 int llext_buf_read(struct llext_loader *ldr, void *buf, size_t len); 40 int llext_buf_seek(struct llext_loader *ldr, size_t pos); 41 void *llext_buf_peek(struct llext_loader *ldr, size_t pos);
|