Skip to content

Commit b8e48fb

Browse files
committed
ci(esp_tee): Enable the tee_test_fw test app for ESP32-H2
1 parent 12e2df2 commit b8e48fb

File tree

5 files changed

+198
-110
lines changed

5 files changed

+198
-110
lines changed

components/esp_tee/test_apps/.build-test-rules.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ components/esp_tee/test_apps/tee_cli_app:
77

88
components/esp_tee/test_apps/tee_test_fw:
99
disable:
10-
- if: IDF_TARGET not in ["esp32c6"]
11-
reason: only supported with esp32c6 for now
10+
- if: IDF_TARGET not in ["esp32c6", "esp32h2"]
11+
reason: only supported with esp32c6 and esp32h2 for now

components/esp_tee/test_apps/tee_test_fw/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| Supported Targets | ESP32-C6 |
2-
| ----------------- | -------- |
1+
| Supported Targets | ESP32-C6 | ESP32-H2 |
2+
| ----------------- | -------- | -------- |
33

44
## ESP-TEE: Test Suite
55

components/esp_tee/test_apps/tee_test_fw/conftest.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,47 @@
6363
0xF4, 0xA4, 0xCF, 0x06, 0xAE, 0x94, 0x75, 0x47, 0xBC, 0x88, 0xA2, 0xCA,
6464
0x52, 0x97, 0x7A, 0x5C, 0x55, 0x43, 0xD9, 0xF5, 0xD3, 0x45, 0xD1, 0x34,
6565
0xFC, 0x74, 0xB2, 0xB9, 0x34, 0x72, 0xC3, 0x00
66+
],
67+
'esp32h2': [
68+
0xE9, 0x04, 0x02, 0x1F, 0x00, 0x00, 0x80, 0x40, 0xEE, 0x00, 0x00, 0x00,
69+
0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
70+
# DROM segment
71+
0x20, 0x00, 0x00, 0x42, 0x00, 0x02, 0x00, 0x00,
72+
# esp_app_desc structure
73+
0x32, 0x54, 0xCD, 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
74+
0x00, 0x00, 0x00, 0x00, 0x76, 0x35, 0x2E, 0x35, 0x00, 0x00, 0x00, 0x00,
75+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
76+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
77+
0x65, 0x73, 0x70, 0x5F, 0x74, 0x65, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
78+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
79+
0x30, 0x30, 0x3A, 0x30, 0x30, 0x3A, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00,
80+
0x00, 0x00, 0x00, 0x00, 0x4E, 0x6F, 0x76, 0x20, 0x31, 0x31, 0x20, 0x32,
81+
0x30, 0x32, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x35, 0x2E, 0x35,
82+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
83+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
84+
0x00, 0x00, 0x00, 0x00, 0x2D, 0x63, 0x66, 0x8B, 0x75, 0xFA, 0x59, 0x05,
85+
0x53, 0x34, 0x91, 0x71, 0x51, 0x33, 0x91, 0xDD, 0xF8, 0xB1, 0xFE, 0x83,
86+
0x06, 0xEB, 0x03, 0x80, 0x45, 0xC9, 0x18, 0x20, 0x83, 0x7E, 0x2E, 0x43,
87+
*([0x00] * 0x58),
88+
# Padding
89+
*([0x00] * 0x100),
90+
# IRAM segment
91+
0x00, 0x00, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00,
92+
*([0x00] * 0x20),
93+
# PADDING segment
94+
0x00, 0x00, 0x00, 0x00, 0xC8, 0x7D, 0x00, 0x00,
95+
*([0x00] * 0x7DC8),
96+
# IROM segment
97+
0x20, 0x80, 0x00, 0x42, 0x00, 0x01, 0x00, 0x00,
98+
*([0x00] * 0x100),
99+
# Padding
100+
*([0x00] * 0x0F),
101+
# CRC8 checksum
102+
0x56,
103+
# Image SHA256
104+
0xDC, 0x60, 0x86, 0x6C, 0x37, 0x76, 0xAA, 0x30, 0x1F, 0x61, 0x48, 0x23,
105+
0xEA, 0x34, 0xAA, 0x19, 0xE8, 0xDE, 0x04, 0x7D, 0x2A, 0x30, 0xC1, 0xDD,
106+
0x61, 0x38, 0x9D, 0xB5, 0xCA, 0x13, 0x5A, 0x79
66107
]
67108
}
68109
# fmt: on

components/esp_tee/test_apps/tee_test_fw/main/test_esp_tee_sec_stg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ TEST_CASE("Test TEE Secure Storage - Sign-verify (ecdsa_secp256r1)", "[sec_stora
119119
}
120120
}
121121

122-
#if CONFIG_SECURE_TEE_SEC_STG_SUPPORT_SECP192R1_SIGN
122+
#if CONFIG_SECURE_TEE_SEC_STG_SUPPORT_SECP192R1_SIGN && !TEMPORARY_DISABLED_FOR_TARGETS(ESP32H2)
123123
TEST_CASE("Test TEE Secure Storage - Sign-verify (ecdsa_secp192r1)", "[sec_storage]")
124124
{
125125
const size_t buf_sz = 16 * 1024 + 6; // NOTE: Not an exact multiple of SHA block size
@@ -507,7 +507,7 @@ static void test_ecdsa_sign(mbedtls_ecp_group_id gid)
507507
TEST_CASE("Test TEE Secure Storage - mbedtls ECDSA signing", "[mbedtls]")
508508
{
509509
test_ecdsa_sign(MBEDTLS_ECP_DP_SECP256R1);
510-
#if CONFIG_SECURE_TEE_SEC_STG_SUPPORT_SECP192R1_SIGN
510+
#if CONFIG_SECURE_TEE_SEC_STG_SUPPORT_SECP192R1_SIGN && !TEMPORARY_DISABLED_FOR_TARGETS(ESP32H2)
511511
test_ecdsa_sign(MBEDTLS_ECP_DP_SECP192R1);
512512
#endif
513513
}

0 commit comments

Comments
 (0)