fsl_secure_boot.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. * Copyright 2010-2011 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __FSL_SECURE_BOOT_H
  7. #define __FSL_SECURE_BOOT_H
  8. #include <asm/config_mpc85xx.h>
  9. #ifdef CONFIG_SECURE_BOOT
  10. #define CONFIG_CMD_ESBC_VALIDATE
  11. #define CONFIG_CMD_BLOB
  12. #define CONFIG_FSL_SEC_MON
  13. #define CONFIG_SHA_PROG_HW_ACCEL
  14. #define CONFIG_DM
  15. #define CONFIG_RSA
  16. #define CONFIG_RSA_FREESCALE_EXP
  17. #ifndef CONFIG_FSL_CAAM
  18. #define CONFIG_FSL_CAAM
  19. #endif
  20. #endif
  21. #ifdef CONFIG_SECURE_BOOT
  22. #if defined(CONFIG_FSL_CORENET)
  23. #define CONFIG_SYS_PBI_FLASH_BASE 0xc0000000
  24. #elif defined(CONFIG_BSC9132QDS)
  25. #define CONFIG_SYS_PBI_FLASH_BASE 0xc8000000
  26. #elif defined(CONFIG_C29XPCIE)
  27. #define CONFIG_SYS_PBI_FLASH_BASE 0xcc000000
  28. #else
  29. #define CONFIG_SYS_PBI_FLASH_BASE 0xce000000
  30. #endif
  31. #define CONFIG_SYS_PBI_FLASH_WINDOW 0xcff80000
  32. #if defined(CONFIG_B4860QDS) || \
  33. defined(CONFIG_T4240QDS) || \
  34. defined(CONFIG_T2080QDS) || \
  35. defined(CONFIG_T2080RDB) || \
  36. defined(CONFIG_T1040QDS) || \
  37. defined(CONFIG_T104xD4QDS) || \
  38. defined(CONFIG_T104xRDB) || \
  39. defined(CONFIG_T104xD4RDB) || \
  40. defined(CONFIG_PPC_T1023) || \
  41. defined(CONFIG_PPC_T1024)
  42. #define CONFIG_SYS_CPC_REINIT_F
  43. #define CONFIG_KEY_REVOCATION
  44. #undef CONFIG_SYS_INIT_L3_ADDR
  45. #define CONFIG_SYS_INIT_L3_ADDR 0xbff00000
  46. #endif
  47. #if defined(CONFIG_RAMBOOT_PBL)
  48. #undef CONFIG_SYS_INIT_L3_ADDR
  49. #define CONFIG_SYS_INIT_L3_ADDR 0xbff00000
  50. #endif
  51. #if defined(CONFIG_C29XPCIE)
  52. #define CONFIG_KEY_REVOCATION
  53. #endif
  54. #if defined(CONFIG_PPC_P3041) || \
  55. defined(CONFIG_PPC_P4080) || \
  56. defined(CONFIG_PPC_P5020) || \
  57. defined(CONFIG_PPC_P5040) || \
  58. defined(CONFIG_PPC_P2041)
  59. #define CONFIG_FSL_TRUST_ARCH_v1
  60. #endif
  61. #if defined(CONFIG_FSL_CORENET) && !defined(CONFIG_SYS_RAMBOOT)
  62. /* The key used for verification of next level images
  63. * is picked up from an Extension Table which has
  64. * been verified by the ISBC (Internal Secure boot Code)
  65. * in boot ROM of the SoC.
  66. * The feature is only applicable in case of NOR boot and is
  67. * not applicable in case of RAMBOOT (NAND, SD, SPI).
  68. */
  69. #define CONFIG_FSL_ISBC_KEY_EXT
  70. #endif
  71. #ifndef CONFIG_FIT_SIGNATURE
  72. /* If Boot Script is not on NOR and is required to be copied on RAM */
  73. #ifdef CONFIG_BOOTSCRIPT_COPY_RAM
  74. #define CONFIG_BS_HDR_ADDR_RAM 0x00010000
  75. #define CONFIG_BS_HDR_ADDR_FLASH 0x00800000
  76. #define CONFIG_BS_HDR_SIZE 0x00002000
  77. #define CONFIG_BS_ADDR_RAM 0x00012000
  78. #define CONFIG_BS_ADDR_FLASH 0x00802000
  79. #define CONFIG_BS_SIZE 0x00001000
  80. #define CONFIG_BOOTSCRIPT_HDR_ADDR CONFIG_BS_HDR_ADDR_RAM
  81. #else
  82. /* The bootscript header address is different for B4860 because the NOR
  83. * mapping is different on B4 due to reduced NOR size.
  84. */
  85. #if defined(CONFIG_B4860QDS)
  86. #define CONFIG_BOOTSCRIPT_HDR_ADDR 0xecc00000
  87. #elif defined(CONFIG_FSL_CORENET)
  88. #define CONFIG_BOOTSCRIPT_HDR_ADDR 0xe8e00000
  89. #elif defined(CONFIG_BSC9132QDS)
  90. #define CONFIG_BOOTSCRIPT_HDR_ADDR 0x88020000
  91. #elif defined(CONFIG_C29XPCIE)
  92. #define CONFIG_BOOTSCRIPT_HDR_ADDR 0xec020000
  93. #else
  94. #define CONFIG_BOOTSCRIPT_HDR_ADDR 0xee020000
  95. #endif
  96. #endif
  97. #include <config_fsl_secboot.h>
  98. #endif
  99. #endif
  100. #endif