tzpc.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * (C) Copyright 2012 Samsung Electronics
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of
  7. * the License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  17. * MA 02111-1307 USA
  18. *
  19. */
  20. #ifndef __TZPC_H_
  21. #define __TZPC_H_
  22. #ifndef __ASSEMBLY__
  23. struct exynos_tzpc {
  24. unsigned int r0size;
  25. char res1[0x7FC];
  26. unsigned int decprot0stat;
  27. unsigned int decprot0set;
  28. unsigned int decprot0clr;
  29. unsigned int decprot1stat;
  30. unsigned int decprot1set;
  31. unsigned int decprot1clr;
  32. unsigned int decprot2stat;
  33. unsigned int decprot2set;
  34. unsigned int decprot2clr;
  35. unsigned int decprot3stat;
  36. unsigned int decprot3set;
  37. unsigned int decprot3clr;
  38. char res2[0x7B0];
  39. unsigned int periphid0;
  40. unsigned int periphid1;
  41. unsigned int periphid2;
  42. unsigned int periphid3;
  43. unsigned int pcellid0;
  44. unsigned int pcellid1;
  45. unsigned int pcellid2;
  46. unsigned int pcellid3;
  47. };
  48. #define EXYNOS4_NR_TZPC_BANKS 6
  49. #define EXYNOS5_NR_TZPC_BANKS 10
  50. /* TZPC : Register Offsets */
  51. #define TZPC_BASE_OFFSET 0x10000
  52. /*
  53. * TZPC Register Value :
  54. * R0SIZE: 0x0 : Size of secured ram
  55. */
  56. #define R0SIZE 0x0
  57. /*
  58. * TZPC Decode Protection Register Value :
  59. * DECPROTXSET: 0xFF : Set Decode region to non-secure
  60. */
  61. #define DECPROTXSET 0xFF
  62. void tzpc_init(void);
  63. #endif
  64. #endif