sec_boot.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef SEC_BOOT_H
  2. #define SEC_BOOT_H
  3. /**************************************************************************
  4. * [S-BOOT]
  5. **************************************************************************/
  6. /* S-BOOT Attribute */
  7. #define ATTR_SBOOT_DISABLE 0x00
  8. #define ATTR_SBOOT_ENABLE 0x11
  9. #define ATTR_SBOOT_ONLY_ENABLE_ON_SCHIP 0x22
  10. /**************************************************************************
  11. * [SECURE BOOT CHECK]
  12. **************************************************************************/
  13. /* Note : this structure record all the partitions
  14. which should be verified by secure boot check */
  15. #define AND_SEC_BOOT_CHECK_PART_SIZE (90)
  16. typedef struct {
  17. unsigned char name[9][10];
  18. } AND_SECBOOT_CHECK_PART_T;
  19. /* Note : partition name between preloader/DA and kernel mtd table may be different
  20. in order to reduce effort, secure boot update will apply
  21. following transfation table to correct mtd partition name */
  22. #define MTD_SECCFG "seccnfg"
  23. #define MTD_UBOOT "uboot"
  24. #define MTD_LOGO "logo"
  25. #define MTD_BOOTIMG "boot"
  26. #define MTD_USER "userdata"
  27. #define MTD_ANDSYSIMG "system"
  28. #define MTD_RECOVERY "recovery"
  29. #define MTD_SECRO "secstatic"
  30. #define USIF_SECCFG "seccfg"
  31. #define USIF_UBOOT "uboot"
  32. #define USIF_LOGO "logo"
  33. #define USIF_BOOTIMG "bootimg"
  34. #define USIF_USER "userdata"
  35. #define USIF_ANDSYSIMG "android"
  36. #define USIF_RECOVERY "recovery"
  37. #define USIF_SECRO "sec_ro"
  38. #define PL_SECCFG "SECCFG"
  39. #define PL_UBOOT "UBOOT"
  40. #define PL_LOGO "LOGO"
  41. #define PL_BOOTIMG "BOOTIMG"
  42. #define PL_USER "USRDATA"
  43. #define PL_ANDSYSIMG "ANDROID"
  44. #define PL_RECOVERY "RECOVERY"
  45. #define PL_SECRO "SEC_RO"
  46. #define GPT_SECRO "secro"
  47. #define GPT_PRELOADER "preloader"
  48. /**************************************************************************
  49. * EXPORT FUNCTION
  50. **************************************************************************/
  51. extern int masp_boot_init(void);
  52. extern int sec_boot_enabled(void);
  53. extern int sec_modem_auth_enabled(void);
  54. extern int sec_schip_enabled(void);
  55. #endif /* SEC_BOOT_H */