[U-Boot] [PATCH] armv8: ls1043a: Extend the size for SPL

The SPL images are growing much bigger especially when DEBUG is ON. So need to fix the values for them.
Signed-off-by: Gong Qianyu Qianyu.Gong@nxp.com --- include/configs/ls1043a_common.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index e55fcb2..fa20e6d 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -69,16 +69,22 @@ #define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define CONFIG_SPL_MMC_SUPPORT -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0xf0 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x110 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x500
#define CONFIG_SPL_TEXT_BASE 0x10000000 -#define CONFIG_SPL_MAX_SIZE 0x1d000 -#define CONFIG_SPL_STACK 0x1001e000 -#define CONFIG_SPL_PAD_TO 0x1d000 +/* + * CONFIG_SPL_MAX_SIZE is limited by OCRAM memory size(128 KiB) and + * a reserved stack size(4 KiB). + * So notice that even if DEBUG is ON, the SPL image(spl/u-boot-spl.bin) + * should not be > 124 KiB. + */ +#define CONFIG_SPL_MAX_SIZE 0x1f000 /* 124 KiB */ +#define CONFIG_SPL_STACK 0x10020000 +#define CONFIG_SPL_PAD_TO 0x21000 /* 132 KiB */
-#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SYS_TEXT_BASE + \ - CONFIG_SYS_MONITOR_LEN) +#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SPL_BSS_START_ADDR + \ + CONFIG_SPL_BSS_MAX_SIZE) #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 #define CONFIG_SPL_BSS_START_ADDR 0x80100000 #define CONFIG_SPL_BSS_MAX_SIZE 0x80000 @@ -101,11 +107,12 @@ #define CONFIG_SPL_NAND_SUPPORT #define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define CONFIG_SPL_TEXT_BASE 0x10000000 -#define CONFIG_SPL_MAX_SIZE 0x1a000 -#define CONFIG_SPL_STACK 0x1001d000 +#define CONFIG_SPL_MAX_SIZE 0x1d000 /* 116 KiB */ +#define CONFIG_SPL_STACK 0x1001f000 #define CONFIG_SYS_NAND_U_BOOT_DST CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE -#define CONFIG_SYS_SPL_MALLOC_START 0x80200000 +#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SPL_BSS_START_ADDR + \ + CONFIG_SPL_BSS_MAX_SIZE) #define CONFIG_SPL_BSS_START_ADDR 0x80100000 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 #define CONFIG_SPL_BSS_MAX_SIZE 0x80000

On 09/07/2016 03:33 AM, Gong Qianyu wrote:
The SPL images are growing much bigger especially when DEBUG is ON. So need to fix the values for them.
Signed-off-by: Gong Qianyu Qianyu.Gong@nxp.com
include/configs/ls1043a_common.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index e55fcb2..fa20e6d 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -69,16 +69,22 @@ #define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define CONFIG_SPL_MMC_SUPPORT -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0xf0 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x110 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x500
#define CONFIG_SPL_TEXT_BASE 0x10000000 -#define CONFIG_SPL_MAX_SIZE 0x1d000 -#define CONFIG_SPL_STACK 0x1001e000 -#define CONFIG_SPL_PAD_TO 0x1d000 +/*
- CONFIG_SPL_MAX_SIZE is limited by OCRAM memory size(128 KiB) and
- a reserved stack size(4 KiB).
- So notice that even if DEBUG is ON, the SPL image(spl/u-boot-spl.bin)
- should not be > 124 KiB.
- */
Qianyu,
It is good to see comment here. However, I am concerned about your calculation. Beside the image and stack, the early MMU tables are at the beginning of OCRAM. Did you count them?
York

Hi York,
-----Original Message----- From: york sun Sent: Wednesday, September 07, 2016 11:36 PM To: Q.Y. Gong qianyu.gong@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; Vincent Hu mingkai.hu@nxp.com Subject: Re: [PATCH] armv8: ls1043a: Extend the size for SPL
On 09/07/2016 03:33 AM, Gong Qianyu wrote:
The SPL images are growing much bigger especially when DEBUG is ON. So need to fix the values for them.
Signed-off-by: Gong Qianyu Qianyu.Gong@nxp.com
include/configs/ls1043a_common.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index e55fcb2..fa20e6d 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -69,16 +69,22 @@ #define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define CONFIG_SPL_MMC_SUPPORT -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
0xf0
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
0x110
#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x500
#define CONFIG_SPL_TEXT_BASE 0x10000000 -#define CONFIG_SPL_MAX_SIZE 0x1d000 -#define CONFIG_SPL_STACK 0x1001e000 -#define CONFIG_SPL_PAD_TO 0x1d000 +/*
- CONFIG_SPL_MAX_SIZE is limited by OCRAM memory size(128 KiB) and
- a reserved stack size(4 KiB).
- So notice that even if DEBUG is ON, the SPL
+image(spl/u-boot-spl.bin)
- should not be > 124 KiB.
- */
Qianyu,
It is good to see comment here. However, I am concerned about your calculation. Beside the image and stack, the early MMU tables are at the beginning of OCRAM. Did you count them?
York
No. We don't set up MMU tables in SPL stage on LS1043A/LS1046A. Seems so far only LS2080A has done that in SPL.
Regards, Qianyu

