Zephyr API 3.6.99
Loading...
Searching...
No Matches
kernel_arch_interface.h File Reference

Internal kernel APIs implemented at the architecture layer. More...

#include <zephyr/kernel.h>
#include <zephyr/arch/arch_interface.h>
#include <kernel_arch_func.h>

Go to the source code of this file.

Enumerations

enum  arch_page_location { ARCH_PAGE_LOCATION_PAGED_OUT , ARCH_PAGE_LOCATION_PAGED_IN , ARCH_PAGE_LOCATION_BAD }
 Status of a particular page location. More...
 

Functions

void arch_busy_wait (uint32_t usec_to_wait)
 Architecture-specific implementation of busy-waiting.
 
void arch_new_thread (struct k_thread *thread, k_thread_stack_t *stack, char *stack_ptr, k_thread_entry_t entry, void *p1, void *p2, void *p3)
 Handle arch-specific logic for setting up new threads.
 
static void arch_switch (void *switch_to, void **switched_from)
 Cooperative context switch primitive.
 
void arch_switch_to_main_thread (struct k_thread *main_thread, char *stack_ptr, k_thread_entry_t _main)
 Custom logic for entering main thread context at early boot.
 
int arch_float_disable (struct k_thread *thread)
 Disable floating point context preservation.
 
int arch_float_enable (struct k_thread *thread, unsigned int options)
 Enable floating point context preservation.
 
FUNC_NORETURN void arch_system_halt (unsigned int reason)
 Halt the system, optionally propagating a reason code.
 
static _Bool arch_is_in_isr (void)
 Test if the current context is in interrupt context.
 
void arch_mem_map (void *virt, uintptr_t phys, size_t size, uint32_t flags)
 Map physical memory into the virtual address space.
 
void arch_mem_unmap (void *addr, size_t size)
 Remove mappings for a provided virtual address range.
 
int arch_page_phys_get (void *virt, uintptr_t *phys)
 Get the mapped physical memory address from virtual address.
 
void arch_reserved_pages_update (void)
 Update page frame database with reserved pages.
 
void arch_mem_page_out (void *addr, uintptr_t location)
 Update all page tables for a paged-out data page.
 
void arch_mem_page_in (void *addr, uintptr_t phys)
 Update all page tables for a paged-in data page.
 
void arch_mem_scratch (uintptr_t phys)
 Update current page tables for a temporary mapping.
 
enum arch_page_location arch_page_location_get (void *addr, uintptr_t *location)
 Fetch location information about a page at a particular address.
 
uintptr_t arch_page_info_get (void *addr, uintptr_t *location, _Bool clear_accessed)
 Retrieve page characteristics from the page table(s)
 
int arch_printk_char_out (int c)
 Early boot console output hook.
 
static void arch_kernel_init (void)
 Architecture-specific kernel initialization hook.
 
static void arch_nop (void)
 Do nothing and return.
 
void arch_coredump_info_dump (const struct arch_esf *esf)
 Architecture-specific handling during coredump.
 
uint16_t arch_coredump_tgt_code_get (void)
 Get the target code specified by the architecture.
 
size_t arch_tls_stack_setup (struct k_thread *new_thread, char *stack_ptr)
 Setup Architecture-specific TLS area in stack.
 

Detailed Description

Internal kernel APIs implemented at the architecture layer.

Not all architecture-specific defines are here, APIs that are used by public functions and macros are defined in include/zephyr/arch/arch_interface.h.

For all inline functions prototyped here, the implementation is expected to be provided by arch/ARCH/include/kernel_arch_func.h