All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhiqiang Hou <zhiqiang.hou@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv6 3/6] ARMv8/layerscape: Add FSL PPA support
Date: Thu, 23 Jun 2016 03:41:56 +0000	[thread overview]
Message-ID: <DBXPR04MB2069FFB3F5C82712EC252CD842D0@DBXPR04MB206.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <AM4PR0401MB17329AB5041B7C63B4FF6CC99A2C0@AM4PR0401MB1732.eurprd04.prod.outlook.com>

Hi York,

Thanks for your comments!

> -----Original Message-----
> From: york sun
> Sent: 2016?6?23? 0:13
> To: Zhiqiang Hou <zhiqiang.hou@nxp.com>; u-boot at lists.denx.de;
> albert.u.boot at aribaud.net; scottwood at freescale.com;
> Mingkai.hu at freescale.com; yorksun at freescale.com; leoli at freescale.com;
> prabhakar at freescale.com; bhupesh.sharma at freescale.com
> Subject: Re: [PATCHv6 3/6] ARMv8/layerscape: Add FSL PPA support
> 
> On 06/21/2016 08:41 PM, Zhiqiang Hou wrote:
> > From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >
> > The FSL Primary Protected Application (PPA) is a software component
> > loaded during boot which runs in TrustZone and remains resident after
> > boot.
> >
> > Use the secure firmware framework to integrate FSL PPA into U-Boot.
> >
> > Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> > ---
> > V6:
> >   - Use the secure firmware framework to integrate PPA.
> >
> > V5:
> >   - Added API sec_firmware_init() implementation.
> >
> > V4:
> >   - Moved secure firmware validation API to this patch.
> >   - Moved secure firmware getting supported PSCI version API to this patch.
> >
> > V3:
> >   - Refactor the code.
> >   - Add PPA firmware version info output.
> >
> >   arch/arm/cpu/armv8/fsl-layerscape/Makefile     |  1 +
> >   arch/arm/cpu/armv8/fsl-layerscape/ppa.c        | 48
> ++++++++++++++++++++++++++
> >   arch/arm/include/asm/arch-fsl-layerscape/ppa.h | 16 +++++++++
> >   arch/arm/include/asm/armv8/sec_firmware.h      |  4 +++
> >   4 files changed, 69 insertions(+)
> >   create mode 100644 arch/arm/cpu/armv8/fsl-layerscape/ppa.c
> >   create mode 100644 arch/arm/include/asm/arch-fsl-layerscape/ppa.h
> >
> > diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Makefile
> > b/arch/arm/cpu/armv8/fsl-layerscape/Makefile
> > index eb2cbc3..bcf6b48 100644
> > --- a/arch/arm/cpu/armv8/fsl-layerscape/Makefile
> > +++ b/arch/arm/cpu/armv8/fsl-layerscape/Makefile
> > @@ -10,6 +10,7 @@ obj-y += soc.o
> >   obj-$(CONFIG_MP) += mp.o
> >   obj-$(CONFIG_OF_LIBFDT) += fdt.o
> >   obj-$(CONFIG_SPL) += spl.o
> > +obj-$(CONFIG_FSL_LS_PPA) += ppa.o
> >
> >   ifneq ($(CONFIG_FSL_LSCH3),)
> >   obj-y += fsl_lsch3_speed.o
> > diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
> > b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
> > new file mode 100644
> > index 0000000..ae7d364
> > --- /dev/null
> > +++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
> > @@ -0,0 +1,48 @@
> > +/*
> > + * Copyright 2016 NXP Semiconductor, Inc.
> > + *
> > + * SPDX-License-Identifier:	GPL-2.0+
> > + */
> > +#include <common.h>
> > +#include <config.h>
> > +#include <errno.h>
> > +#include <asm/system.h>
> > +#include <asm/types.h>
> > +#include <asm/arch/soc.h>
> > +#ifdef CONFIG_FSL_LSCH3
> > +#include <asm/arch/immap_lsch3.h>
> > +#elif defined(CONFIG_FSL_LSCH2)
> > +#include <asm/arch/immap_lsch2.h>
> > +#endif
> > +#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT #include
> > +<asm/armv8/sec_firmware.h> #endif
> > +
> > +int ppa_init(void)
> > +{
> > +	void *ppa_fit_addr;
> > +	u32 *boot_loc_ptr_l, *boot_loc_ptr_h;
> > +	int ret;
> > +
> > +#ifdef CONFIG_SYS_LS_PPA_FW_IN_NOR
> > +	ppa_fit_addr = (void *)CONFIG_SYS_LS_PPA_FW_ADDR; #else #error "No
> > +CONFIG_SYS_LS_PPA_FW_IN_xxx defined"
> > +#endif
> > +
> > +#ifdef CONFIG_FSL_LSCH3
> > +	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
> > +	boot_loc_ptr_l = &gur->bootlocptrl;
> > +	boot_loc_ptr_h = &gur->bootlocptrh;
> > +#elif defined(CONFIG_FSL_LSCH2)
> > +	struct ccsr_scfg __iomem *scfg = (void *)(CONFIG_SYS_FSL_SCFG_ADDR);
> > +	boot_loc_ptr_l = &scfg->scratchrw[1];
> > +	boot_loc_ptr_h = &scfg->scratchrw[0]; #endif
> > +
> > +	debug("fsl-ppa: boot_loc_ptr_l = 0x%p, boot_loc_ptr_h =0x%p\n",
> > +			boot_loc_ptr_l, boot_loc_ptr_h);
> 
> Alignment issue. Didn't checkpatch remind you about this?

Will fix it.

Thanks,
Zhiqiang

  reply	other threads:[~2016-06-23  3:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22  3:30 [U-Boot] [PATCHv6 1/6] armv8: fsl-layerscape: add i/d-cache enable function to enable_caches Zhiqiang Hou
2016-06-22  3:30 ` [U-Boot] [PATCHv6 2/6] ARMv8: add the secure monitor firmware framework Zhiqiang Hou
2016-06-22 16:11   ` york sun
2016-06-23  3:40     ` Zhiqiang Hou
2016-06-22 16:19   ` york sun
2016-06-23  3:54     ` Zhiqiang Hou
2016-06-22  3:30 ` [U-Boot] [PATCHv6 3/6] ARMv8/layerscape: Add FSL PPA support Zhiqiang Hou
2016-06-22 16:12   ` york sun
2016-06-23  3:41     ` Zhiqiang Hou [this message]
2016-06-22  3:30 ` [U-Boot] [PATCHv6 4/6] ARMv8/Layerscape: switch SMP method accordingly Zhiqiang Hou
2016-06-22 16:21   ` york sun
2016-06-23  3:56     ` Zhiqiang Hou
2016-06-22  3:30 ` [U-Boot] [PATCHv6 5/6] ARMv8/PSCI: Fixup the device tree for PSCI Zhiqiang Hou
2016-06-22  4:04   ` Chen-Yu Tsai
2016-06-23  3:26     ` Zhiqiang Hou
2016-06-22 16:52   ` york sun
2016-06-23  4:17     ` Zhiqiang Hou
2016-06-22  3:30 ` [U-Boot] [PATCHv6 6/6] ARMv8/ls1043ardb: Integrate FSL PPA Zhiqiang Hou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DBXPR04MB2069FFB3F5C82712EC252CD842D0@DBXPR04MB206.eurprd04.prod.outlook.com \
    --to=zhiqiang.hou@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.