Skip to content

Commit

Permalink
[pentest] Split FPGA firmware
Browse files Browse the repository at this point in the history
Due to size constraints, this commit splits the pentest framework into
a SCA, FI, and FI OTBN part.

Signed-off-by: Pascal Nasahl <[email protected]>
  • Loading branch information
nasahlpa committed Feb 14, 2025
1 parent 8ec9004 commit 034e3cf
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 156 deletions.
66 changes: 33 additions & 33 deletions sw/device/tests/penetrationtests/firmware/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,6 @@ load(

package(default_visibility = ["//visibility:public"])

FIRMWARE_DEPS_FPGA = [
"//sw/device/tests/penetrationtests/firmware/fi:crypto_fi",
"//sw/device/tests/penetrationtests/firmware/fi:ibex_fi",
"//sw/device/tests/penetrationtests/firmware/fi:lc_ctrl_fi",
"//sw/device/tests/penetrationtests/firmware/fi:otbn_fi",
"//sw/device/tests/penetrationtests/firmware/fi:otp_fi",
"//sw/device/tests/penetrationtests/firmware/fi:rng_fi",
"//sw/device/tests/penetrationtests/firmware/fi:rom_fi",
"//sw/device/tests/penetrationtests/firmware/sca:aes_sca",
"//sw/device/tests/penetrationtests/firmware/sca:edn_sca",
"//sw/device/tests/penetrationtests/firmware/sca:hmac_sca",
"//sw/device/tests/penetrationtests/firmware/sca:ibex_sca",
"//sw/device/tests/penetrationtests/firmware/sca:kmac_sca",
"//sw/device/tests/penetrationtests/firmware/sca:otbn_sca",
"//sw/device/tests/penetrationtests/firmware/sca:prng_sca",
"//sw/device/tests/penetrationtests/firmware/sca:sha3_sca",
"//sw/device/tests/penetrationtests/firmware/sca:trigger_sca",
"//sw/device/tests/penetrationtests/firmware/lib:extclk_sca_fi",
"//sw/device/lib/base:csr",
"//sw/device/lib/base:status",
"//sw/device/lib/crypto/drivers:entropy",
"//sw/device/lib/testing/test_framework:check",
"//sw/device/lib/testing/test_framework:ottf_main",
"//sw/device/lib/testing/test_framework:ujson_ottf",
"//sw/device/lib/ujson",

# Include all JSON commands.
"//sw/device/tests/penetrationtests/json:commands",
]

FIRMWARE_DEPS_FI = [
"//sw/device/tests/penetrationtests/firmware/fi:crypto_fi",
"//sw/device/tests/penetrationtests/firmware/fi:ibex_fi",
Expand Down Expand Up @@ -100,13 +70,43 @@ FIRMWARE_DEPS_SCA = [

[
opentitan_binary(
name = "firmware_{}".format(exec_env),
name = "fpga_pentest_fi_{}".format(exec_env),
testonly = True,
srcs = [":firmware_fi.c"],
exec_env = [
"//hw/top_earlgrey:{}".format(exec_env),
],
deps = FIRMWARE_DEPS_FI,
)
for exec_env in [
"fpga_cw310_test_rom",
]
]

[
opentitan_binary(
name = "fpga_pentest_fi_otbn_{}".format(exec_env),
testonly = True,
srcs = [":firmware_fi_otbn.c"],
exec_env = [
"//hw/top_earlgrey:{}".format(exec_env),
],
deps = FIRMWARE_DEPS_FI_OTBN,
)
for exec_env in [
"fpga_cw310_test_rom",
]
]

[
opentitan_binary(
name = "fpga_pentest_sca_{}".format(exec_env),
testonly = True,
srcs = [":firmware.c"],
srcs = [":firmware_sca.c"],
exec_env = [
"//hw/top_earlgrey:{}".format(exec_env),
],
deps = FIRMWARE_DEPS_FPGA,
deps = FIRMWARE_DEPS_SCA,
)
for exec_env in [
"fpga_cw310_test_rom",
Expand Down
123 changes: 0 additions & 123 deletions sw/device/tests/penetrationtests/firmware/firmware.c

This file was deleted.

0 comments on commit 034e3cf

Please sign in to comment.