core: riscv: implement ASLR base address calculation

Implement arch_aslr_base_addr() for RISC-V to compute the ASLR base
address using the provided seed.

The implementation maps addresses across the full virtual address space:
- When MSB of new based address is set, the address is mapped
  to the upper half by extending MSB to 64-bit
- Otherwise, it's mapped to the lower half

This approach utilizes the entire available virtual address space for
ASLR (e.g. 512 GiB for Sv39).

Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
1 file changed
tree: 68c4f98460f9fa93ca5674a49a724cb13e111dfc
  1. .devcontainer/
  2. .github/
  3. .vscode/
  4. core/
  5. keys/
  6. ldelf/
  7. lib/
  8. mk/
  9. scripts/
  10. ta/
  11. .checkpatch.conf
  12. .clang-format
  13. .gitattributes
  14. .gitignore
  15. CHANGELOG.md
  16. LICENSE
  17. MAINTAINERS
  18. Makefile
  19. README.md
  20. typedefs.checkpatch
README.md

OP-TEE Trusted OS

This git contains source code for the secure side implementation of OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io.

// OP-TEE core maintainers