Hi Gong,
You have increased SPL size to 124KB. It is very high. As per my understanding 40K has been reserved for headers to be used during secure boot.
Have you consider the secure boot case?
Regards, Prabhakar
-----Original Message----- From: Q.Y. Gong Sent: Thursday, September 08, 2016 8:04 AM To: york sun york.sun@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; Vincent Hu mingkai.hu@nxp.com Subject: RE: [PATCH] armv8: ls1043a: Extend the size for SPL
Hi York,
-----Original Message----- From: york sun Sent: Wednesday, September 07, 2016 11:36 PM To: Q.Y. Gong qianyu.gong@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; Vincent Hu mingkai.hu@nxp.com Subject: Re: [PATCH] armv8: ls1043a: Extend the size for SPL
On 09/07/2016 03:33 AM, Gong Qianyu wrote:
The SPL images are growing much bigger especially when DEBUG is ON. So need to fix the values for them.
Signed-off-by: Gong Qianyu Qianyu.Gong@nxp.com
include/configs/ls1043a_common.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index e55fcb2..fa20e6d 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -69,16 +69,22 @@ #define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define CONFIG_SPL_MMC_SUPPORT -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
0xf0
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
0x110
#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x500
#define CONFIG_SPL_TEXT_BASE 0x10000000 -#define CONFIG_SPL_MAX_SIZE 0x1d000 -#define CONFIG_SPL_STACK 0x1001e000 -#define CONFIG_SPL_PAD_TO 0x1d000 +/*
- CONFIG_SPL_MAX_SIZE is limited by OCRAM memory size(128 KiB) and
- a reserved stack size(4 KiB).
- So notice that even if DEBUG is ON, the SPL
+image(spl/u-boot-spl.bin)
- should not be > 124 KiB.
- */
Qianyu,
It is good to see comment here. However, I am concerned about your
calculation.
Beside the image and stack, the early MMU tables are at the beginning of
OCRAM.
Did you count them?
York
No. We don't set up MMU tables in SPL stage on LS1043A/LS1046A. Seems so far only LS2080A has done that in SPL.
Regards, Qianyu

Hi Prabhakar,
Does secure boot enable SPL on LS1043A? I only see secure boot for NOR boot.
As there won't be enough space for SPL soon, I don't think it could support secure boot and SPL at the same time.
Regards, Qianyu
-----Original Message----- From: Prabhakar Kushwaha Sent: Thursday, September 08, 2016 2:35 PM To: Q.Y. Gong qianyu.gong@nxp.com; york sun york.sun@nxp.com; Ruchika Gupta ruchika.gupta@nxp.com; u-boot@lists.denx.de Cc: Vincent Hu mingkai.hu@nxp.com Subject: RE: [PATCH] armv8: ls1043a: Extend the size for SPL
Hi Gong,
You have increased SPL size to 124KB. It is very high. As per my understanding 40K has been reserved for headers to be used during secure boot.
Have you consider the secure boot case?
Regards, Prabhakar
-----Original Message----- From: Q.Y. Gong Sent: Thursday, September 08, 2016 8:04 AM To: york sun york.sun@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; Vincent Hu mingkai.hu@nxp.com Subject: RE: [PATCH] armv8: ls1043a: Extend the size for SPL
Hi York,
-----Original Message----- From: york sun Sent: Wednesday, September 07, 2016 11:36 PM To: Q.Y. Gong qianyu.gong@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; Vincent Hu mingkai.hu@nxp.com Subject: Re: [PATCH] armv8: ls1043a: Extend the size for SPL
On 09/07/2016 03:33 AM, Gong Qianyu wrote:
The SPL images are growing much bigger especially when DEBUG is ON. So need to fix the values for them.
Signed-off-by: Gong Qianyu Qianyu.Gong@nxp.com
include/configs/ls1043a_common.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index e55fcb2..fa20e6d 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -69,16 +69,22 @@ #define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define
CONFIG_SPL_MMC_SUPPORT
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
0xf0
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
0x110
#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x500
#define CONFIG_SPL_TEXT_BASE 0x10000000 -#define CONFIG_SPL_MAX_SIZE 0x1d000 -#define CONFIG_SPL_STACK 0x1001e000 -#define CONFIG_SPL_PAD_TO 0x1d000 +/*
- CONFIG_SPL_MAX_SIZE is limited by OCRAM memory size(128 KiB)
+and
- a reserved stack size(4 KiB).
- So notice that even if DEBUG is ON, the SPL
+image(spl/u-boot-spl.bin)
- should not be > 124 KiB.
- */
Qianyu,
It is good to see comment here. However, I am concerned about your
calculation.
Beside the image and stack, the early MMU tables are at the beginning of
OCRAM.
Did you count them?
York
No. We don't set up MMU tables in SPL stage on LS1043A/LS1046A. Seems so far only LS2080A has done that in SPL.
Regards, Qianyu

