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