nxp: Rename CONFIG_U_BOOT_HDR_SIZE to FSL_U_BOOT_HDR_SIZE
This is always defined to 16K, so we move this over to include/fsl_validate.h to start with. Next, we rename this from CONFIG_ to FSL_. Coalesce the various comments around this definition to be in fsl_validate.h as well to explain the usage. Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
0c3a6d443f
commit
46df77669e
@ -143,7 +143,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
|
|||||||
(image_entry_noargs_t)(unsigned long)spl_image->entry_point;
|
(image_entry_noargs_t)(unsigned long)spl_image->entry_point;
|
||||||
|
|
||||||
hdr_addr = (spl_image->entry_point + spl_image->size -
|
hdr_addr = (spl_image->entry_point + spl_image->size -
|
||||||
CONFIG_U_BOOT_HDR_SIZE);
|
FSL_U_BOOT_HDR_SIZE);
|
||||||
spl_validate_uboot(hdr_addr, (uintptr_t)spl_image->entry_point);
|
spl_validate_uboot(hdr_addr, (uintptr_t)spl_image->entry_point);
|
||||||
/*
|
/*
|
||||||
* In case of failure in validation, spl_validate_uboot would
|
* In case of failure in validation, spl_validate_uboot would
|
||||||
|
@ -278,11 +278,11 @@ void nand_boot(void)
|
|||||||
* U-Boot header is appended at end of U-boot image, so
|
* U-Boot header is appended at end of U-boot image, so
|
||||||
* calculate U-boot header address using U-boot header size.
|
* calculate U-boot header address using U-boot header size.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_U_BOOT_HDR_ADDR \
|
#define FSL_U_BOOT_HDR_ADDR \
|
||||||
((CFG_SYS_NAND_U_BOOT_START + \
|
((CFG_SYS_NAND_U_BOOT_START + \
|
||||||
CFG_SYS_NAND_U_BOOT_SIZE) - \
|
CFG_SYS_NAND_U_BOOT_SIZE) - \
|
||||||
CONFIG_U_BOOT_HDR_SIZE)
|
FSL_U_BOOT_HDR_SIZE)
|
||||||
spl_validate_uboot(CONFIG_U_BOOT_HDR_ADDR,
|
spl_validate_uboot(FSL_U_BOOT_HDR_ADDR,
|
||||||
CFG_SYS_NAND_U_BOOT_START);
|
CFG_SYS_NAND_U_BOOT_START);
|
||||||
/*
|
/*
|
||||||
* In case of failure in validation, spl_validate_uboot would
|
* In case of failure in validation, spl_validate_uboot would
|
||||||
|
@ -20,13 +20,7 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_MTD_RAW_NAND
|
#ifdef CONFIG_MTD_RAW_NAND
|
||||||
#ifdef CONFIG_NXP_ESBC
|
#ifdef CONFIG_NXP_ESBC
|
||||||
#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
|
#define CFG_SYS_NAND_U_BOOT_SIZE ((768 << 10) + (16 << 10))
|
||||||
/*
|
|
||||||
* HDR would be appended at end of image and copied to DDR along
|
|
||||||
* with U-Boot image.
|
|
||||||
*/
|
|
||||||
#define CFG_SYS_NAND_U_BOOT_SIZE ((768 << 10) + \
|
|
||||||
CONFIG_U_BOOT_HDR_SIZE)
|
|
||||||
#else
|
#else
|
||||||
#define CFG_SYS_NAND_U_BOOT_SIZE (768 << 10)
|
#define CFG_SYS_NAND_U_BOOT_SIZE (768 << 10)
|
||||||
#endif
|
#endif
|
||||||
|
@ -38,21 +38,6 @@
|
|||||||
#define SDRAM_CFG2_FRC_SR 0x80000000
|
#define SDRAM_CFG2_FRC_SR 0x80000000
|
||||||
#define SDRAM_CFG_BI 0x00000001
|
#define SDRAM_CFG_BI 0x00000001
|
||||||
|
|
||||||
#ifdef CONFIG_SD_BOOT
|
|
||||||
#ifdef CONFIG_NXP_ESBC
|
|
||||||
#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
|
|
||||||
#endif /* ifdef CONFIG_NXP_ESBC */
|
|
||||||
|
|
||||||
#ifdef CONFIG_U_BOOT_HDR_SIZE
|
|
||||||
/*
|
|
||||||
* HDR would be appended at end of image and copied to DDR along
|
|
||||||
* with U-Boot image. Here u-boot max. size is 512K. So if binary
|
|
||||||
* size increases then increase this size in case of secure boot as
|
|
||||||
* it uses raw U-Boot image instead of FIT image.
|
|
||||||
*/
|
|
||||||
#endif /* ifdef CONFIG_U_BOOT_HDR_SIZE */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define PHYS_SDRAM 0x80000000
|
#define PHYS_SDRAM 0x80000000
|
||||||
#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
|
#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
|
||||||
|
|
||||||
|
@ -37,25 +37,6 @@
|
|||||||
#define SDRAM_CFG2_FRC_SR 0x80000000
|
#define SDRAM_CFG2_FRC_SR 0x80000000
|
||||||
#define SDRAM_CFG_BI 0x00000001
|
#define SDRAM_CFG_BI 0x00000001
|
||||||
|
|
||||||
#ifdef CONFIG_SD_BOOT
|
|
||||||
#ifdef CONFIG_NXP_ESBC
|
|
||||||
/*
|
|
||||||
* HDR would be appended at end of image and copied to DDR along
|
|
||||||
* with U-Boot image.
|
|
||||||
*/
|
|
||||||
#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
|
|
||||||
#endif /* ifdef CONFIG_NXP_ESBC */
|
|
||||||
|
|
||||||
#ifdef CONFIG_U_BOOT_HDR_SIZE
|
|
||||||
/*
|
|
||||||
* HDR would be appended at end of image and copied to DDR along
|
|
||||||
* with U-Boot image. Here u-boot max. size is 512K. So if binary
|
|
||||||
* size increases then increase this size in case of secure boot as
|
|
||||||
* it uses raw u-boot image instead of fit image.
|
|
||||||
*/
|
|
||||||
#endif /* ifdef CONFIG_U_BOOT_HDR_SIZE */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define PHYS_SDRAM 0x80000000
|
#define PHYS_SDRAM 0x80000000
|
||||||
#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
|
#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
|
||||||
|
|
||||||
|
@ -41,37 +41,10 @@
|
|||||||
/* Serial Port */
|
/* Serial Port */
|
||||||
#define CFG_SYS_NS16550_CLK (get_serial_clock())
|
#define CFG_SYS_NS16550_CLK (get_serial_clock())
|
||||||
|
|
||||||
/* SD boot SPL */
|
|
||||||
#ifdef CONFIG_SD_BOOT
|
|
||||||
#ifdef CONFIG_NXP_ESBC
|
|
||||||
#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
|
|
||||||
/*
|
|
||||||
* HDR would be appended at end of image and copied to DDR along
|
|
||||||
* with U-Boot image. Here u-boot max. size is 512K. So if binary
|
|
||||||
* size increases then increase this size in case of secure boot as
|
|
||||||
* it uses raw u-boot image instead of fit image.
|
|
||||||
*/
|
|
||||||
#endif /* ifdef CONFIG_NXP_ESBC */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* NAND SPL */
|
/* NAND SPL */
|
||||||
#ifdef CONFIG_NAND_BOOT
|
#ifdef CONFIG_NAND_BOOT
|
||||||
#define CFG_SYS_NAND_U_BOOT_DST CONFIG_TEXT_BASE
|
#define CFG_SYS_NAND_U_BOOT_DST CONFIG_TEXT_BASE
|
||||||
#define CFG_SYS_NAND_U_BOOT_START CONFIG_TEXT_BASE
|
#define CFG_SYS_NAND_U_BOOT_START CONFIG_TEXT_BASE
|
||||||
|
|
||||||
#ifdef CONFIG_NXP_ESBC
|
|
||||||
#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
|
|
||||||
#endif /* ifdef CONFIG_NXP_ESBC */
|
|
||||||
|
|
||||||
#ifdef CONFIG_U_BOOT_HDR_SIZE
|
|
||||||
/*
|
|
||||||
* HDR would be appended at end of image and copied to DDR along
|
|
||||||
* with U-Boot image. Here u-boot max. size is 512K. So if binary
|
|
||||||
* size increases then increase this size in case of secure boot as
|
|
||||||
* it uses raw u-boot image instead of fit image.
|
|
||||||
*/
|
|
||||||
#endif /* ifdef CONFIG_U_BOOT_HDR_SIZE */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GPIO */
|
/* GPIO */
|
||||||
|
@ -41,19 +41,6 @@
|
|||||||
/* Serial Port */
|
/* Serial Port */
|
||||||
#define CFG_SYS_NS16550_CLK (get_serial_clock())
|
#define CFG_SYS_NS16550_CLK (get_serial_clock())
|
||||||
|
|
||||||
/* SD boot SPL */
|
|
||||||
#ifdef CONFIG_SD_BOOT
|
|
||||||
#ifdef CONFIG_NXP_ESBC
|
|
||||||
#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
|
|
||||||
/*
|
|
||||||
* HDR would be appended at end of image and copied to DDR along
|
|
||||||
* with U-Boot image. Here u-boot max. size is 512K. So if binary
|
|
||||||
* size increases then increase this size in case of secure boot as
|
|
||||||
* it uses raw u-boot image instead of fit image.
|
|
||||||
*/
|
|
||||||
#endif /* ifdef CONFIG_NXP_ESBC */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* NAND SPL */
|
/* NAND SPL */
|
||||||
#ifdef CONFIG_NAND_BOOT
|
#ifdef CONFIG_NAND_BOOT
|
||||||
#define CFG_SYS_NAND_U_BOOT_DST CONFIG_TEXT_BASE
|
#define CFG_SYS_NAND_U_BOOT_DST CONFIG_TEXT_BASE
|
||||||
|
@ -133,17 +133,4 @@ unsigned long long get_qixis_addr(void);
|
|||||||
" 0x580e00000 \0"
|
" 0x580e00000 \0"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SPL
|
|
||||||
#ifdef CONFIG_NXP_ESBC
|
|
||||||
#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
|
|
||||||
/*
|
|
||||||
* HDR would be appended at end of image and copied to DDR along
|
|
||||||
* with U-Boot image. Here u-boot max. size is 512K. So if binary
|
|
||||||
* size increases then increase this size in case of secure boot as
|
|
||||||
* it uses raw u-boot image instead of fit image.
|
|
||||||
*/
|
|
||||||
#endif /* ifdef CONFIG_NXP_ESBC */
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __LS1088_COMMON_H */
|
#endif /* __LS1088_COMMON_H */
|
||||||
|
@ -280,4 +280,11 @@ int fsl_setenv_chain_of_trust(void);
|
|||||||
* Architecture header (appended to U-boot image).
|
* Architecture header (appended to U-boot image).
|
||||||
*/
|
*/
|
||||||
void spl_validate_uboot(uint32_t hdr_addr, uintptr_t img_addr);
|
void spl_validate_uboot(uint32_t hdr_addr, uintptr_t img_addr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This header is appended at end of image and copied to DDR along
|
||||||
|
* with the U-Boot image and later used as part of the validation
|
||||||
|
* flow
|
||||||
|
*/
|
||||||
|
#define FSL_U_BOOT_HDR_SIZE (16 << 10)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user