zephyr/kernel/include
Nicolas Pitre 678b76e4b0 kernel/init.c: allow for memset/memcpy alternatives during early boot
Zeroing the BSS and copying data to RAM with regular memset/memcpy may
cause problems when those functions are assuming a fully initialized
system for their optimizations to work e.g. some instructions require
an active MMU, but turning the MMU on needs the .bss section to be
cleared first, etc.

Commit c5b898743a ("aarch64: Fix alignment fault on z_bss_zero()")
provides a detailed explanation of such a case.

Replacing z_bss_zero() with an architecture specific one is problematic
as the former may see new sections added to it that would be missed by
the later. The same reasoning goes for z_data_copy().

Let's make maintenance much easier by providing weak versions of
memset/memcpy that can be overridden by architecture-specific safe
versions when needed.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-02-21 21:00:12 -05:00
..
gen_offset.h aarch64: Use absolute symbols for the callee saved registers 2020-11-17 18:59:23 -05:00
kernel_arch_interface.h kernel: arch: no need for #ifdef MMU in header 2022-01-18 19:18:30 -05:00
kernel_internal.h kernel/init.c: allow for memset/memcpy alternatives during early boot 2022-02-21 21:00:12 -05:00
kernel_offsets.h kernel/sched: Add CONFIG_CPU_MASK_PIN_ONLY 2021-09-28 20:15:05 -04:00
kernel_tls.h kernel: tls: align tdata/tbss sections in stack 2021-02-07 23:28:43 -05:00
ksched.h kernel: extend CPU runtime stats 2022-01-10 10:38:06 -05:00
kswap.h kernel/swap: Initialize dummy thread's resource pool 2022-01-06 11:57:18 -05:00
mmu.h kernel: mmu: z_backing_store* to k_mem_paging_backing_store* 2021-05-28 11:33:22 -04:00
offsets_short.h kernel: add common bits to support TLS 2020-10-24 10:52:00 -07:00