diff options
author | Tom Rini <trini@konsulko.com> | 2025-03-14 09:31:36 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-03-14 09:31:36 -0600 |
commit | 973c366ce68d9a99e16bcbce3941a1c52492c097 (patch) | |
tree | 4551686cc38c7e419c833ebfeaf6bd6843124691 /arch/riscv/lib/cache.c | |
parent | bbfabe290138d76e78e0dac28fec93c32e3964eb (diff) | |
parent | fb553201b67aededdc794f3a0880e386771cbd58 (diff) |
Merge tag 'mmu-next-14032025' of https://source.denx.de/u-boot/custodians/u-boot-tpm into next
Up to now we configure the entire memory space for U-Boot as RWX.
For modern architectures and security requirements, it's better to
map the memory properly.
This pull request adds basics support for mapping the U-Boot binary with
proper (RO, RW, RW^X) memory permissions on aarch64 right after we
relocate U-Boot in the top of DRAM.
It's worrth noting that the linker script annotations are only added for
the aarch64 architecture. We can, in the future, try to unify the linker --
at least for the architectures that have enough in common and expand this
Diffstat (limited to 'arch/riscv/lib/cache.c')
-rw-r--r-- | arch/riscv/lib/cache.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/riscv/lib/cache.c b/arch/riscv/lib/cache.c index 71e4937ab54..31aa30bc7d7 100644 --- a/arch/riscv/lib/cache.c +++ b/arch/riscv/lib/cache.c @@ -8,6 +8,7 @@ #include <dm.h> #include <asm/insn-def.h> #include <linux/const.h> +#include <linux/errno.h> #define CBO_INVAL(base) \ INSN_I(OPCODE_MISC_MEM, FUNC3(2), __RD(0), \ @@ -151,3 +152,8 @@ __weak void enable_caches(void) if (!zicbom_block_size) log_debug("Zicbom not initialized.\n"); } + +int __weak pgprot_set_attrs(phys_addr_t addr, size_t size, enum pgprot_attrs perm) +{ + return -ENOSYS; +} |