Lines Matching refs:start
68 unsigned long start, end, tmp; in print_pmp_entries() local
72 start = (index == 0) ? 0 : (pmp_addr[index - 1] << 2); in print_pmp_entries()
76 start = pmp_addr[index] << 2; in print_pmp_entries()
77 end = start + 3; in print_pmp_entries()
81 start = tmp & (tmp + 1); in print_pmp_entries()
85 start = 0; in print_pmp_entries()
98 start, end, in print_pmp_entries()
156 uintptr_t start, size_t size, in set_pmp_entry() argument
164 __ASSERT((start & (CONFIG_PMP_GRANULARITY - 1)) == 0, "misaligned start address"); in set_pmp_entry()
171 ((index == 0 && start == 0) || in set_pmp_entry()
172 (index != 0 && pmp_addr[index - 1] == PMP_ADDR(start)))) { in set_pmp_entry()
174 pmp_addr[index] = PMP_ADDR(start + size); in set_pmp_entry()
178 pmp_addr[index] = PMP_ADDR(start); in set_pmp_entry()
183 ((start & (size - 1)) == 0) /* naturally aligned */ && in set_pmp_entry()
185 pmp_addr[index] = PMP_ADDR_NAPOT(start, size); in set_pmp_entry()
192 pmp_addr[index] = PMP_ADDR(start); in set_pmp_entry()
195 pmp_addr[index] = PMP_ADDR(start + size); in set_pmp_entry()
199 LOG_ERR("inappropriate PMP range (start=%#lx size=%#zx)", start, size); in set_pmp_entry()
250 extern void z_riscv_write_pmp_entries(unsigned int start, unsigned int end,
267 static void write_pmp_entries(unsigned int start, unsigned int end, in write_pmp_entries() argument
272 __ASSERT(start < end && end <= index_limit && in write_pmp_entries()
274 "bad PMP range (start=%u end=%u)", start, end); in write_pmp_entries()
277 if (start >= end || end > index_limit) { in write_pmp_entries()
296 print_pmp_entries(start, end, pmp_addr, pmp_cfg, "register write"); in write_pmp_entries()
309 z_riscv_write_pmp_entries(start, CONFIG_PMP_SLOTS, false, in write_pmp_entries()
313 z_riscv_write_pmp_entries(start, end, clear_trailing_entries, in write_pmp_entries()
484 stack_bottom = thread->stack_info.start - K_KERNEL_STACK_RESERVED; in z_riscv_pmp_stackguard_prepare()
489 stack_bottom = thread->stack_info.start - K_THREAD_STACK_RESERVED; in z_riscv_pmp_stackguard_prepare()
591 thread->stack_info.start, thread->stack_info.size, in z_riscv_pmp_usermode_prepare()
630 part->start, part->size, PMP_U_MODE(thread)); in resync_pmp_domain()
751 uintptr_t start = (uintptr_t)addr; in arch_buffer_validate() local
755 if (IS_WITHIN(start, size, arch_current_thread()->stack_info.start, in arch_buffer_validate()
765 if (IS_WITHIN(start, size, ro_start, ro_size)) { in arch_buffer_validate()
786 if (!IS_WITHIN(start, size, part->start, part->size)) { in arch_buffer_validate()