rmmd_initial_context.h 706 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef RMMD_INITIAL_CONTEXT_H
  7. #define RMMD_INITIAL_CONTEXT_H
  8. #include <arch.h>
  9. /*
  10. * SPSR_EL2
  11. * M=0x9 (0b1001 EL2h)
  12. * M[4]=0
  13. * DAIF=0xF Exceptions masked on entry.
  14. * BTYPE=0 BTI not yet supported.
  15. * SSBS=0 Not yet supported.
  16. * IL=0 Not an illegal exception return.
  17. * SS=0 Not single stepping.
  18. * PAN=1 RMM shouldn't access realm memory.
  19. * UAO=0
  20. * DIT=0
  21. * TCO=0
  22. * NZCV=0
  23. */
  24. #define REALM_SPSR_EL2 ( \
  25. SPSR_M_EL2H | \
  26. (0xF << SPSR_DAIF_SHIFT) | \
  27. SPSR_PAN_BIT \
  28. )
  29. #endif /* RMMD_INITIAL_CONTEXT_H */