apusys_security_ctrl_plat.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) 2024, MediaTek Inc. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef APUSYS_SECURITY_CTRL_PLAT_H
  7. #define APUSYS_SECURITY_CTRL_PLAT_H
  8. #include <lib/utils_def.h>
  9. #include <platform_def.h>
  10. #define SEC_CTRL_SOC2APU_SET1_0 (APU_SEC_CON + 0xC)
  11. #define SEC_CTRL_SOC2APU_SET1_1 (APU_SEC_CON + 0x10)
  12. #define SEC_CTRL_SIDE_BAND (APU_SEC_CON + 0x24)
  13. #define SEC_CTRL_REG_DOMAIN_NUM (8)
  14. #define SEC_CTRL_DOMAIN_REMAP_SEL BIT(6)
  15. #define SEC_CTRL_DOMAIN_MASK (0xF)
  16. #define SEC_CTRL_NS_MASK (0x1)
  17. #define SEC_CTRL_NARE_DOMAIN (5)
  18. #define SEC_CTRL_NARE_NS (0)
  19. #define SEC_CTRL_NARE_DOMAIN_SHF (0)
  20. #define SEC_CTRL_NARE_NS_SHF (4)
  21. #define SEC_CTRL_SARE0_DOMAIN (5)
  22. #define SEC_CTRL_SARE0_NS (0)
  23. #define SEC_CTRL_SARE0_DOMAIN_SHF (5)
  24. #define SEC_CTRL_SARE0_NS_SHF (9)
  25. #define SEC_CTRL_SARE1_DOMAIN (5)
  26. #define SEC_CTRL_SARE1_NS (0)
  27. #define SEC_CTRL_SARE1_DOMAIN_SHF (10)
  28. #define SEC_CTRL_SARE1_NS_SHF (14)
  29. #define REG_DOMAIN_BITS (4)
  30. #define D0_REMAP_DOMAIN (0)
  31. #define D1_REMAP_DOMAIN (1)
  32. #define D2_REMAP_DOMAIN (2)
  33. #define D3_REMAP_DOMAIN (3)
  34. #define D4_REMAP_DOMAIN (4)
  35. #define D5_REMAP_DOMAIN (6)
  36. #define D6_REMAP_DOMAIN (6)
  37. #define D7_REMAP_DOMAIN (6)
  38. #define D8_REMAP_DOMAIN (8)
  39. #define D9_REMAP_DOMAIN (9)
  40. #define D10_REMAP_DOMAIN (10)
  41. #define D11_REMAP_DOMAIN (11)
  42. #define D12_REMAP_DOMAIN (12)
  43. #define D13_REMAP_DOMAIN (13)
  44. #define D14_REMAP_DOMAIN (6)
  45. #define D15_REMAP_DOMAIN (15)
  46. void apusys_security_ctrl_init(void);
  47. int apusys_plat_setup_sec_mem(void);
  48. #endif /* APUSYS_SECURITY_CTRL_PLAT_H */