powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
In case of secure boot, boot from NAND is ramboot. It was removed by some other commit. So defining it again.
--- include/configs/P1010RDB.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/configs/P1010RDB.h +2 -1
@@ -446,7 +446,8 @@ extern unsigned long get_sdram_size(void); FTIM2_GPCM_TWP(0x1f))#define CONFIG_SYS_CS3_FTIM3 0x0 -#if defined(CONFIG_RAMBOOT_SDCARD ) || defined(CONFIG_RAMBOOT_SPIFLASH ) +#if defined(CONFIG_RAMBOOT_SDCARD ) || defined(CONFIG_RAMBOOT_SPIFLASH ) || \ + defined(CONFIG_RAMBOOT_NAND )#define CONFIG_SYS_RAMBOOT #define CONFIG_SYS_EXTRA_ENV_RELOC #else
Signature · 1 line
1.8.1.4
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 2 lines · Aneesh Bansal
In case of secure boot, boot from NAND is ramboot. It was removed by some other commit. So defining it again.
In case of not-secure-boot, it's not ramboot.
What user of CONFIG_SYS_RAMBOOT are you concerned about? Many of them look like this:
#elif !defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SECURE_BOOT)
...which doesn't make sense if secure boot is always considered ramboot.
-Scott
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 5 lines
Quoted 2 lines
In case of secure boot, boot from NAND is ramboot. It was removed by some other commit. So defining it again.
In case of not-secure-boot, it's not ramboot.
Quoted 8 lines
What user of
CONFIG_SYS_RAMBOOTare you concerned about? Many of them look like this:#elif !defined(CONFIG_SYS_RAMBOOT) &&
defined(CONFIG_SECURE_BOOT)...which doesn't make sense if secure boot is always considered ramboot.
-Scott
CONFIG_SYS_RAMBOOT is for secure boot from NAND, SPI and SD. CONFIG_SYS_RAMBOOT is not used for secure boot from NOR.
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Dear "aneesh.bansal at freescale.com",
Quoted 8 lines · In message <680c371d651d49a08b33ddd4d01fb3bd@DM2PR03MB415.namprd03.prod.outlook…
Quoted 8 lines
Quoted 2 lines
In case of secure boot, boot from NAND is ramboot. It was removed by some other commit. So defining it again.
In case of not-secure-boot, it's not ramboot.
What user of
CONFIG_SYS_RAMBOOTare you concerned about? Many of them look like this:
Quoted 7 lines
Quoted 5 lines
#elif !defined(CONFIG_SYS_RAMBOOT) &&
defined(CONFIG_SECURE_BOOT)...which doesn't make sense if secure boot is always considered ramboot.
-Scott
CONFIG_SYS_RAMBOOTis for secure boot from NAND, SPI and SD.
This is a misuse of the variable. The established meaning does NOT include booding from standard boot media like NAND, SPI and SD. It refers to booting from RAM "directly", after the image has been placed into RAM by "external" means, say by a JTAG debugger, or by copying it to a PCI card's memory.
Please avoid such misleading usage.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Time is a drug. Too much of it kills you.
- Terry Pratchett, _Small Gods_PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
I think I have caused some confusion when trying to explain. I will try and elaborate on it further. Please see inline.
Quoted 18 lines
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Monday, January 27, 2014 7:52 PM
To: Bansal Aneesh-B39320
Cc: Wood Scott-B07421; u-boot at lists.denx.de; Sun York-R58495
Subject: Re: [U-Boot] [PATCH 1/3] powerpc/p1010rdb: SECURE BOOT- defineCONFIG_SYS_RAMBOOTfor NAND bootDear "aneesh.bansal at freescale.com",
In message <680c371d651d49a08b33ddd4d01fb3bd@DM2PR03MB415.namprd03.prod.outlook.com>
Quoted 5 lines · you
Quoted 5 lines
Quoted 2 lines
In case of secure boot, boot from NAND is ramboot. It was removed by some other commit. So defining it again.
In case of not-secure-boot, it's not ramboot.
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
What user of
CONFIG_SYS_RAMBOOTare you concerned about? Many of them look like this:#elif !defined(CONFIG_SYS_RAMBOOT) &&
defined(CONFIG_SECURE_BOOT)...which doesn't make sense if secure boot is always considered
ramboot.
This code snippet is from the file start.S. This for the scenarios when
1. We are NOT booting from RAM and
2. Secure booting is configured
i.e. the above case is for secure Boot from NOR.
Quoted 15 lines
Quoted 4 lines
Quoted 2 lines
-Scott
CONFIG_SYS_RAMBOOTis for secure boot from NAND, SPI and SD.This is a misuse of the variable. The established meaning does NOT include booding from standard boot media like NAND, SPI and SD. It refers to booting from RAM "directly", after the image has been placed into RAM by "external" means, say by a JTAG debugger, or by copying it to a PCI card's memory.
Please avoid such misleading usage.
Best regards,
Quoted 9 lines
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Time is a drug. Too much of it kills you.
- Terry Pratchett,_SmallGods_
Sorry for the misleading statement. Yes, CONFIG_SYS_RAMBOOT is for booting from RAM directly and we have used it for the same purpose in the patch. Let me try and explain.
What I meant is that for P1010 like platforms for normal (non-secure) boot in case of NAND, we don?t use the CONFIG_SYS_RAMBOOT as we don?t boot from RAM directly in this case.
However in case of secure boot, even for NAND, we boot from RAM directly with boot ROM (ISBC) code copying the image from NAND to RAM. So in P1010RDB.h config file, for NAND Secure boot, we have defined CONFIG_RAMBOOT_NAND and then further are enabling CONFIG_SYS_RAMBOOT for the same.
#ifdef CONFIG_NAND_SECBOOT /* NAND Boot */
#define CONFIG_RAMBOOT_NAND
.
.
.
#if defined(CONFIG_RAMBOOT_SDCARD) || defined(CONFIG_RAMBOOT_SPIFLASH) || \
defined(CONFIG_RAMBOOT_NAND)
#define CONFIG_SYS_RAMBOOT
Regards,
Aneesh Bansal
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Dear Aneesh,
Quoted 4 lines · In message <7f771c64c5c44208b24e38c75e159f28@DM2PR03MB415.namprd03.prod.outlook…
Sorry for the misleading statement. Yes,
CONFIG_SYS_RAMBOOTis for booting from RAM directly and we have used it for the same purpose in the patch. Let me try and explain.
Mind the "directly" in this sentence, and no, you have not used it in this way.
Quoted 3 lines
What I meant is that for P1010 like platforms for normal (non-secure) boot in case of NAND, we don't use the
CONFIG_SYS_RAMBOOTas we don't boot from RAM directly in this case.
You also do not boot directly from RAM in the secure case.
Quoted 3 lines
However in case of secure boot, even for NAND, we boot from RAM directly with boot ROM (ISBC) code copying the image from NAND to RAM. So in
P1010RDB.hconfig file, for NAND Secure boot, we have
This is NOT a RAM boot. This is a completely normal boot process from NAND. You must not declare this as RAM booting, as it is NOT.
Quoted 2 lines
defined
CONFIG_RAMBOOT_NANDand then further are enablingCONFIG_SYS_RAMBOOTfor the same.
This is wrong. You have the ROM boot loader booting from NAND and not from RAM.
The name CONFIG_RAMBOOT_NAND is an oxymoron in itself (and it's
undocumented as well). This should be fixed, as it makes no sense.
You cannot "RAM-boot form NAND" - you can always boot from a single boot device only - either NOR or NAND or SDCard or ... or RAM.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Microsoft Multitasking:
several applications can crash at the same time.PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 27 lines · Wolfgang Denk
Dear Aneesh,
Quoted 4 lines · In message <7f771c64c5c44208b24e38c75e159f28@DM2PR03MB415.namprd03.prod.outlook…
Sorry for the misleading statement. Yes,
CONFIG_SYS_RAMBOOTis for booting from RAM directly and we have used it for the same purpose in the patch. Let me try and explain.Mind the "directly" in this sentence, and no, you have not used it in this way.
Quoted 3 lines
What I meant is that for P1010 like platforms for normal (non-secure) boot in case of NAND, we don't use the
CONFIG_SYS_RAMBOOTas we don't boot from RAM directly in this case.You also do not boot directly from RAM in the secure case.
Quoted 3 lines
However in case of secure boot, even for NAND, we boot from RAM directly with boot ROM (ISBC) code copying the image from NAND to RAM. So in
P1010RDB.hconfig file, for NAND Secure boot, we haveThis is NOT a RAM boot. This is a completely normal boot process from NAND. You must not declare this as RAM booting, as it is NOT.
Quoted 2 lines
defined
CONFIG_RAMBOOT_NANDand then further are enablingCONFIG_SYS_RAMBOOTfor the same.
Quoted 9 lines
This is wrong. You have the ROM boot loader booting from NAND and not from RAM.
The name
CONFIG_RAMBOOT_NANDis an oxymoron in itself (and it's
undocumented as well). This should be fixed, as it makes no sense.You cannot "RAM-boot form NAND" - you can always boot from a single boot device only - either NOR or NAND or SDCard or ... or RAM.
Let me try to get the bottom of the CONFIG_SYS_RAMBOOT.
When a complete u-boot image boots from RAM (DDR, SRAM, etc), we can call it RAMBOOT regardless how the image is loaded there. It can be JTAG, PBI, or other bootloader. This line becomes blurred when we have SPL, TPL, secure boot. We need to go back to see why we had CONFIG_SYS_RAMBOOT at the first place. If I remember correctly, we had this RAMBOOT because we didn't want u-boot to initialized DRAM for obvious reason. If we still have the same purpose of RAMBOOT, then it is not difficult to draw the line for current situations.
Any booting method which initializes DRAM in its complete image is not a RAMBOOT. So clearly NAND boot has its own DDR init code, even sometimes using fixed register settings. So a normal NAND boot is not RAMBOOT. If a u-boot image is wrapped by another bootloader, and the bootloader is responsible to initialize DRAM, the u-boot image runs from DRAM doesn't init DRAM again, this u-boot is a RAMBOOT.
Now we are back to secure NAND boot. Does the secure boot mechanism initialize DRAM and load a complete u-boot image from NAND to DRAM? If true, then we can call that image a RAMBOOT. But if the image has its own code to initialize DRAM, it is not a RAMBOOT.
Do we all agree on this clarification?
York
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 72 lines
-----Original Message-----
From: Sun York-R58495
Sent: Tuesday, March 04, 2014 10:42 PM
To: Wolfgang Denk; Bansal Aneesh-B39320
Cc: Wood Scott-B07421; u-boot at lists.denx.de; Gupta Ruchika-R66431
Subject: Re: [U-Boot] [PATCH 1/3] powerpc/p1010rdb: SECURE BOOT- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 3 lines · Wolfgang Denk
Dear Aneesh,
In message
<7f771c64c5c44208b24e38c75e159f28@DM2PR03MB415.namprd03.prod.outlook.c
Quoted 3 lines · om> you wrote:
Quoted 3 lines
Sorry for the misleading statement. Yes,
CONFIG_SYS_RAMBOOTis for booting from RAM directly and we have used it for the same purposein
Quoted 3 lines
Quoted 1 line
the patch. Let me try and explain.
Mind the "directly" in this sentence, and no, you have not used it
in
Quoted 3 lines
this way.
Quoted 1 line
What I meant is that for P1010 like platforms for normal (non-
secure)
Quoted 1 line
Quoted 1 line
boot in case of NAND, we don't use the
CONFIG_SYS_RAMBOOTas wedon't
Quoted 9 lines
Quoted 1 line
boot from RAM directly in this case.
You also do not boot directly from RAM in the secure case.
Quoted 3 lines
However in case of secure boot, even for NAND, we boot from RAM directly with boot ROM (ISBC) code copying the image from NAND to RAM. So in
P1010RDB.hconfig file, for NAND Secure boot, we haveThis is NOT a RAM boot. This is a completely normal boot process
from
Quoted 6 lines
NAND. You must not declare this as RAM booting, as it is NOT.
Quoted 2 lines
defined
CONFIG_RAMBOOT_NANDand then further are enablingCONFIG_SYS_RAMBOOTfor the same.This is wrong. You have the ROM boot loader booting from NAND and
not
Quoted 8 lines
from RAM.
The name
CONFIG_RAMBOOT_NANDis an oxymoron in itself (and it's
undocumented as well). This should be fixed, as it makes no sense.You cannot "RAM-boot form NAND" - you can always boot from a single boot device only - either NOR or NAND or SDCard or ... or RAM.
Let me try to get the bottom of the
CONFIG_SYS_RAMBOOT.When a complete u-boot image boots from RAM (DDR, SRAM, etc), we can call it RAMBOOT regardless how the image is loaded there. It can be JTAG, PBI, or other bootloader. This line becomes blurred when we have SPL, TPL, secure boot. We need to go back to see why we had
CONFIG_SYS_RAMBOOTat the first place. If I remember correctly, we had this RAMBOOT because we didn't want u-boot to initialized DRAM for obvious reason. If we still have the same purpose of RAMBOOT, then it is not difficult to draw the line for current situations.Any booting method which initializes DRAM in its complete image is not a RAMBOOT. So clearly NAND boot has its own DDR init code, even sometimes using fixed register settings. So a normal NAND boot is not RAMBOOT. If a u-boot image is wrapped by another bootloader, and the bootloader is responsible to initialize DRAM, the u-boot image runs from DRAM doesn't init DRAM again, this u-boot is a RAMBOOT.
Quoted 8 lines
Now we are back to secure NAND boot. Does the secure boot mechanism initialize DRAM and load a complete u-boot image from NAND to DRAM? If true, then we can call that image a RAMBOOT. But if the image has its own code to initialize DRAM, it is not a RAMBOOT.
Do we all agree on this clarification?
York
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.
Aneesh
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 3 lines · 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
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 11 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 1 line · 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
Quoted 9 lines
the
Quoted 1 line
BootROM and complete u-boot image is copied from NAND to DRAM by the
BootROM.
Quoted 1 line
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, 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.
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 20 lines · On 03/06/2014 01:24 AM, Bansal Aneesh-B39320 wrote:
Quoted 11 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 1 line · 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
Quoted 9 lines
the
Quoted 1 line
BootROM and complete u-boot image is copied from NAND to DRAM by the
BootROM.
Quoted 1 line
So, it should be called RAMBOOT.
DRAM or SRAM? Having ROM initialize DDR is a bit scary.
-Scott
Quoted 8 lines
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 theCF_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, the CPC size is not big enough to accommodate the U-boot image. So, currently theCF_WORDSare for DDR to be initialized and copy the image on DDR.
Does it use similar technique like PBI to initialize DDR? If so, it has static settings which cannot adapt to various speeds. That's OK if you have to do so. In this case, your u-boot image is a RAMBOOT. I suggest you to update the subject to avoid mixing NAND boot with RAMBOOT, and add comment or commit message to explain the image is loaded into DDR and run directly from there.
York
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
In reply to aneesh.bansal at freescale.comQuoted 18 lines · On Thu, 2014-03-06 at 03:24 -0600, Bansal Aneesh-B39320 wrote:
Quoted 18 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 1 line · 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
Quoted 1 line
BootROM and complete u-boot image is copied from NAND to DRAM by the
BootROM.
Quoted 1 line
So, it should be called RAMBOOT.
DRAM or SRAM? Having ROM initialize DDR is a bit scary.
Quoted 8 lines
Quoted 2 lines
-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 theCF_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?
Quoted 2 lines
the CPC size is not big enough to accommodate the U-boot image.
So, currently theCF_WORDSare 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.
-Scott
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 28 lines · Scott Wood
Quoted 18 lines · On Thu, 2014-03-06 at 03:24 -0600, Bansal Aneesh-B39320 wrote:
Quoted 18 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 1 line · 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
Quoted 1 line
BootROM and complete u-boot image is copied from NAND to DRAM by the
BootROM.
Quoted 1 line
So, it should be called RAMBOOT.
DRAM or SRAM? Having ROM initialize DDR is a bit scary.
Quoted 8 lines
Quoted 2 lines
-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 theCF_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,
Quoted 8 lines
P1010? LS1010? Something else?
Quoted 2 lines
the CPC size is not big enough to accommodate the U-boot image.
So, currently theCF_WORDSare 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
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 51 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 15 lines · Scott Wood
Quoted 14 lines · On Thu, 2014-03-06 at 03:24 -0600, Bansal Aneesh-B39320 wrote:
Quoted 14 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 1 line · 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
Quoted 2 lines
BootROM and complete u-boot image is copied from NAND to DRAM by the
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
BootROM.
Quoted 1 line
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.
Quoted 2 lines
Quoted 2 lines
This depends on the config words (
CF_WORDS) in theCF_HEADER. The Boot ROM code parses the config words and programs theaddresses
Quoted 1 line
Quoted 1 line
with data values accordingly. The user may opt to initialize DDR
and
Quoted 1 line
Quoted 1 line
get the image copied onto DDR or configure CPC as SRAM and get the
Image copied onto SRAM.
Quoted 6 lines
Quoted 1 line
On 1010,
P1010? LS1010? Something else?
Quoted 2 lines
the CPC size is not big enough to accommodate the U-boot image. So, currently the
CF_WORDSare for DDR to be initialized and copythe image on DDR.
Quoted 2 lines
Generally if SPD is present, it should be used to init DDR rather
than
Quoted 8 lines
Quoted 2 lines
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.
Aneesh
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 54 lines · On 03/10/2014 02:14 AM, Bansal Aneesh-B39320 wrote:
Quoted 54 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 15 lines · Scott Wood
Quoted 14 lines · On Thu, 2014-03-06 at 03:24 -0600, Bansal Aneesh-B39320 wrote:
Quoted 14 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 1 line · 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
Quoted 2 lines
BootROM and complete u-boot image is copied from NAND to DRAM by the
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
BootROM.
Quoted 1 line
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.
Quoted 2 lines
Quoted 2 lines
This depends on the config words (
CF_WORDS) in theCF_HEADER. The Boot ROM code parses the config words and programs theaddresses
Quoted 1 line
Quoted 1 line
with data values accordingly. The user may opt to initialize DDR
and
Quoted 1 line
Quoted 1 line
get the image copied onto DDR or configure CPC as SRAM and get the
Image copied onto SRAM.
Quoted 6 lines
Quoted 1 line
On 1010,
P1010? LS1010? Something else?
Quoted 2 lines
the CPC size is not big enough to accommodate the U-boot image. So, currently the
CF_WORDSare for DDR to be initialized and copythe image on DDR.
Quoted 2 lines
Generally if SPD is present, it should be used to init DDR rather
than
Quoted 2 lines
using hardcoded values. If U-Boot doesn't fit in SRAM, you can use SPL instead of hardcoded init.
Quoted 7 lines
Quoted 5 lines
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.
Understood.
York
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
In reply to aneesh.bansal at freescale.comQuoted 58 lines · On Mon, 2014-03-10 at 04:14 -0500, Bansal Aneesh-B39320 wrote:
Quoted 58 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 15 lines · Scott Wood
Quoted 14 lines · On Thu, 2014-03-06 at 03:24 -0600, Bansal Aneesh-B39320 wrote:
Quoted 14 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 1 line · 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
Quoted 2 lines
BootROM and complete u-boot image is copied from NAND to DRAM by the
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
BootROM.
Quoted 1 line
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.
Quoted 2 lines
Quoted 2 lines
This depends on the config words (
CF_WORDS) in theCF_HEADER. The Boot ROM code parses the config words and programs theaddresses
Quoted 1 line
Quoted 1 line
with data values accordingly. The user may opt to initialize DDR
and
Quoted 1 line
Quoted 1 line
get the image copied onto DDR or configure CPC as SRAM and get the
Image copied onto SRAM.
Quoted 6 lines
Quoted 1 line
On 1010,
P1010? LS1010? Something else?
Quoted 2 lines
the CPC size is not big enough to accommodate the U-boot image. So, currently the
CF_WORDSare for DDR to be initialized and copythe image on DDR.
Quoted 2 lines
Generally if SPD is present, it should be used to init DDR rather
than
Quoted 2 lines
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.
Quoted 5 lines
Quoted 1 line
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
PATCH 1/3 powerpc/p1010rdb: SECURE BOOT- define CONFIG_SYS_RAMBOOT for NAND boot
Quoted 61 lines · Scott Wood
Quoted 60 lines · On Mon, 2014-03-10 at 04:14 -0500, Bansal Aneesh-B39320 wrote:
Quoted 59 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 15 lines · Scott Wood
Quoted 14 lines · On Thu, 2014-03-06 at 03:24 -0600, Bansal Aneesh-B39320 wrote:
Quoted 14 lines
-----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- defineCONFIG_SYS_RAMBOOTfor NAND bootQuoted 1 line · 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
Quoted 2 lines
BootROM and complete u-boot image is copied from NAND to DRAM by the
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
BootROM.
Quoted 1 line
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.
Quoted 2 lines
Quoted 2 lines
This depends on the config words (
CF_WORDS) in theCF_HEADER. The Boot ROM code parses the config words and programs theaddresses
Quoted 1 line
Quoted 1 line
with data values accordingly. The user may opt to initialize DDR
and
Quoted 1 line
Quoted 1 line
get the image copied onto DDR or configure CPC as SRAM and get the
Image copied onto SRAM.
Quoted 6 lines
Quoted 1 line
On 1010,
P1010? LS1010? Something else?
Quoted 2 lines
the CPC size is not big enough to accommodate the U-boot image. So, currently the
CF_WORDSare for DDR to be initialized and copythe image on DDR.
Quoted 2 lines
Generally if SPD is present, it should be used to init DDR rather
than
Quoted 2 lines
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
Quoted 9 lines
Quoted 3 lines
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.
We should move to SPL for SD/SPI/NAND. Let's take step by step. I intend to accept the updated patch to get NAND SECURE boot working for this board. Aneesh will submit patches to move to SPL, for SD/SPI/NAND.
York