diff --git a/hw/top_earlgrey/BUILD b/hw/top_earlgrey/BUILD index e3441fd6909ce..2c5ae62f33479 100644 --- a/hw/top_earlgrey/BUILD +++ b/hw/top_earlgrey/BUILD @@ -303,8 +303,7 @@ silicon( }, rom_ext = select({ "//signing:test_keys": "//sw/device/silicon_creator/rom_ext/sival:rom_ext_fake_prod_signed_slot_a", - # TODO: set this to the prod signed SiVAL rom_ext binary. - "//conditions:default": "//sw/device/silicon_creator/rom_ext/sival:rom_ext_fake_prod_signed_slot_a", + "//conditions:default": "//sw/device/silicon_creator/rom_ext/sival/binaries:rom_ext_real_prod_signed_slot_a", }), rsa_key = select({ "//signing:test_keys": {"//sw/device/silicon_creator/rom_ext/keys/fake:rom_ext_test_private_key_0": "test_key_0"}, diff --git a/rules/opentitan/defs.bzl b/rules/opentitan/defs.bzl index cc090495baec5..b36d6e4d89ed7 100644 --- a/rules/opentitan/defs.bzl +++ b/rules/opentitan/defs.bzl @@ -122,6 +122,11 @@ def _hacky_tags(env): # rule's implementation, we have to infer these tag names from the # label name. tags.append(suffix[5:]) + if suffix.startswith("silicon"): + # We add the entire suffix for silicon exec environments to be able + # to filter tests by them. "silicon_creator" and + # "silicon_owner_sival_rom_ext" have different target configurations. + tags.append(suffix) return tags def opentitan_test( diff --git a/sw/device/silicon_creator/rom_ext/sival/binaries/BUILD b/sw/device/silicon_creator/rom_ext/sival/binaries/BUILD new file mode 100644 index 0000000000000..3f7439828009e --- /dev/null +++ b/sw/device/silicon_creator/rom_ext/sival/binaries/BUILD @@ -0,0 +1,15 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +package(default_visibility = ["//visibility:public"]) + +filegroup( + name = "rom_ext_real_prod_signed_slot_a", + srcs = ["rom_ext_real_prod_signed_slot_a_silicon_creator.signed.bin"], +) + +filegroup( + name = "rom_ext_real_prod_signed_slot_b", + srcs = ["rom_ext_real_prod_signed_slot_b_silicon_creator.signed.bin"], +) diff --git a/sw/device/silicon_creator/rom_ext/sival/binaries/rom_ext_real_prod_signed_slot_a_silicon_creator.signed.bin b/sw/device/silicon_creator/rom_ext/sival/binaries/rom_ext_real_prod_signed_slot_a_silicon_creator.signed.bin new file mode 100644 index 0000000000000..6c22d8427a1a9 Binary files /dev/null and b/sw/device/silicon_creator/rom_ext/sival/binaries/rom_ext_real_prod_signed_slot_a_silicon_creator.signed.bin differ diff --git a/sw/device/silicon_creator/rom_ext/sival/binaries/rom_ext_real_prod_signed_slot_b_silicon_creator.signed.bin b/sw/device/silicon_creator/rom_ext/sival/binaries/rom_ext_real_prod_signed_slot_b_silicon_creator.signed.bin new file mode 100644 index 0000000000000..c70744c3bc81c Binary files /dev/null and b/sw/device/silicon_creator/rom_ext/sival/binaries/rom_ext_real_prod_signed_slot_b_silicon_creator.signed.bin differ diff --git a/sw/device/tests/BUILD b/sw/device/tests/BUILD index b2633c79f579a..64ada2c2a94cd 100644 --- a/sw/device/tests/BUILD +++ b/sw/device/tests/BUILD @@ -165,6 +165,7 @@ opentitan_test( "//hw/top_earlgrey:fpga_cw310_sival": None, "//hw/top_earlgrey:fpga_cw310_sival_rom_ext": None, "//hw/top_earlgrey:silicon_creator": None, + "//hw/top_earlgrey:silicon_owner_sival_rom_ext": None, }, ), deps = [ @@ -1599,6 +1600,7 @@ opentitan_test( "//hw/top_earlgrey:fpga_cw310_sival": None, "//hw/top_earlgrey:fpga_cw310_sival_rom_ext": None, "//hw/top_earlgrey:silicon_creator": None, + "//hw/top_earlgrey:silicon_owner_sival_rom_ext": None, }, ), deps = [ diff --git a/sw/device/tests/doc/sival/README.md b/sw/device/tests/doc/sival/README.md index 1a145a9899664..bb8c680e9b8f7 100644 --- a/sw/device/tests/doc/sival/README.md +++ b/sw/device/tests/doc/sival/README.md @@ -175,7 +175,7 @@ bazel test --define DISABLE_VERILATOR_BUILD=true \ ### Silicon Creator -The following commands runs the `SV2` test suite on the `silicon_creator` +The following command runs the `SV2` test suite using the `silicon_creator` execution environment. The binaries are signed with the `earlgrey_a0_dev_0` key using the `nitrokey` signing token configuration. @@ -183,7 +183,26 @@ key using the `nitrokey` signing token configuration. bazel test --define DISABLE_VERILATOR_BUILD=true \ --//signing:token=//signing/tokens:nitrokey \ --//sw/device/silicon_creator/rom/keys/real/rsa:keyset=earlgrey_a0_dev_0 \ - --test_tag_filters=silicon \ + --build_tag_filters=silicon_creator \ + --test_tag_filters=silicon_creator \ + --test_output=streamed \ + --define bitstream=gcp_splice \ + --cache_test_results=no \ + --local_test_jobs 1 \ + //sw/device/tests/sival:sv2_tests +``` + +### Silicon Owner + +The following command runs the `SV2` test suite using the +`silicon_owner_sival_rom_ext` execution environment. The binaries are signed +using the `cloud_kms` signing token configuration. + +```console +bazel test --define DISABLE_VERILATOR_BUILD=true \ + --//signing:token=//signing/tokens:cloud_kms \ + --build_tag_filters=silicon_owner_sival_rom_ext \ + --test_tag_filters=silicon_owner_sival_rom_ext \ --test_output=streamed \ --define bitstream=gcp_splice \ --cache_test_results=no \