tzpc.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. /* TZPC : Register Offsets */
  49. #define TZPC0_BASE 0x10100000
  50. #define TZPC1_BASE 0x10110000
  51. #define TZPC2_BASE 0x10120000
  52. #define TZPC3_BASE 0x10130000
  53. #define TZPC4_BASE 0x10140000
  54. #define TZPC5_BASE 0x10150000
  55. #define TZPC6_BASE 0x10160000
  56. #define TZPC7_BASE 0x10170000
  57. #define TZPC8_BASE 0x10180000
  58. #define TZPC9_BASE 0x10190000
  59. #define TZPC_BASE_OFFSET 0x10000
  60. /*
  61. * TZPC Register Value :
  62. * R0SIZE: 0x0 : Size of secured ram
  63. */
  64. #define R0SIZE 0x0
  65. /*
  66. * TZPC Decode Protection Register Value :
  67. * DECPROTXSET: 0xFF : Set Decode region to non-secure
  68. */
  69. #define DECPROTXSET 0xFF
  70. void tzpc_init(void);
  71. #endif
  72. #endif