summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2020-01-13 13:49:56 -0800
committerCommit Bot <commit-bot@chromium.org>2020-12-30 07:16:31 +0000
commit0036129b448905691f40ad01aecbd3c58572d22b (patch)
treee367784b36103c87b55f6b56e0d690cec4af9295 /board
parentd8fd3f42def615702cdaa911dd512cf518018eca (diff)
downloadchrome-ec-0036129b448905691f40ad01aecbd3c58572d22b.tar.gz
hatch_fp/nocturne_fp: Specify RSA_KEY_SIZE in RW and RO
The rsa.h header can be included by any file, regardless of whether CONFIG_RSA is enabled. In that case we still want RSA_KEY_SIZE and CONFIG_RSA_EXPONENT_3 to be correct for the board. The following boards already set CONFIG_RSA_KEY_SIZE outside of RO/RW * kalista * endeavour * fizz * puff BRANCH=none BUG=b:144958737 TEST=make buildall -j TEST=diff build/<hatch_fp,nocturne_fp,hammeri,nucleo-h743zi>/ec.bin with and without the change => same Change-Id: I7e565e25b06b0d36e28ae32934b1f65b382e5b66 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1999606 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607029 Tested-by: Chen-Tsung Hsieh <chentsung@chromium.org> Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org> Commit-Queue: Chen-Tsung Hsieh <chentsung@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/hammer/board.h3
-rw-r--r--board/hatch_fp/board.h5
-rw-r--r--board/nocturne_fp/board.h5
3 files changed, 8 insertions, 5 deletions
diff --git a/board/hammer/board.h b/board/hammer/board.h
index 447fe6e5eb..323db1a16b 100644
--- a/board/hammer/board.h
+++ b/board/hammer/board.h
@@ -287,9 +287,10 @@
/* Sign and switch to RW partition on boot. */
#define CONFIG_RWSIG
#define CONFIG_RSA
+#endif
+
#define CONFIG_RSA_KEY_SIZE 3072
#define CONFIG_RSA_EXPONENT_3
-#endif
#define CONFIG_SHA256
#ifdef SECTION_IS_RO
diff --git a/board/hatch_fp/board.h b/board/hatch_fp/board.h
index c8b8bc726e..0c6cdbf1a3 100644
--- a/board/hatch_fp/board.h
+++ b/board/hatch_fp/board.h
@@ -133,10 +133,11 @@
#else /* SECTION_IS_RO */
/* RO verifies the RW partition signature */
#define CONFIG_RSA
-#define CONFIG_RSA_KEY_SIZE 3072
-#define CONFIG_RSA_EXPONENT_3
#define CONFIG_RWSIG
#endif
+
+#define CONFIG_RSA_KEY_SIZE 3072
+#define CONFIG_RSA_EXPONENT_3
#define CONFIG_RWSIG_TYPE_RWSIG
/* RW does slow compute, RO does slow flash erase. */
diff --git a/board/nocturne_fp/board.h b/board/nocturne_fp/board.h
index 82fa7805b7..065fdf35cb 100644
--- a/board/nocturne_fp/board.h
+++ b/board/nocturne_fp/board.h
@@ -118,10 +118,11 @@
#else /* SECTION_IS_RO */
/* RO verifies the RW partition signature */
#define CONFIG_RSA
-#define CONFIG_RSA_KEY_SIZE 3072
-#define CONFIG_RSA_EXPONENT_3
#define CONFIG_RWSIG
#endif
+
+#define CONFIG_RSA_KEY_SIZE 3072
+#define CONFIG_RSA_EXPONENT_3
#define CONFIG_RWSIG_TYPE_RWSIG
/* RW does slow compute, RO does slow flash erase. */