From: Scott Wood Date: Tue, 28 Jan 2014 15:10:11 -0600 Subject: [U-Boot] [PATCH 3/3] powerpc/mpc85xx: SECURE BOOT- Disable law 0 for non PBL platforms In-Reply-To: <33946d963bf142ceb41400bc62f1fb11@DM2PR03MB415.namprd03.prod.outlook.com> References: <1390210041-10353-1-git-send-email-aneesh.bansal@freescale.com> ,<1390255705.24905.308.camel@snotra.buserror.net> <33946d963bf142ceb41400bc62f1fb11@DM2PR03MB415.namprd03.prod.outlook.com> Message-ID: <1390943411.24905.814.camel@snotra.buserror.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 2014-01-27 at 01:28 -0600, Bansal Aneesh-B39320 wrote: > > > ISBC creates a LAW 0 entry for non PBL platforms, which is not > > > disabled before transferring the control to uboot. > > > The LAW 0 entry has to be disabled. > > > > > > Signed-off-by: Aneesh Bansal > > > --- > > > arch/powerpc/cpu/mpc85xx/start.S | 58 ++++++++++++++++++++++++++++++++++++++++ > > > 1 file changed, 58 insertions(+) > > > > > > diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S > > > index 5440bf5..2b2c4dd 100644 > > > --- a/arch/powerpc/cpu/mpc85xx/start.S > > > +++ b/arch/powerpc/cpu/mpc85xx/start.S > > > @@ -116,6 +116,64 @@ _start_e500: > > > mtspr SPRN_HDBCR0, r3 > > > #endif > > > > > > +#if defined(CONFIG_SECURE_BOOT) && defined(CONFIG_E500) && \ > > > + !defined(CONFIG_E500MC) > > > > CONFIG_E500 can be assumed in this file. > > > > > + /* ISBC creates a LAW 0 entry for non PBL platforms, > > > + * which is not disabled before transferring the control to uboot. > > > + * Disable the LAW 0 entry here. > > > + */ > > > > Could you explain what this LAW 0 entry is for, why we don't need it, > > and why we can't wait until later to clear it? > > > > -Scott > > Boot ROM creates a LAW 0 entry for IFC and at entry at U-boot during > secure boot, we want to have the same environment as in case of > Non-secure Boot. So, this LAW entry is being removed at start. But in the secure boot case aren't you currently running from that LAW? And I don't think wanting to have the same environment is a good reason for injecting more code into the already messy start.S, if there isn't a good reason why it can't be done later. -Scott