Skip to content

Commit 35ec68c

Browse files
committed
[rom] Make the DEV key valid in TEST and RMA
Make the DEV key valid in TEST and RMA. Because of the limited number of key slots in OTP, we allow the DEV key to be valid in DEV, TEST and RMA. This will allow a single set of keys (e.g. 3xPROD + 1xDEV) to be viable for devices provisioned to PROD and DEV mission mode states while still allowing the use of the DEV key for TEST and RMA states. Signed-off-by: Chris Frantz <cfrantz@google.com>
1 parent fb0b4fb commit 35ec68c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

rules/opentitan.bzl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ def create_test_key(name, label):
6464

6565
def create_dev_key(name, label):
6666
return create_key_(name, label, [
67+
CONST.LCV.TEST_UNLOCKED0,
68+
CONST.LCV.TEST_UNLOCKED1,
69+
CONST.LCV.TEST_UNLOCKED2,
70+
CONST.LCV.TEST_UNLOCKED3,
71+
CONST.LCV.TEST_UNLOCKED4,
72+
CONST.LCV.TEST_UNLOCKED5,
73+
CONST.LCV.TEST_UNLOCKED6,
74+
CONST.LCV.TEST_UNLOCKED7,
75+
CONST.LCV.RMA,
6776
CONST.LCV.DEV,
6877
])
6978

sw/device/silicon_creator/rom/sigverify_otp_keys.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static rom_error_t key_is_valid_in_lc_state_rma(sigverify_key_type_t key_type) {
6565
return kErrorOk;
6666
case kSigverifyKeyTypeDev:
6767
HARDENED_CHECK_EQ(key_type, kSigverifyKeyTypeDev);
68-
return kErrorSigverifyBadKey;
68+
return kErrorOk;
6969
default:
7070
HARDENED_TRAP();
7171
OT_UNREACHABLE();
@@ -145,7 +145,7 @@ static rom_error_t key_is_valid_in_lc_state_test(
145145
return kErrorOk;
146146
case kSigverifyKeyTypeDev:
147147
HARDENED_CHECK_EQ(key_type, kSigverifyKeyTypeDev);
148-
return kErrorSigverifyBadKey;
148+
return kErrorOk;
149149
default:
150150
HARDENED_TRAP();
151151
OT_UNREACHABLE();

0 commit comments

Comments
 (0)