Hi Qianyu,
There are plans to enable secure boot on LS1043 soon and it would require the SPL flow. The patches for same are already available on LS1020.
Additionally we would also have drivers for CAAM for validation of next level image. Approx 48K of area needs to be reserved for this. Out of this 48K , last 32K of space in OCRAM is reserved for use by Boot ROM and 16K needs to be reserved for header of uboot.
Is DEBUG being enabled by default in SPL ? What is the reason for increasing the functionality in SPL. Ideally SPL's role should be limited to DDR Init and copying of image from the boot source.
Regards, Ruchika
-----Original Message----- From: Q.Y. Gong Sent: Thursday, September 08, 2016 12:32 PM To: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; york sun york.sun@nxp.com; Ruchika Gupta ruchika.gupta@nxp.com; u-boot@lists.denx.de Cc: Vincent Hu mingkai.hu@nxp.com Subject: RE: [PATCH] armv8: ls1043a: Extend the size for SPL
Hi Prabhakar,
Does secure boot enable SPL on LS1043A? I only see secure boot for NOR boot.
As there won't be enough space for SPL soon, I don't think it could support secure boot and SPL at the same time.
Regards, Qianyu
-----Original Message----- From: Prabhakar Kushwaha Sent: Thursday, September 08, 2016 2:35 PM To: Q.Y. Gong qianyu.gong@nxp.com; york sun york.sun@nxp.com; Ruchika Gupta ruchika.gupta@nxp.com; u-boot@lists.denx.de Cc: Vincent Hu mingkai.hu@nxp.com Subject: RE: [PATCH] armv8: ls1043a: Extend the size for SPL
Hi Gong,
You have increased SPL size to 124KB. It is very high. As per my understanding 40K has been reserved for headers to be used during secure boot.
Have you consider the secure boot case?
Regards, Prabhakar
-----Original Message----- From: Q.Y. Gong Sent: Thursday, September 08, 2016 8:04 AM To: york sun york.sun@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; Vincent Hu mingkai.hu@nxp.com Subject: RE: [PATCH] armv8: ls1043a: Extend the size for SPL
Hi York,
-----Original Message----- From: york sun Sent: Wednesday, September 07, 2016 11:36 PM To: Q.Y. Gong qianyu.gong@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com; Vincent Hu mingkai.hu@nxp.com Subject: Re: [PATCH] armv8: ls1043a: Extend the size for SPL
On 09/07/2016 03:33 AM, Gong Qianyu wrote:
The SPL images are growing much bigger especially when DEBUG is ON. So need to fix the values for them.
Signed-off-by: Gong Qianyu Qianyu.Gong@nxp.com
include/configs/ls1043a_common.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index e55fcb2..fa20e6d 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -69,16 +69,22 @@ #define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_DRIVERS_MISC_SUPPORT #define
CONFIG_SPL_MMC_SUPPORT
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
0xf0
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
0x110
#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x500
#define CONFIG_SPL_TEXT_BASE 0x10000000 -#define CONFIG_SPL_MAX_SIZE 0x1d000 -#define CONFIG_SPL_STACK 0x1001e000 -#define CONFIG_SPL_PAD_TO 0x1d000 +/*
- CONFIG_SPL_MAX_SIZE is limited by OCRAM memory size(128 KiB)
+and
- a reserved stack size(4 KiB).
- So notice that even if DEBUG is ON, the SPL
+image(spl/u-boot-spl.bin)
- should not be > 124 KiB.
- */
Qianyu,
It is good to see comment here. However, I am concerned about your
calculation.
Beside the image and stack, the early MMU tables are at the beginning of
OCRAM.
Did you count them?
York
No. We don't set up MMU tables in SPL stage on LS1043A/LS1046A. Seems so far only LS2080A has done that in SPL.
Regards, Qianyu
participants (5)
-
Gong Qianyu
-
Prabhakar Kushwaha
-
Q.Y. Gong
-
Ruchika Gupta
-
york sun