From: Scott Wood Date: Mon, 10 Mar 2014 18:58:22 -0500 Subject: [U-Boot] [PATCH 1/3] powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot In-Reply-To: <8b80270d5e2f4dc88e58326f43f00532@DM2PR03MB415.namprd03.prod.outlook.com> References: <1390209926-10115-1-git-send-email-aneesh.bansal@freescale.com> , <1390255477.24905.305.camel@snotra.buserror.net> <680c371d651d49a08b33ddd4d01fb3bd@DM2PR03MB415.namprd03.prod.outlook.com> <20140127142223.DDF2538033A@gemini.denx.de> <7f771c64c5c44208b24e38c75e159f28@DM2PR03MB415.namprd03.prod.outlook.com> <20140128053539.DE87A3801D7@gemini.denx.de> <5316094D.8060504@freescale.com> <8720849b6fdc48aeaf2dcbdfd1905a12@DM2PR03MB415.namprd03.prod.outlook.com> <1394042423.2697.192.camel@snotra.buserror.net> <1394218633.32664.37.camel@snotra.buserror.net> <531A1777.80302@freescale.com> <8b80270d5e2f4dc88e58326f43f00532@DM2PR03MB415.namprd03.prod.outlook.com> Message-ID: <1394495902.6150.10.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-03-10 at 04:14 -0500, Bansal Aneesh-B39320 wrote: > > -----Original Message----- > > From: Sun York-R58495 > > Sent: Saturday, March 08, 2014 12:31 AM > > To: Bansal Aneesh-B39320 > > Cc: Wood Scott-B07421; Wolfgang Denk; u-boot at lists.denx.de; Gupta > > Ruchika-R66431 > > Subject: Re: [U-Boot] [PATCH 1/3] powerpc/p1010rdb: SECURE BOOT- > > define CONFIG_SYS_RAMBOOT for NAND boot > > > > On 03/07/2014 10:57 AM, Scott Wood wrote: > > > On Thu, 2014-03-06 at 03:24 -0600, Bansal Aneesh-B39320 wrote: > > >>> -----Original Message----- > > >>> From: Wood Scott-B07421 > > >>> Sent: Wednesday, March 05, 2014 11:30 PM > > >>> To: Bansal Aneesh-B39320 > > >>> Cc: Sun York-R58495; Wolfgang Denk; u-boot at lists.denx.de; Gupta > > >>> Ruchika-R66431 > > >>> Subject: Re: [U-Boot] [PATCH 1/3] powerpc/p1010rdb: SECURE BOOT- > > >>> define CONFIG_SYS_RAMBOOT for NAND boot > > >>> > > >>> On Tue, 2014-03-04 at 23:30 -0600, Bansal Aneesh-B39320 wrote: > > >>>> Yes, in case of secure boot from NAND, the DRAM is initialized by > > >>> the > > >>>> BootROM and complete u-boot image is copied from NAND to DRAM by > > >>>> the > > >>> BootROM. > > >>>> So, it should be called RAMBOOT. > > >>> > > >>> DRAM or SRAM? Having ROM initialize DDR is a bit scary. > > >>> > > >>> -Scott > > >>> > > >> It can be either DDR or SRAM. It is not hardcoded in BootROM to > > initialize DDR. > > >> This depends on the config words (CF_WORDS) in the CF_HEADER. > > >> The Boot ROM code parses the config words and programs the > > addresses > > >> with data values accordingly. The user may opt to initialize DDR > > and > > >> get the image copied onto DDR or configure CPC as SRAM and get the > > Image copied onto SRAM. > > >> On 1010, > > > > > > P1010? LS1010? Something else? > > > > > >> the CPC size is not big enough to accommodate the U-boot image. > > >> So, currently the CF_WORDS are for DDR to be initialized and copy > > the image on DDR. > > > > > > Generally if SPD is present, it should be used to init DDR rather > > than > > > using hardcoded values. If U-Boot doesn't fit in SRAM, you can use > > > SPL instead of hardcoded init. > > > > I agree with Scott on this point. Using hardcoded values totally skip > > DDR driver. You don't only lose the flexibility of various speeds, you > > also skip all workarounds implemented in DDR driver. > > > > York > > Currently we are following the same approach which was there for SPI > and SD on P1010 i.e hardcoded initialization of DDR in platforms like > P1010, 9131/9132 using config words. I don't know about 9131/9132, but on P1010RDB we now use SPL to init DDR when booting from SPI/SD. In any case, "we've always done it this way" isn't really a good reason. -Scott