Lines Matching full:start
23 * Thread-specific m-mode and u-mode PMP entries start from the PMP slot
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()
143 * case start=0 size=0 is valid and means the whole address range.
148 * @param start Start address of the memory area to cover
156 uintptr_t start, size_t size, in set_pmp_entry() argument
164 __ASSERT((start & 0x3) == 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()
214 * Requirement: start < end && end <= CONFIG_PMP_SLOTS
216 * @param start Start of the PMP range to be written
222 extern void z_riscv_write_pmp_entries(unsigned int start, unsigned int end,
232 * @param start Start of the PMP range to be written
239 static void write_pmp_entries(unsigned int start, unsigned int end, in write_pmp_entries() argument
244 __ASSERT(start < end && end <= index_limit && in write_pmp_entries()
246 "bad PMP range (start=%u end=%u)", start, end); in write_pmp_entries()
249 if (start >= end || end > index_limit) { in write_pmp_entries()
268 print_pmp_entries(start, end, pmp_addr, pmp_cfg, "register write"); in write_pmp_entries()
274 * pmp registers to zero from the update start point to the end in write_pmp_entries()
281 z_riscv_write_pmp_entries(start, CONFIG_PMP_SLOTS, false, in write_pmp_entries()
285 z_riscv_write_pmp_entries(start, end, clear_trailing_entries, in write_pmp_entries()
421 stack_bottom = thread->stack_info.start - K_KERNEL_STACK_RESERVED; in z_riscv_pmp_stackguard_prepare()
426 stack_bottom = thread->stack_info.start - K_THREAD_STACK_RESERVED; in z_riscv_pmp_stackguard_prepare()
512 thread->stack_info.start, thread->stack_info.size, in z_riscv_pmp_usermode_prepare()
551 part->start, part->size, PMP_U_MODE(thread)); in resync_pmp_domain()
672 uintptr_t start = (uintptr_t)addr; in arch_buffer_validate() local
676 if (IS_WITHIN(start, size, in arch_buffer_validate()
677 _current->stack_info.start, _current->stack_info.size)) { in arch_buffer_validate()
686 if (IS_WITHIN(start, size, ro_start, ro_size)) { in arch_buffer_validate()
707 if (!IS_WITHIN(start, size, part->start, part->size)) { in arch_buffer_validate()