Skip to content
Commit e5594891 authored by Luca Burelli's avatar Luca Burelli Committed by Anas Nashif
Browse files

llext: stricter alignment checks for MPU/MMU regions



This patch moves the alignment checks for MPU and MMU regions to the
beginning of the llext_copy_region() function. This is done to ensure
that the correct region alignment and size are used even in the case
where the region is reused from the ELF file buffer, avoiding MMU/MPU
configuration issues.

This also relaxes the same checks for regions that are accessed by the
kernel only (e.g. symbol and string tables), which do not need special
MMU/MPU treatment. This exposed an inconsistency in the MMU code, which
was setting the permission on the correct regions, but later restoring
the default permissions on every region, including the now-unaligned
ones.

Signed-off-by: default avatarLuca Burelli <l.burelli@arduino.cc>
parent 9fa6a95e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment