Skip to content

Commit 61c232e

Browse files
moidxpamaury
authored andcommitted
[sival] Remove unused OTP targets from sival SKU.
The provisioning firmware contains hardcoded settings for the HWCFG1 partition, and uses data generated at manufacturing time to calculate the DEVICE_ID. As a result, most of the otp image targets and hardware partition settings in the sival SKU, are not derived from the OTP build targets. This change removes unused tardgets to simplify the build / provisioning maintenance. pre-silicon and post-silicon simulation and emulation environments should use the emulation SKU instead. Signed-off-by: Miguel Osorio <miguelosorio@google.com>
1 parent b4a451b commit 61c232e

File tree

1 file changed

+7
-149
lines changed
  • hw/top_earlgrey/data/otp/sival_skus

1 file changed

+7
-149
lines changed

hw/top_earlgrey/data/otp/sival_skus/BUILD

Lines changed: 7 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ load(
1212
"CONST",
1313
"EARLGREY_ALERTS",
1414
"EARLGREY_LOC_ALERTS",
15-
"get_lc_items",
1615
)
1716
load(
1817
"//rules:otp.bzl",
1918
"OTP_SIGVERIFY_FAKE_KEYS",
2019
"otp_alert_classification",
2120
"otp_alert_digest",
2221
"otp_hex",
23-
"otp_image",
2422
"otp_image_consts",
2523
"otp_json",
2624
"otp_partition",
@@ -206,79 +204,19 @@ otp_alert_digest(
206204
otp_img = ":otp_json_owner_sw_cfg",
207205
)
208206

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-
273207
# OTP *_SW_CFG and ROT_CREATOR_AUTH_* constants used to generate an FT
274208
# individualization binary.
275209
otp_image_consts(
276210
name = "otp_consts_c_file",
277211
src = "//hw/top_earlgrey/data/otp:otp_json_baseline",
278212
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,
282220
)
283221

284222
# Library containing {CREATOR,OWNER}_SW_CFG and
@@ -291,83 +229,3 @@ cc_library(
291229
"//sw/device/silicon_creator/manuf/lib:otp_img_types",
292230
],
293231
)
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

Comments
 (0)