From: York Sun Date: Mon, 10 Apr 2017 23:14:22 -0700 Subject: [U-Boot] [PATCH 1/3] fsl: PPA: add support PPA image validation from NAND and SD In-Reply-To: References: <1491606536-3858-1-git-send-email-sumit.garg@nxp.com> <4d5fb2b5-c53f-0f91-2946-9ddddce95203@nxp.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/10/2017 10:54 PM, Sumit Garg wrote: >> -----Original Message----- >> From: York Sun [mailto:york.sun at nxp.com] >> Sent: Monday, April 10, 2017 10:39 PM >> To: Sumit Garg ; u-boot at lists.denx.de >> Cc: Ruchika Gupta ; Prabhakar Kushwaha >> ; Vini Pillai ; Udit >> Agarwal >> Subject: Re: [PATCH 1/3] fsl: PPA: add support PPA image validation from >> NAND and SD >> >> On 04/07/2017 04:41 AM, Sumit Garg wrote: >>> Signed-off-by: Sumit Garg >>> Signed-off-by: Udit Agarwal >>> Tested-by: Vinitha Pillai >>> --- >>> arch/arm/cpu/armv8/fsl-layerscape/ppa.c | 67 >>> ++++++++++++++++++++++++++++++++- >>> 1 file changed, 66 insertions(+), 1 deletion(-) >>> >>> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c >>> b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c >>> index 7f87bb8..d8f1d36 100644 >>> --- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c >>> +++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c >>> @@ -39,6 +39,10 @@ int ppa_init(void) >>> #ifdef CONFIG_CHAIN_OF_TRUST >>> uintptr_t ppa_esbc_hdr = CONFIG_SYS_LS_PPA_ESBC_ADDR; >> >> For MMC and NAND, this CONFIG_SYS_LS_PPA_ESBC_ADDR is actually not >> used. >> Shall we move the assignment down to XIP section? The Kconfig should also be >> updated. >> >> York > > As per PPA verification patch for eMMC/SD and NAND: > > --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig > +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig > @@ -179,12 +179,22 @@ config SYS_LS_PPA_ESBC_ADDR > default 0x40740000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1046A > default 0x40480000 if SYS_LS_PPA_FW_IN_XIP && ARCH_LS1012A > default 0x580c40000 if SYS_LS_PPA_FW_IN_XIP && FSL_LSCH3 > + default 0x700000 if SYS_LS_PPA_FW_IN_MMC > + default 0x700000 if SYS_LS_PPA_FW_IN_NAND > help > If the PPA header firmware locate at XIP flash, such as NOR or > QSPI flash, this address is a directly memory-mapped. > If it is in a serial accessed flash, such as NAND and SD > card, it is a byte offset. > > CONFIG_SYS_LS_PPA_ESBC_ADDR is used to provide offset on eMMC/SD and NAND. > That's exactly what I was referring to. You are _NOT_ using CONFIG_SYS_LS_PPA_ESBC_ADDR value for eMMC/SD or NAND. Instead, you use malloc to get a new memory for the header, which I agree it is right to do. So the macro CONFIG_SYS_LS_PPA_ESBC_ADDR is not used for either MMC or NAND. York