[PATCH 1/1] config: ls2088ardb: Add config CONFIG_SYS_FLASH_CFI_WIDTH
Add config CONFIG_SYS_FLASH_CFI_WIDTH as FLASH_CFI_16BIT to fix flash writing issue on ls2088ardb platform introduced by the commit '53879b1738' (cfi_flash: Fix detection of 8-bit bus flash devices via address shift) Signed-off-by: Priyanka Singh --- include/configs/ls2080ardb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h index 60d99a0b37..6445193272 100644 --- a/include/configs/ls2080ardb.h +++ b/include/configs/ls2080ardb.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2017, 2019-2021 NXP + * Copyright 2017, 2019-2022 NXP * Copyright 2015 Freescale Semiconductor */ @@ -77,6 +77,8 @@ #define CONFIG_SYS_NOR_FTIM3 0x0400 #define CONFIG_SYS_IFC_CCR 0x0100 +#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT + #ifdef CONFIG_MTD_NOR_FLASH #define CONFIG_SYS_FLASH_QUIET_TEST #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */ -- 2.17.1
[PATCH v2 1/1] board: freescale: t104xrdb: Set popts->cpo_sample to 0x54 for DDR3
Set popts->cpo_sample to 0x54 in t104xrdb/ddr.c to optimize cpo Signed-off-by: Priyanka Singh --- Changes for v2: -Added NXP Copyright to file updated --- board/freescale/t104xrdb/ddr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c index 8351f7ce9d..539a36d2a9 100644 --- a/board/freescale/t104xrdb/ddr.c +++ b/board/freescale/t104xrdb/ddr.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2013 Freescale Semiconductor, Inc. + * Copyright 2021 NXP */ #include @@ -83,6 +84,7 @@ found: /* optimize cpo for erratum A-009942 */ popts->cpo_sample = 0x59; #else + popts->cpo_sample = 0x54; popts->half_strength_driver_enable = 0; #endif /* -- 2.17.1
[PATCH 4/4] board: freescale: t104xrdb: Set popts->cpo_sample to 0x54 for DDR3
Set popts->cpo_sample to 0x54 in t104xrdb/ddr.c to optimize cpo Signed-off-by: Priyanka Singh --- board/freescale/t104xrdb/ddr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c index 8351f7ce9d..eedb8c9f6d 100644 --- a/board/freescale/t104xrdb/ddr.c +++ b/board/freescale/t104xrdb/ddr.c @@ -83,6 +83,7 @@ found: /* optimize cpo for erratum A-009942 */ popts->cpo_sample = 0x59; #else + popts->cpo_sample = 0x54; popts->half_strength_driver_enable = 0; #endif /* -- 2.17.1
[PATCH 3/4] drivers: ddr: main.c: Fix Bad Shift operator issue
Fix Bad Shift operator issue in step_to_string function by adding an if check Signed-off-by: Priyanka Singh --- drivers/ddr/fsl/main.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c index 8e147160b9..f389e5ef95 100644 --- a/drivers/ddr/fsl/main.c +++ b/drivers/ddr/fsl/main.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /* * Copyright 2008-2014 Freescale Semiconductor, Inc. + * Copyright 2021 NXP */ /* @@ -297,9 +298,13 @@ const char * step_to_string(unsigned int step) { unsigned int s = __ilog2(step); - if ((1 << s) != step) - return step_string_tbl[7]; - + if (s <= 31) { + if ((1 << s) != step) + return step_string_tbl[7]; + } else { + if ((1 << (s - 32)) != step) + return step_string_tbl[7]; + } if (s >= ARRAY_SIZE(step_string_tbl)) { printf("Error for the step in %s\n", __func__); s = 0; -- 2.17.1
[PATCH 2/4] drivers: ddr: fsl_ddr_gen4.c: Fix divide by zero issue
Fix possible divide by zero issue in fsl_ddr_set_memctl_regs by adding an if check Signed-off-by: Priyanka Singh --- drivers/ddr/fsl/fsl_ddr_gen4.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c index e43c680154..89cb4d352e 100644 --- a/drivers/ddr/fsl/fsl_ddr_gen4.c +++ b/drivers/ddr/fsl/fsl_ddr_gen4.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2014-2020 Freescale Semiconductor, Inc. + * Copyright 2021 NXP */ #include @@ -57,7 +58,8 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs, struct ccsr_ddr __iomem *ddr; u32 temp32; u32 total_gb_size_per_controller; - int timeout; + int timeout = 0; + int ddr_freq_for_timeout = 0; int mod_bnds = 0; #ifdef CONFIG_SYS_FSL_ERRATUM_A008511 @@ -511,8 +513,14 @@ step2: */ bus_width = 3 - ((ddr_in32(>sdram_cfg) & SDRAM_CFG_DBW_MASK) >> SDRAM_CFG_DBW_SHIFT); - timeout = ((total_gb_size_per_controller << (6 - bus_width)) * 100 / - (get_ddr_freq(ctrl_num) >> 20)) << 2; + ddr_freq_for_timeout = (get_ddr_freq(ctrl_num) >> 20) << 2; + if (ddr_freq_for_timeout) { + timeout = ((total_gb_size_per_controller << + (6 - bus_width)) * 100 / + ddr_freq_for_timeout); + } else { + debug("Error in getting timeout.\n"); + } total_gb_size_per_controller >>= 4; /* shift down to gb size */ debug("total %d GB\n", total_gb_size_per_controller); debug("Need to wait up to %d * 10ms\n", timeout); -- 2.17.1
[PATCH 1/4] drivers: ddr: util.c: Fix divide by zero issue
Fix possible divide by zero issue in get_memory_clk_period_ps by adding a check Signed-off-by: Priyanka Singh --- drivers/ddr/fsl/util.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/ddr/fsl/util.c b/drivers/ddr/fsl/util.c index ac4f8d2732..43cb01804b 100644 --- a/drivers/ddr/fsl/util.c +++ b/drivers/ddr/fsl/util.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /* * Copyright 2008-2014 Freescale Semiconductor, Inc. + * Copyright 2021 NXP */ #include @@ -75,10 +76,13 @@ unsigned int get_memory_clk_period_ps(const unsigned int ctrl_num) /* Round to nearest 10ps, being careful about 64-bit multiply/divide */ unsigned long long rem, mclk_ps = ULL_2E12; - - /* Now perform the big divide, the result fits in 32-bits */ - rem = do_div(mclk_ps, data_rate); - result = (rem >= (data_rate >> 1)) ? mclk_ps + 1 : mclk_ps; + if (data_rate) { + /* Now perform the big divide, the result fits in 32-bits */ + rem = do_div(mclk_ps, data_rate); + result = (rem >= (data_rate >> 1)) ? mclk_ps + 1 : mclk_ps; + } else { + result = 0; + } return result; } -- 2.17.1
[PATCH 1/1] board: freescale: vid.c: Add check for return value of adjust_vdd()
Add check for return value of adjust_vdd() Signed-off-by: Biwen Li Signed-off-by: Priyanka Singh --- board/freescale/common/vid.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index 6e8296293b..13ef101e7f 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2014 Freescale Semiconductor, Inc. - * Copyright 2020 NXP + * Copyright 2020-21 NXP * Copyright 2020 Stephen Carlson */ @@ -793,13 +793,16 @@ static int do_vdd_override(struct cmd_tbl *cmdtp, char *const argv[]) { ulong override; + int ret = 0; if (argc < 2) return CMD_RET_USAGE; - if (!strict_strtoul(argv[1], 10, )) - adjust_vdd(override); /* the value is checked by callee */ - else + if (!strict_strtoul(argv[1], 10, )) { + ret = adjust_vdd(override); + if (ret < 0) + return CMD_RET_FAILURE; + } else return CMD_RET_USAGE; return 0; } -- 2.17.1
[PATCH v2 1/1] board: freescale: vid.c: Add check for return value of adjust_vdd()
From: Biwen Li Add check for return value of adjust_vdd() --- Changes for v2: -Add parantheses to fix build warning Signed-off-by: Priyanka Singh Signed-off-by: Biwen Li --- board/freescale/common/vid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index d02d91cdef..0256d035eb 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -971,11 +971,11 @@ static int do_vdd_override(cmd_tbl_t *cmdtp, if (argc < 2) return CMD_RET_USAGE; - if (!strict_strtoul(argv[1], 10, )) + if (!strict_strtoul(argv[1], 10, )) { ret = adjust_vdd(override); /* the value is checked by callee */ if (ret < 0) return CMD_RET_FAILURE; - else + } else return CMD_RET_USAGE; return 0; } -- 2.17.1
[PATCH 1/1] layerscape: fdt.c: Check for NULL return value from fdt_getprop()
Check for NULL return value from fdt_getprop() in fdt_fixup_remove_jr() Signed-off-by: Priyanka Singh --- arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c index f5f75fa452..5fc17a7233 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c @@ -391,10 +391,13 @@ void fdt_fixup_remove_jr(void *blob) while (jr_node != -FDT_ERR_NOTFOUND) { reg = (fdt32_t *)fdt_getprop(blob, jr_node, "reg", ); - jr_offset = fdt_read_number(reg, addr_cells); - if (jr_offset == used_jr) { - fdt_del_node(blob, jr_node); - break; + if(reg != NULL) + { + jr_offset = fdt_read_number(reg, addr_cells); + if (jr_offset == used_jr) { + fdt_del_node(blob, jr_node); + break; + } } jr_node = fdt_node_offset_by_compatible(blob, jr_node, "fsl,sec-v4.0-job-ring"); -- 2.17.1
[PATCH 1/1] board: freescale: vid.c: Add check for return value of adjust_vdd()
Add check for return value of adjust_vdd() Signed-off-by: Priyanka Singh --- board/freescale/common/vid.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index bfd24c43b4..95d7df1e26 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -931,12 +931,14 @@ static int do_vdd_override(cmd_tbl_t *cmdtp, char * const argv[]) { ulong override; - + int ret = 0; if (argc < 2) return CMD_RET_USAGE; if (!strict_strtoul(argv[1], 10, )) - adjust_vdd(override); /* the value is checked by callee */ + ret = adjust_vdd(override); /* the value is checked by callee */ + if (ret < 0) + return CMD_RET_FAILURE; else return CMD_RET_USAGE; return 0; -- 2.17.1
[PATCH 1/1] board: freescale: vid.c: Initialize variable 'i2caddress'
Initialize variable 'i2caddress' in adjust_vdd() to zero Signed-off-by: Priyanka Singh --- board/freescale/common/vid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index bfd24c43b4..755108e385 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -447,7 +447,7 @@ int adjust_vdd(ulong vdd_override) u8 vid; #endif int vdd_target, vdd_current, vdd_last; - int ret, i2caddress; + int ret, i2caddress = 0; unsigned long vdd_string_override; char *vdd_string; #if defined(CONFIG_ARCH_LX2160A) || defined(CONFIG_ARCH_LX2162A) -- 2.17.1
[PATCH 1/1] board: freescale: vid.c: Initialize variable 'i2caddress'
Initialize variable 'i2caddress' in adjust_vdd() to zero Signed-off-by: Priyanka Singh --- board/freescale/common/vid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index bfd24c43b4..755108e385 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -447,7 +447,7 @@ int adjust_vdd(ulong vdd_override) u8 vid; #endif int vdd_target, vdd_current, vdd_last; - int ret, i2caddress; + int ret, i2caddress = 0; unsigned long vdd_string_override; char *vdd_string; #if defined(CONFIG_ARCH_LX2160A) || defined(CONFIG_ARCH_LX2162A) -- 2.17.1
[PATCH 1/1] board: freescale: vid.c: Initialize variable 'i2caddress'
Initialize variable 'i2caddress' in print_vdd() to zero Signed-off-by: Priyanka Singh --- board/freescale/common/vid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index 43b5d8ebd7..bfd24c43b4 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -891,7 +891,7 @@ exit: static int print_vdd(void) { - int vdd_last, ret, i2caddress; + int vdd_last, ret, i2caddress = 0; ret = i2c_multiplexer_select_vid_channel(I2C_MUX_CH_VOL_MONITOR); if (ret) { -- 2.17.1
[PATCH 1/1] armv8: ls1028a: Update secure boot headers offset
Update the secure boot headers offsets of Kernel and other firmware images for SD and XSPI boot sources used by esbc_validate command. Signed-off-by: Priyanka Singh --- include/configs/ls1028a_common.h | 8 include/configs/ls1028aqds.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/configs/ls1028a_common.h b/include/configs/ls1028a_common.h index 98320e22e9..62639cfb39 100644 --- a/include/configs/ls1028a_common.h +++ b/include/configs/ls1028a_common.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2019 NXP + * Copyright 2019-2020 NXP */ #ifndef __L1028A_COMMON_H @@ -92,14 +92,14 @@ "fdt_addr_r=0x9000\0" \ "ramdisk_addr_r=0xa000\0" \ "kernel_start=0x100\0" \ - "kernelheader_start=0x80\0" \ + "kernelheader_start=0x60\0" \ "kernel_load=0xa000\0" \ "kernel_size=0x280\0" \ "kernelheader_size=0x4\0" \ "kernel_addr_sd=0x8000\0" \ "kernel_size_sd=0x14000\0" \ - "kernelhdr_addr_sd=0x4000\0"\ - "kernelhdr_size_sd=0x10\0" \ + "kernelhdr_addr_sd=0x3000\0"\ + "kernelhdr_size_sd=0x20\0" \ "console=ttyS0,115200\0"\ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"\ BOOTENV \ diff --git a/include/configs/ls1028aqds.h b/include/configs/ls1028aqds.h index b0e9441a48..4eec03dcbd 100644 --- a/include/configs/ls1028aqds.h +++ b/include/configs/ls1028aqds.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2019 NXP + * Copyright 2019-2020 NXP */ #ifndef __LS1028A_QDS_H @@ -104,13 +104,13 @@ "fdt_addr_r=0x9000\0" \ "ramdisk_addr_r=0xa000\0" \ "kernel_start=0x100\0" \ - "kernelheader_start=0x80\0" \ + "kernelheader_start=0x60\0" \ "kernel_load=0xa000\0" \ "kernel_size=0x280\0" \ "kernelheader_size=0x4\0" \ "kernel_addr_sd=0x8000\0" \ "kernel_size_sd=0x14000\0" \ - "kernelhdr_addr_sd=0x4000\0" \ + "kernelhdr_addr_sd=0x3000\0" \ "kernelhdr_size_sd=0x10\0" \ "console=ttyS0,115200\0" \ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ -- 2.17.1
[PATCH 1/1] configs: ls1012ardb: secure boot: Add PFE config
Add config to enable the PFE, ETH and MMC HS200 support. Also change the pfe secure boot header address. Signed-off-by: Priyanka Singh --- board/freescale/ls1012ardb/Kconfig | 2 +- configs/ls1012ardb_tfa_SECURE_BOOT_defconfig | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/board/freescale/ls1012ardb/Kconfig b/board/freescale/ls1012ardb/Kconfig index 51efd0fa37..dea9ba5d2f 100644 --- a/board/freescale/ls1012ardb/Kconfig +++ b/board/freescale/ls1012ardb/Kconfig @@ -35,7 +35,7 @@ config SYS_LS_PFE_FW_ADDR config SYS_LS_PFE_ESBC_ADDR hex "PFE Firmware HDR Addr" - default 0x4070 + default 0x4064 config DDR_PFE_PHYS_BASEADDR hex "PFE DDR physical base address" diff --git a/configs/ls1012ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1012ardb_tfa_SECURE_BOOT_defconfig index 342fac6083..2330105852 100644 --- a/configs/ls1012ardb_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1012ardb_tfa_SECURE_BOOT_defconfig @@ -60,3 +60,6 @@ CONFIG_RSA_SOFTWARE_EXP=y CONFIG_DM_I2C=y CONFIG_DM_GPIO=y CONFIG_DM_RTC=y +CONFIG_MMC_HS200_SUPPORT=y +CONFIG_FSL_PFE=y +CONFIG_DM_ETH=y -- 2.17.1
[PATCH 2/2] armv8: ls2088a: Updates secure boot headers offset
Updates the secure boot headers offsets of Kernel and other firmware images for SD and NOR boot sources used by esbc_validate command. Signed-off-by: Priyanka Singh --- include/configs/ls2080aqds.h | 12 - include/configs/ls2080ardb.h | 52 ++-- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h index e2a897557d..f71bf95978 100644 --- a/include/configs/ls2080aqds.h +++ b/include/configs/ls2080aqds.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2017, 2019 NXP + * Copyright 2017, 2019-2020 NXP * Copyright 2015 Freescale Semiconductor */ @@ -365,8 +365,8 @@ unsigned long get_board_ddr_clk(void); "kernel_load=0xa000\0" \ "kernel_size=0x280\0" \ "mcmemsize=0x4000\0"\ - "mcinitcmd=esbc_validate 0x58070;" \ - "esbc_validate 0x58074;"\ + "mcinitcmd=esbc_validate 0x58064;" \ + "esbc_validate 0x58068;"\ "fsl_mc start mc 0x580a0" \ " 0x580e0 \0" #else @@ -394,7 +394,7 @@ unsigned long get_board_ddr_clk(void); "kernel_size=0x280\0" \ "kernel_size_sd=0x14000\0" \ "load_addr=0xa000\0"\ - "kernelheader_addr=0x58080\0" \ + "kernelheader_addr=0x58060\0" \ "kernelheader_addr_r=0x8020\0" \ "kernelheader_size=0x4\0" \ "BOARD=ls2088aqds\0" \ @@ -447,7 +447,7 @@ unsigned long get_board_ddr_clk(void); #ifdef CONFIG_TFABOOT #define SD_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& mmcinfo && mmc read $load_addr 0x3c00 0x800 " \ + "&& mmcinfo && mmc read $load_addr 0x3600 0x800 " \ "&& esbc_validate $load_addr; " \ "env exists mcinitcmd && run mcinitcmd "\ "&& mmc read 0x80d0 0x6800 0x800 " \ @@ -457,7 +457,7 @@ unsigned long get_board_ddr_clk(void); #define IFC_NOR_BOOTCOMMAND\ "env exists mcinitcmd && env exists secureboot "\ - "&& esbc_validate 0x58078; env exists mcinitcmd "\ + "&& esbc_validate 0x5806C; env exists mcinitcmd "\ "&& fsl_mc lazyapply dpl 0x580d0;" \ "run nor_bootcmd; " \ "env exists secureboot && esbc_halt;" diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h index ee9b3484dd..6be1ac95c3 100644 --- a/include/configs/ls2080ardb.h +++ b/include/configs/ls2080ardb.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2017, 2019 NXP + * Copyright 2017, 2019-2020 NXP * Copyright 2015 Freescale Semiconductor */ @@ -340,46 +340,46 @@ unsigned long get_board_sys_clk(void); #ifdef CONFIG_TFABOOT #define QSPI_MC_INIT_CMD \ "env exists secureboot && " \ - "esbc_validate 0x2070 && " \ - "esbc_validate 0x2074;" \ + "esbc_validate 0x2064 && " \ + "esbc_validate 0x2068;" \ "fsl_mc start mc 0x20a0 0x20e0 \0" #define SD_MC_INIT_CMD \ "mmcinfo;mmc read 0x80a0 0x5000 0x1200;" \ "mmc read 0x80e0 0x7000 0x800;" \ "env exists secureboot && " \ - "mmc read 0x8070 0x3800 0x20 && " \ - "mmc read 0x8074 0x3A00 0x20 && " \ - "esbc_validate 0x8070 && " \ - "esbc_validate 0x8074 ;"\ + "mmc read 0x8064 0x3200 0x20 && " \ + "mmc read 0x8068 0x3400 0x20 && " \ + "esbc_validate 0x8064 && " \ + "esbc_validate 0x8068 ;"\ "fsl_mc start mc 0x80a0 0x80e0\0" #define IFC_MC_INIT_CMD\ "env exists secureboot &a
[PATCH 1/2] armv8: ls1088a: Updates secure boot headers offset
Updates the secure boot headers offsets of Kernel and other firmware images for SD and QSPI boot sources used by esbc_validate command. Signed-off-by: Priyanka Singh --- include/configs/ls1088aqds.h | 6 ++-- include/configs/ls1088ardb.h | 60 ++-- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/include/configs/ls1088aqds.h b/include/configs/ls1088aqds.h index 85e20617e6..f3a87df26a 100644 --- a/include/configs/ls1088aqds.h +++ b/include/configs/ls1088aqds.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2017 NXP + * Copyright 2017, 2020 NXP */ #ifndef __LS1088A_QDS_H @@ -421,9 +421,9 @@ unsigned long get_board_ddr_clk(void); "kernel_load=0xa000\0" \ "kernel_size=0x280\0" \ "mcinitcmd=sf probe 0:0;sf read 0xa0a0 0xa0 0x10;" \ - "sf read 0xa070 0x70 0x4000; esbc_validate 0xa070;" \ + "sf read 0xa064 0x64 0x4000; esbc_validate 0xa064;" \ "sf read 0xa0e0 0xe0 0x10;" \ - "sf read 0xa074 0x74 0x4000;esbc_validate 0xa074;" \ + "sf read 0xa068 0x68 0x4000;esbc_validate 0xa068;" \ "fsl_mc start mc 0xa0a0 0xa0e0\0" \ "mcmemsize=0x7000 \0" #else /* if !(CONFIG_SECURE_BOOT) */ diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h index 50de658d2e..a5cccbd250 100644 --- a/include/configs/ls1088ardb.h +++ b/include/configs/ls1088ardb.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright 2017 NXP + * Copyright 2017, 2020 NXP */ #ifndef __LS1088A_RDB_H @@ -309,19 +309,19 @@ "sf probe 0:0;sf read 0x8000 0xA0 0x10;"\ "sf read 0x8010 0xE0 0x10;" \ "env exists secureboot && " \ - "sf read 0x8070 0x70 0x4 && " \ - "sf read 0x8074 0x74 0x4 && " \ - "esbc_validate 0x8070 && " \ - "esbc_validate 0x8074 ;"\ + "sf read 0x8064 0x64 0x4 && " \ + "sf read 0x8068 0x68 0x4 && " \ + "esbc_validate 0x8064 && " \ + "esbc_validate 0x8068 ;"\ "fsl_mc start mc 0x8000 0x8010\0" #define SD_MC_INIT_CMD \ "mmcinfo;mmc read 0x8000 0x5000 0x800;" \ "mmc read 0x8010 0x7000 0x800;" \ "env exists secureboot && " \ - "mmc read 0x8070 0x3800 0x20 && " \ - "mmc read 0x8074 0x3A00 0x20 && " \ - "esbc_validate 0x8070 && " \ - "esbc_validate 0x8074 ;"\ + "mmc read 0x8064 0x3200 0x20 && " \ + "mmc read 0x8068 0x3400 0x20 && " \ + "esbc_validate 0x8064 && " \ + "esbc_validate 0x8068 ;"\ "fsl_mc start mc 0x8000 0x8010\0" #else #if defined(CONFIG_QSPI_BOOT) @@ -329,10 +329,10 @@ "mcinitcmd=sf probe 0:0;sf read 0x8000 0xA0 0x10;" \ "sf read 0x8010 0xE0 0x10;" \ "env exists secureboot && " \ - "sf read 0x8070 0x70 0x4 && " \ - "sf read 0x8074 0x74 0x4 && " \ - "esbc_validate 0x8070 && " \ - "esbc_validate 0x8074 ;"\ + "sf read 0x8064 0x64 0x4 && " \ + "sf read 0x8068 0x68 0x4 && " \ + "esbc_validate 0x8064 && " \ + "esbc_validate 0x8068 ;"\ "fsl_mc start mc 0x8000 0x8010\0" \ "mcmemsize=0x7000\0" #elif defined(CONFIG_SD_BOOT) @@ -340,10 +340,10 @@ "mcinitcmd=mmcinfo;mmc read 0x8000 0x5000 0x800;" \ "mmc read 0x8010 0x7000 0x800;" \ "env exists secureboot && " \ - "mmc read 0x807
[PATCH 1/1] armv8: lx2160a: Updates secure boot headers offset
Updates the secure boot headers offsets of Kernel and other firmware images for SD and XSPI boot sources used by esbc_validate command. Signed-off-by: Priyanka Singh --- include/configs/lx2160a_common.h | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h index 909d047d7d..0b0075a406 100644 --- a/include/configs/lx2160a_common.h +++ b/include/configs/lx2160a_common.h @@ -207,18 +207,18 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); /* Initial environment variables */ #define XSPI_MC_INIT_CMD \ "env exists secureboot && " \ - "esbc_validate 0x2070 && " \ - "esbc_validate 0x2074 ;"\ + "esbc_validate 0x2064 && " \ + "esbc_validate 0x2068 ;"\ "fsl_mc start mc 0x20a0 0x20e0\0" #define SD_MC_INIT_CMD \ "mmc read 0x80a0 0x5000 0x1200;"\ "mmc read 0x80e0 0x7000 0x800;" \ "env exists secureboot && " \ - "mmc read 0x8070 0x3800 0x20 && " \ - "mmc read 0x8074 0x3A00 0x20 && " \ - "esbc_validate 0x8070 && " \ - "esbc_validate 0x8074 ;"\ + "mmc read 0x8064 0x3200 0x20 && " \ + "mmc read 0x8068 0x3400 0x20 && " \ + "esbc_validate 0x8064 && " \ + "esbc_validate 0x8068 ;"\ "fsl_mc start mc 0x80a0 0x80e0\0" #define EXTRA_ENV_SETTINGS \ @@ -229,7 +229,7 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); "initrd_high=0x\0" \ "fdt_addr=0x64f0\0" \ "kernel_start=0x100\0" \ - "kernelheader_start=0x7C\0" \ + "kernelheader_start=0x60\0" \ "scriptaddr=0x8000\0" \ "scripthdraddr=0x8008\0"\ "fdtheader_addr_r=0x8010\0" \ @@ -240,7 +240,7 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); "load_addr=0xa000\0"\ "kernel_size=0x280\0" \ "kernel_addr_sd=0x8000\0" \ - "kernelhdr_addr_sd=0x3E00\0"\ + "kernelhdr_addr_sd=0x3000\0"\ "kernel_size_sd=0x1d000\0" \ "kernelhdr_size_sd=0x20\0" \ "console=ttyAMA0,38400n8\0" \ @@ -268,7 +268,7 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); #define XSPI_NOR_BOOTCOMMAND \ "env exists mcinitcmd && env exists secureboot "\ - "&& esbc_validate 0x2078; " \ + "&& esbc_validate 0x206C; " \ "env exists mcinitcmd && " \ "fsl_mc lazyapply dpl 0x20d0; " \ "run distro_bootcmd;run xspi_bootcmd; " \ @@ -278,8 +278,8 @@ int select_i2c_ch_pca9547_sec(unsigned char ch); "env exists mcinitcmd && mmcinfo; " \ "mmc read 0x80d0 0x6800 0x800; "\ "env exists mcinitcmd && env exists secureboot "\ - " && mmc read 0x8078 0x3C00 0x20 " \ - "&& esbc_validate 0x8078;env exists mcinitcmd " \ + " && mmc read 0x806C 0x3600 0x20 " \ + "&& esbc_validate 0x806C;env exists mcinitcmd " \ "&& fsl_mc lazyapply dpl 0x80d0;" \ "run distro_bootcmd;run sd_bootcmd;"\ "env exists secureboot && esbc_halt;" -- 2.17.1
[PATCH 2/2] armv8: ls1012ardb: Updates secure boot headers offset
Updates the secure boot headers offsets of Kernel and other firmware images used by esbc_validate command. Signed-off-by: Priyanka Singh --- include/configs/ls1012ardb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h index 41e1bff15b..d217b943dd 100644 --- a/include/configs/ls1012ardb.h +++ b/include/configs/ls1012ardb.h @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* + * Copyright 2020 NXP * Copyright 2016 Freescale Semiconductor, Inc. */ @@ -66,7 +67,7 @@ "initrd_high=0x\0" \ "fdt_addr=0x00f0\0" \ "kernel_addr=0x0100\0" \ - "kernelheader_addr=0x80\0" \ + "kernelheader_addr=0x60\0" \ "scriptaddr=0x8000\0" \ "scripthdraddr=0x8008\0"\ "fdtheader_addr_r=0x8010\0" \ -- 2.17.1
[PATCH 1/2] armv8: ls1046a: Updates secure boot headers offset
Updates the secure boot headers offsets of Kernel and other firmware images for SD and QSPI boot sources used by esbc_validate command. Signed-off-by: Priyanka Singh --- include/configs/ls1046a_common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h index 77805479c9..07570187f5 100644 --- a/include/configs/ls1046a_common.h +++ b/include/configs/ls1046a_common.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2016 Freescale Semiconductor - * Copyright 2019 NXP + * Copyright 2019-2020 NXP */ #ifndef __LS1046A_COMMON_H @@ -237,13 +237,13 @@ "fdt_addr_r=0x9000\0" \ "ramdisk_addr_r=0xa000\0" \ "kernel_start=0x100\0" \ - "kernelheader_start=0x80\0" \ + "kernelheader_start=0x60\0" \ "kernel_load=0xa000\0" \ "kernel_size=0x280\0" \ "kernelheader_size=0x4\0" \ "kernel_addr_sd=0x8000\0" \ "kernel_size_sd=0x14000\0" \ - "kernelhdr_addr_sd=0x4000\0"\ + "kernelhdr_addr_sd=0x3000\0"\ "kernelhdr_size_sd=0x10\0" \ "console=ttyS0,115200\0"\ CONFIG_MTDPARTS_DEFAULT "\0" \ -- 2.17.1
Query: Error: Unable to find signature node in Verified boot
Hi, I was trying to test the Verified boot feature on NXP's LX2160ARDB board and I am facing the following issue during the same: 1. U-boot is unable to verify the signatures of the images and configurations. I added more logs to debug this issue and found that U-boot is unable to find the signature node and returns from common/image-sig.c line: 260. Log snippet: Verifying Hash Integrity ... sha1,rsa2048:dev- OK The signing of the images and configuration has been done using mkimage. Can someone please suggest how can I correct this. Thanks, Priyanka Singh