omap-secure.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * omap-secure.h: OMAP Secure infrastructure header.
  3. *
  4. * Copyright (C) 2011 Texas Instruments, Inc.
  5. * Santosh Shilimkar <santosh.shilimkar@ti.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef OMAP_ARCH_OMAP_SECURE_H
  12. #define OMAP_ARCH_OMAP_SECURE_H
  13. /* Monitor error code */
  14. #define API_HAL_RET_VALUE_NS2S_CONVERSION_ERROR 0xFFFFFFFE
  15. #define API_HAL_RET_VALUE_SERVICE_UNKNWON 0xFFFFFFFF
  16. /* HAL API error codes */
  17. #define API_HAL_RET_VALUE_OK 0x00
  18. #define API_HAL_RET_VALUE_FAIL 0x01
  19. /* Secure HAL API flags */
  20. #define FLAG_START_CRITICAL 0x4
  21. #define FLAG_IRQFIQ_MASK 0x3
  22. #define FLAG_IRQ_ENABLE 0x2
  23. #define FLAG_FIQ_ENABLE 0x1
  24. #define NO_FLAG 0x0
  25. /* Maximum Secure memory storage size */
  26. #define OMAP_SECURE_RAM_STORAGE (88 * SZ_1K)
  27. /* Secure low power HAL API index */
  28. #define OMAP4_HAL_SAVESECURERAM_INDEX 0x1a
  29. #define OMAP4_HAL_SAVEHW_INDEX 0x1b
  30. #define OMAP4_HAL_SAVEALL_INDEX 0x1c
  31. #define OMAP4_HAL_SAVEGIC_INDEX 0x1d
  32. /* Secure Monitor mode APIs */
  33. #define OMAP4_MON_SCU_PWR_INDEX 0x108
  34. #define OMAP4_MON_L2X0_DBG_CTRL_INDEX 0x100
  35. #define OMAP4_MON_L2X0_CTRL_INDEX 0x102
  36. #define OMAP4_MON_L2X0_AUXCTRL_INDEX 0x109
  37. #define OMAP4_MON_L2X0_PREFETCH_INDEX 0x113
  38. /* Secure PPA(Primary Protected Application) APIs */
  39. #define OMAP4_PPA_L2_POR_INDEX 0x23
  40. #define OMAP4_PPA_CPU_ACTRL_SMP_INDEX 0x25
  41. #ifndef __ASSEMBLER__
  42. extern u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs,
  43. u32 arg1, u32 arg2, u32 arg3, u32 arg4);
  44. extern u32 omap_smc2(u32 id, u32 falg, u32 pargs);
  45. extern phys_addr_t omap_secure_ram_mempool_base(void);
  46. #endif /* __ASSEMBLER__ */
  47. #endif /* OMAP_ARCH_OMAP_SECURE_H */