secHw.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*****************************************************************************
  2. * Copyright 2004 - 2008 Broadcom Corporation. All rights reserved.
  3. *
  4. * Unless you and Broadcom execute a separate written software license
  5. * agreement governing use of this software, this software is licensed to you
  6. * under the terms of the GNU General Public License version 2, available at
  7. * http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
  8. *
  9. * Notwithstanding the above, under no circumstances may you combine this
  10. * software in any way with any other Broadcom software provided under a
  11. * license other than the GPL, without Broadcom's express prior written
  12. * consent.
  13. *****************************************************************************/
  14. /****************************************************************************/
  15. /**
  16. * @file secHw.h
  17. *
  18. * @brief Definitions for accessing low level security features
  19. *
  20. */
  21. /****************************************************************************/
  22. #ifndef SECHW_H
  23. #define SECHW_H
  24. typedef void (*secHw_FUNC_t) (void);
  25. typedef enum {
  26. secHw_MODE_SECURE = 0x0, /* Switches processor into secure mode */
  27. secHw_MODE_NONSECURE = 0x1 /* Switches processor into non-secure mode */
  28. } secHw_MODE;
  29. /****************************************************************************/
  30. /**
  31. * @brief Requesting to execute the function in secure mode
  32. *
  33. * This function requests the given function to run in secure mode
  34. *
  35. */
  36. /****************************************************************************/
  37. void secHw_RunSecure(secHw_FUNC_t /* Function to run in secure mode */
  38. );
  39. /****************************************************************************/
  40. /**
  41. * @brief Sets the mode
  42. *
  43. * his function sets the processor mode (secure/non-secure)
  44. *
  45. */
  46. /****************************************************************************/
  47. void secHw_SetMode(secHw_MODE /* Processor mode */
  48. );
  49. /****************************************************************************/
  50. /**
  51. * @brief Get the current mode
  52. *
  53. * This function retieves the processor mode (secure/non-secure)
  54. *
  55. */
  56. /****************************************************************************/
  57. void secHw_GetMode(secHw_MODE *);
  58. #endif /* SECHW_H */