@@ -12,15 +12,13 @@ load(
12
12
"CONST" ,
13
13
"EARLGREY_ALERTS" ,
14
14
"EARLGREY_LOC_ALERTS" ,
15
- "get_lc_items" ,
16
15
)
17
16
load (
18
17
"//rules:otp.bzl" ,
19
18
"OTP_SIGVERIFY_FAKE_KEYS" ,
20
19
"otp_alert_classification" ,
21
20
"otp_alert_digest" ,
22
21
"otp_hex" ,
23
- "otp_image" ,
24
22
"otp_image_consts" ,
25
23
"otp_json" ,
26
24
"otp_partition" ,
@@ -206,79 +204,19 @@ otp_alert_digest(
206
204
otp_img = ":otp_json_owner_sw_cfg" ,
207
205
)
208
206
209
- # Create an overlay that enalbes the rv_dm late debug feature.
210
- otp_json (
211
- name = "otp_json_hw_cfg1_enable_rv_dm_late_debug" ,
212
- partitions = [
213
- otp_partition (
214
- name = "HW_CFG1" ,
215
- items = {
216
- # Use legacy behavior and disable late debug enable.
217
- "DIS_RV_DM_LATE_DEBUG" : False ,
218
- },
219
- lock = True ,
220
- ),
221
- ],
222
- )
223
-
224
- # The `LC_MISSION_STATES` object contains the set of mission mode life cycle
225
- # states. A device is considered to be mission mode configured if it has a
226
- # matching `MANUF_PERSONALIZED` OTP configuration.
227
- LC_MISSION_STATES = get_lc_items (
228
- CONST .LCV .DEV ,
229
- CONST .LCV .PROD ,
230
- CONST .LCV .PROD_END ,
231
- )
232
-
233
- # The `MANUF_INITIALIZED` OTP profile configures the SECRET0 partition to
234
- # enable the device to transition between test_unlock and test_locked states,
235
- # as well as to transition out of test_unlock into any mission mode state.
236
- # This profile represents the OTP state of a device that has completed CP
237
- # provisioning.
238
- MANUF_INITIALIZED = [
239
- "//hw/top_earlgrey/data/otp:otp_json_fixed_secret0" ,
240
- ]
241
-
242
- # The `MANUF_SW_INITIALIZED` OTP profile configures the following partitions:
243
- # - CREATOR_SW_CFG, and
244
- # - OWNER_SW_CFG.
245
- # This profile is used to construct the `MANUF_INDIVIDUALIZED` profile below.
246
- MANUF_SW_INITIALIZED = [
247
- ":alert_digest_cfg" ,
248
- ":otp_json_creator_sw_cfg" ,
249
- ":otp_json_owner_sw_cfg" ,
250
- ]
251
-
252
- # The `MANUF_INDIVIDUALIZED` OTP profile configures the following partitions:
253
- # - CREATOR_SW_CFG,
254
- # - OWNER_SW_CFG,
255
- # - ROT_CREATOR_AUTH_CODESIGN,
256
- # - ROT_CREATOR_AUTH_STATE, and
257
- # - HW_CFG0/1.
258
- # It also includes the `MANUF_INITIALIZED` profile defined above. It represents
259
- # the OTP state of a device that has completed FT individualize provisioning.
260
- MANUF_INDIVIDUALIZED = MANUF_INITIALIZED + MANUF_SW_INITIALIZED + OTP_SIGVERIFY_FAKE_KEYS + [
261
- "//hw/top_earlgrey/data/otp:otp_json_hw_cfg0" ,
262
- "//hw/top_earlgrey/data/otp:otp_json_hw_cfg1" ,
263
- ]
264
-
265
- # The `MANUF_PERSONALIZED` OTP profile configures the SECRET1 and SECRET2 OTP
266
- # partitions. It also includes the `MANUF_INDIVIDUALIZED` profile. It represents
267
- # the OTP state of a device that has completed all provisioning steps.
268
- MANUF_PERSONALIZED = MANUF_INDIVIDUALIZED + [
269
- "//hw/top_earlgrey/data/otp:otp_json_secret1" ,
270
- "//hw/top_earlgrey/data/otp:otp_json_fixed_secret2" ,
271
- ]
272
-
273
207
# OTP *_SW_CFG and ROT_CREATOR_AUTH_* constants used to generate an FT
274
208
# individualization binary.
275
209
otp_image_consts (
276
210
name = "otp_consts_c_file" ,
277
211
src = "//hw/top_earlgrey/data/otp:otp_json_baseline" ,
278
212
mmap_def = "//hw/top_earlgrey/data/otp:otp_ctrl_mmap.hjson" ,
279
- # Do not add additional overlays here. Update the `MANUF_SW_INITIALIZED`
280
- # OTP profile instead.
281
- overlays = MANUF_SW_INITIALIZED + OTP_SIGVERIFY_FAKE_KEYS ,
213
+ # TODO: Replace `OTP_SIGVERIFY_FAKE_KEYS` for real keys once they are
214
+ # available.
215
+ overlays = [
216
+ ":alert_digest_cfg" ,
217
+ ":otp_json_creator_sw_cfg" ,
218
+ ":otp_json_owner_sw_cfg" ,
219
+ ] + OTP_SIGVERIFY_FAKE_KEYS ,
282
220
)
283
221
284
222
# Library containing {CREATOR,OWNER}_SW_CFG and
@@ -291,83 +229,3 @@ cc_library(
291
229
"//sw/device/silicon_creator/manuf/lib:otp_img_types" ,
292
230
],
293
231
)
294
-
295
- # Initial test_unlocked state. Only applicable for test_unlocked0. All other
296
- # test states require the SECRET0 partition to be configured.
297
- # In this configuration, ROM execution is disabled by default. JTAG should be
298
- # used to bootstrap code into SRAM or FLASH.
299
- # See sw/device/tests/doc/sival/devguide.md for more details.
300
- otp_image (
301
- name = "otp_img_test_unlocked0_manuf_empty" ,
302
- src = "//hw/top_earlgrey/data/otp:otp_json_test_unlocked0" ,
303
- )
304
-
305
- # `MANUF_INITIALIZED` configuration. This configuration will be generally used
306
- # to lock the chips before shipping to the Final-Test test house.
307
- # See sw/device/tests/doc/sival/devguide.md for more details.
308
- otp_image (
309
- name = "otp_img_test_locked0_manuf_initialized" ,
310
- src = "//hw/top_earlgrey/data/otp:otp_json_test_locked0" ,
311
- overlays = MANUF_INITIALIZED ,
312
- )
313
-
314
- # `MANUF_INITIALIZED` OTP configuration. Available on TEST_UNLOCK states 1-7.
315
- # See sw/device/tests/doc/sival/devguide.md for more details.
316
- [
317
- otp_image (
318
- name = "otp_img_test_unlocked{}_manuf_initialized" .format (i ),
319
- src = "//hw/top_earlgrey/data/otp:otp_json_test_unlocked{}" .format (i ),
320
- overlays = MANUF_INITIALIZED ,
321
- )
322
- for i in range (1 , 8 )
323
- ]
324
-
325
- # `MANUF_INDIVIDUALIZED` configuration. Available on TEST_UNLOCK states 1-7, as
326
- # well as DEV, PROD, PROD_END and RMA. This configuration has flash scrambling
327
- # disabled. See the personalized OTP configuration for targets requiring flash
328
- # scrambling enabled.
329
- # See sw/device/tests/doc/sival/devguide.md for more details.
330
- [
331
- otp_image (
332
- name = "otp_img_{}_manuf_individualized" .format (lc_state ),
333
- src = "//hw/top_earlgrey/data/otp:otp_json_{}" .format (lc_state ),
334
- overlays = MANUF_INDIVIDUALIZED ,
335
- )
336
- for lc_state , _ in get_lc_items (
337
- CONST .LCV .TEST_UNLOCKED1 ,
338
- CONST .LCV .TEST_UNLOCKED2 ,
339
- CONST .LCV .TEST_UNLOCKED3 ,
340
- CONST .LCV .TEST_UNLOCKED4 ,
341
- CONST .LCV .TEST_UNLOCKED5 ,
342
- CONST .LCV .TEST_UNLOCKED6 ,
343
- CONST .LCV .TEST_UNLOCKED7 ,
344
- CONST .LCV .DEV ,
345
- CONST .LCV .PROD ,
346
- CONST .LCV .PROD_END ,
347
- )
348
- ]
349
-
350
- # `MANUF_PERSONALIZED` configuration. Available on `LC_MISSION_STATES` life
351
- # cycle states.
352
- # See sw/device/tests/doc/sival/devguide.md for more details.
353
- [
354
- otp_image (
355
- name = "otp_img_{}_manuf_personalized" .format (lc_state ),
356
- src = "//hw/top_earlgrey/data/otp:otp_json_{}" .format (lc_state ),
357
- overlays = MANUF_PERSONALIZED ,
358
- )
359
- for lc_state , _ in LC_MISSION_STATES
360
- ]
361
-
362
- otp_image (
363
- name = "otp_img_dev_manuf_personalized_enable_rv_dm_late_debug_enable" ,
364
- src = "//hw/top_earlgrey/data/otp:otp_json_dev" ,
365
- overlays = MANUF_PERSONALIZED + [":otp_json_hw_cfg1_enable_rv_dm_late_debug" ],
366
- )
367
-
368
- # `MANUF_PERSONALIZED` configuration for RMA. Only available in secure environments.
369
- otp_image (
370
- name = "otp_img_rma_manuf_personalized" ,
371
- src = "//hw/top_earlgrey/data/otp:otp_json_rma" ,
372
- overlays = MANUF_PERSONALIZED ,
373
- )
0 commit comments