riscv: mm: Fix VA base for canonical addresses

RISC-V defines the following virtual address rules:
- For Sv39 (39-bit VA), bits 63–39 all equal to bit 38 of VA
- For Sv48 (48-bit VA), bits 63–48 all equal to bit 47 of VA
- For Sv57 (57-bit VA), bits 63–57 all equal to bit 56 of VA

In other words, the most-significant bits of VA base must be all one if
the highest SvXX address bit of VA is one.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
1 file changed
tree: 8b832e21af1f0ac113d5f9074523d2fcdb895e8b
  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