summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorEric Sun <jian.sun@freescale.com>2012-07-23 10:43:32 +0800
committerJustin Waters <justin.waters@timesys.com>2012-09-12 11:05:52 -0400
commit41289df2cf836f510a1806621a1f4e6f177e5313 (patch)
treed62d09aa760ef9caf1ae8fe7313faca7e0b97b72 /board
parent7f8798712f1600409a0f0b306f5615c0c25c5764 (diff)
ENGR00217764 MX6 Secure Boot : Fix NAND BOOT Failure due to secure patch
With the secure boot patch. MX6 NAND Boot is not functional. The root cause is that, the original secure boot patch fills "0xFF' to spacing regions, due to a issue in ROM code, read pages of all "0xff" will be treated as a critical error. Thus prevent the U-Boot from booting normally. The fix adjust image copy size in IVT so that when secure boot is not enabled, no unuseful data is copied by ROM code. Also the secure boot option is default disabled. The end user won't enable it unless they know what they are doing. These prevent the ROM code from copied pages of "0xff" data, and fix the issue. Signed-off-by: Eric Sun <jian.sun@freescale.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/mx6q_arm2/flash_header.S2
-rw-r--r--board/freescale/mx6q_arm2/u-boot.lds6
-rw-r--r--board/freescale/mx6sl_arm2/flash_header.S2
-rw-r--r--board/freescale/mx6sl_arm2/u-boot.lds5
4 files changed, 8 insertions, 7 deletions
diff --git a/board/freescale/mx6q_arm2/flash_header.S b/board/freescale/mx6q_arm2/flash_header.S
index ee67d52dfcf..3c1719bf718 100644
--- a/board/freescale/mx6q_arm2/flash_header.S
+++ b/board/freescale/mx6q_arm2/flash_header.S
@@ -58,7 +58,7 @@ reserv2: .word 0x0
boot_data: .word TEXT_BASE
#ifdef CONFIG_SECURE_BOOT
-image_len: .word __hab_data_end - TEXT_BASE
+image_len: .word __hab_data_end - TEXT_BASE + CONFIG_FLASH_HEADER_OFFSET
#else
image_len: .word _end_of_copy - TEXT_BASE + CONFIG_FLASH_HEADER_OFFSET
#endif
diff --git a/board/freescale/mx6q_arm2/u-boot.lds b/board/freescale/mx6q_arm2/u-boot.lds
index 177bac191c9..5bd58bbaaa3 100644
--- a/board/freescale/mx6q_arm2/u-boot.lds
+++ b/board/freescale/mx6q_arm2/u-boot.lds
@@ -66,6 +66,9 @@ SECTIONS
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
+ . = ALIGN(4);
+ _end_of_copy = .; /* end_of ROM copy code when HAB is not enabled */
+
/* Original Size is 0x27..., enlarge to 0x2F000 */
. = TEXT_BASE + 0x2F000;
__hab_data = .;
@@ -73,9 +76,6 @@ SECTIONS
__hab_data_end = .;
/* End of Hab Data, Place it before BSS section */
-
- . = ALIGN(4);
- _end_of_copy = .; /* end_of ROM copy code here */
__bss_start = .;
.bss : { *(.bss) }
_end = .;
diff --git a/board/freescale/mx6sl_arm2/flash_header.S b/board/freescale/mx6sl_arm2/flash_header.S
index 9421700d07c..4c2475e7305 100644
--- a/board/freescale/mx6sl_arm2/flash_header.S
+++ b/board/freescale/mx6sl_arm2/flash_header.S
@@ -58,7 +58,7 @@ reserv2: .word 0x0
boot_data: .word TEXT_BASE
#ifdef CONFIG_SECURE_BOOT
-image_len: .word __hab_data_end - TEXT_BASE
+image_len: .word __hab_data_end - TEXT_BASE + CONFIG_FLASH_HEADER_OFFSET
#else
image_len: .word _end_of_copy - TEXT_BASE + CONFIG_FLASH_HEADER_OFFSET
#endif
diff --git a/board/freescale/mx6sl_arm2/u-boot.lds b/board/freescale/mx6sl_arm2/u-boot.lds
index 0bd13f61650..e60df09e2bf 100644
--- a/board/freescale/mx6sl_arm2/u-boot.lds
+++ b/board/freescale/mx6sl_arm2/u-boot.lds
@@ -66,6 +66,9 @@ SECTIONS
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
+ . = ALIGN(4);
+ _end_of_copy = .; /* end_of ROM copy code when HAB is not enabled */
+
/* Original Size is 0x27..., enlarge to 0x2F000 */
. = TEXT_BASE + 0x2F000;
__hab_data = .;
@@ -73,8 +76,6 @@ SECTIONS
__hab_data_end = .;
/* End of Hab Data, Place it before BSS section */
- . = ALIGN(4);
- _end_of_copy = .; /* end_of ROM copy code here */
__bss_start = .;
.bss : { *(.bss) }
_end = .;