diff options
author | Ulises Cardenas <Ulises.Cardenas@freescale.com> | 2015-06-16 12:36:41 -0500 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2016-03-09 14:42:39 +0100 |
commit | db5e1632538f9f5e7509f6f94adcbcefa4ff2b6b (patch) | |
tree | d8d2a5063dd7b86bd62fed72f343e92c7d1e60fa | |
parent | ab54d9d962d86de4b2ce72e9317896d0162c16dc (diff) |
MLK-11059 imx: HAB unable to support Encrypted boot for 4096-bit keys
Abstracted the CSF size in imximage from a hardcoded value to a config
setting CONFIG_CSF_SIZE. This configuration is only enabled for secure
boot.
Increased the size of the CSF default allocation to 0x4000. This size
covers the event the worst case of 4906-bits keys.
34 files changed, 84 insertions, 24 deletions
diff --git a/board/freescale/mx6qarm2/imximage.cfg b/board/freescale/mx6qarm2/imximage.cfg index 425f24a5c9..1063f29877 100644 --- a/board/freescale/mx6qarm2/imximage.cfg +++ b/board/freescale/mx6qarm2/imximage.cfg @@ -28,7 +28,7 @@ PLUGIN board/freescale/mx6qarm2/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6qarm2/imximage_mx6dl.cfg b/board/freescale/mx6qarm2/imximage_mx6dl.cfg index 8d1b8bd3aa..3f1d6c65a4 100644 --- a/board/freescale/mx6qarm2/imximage_mx6dl.cfg +++ b/board/freescale/mx6qarm2/imximage_mx6dl.cfg @@ -28,7 +28,7 @@ PLUGIN board/freescale/mx6qarm2/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6qsabreauto/imximage.cfg b/board/freescale/mx6qsabreauto/imximage.cfg index dacbe80c5e..76b35c3f1e 100644 --- a/board/freescale/mx6qsabreauto/imximage.cfg +++ b/board/freescale/mx6qsabreauto/imximage.cfg @@ -36,7 +36,7 @@ PLUGIN board/freescale/mx6qsabreauto/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6qsabreauto/mx6dl.cfg b/board/freescale/mx6qsabreauto/mx6dl.cfg index f7f40620d7..d6ba5b80ee 100644 --- a/board/freescale/mx6qsabreauto/mx6dl.cfg +++ b/board/freescale/mx6qsabreauto/mx6dl.cfg @@ -37,7 +37,7 @@ PLUGIN board/freescale/mx6qsabreauto/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6qsabreauto/mx6qp.cfg b/board/freescale/mx6qsabreauto/mx6qp.cfg index 5d55bccdc5..0fef4b8bca 100644 --- a/board/freescale/mx6qsabreauto/mx6qp.cfg +++ b/board/freescale/mx6qsabreauto/mx6qp.cfg @@ -36,7 +36,7 @@ PLUGIN board/freescale/mx6qsabreauto/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6qsabreauto/mx6solo.cfg b/board/freescale/mx6qsabreauto/mx6solo.cfg index 011042b4a5..9c5d17f7c5 100644 --- a/board/freescale/mx6qsabreauto/mx6solo.cfg +++ b/board/freescale/mx6qsabreauto/mx6solo.cfg @@ -34,7 +34,7 @@ PLUGIN board/freescale/mx6qsabreauto/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6sabresd/mx6dlsabresd.cfg b/board/freescale/mx6sabresd/mx6dlsabresd.cfg index 0f77f7e7fe..89a46481aa 100644 --- a/board/freescale/mx6sabresd/mx6dlsabresd.cfg +++ b/board/freescale/mx6sabresd/mx6dlsabresd.cfg @@ -27,7 +27,7 @@ PLUGIN board/freescale/mx6sabresd/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg b/board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg index aa897e947d..8621dddd35 100644 --- a/board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg +++ b/board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg @@ -32,7 +32,7 @@ PLUGIN board/freescale/mx6sabresd/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6sabresd/mx6solo_4x_mt41j128.cfg b/board/freescale/mx6sabresd/mx6solo_4x_mt41j128.cfg index 6526db46a2..0b302511ed 100644 --- a/board/freescale/mx6sabresd/mx6solo_4x_mt41j128.cfg +++ b/board/freescale/mx6sabresd/mx6solo_4x_mt41j128.cfg @@ -33,7 +33,7 @@ PLUGIN board/freescale/mx6sabresd/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6slevk/imximage.cfg b/board/freescale/mx6slevk/imximage.cfg index 2dc59760b6..16576dadeb 100644 --- a/board/freescale/mx6slevk/imximage.cfg +++ b/board/freescale/mx6slevk/imximage.cfg @@ -29,7 +29,7 @@ PLUGIN board/freescale/mx6slevk/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6sx_17x17_arm2/imximage.cfg b/board/freescale/mx6sx_17x17_arm2/imximage.cfg index f98acb0907..dbfe254318 100644 --- a/board/freescale/mx6sx_17x17_arm2/imximage.cfg +++ b/board/freescale/mx6sx_17x17_arm2/imximage.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx6sx_17x17_arm2/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6sx_17x17_arm2/imximage_wp.cfg b/board/freescale/mx6sx_17x17_arm2/imximage_wp.cfg index fb7ba4f6a0..1aa8966204 100644 --- a/board/freescale/mx6sx_17x17_arm2/imximage_wp.cfg +++ b/board/freescale/mx6sx_17x17_arm2/imximage_wp.cfg @@ -30,7 +30,7 @@ BOOT_FROM sd #endif #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6sx_17x17_arm2/mx6sx_14x14_lpddr2_arm2.cfg b/board/freescale/mx6sx_17x17_arm2/mx6sx_14x14_lpddr2_arm2.cfg index e7379b046b..afb780e79b 100644 --- a/board/freescale/mx6sx_17x17_arm2/mx6sx_14x14_lpddr2_arm2.cfg +++ b/board/freescale/mx6sx_17x17_arm2/mx6sx_14x14_lpddr2_arm2.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx6sx_17x17_arm2/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6sx_19x19_arm2/imximage.cfg b/board/freescale/mx6sx_19x19_arm2/imximage.cfg index 475127caca..6707b7335c 100644 --- a/board/freescale/mx6sx_19x19_arm2/imximage.cfg +++ b/board/freescale/mx6sx_19x19_arm2/imximage.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx6sx_19x19_arm2/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6sx_19x19_arm2/imximage_lpddr2.cfg b/board/freescale/mx6sx_19x19_arm2/imximage_lpddr2.cfg index c8ab4839e5..5488d220a5 100644 --- a/board/freescale/mx6sx_19x19_arm2/imximage_lpddr2.cfg +++ b/board/freescale/mx6sx_19x19_arm2/imximage_lpddr2.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx6sx_19x19_arm2/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6sxsabreauto/imximage.cfg b/board/freescale/mx6sxsabreauto/imximage.cfg index d431a2d01c..542cc7a828 100644 --- a/board/freescale/mx6sxsabreauto/imximage.cfg +++ b/board/freescale/mx6sxsabreauto/imximage.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx6sxsabreauto/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6sxsabresd/imximage.cfg b/board/freescale/mx6sxsabresd/imximage.cfg index de48fcff87..0b745b727a 100644 --- a/board/freescale/mx6sxsabresd/imximage.cfg +++ b/board/freescale/mx6sxsabresd/imximage.cfg @@ -28,7 +28,7 @@ PLUGIN board/freescale/mx6sxsabresd/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6ul_14x14_ddr3_arm2/imximage.cfg b/board/freescale/mx6ul_14x14_ddr3_arm2/imximage.cfg index 2272c8683c..100ce00668 100644 --- a/board/freescale/mx6ul_14x14_ddr3_arm2/imximage.cfg +++ b/board/freescale/mx6ul_14x14_ddr3_arm2/imximage.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx6ul_14x14_ddr3_arm2/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx6ul_14x14_evk/imximage.cfg b/board/freescale/mx6ul_14x14_evk/imximage.cfg index 53088d8e94..1164fdd25d 100644 --- a/board/freescale/mx6ul_14x14_evk/imximage.cfg +++ b/board/freescale/mx6ul_14x14_evk/imximage.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx6ul_14x14_evk/plugin.bin 0x00907000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx7d_12x12_ddr3_arm2/imximage.cfg b/board/freescale/mx7d_12x12_ddr3_arm2/imximage.cfg index 619944c1db..ad7df841b1 100644 --- a/board/freescale/mx7d_12x12_ddr3_arm2/imximage.cfg +++ b/board/freescale/mx7d_12x12_ddr3_arm2/imximage.cfg @@ -33,7 +33,7 @@ PLUGIN board/freescale/mx7d_12x12_ddr3_arm2/plugin.bin 0x00910000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx7d_12x12_lpddr3_arm2/imximage.cfg b/board/freescale/mx7d_12x12_lpddr3_arm2/imximage.cfg index 47b2defbef..9f8d9eb619 100644 --- a/board/freescale/mx7d_12x12_lpddr3_arm2/imximage.cfg +++ b/board/freescale/mx7d_12x12_lpddr3_arm2/imximage.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx7d_12x12_lpddr3_arm2/plugin.bin 0x00910000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx7d_19x19_ddr3_arm2/imximage.cfg b/board/freescale/mx7d_19x19_ddr3_arm2/imximage.cfg index b8970d75cf..bb5cf955b7 100644 --- a/board/freescale/mx7d_19x19_ddr3_arm2/imximage.cfg +++ b/board/freescale/mx7d_19x19_ddr3_arm2/imximage.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx7d_19x19_ddr3_arm2/plugin.bin 0x00910000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx7d_19x19_lpddr3_arm2/imximage.cfg b/board/freescale/mx7d_19x19_lpddr3_arm2/imximage.cfg index 737bf9ad68..ea8b446322 100644 --- a/board/freescale/mx7d_19x19_lpddr3_arm2/imximage.cfg +++ b/board/freescale/mx7d_19x19_lpddr3_arm2/imximage.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx7d_19x19_lpddr3_arm2/plugin.bin 0x00910000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/board/freescale/mx7dsabresd/imximage.cfg b/board/freescale/mx7dsabresd/imximage.cfg index 700e2a0b70..9b23949486 100644 --- a/board/freescale/mx7dsabresd/imximage.cfg +++ b/board/freescale/mx7dsabresd/imximage.cfg @@ -35,7 +35,7 @@ PLUGIN board/freescale/mx7dsabresd/plugin.bin 0x00910000 #else #ifdef CONFIG_SECURE_BOOT -CSF 0x2000 +CSF CONFIG_CSF_SIZE #endif /* diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h index 9d5cc0f3af..daeca9f88b 100644 --- a/include/configs/mx6qarm2.h +++ b/include/configs/mx6qarm2.h @@ -17,6 +17,12 @@ /* uncomment for SECURE mode support */ /* #define CONFIG_SECURE_BOOT */ +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #include "mx6_common.h" #define CONFIG_DISPLAY_CPUINFO diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index 6812cb4f70..27b1e85c2e 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -21,6 +21,12 @@ /* uncomment for SECURE mode support */ /* #define CONFIG_SECURE_BOOT */ +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #include "mx6_common.h" #include <linux/sizes.h> diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h index 5afcaea46f..1867162fa4 100644 --- a/include/configs/mx6slevk.h +++ b/include/configs/mx6slevk.h @@ -24,6 +24,12 @@ /* uncomment for SECURE mode support */ /* #define CONFIG_SECURE_BOOT */ +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #define MACH_TYPE_MX6SLEVK 4307 #define CONFIG_MACH_TYPE MACH_TYPE_MX6SLEVK diff --git a/include/configs/mx6sx_arm2.h b/include/configs/mx6sx_arm2.h index defa733fda..8820e35779 100644 --- a/include/configs/mx6sx_arm2.h +++ b/include/configs/mx6sx_arm2.h @@ -27,6 +27,12 @@ /* uncomment for SECURE mode support */ /* #define CONFIG_SECURE_BOOT */ +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git a/include/configs/mx6sxsabreauto.h b/include/configs/mx6sxsabreauto.h index b772485df3..a41ec144c3 100644 --- a/include/configs/mx6sxsabreauto.h +++ b/include/configs/mx6sxsabreauto.h @@ -27,6 +27,12 @@ /* uncomment for SECURE mode support */ /* #define CONFIG_SECURE_BOOT */ +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h index 5ab4573859..bc061d93ed 100644 --- a/include/configs/mx6sxsabresd.h +++ b/include/configs/mx6sxsabresd.h @@ -27,6 +27,12 @@ /* uncomment for SECURE mode support */ /* #define CONFIG_SECURE_BOOT */ +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #ifdef CONFIG_SPL #define CONFIG_SPL_LIBCOMMON_SUPPORT #define CONFIG_SPL_MMC_SUPPORT diff --git a/include/configs/mx6ul_14x14_ddr3_arm2.h b/include/configs/mx6ul_14x14_ddr3_arm2.h index 0148f6c9e6..643961e83a 100644 --- a/include/configs/mx6ul_14x14_ddr3_arm2.h +++ b/include/configs/mx6ul_14x14_ddr3_arm2.h @@ -26,6 +26,12 @@ /* uncomment for SECURE mode support */ /* #define CONFIG_SECURE_BOOT */ +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h index dde1463c38..98a03464f4 100644 --- a/include/configs/mx6ul_14x14_evk.h +++ b/include/configs/mx6ul_14x14_evk.h @@ -29,6 +29,12 @@ /* uncomment for SECURE mode support */ /* #define CONFIG_SECURE_BOOT */ +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git a/include/configs/mx7d_arm2.h b/include/configs/mx7d_arm2.h index 2be10cd327..ecc3d223bf 100644 --- a/include/configs/mx7d_arm2.h +++ b/include/configs/mx7d_arm2.h @@ -27,6 +27,12 @@ /* uncomment for SECURE mode support */ /* #define CONFIG_SECURE_BOOT */ +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h index f0d421cf8e..9c38a7e100 100644 --- a/include/configs/mx7dsabresd.h +++ b/include/configs/mx7dsabresd.h @@ -27,6 +27,12 @@ /* uncomment for SECURE mode support */ /* #define CONFIG_SECURE_BOOT */ +#ifdef CONFIG_SECURE_BOOT +#ifndef CONFIG_CSF_SIZE +#define CONFIG_CSF_SIZE 0x4000 +#endif +#endif + #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG |