Skip to content

Commit d4540e3

Browse files
committed
[ottf] Enable alert catching by default in OTTF
Alert 37 is skipped on FPGA ROM_EXT execution environments until we can splice provisioning data into flash. Signed-off-by: James Wainwright <[email protected]> (cherry picked from commit 48ec170)
1 parent 31be389 commit d4540e3

32 files changed

+32
-32
lines changed

sw/device/lib/testing/test_framework/ottf_alerts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ status_t ottf_alerts_ignore_alert(dif_alert_handler_alert_t alert) {
111111

112112
bool ottf_alerts_should_handle_irq(dt_instance_id_t devid,
113113
dif_rv_plic_irq_id_t plic_irq_id) {
114-
return kOttfTestConfig.catch_alerts &&
114+
return !kOttfTestConfig.ignore_alerts &&
115115
devid == dt_alert_handler_instance_id(kDtAlertHandler) &&
116116
plic_irq_id == dt_alert_handler_irq_to_plic_id(
117117
kDtAlertHandler, kDtAlertHandlerIrqClassd);

sw/device/lib/testing/test_framework/ottf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void _ottf_main(void) {
177177
}
178178

179179
#if OPENTITAN_HAS_ALERT_HANDLER
180-
if (kOttfTestConfig.catch_alerts) {
180+
if (!kOttfTestConfig.ignore_alerts) {
181181
if (!kOttfTestConfig.silence_console_prints) {
182182
LOG_INFO("Enabling OTTF alert catcher");
183183
}

sw/device/lib/testing/test_framework/ottf_test_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ typedef struct ottf_test_config {
136136
* The alert handler configuration is not locked and can be modified further
137137
* by the test.
138138
*/
139-
bool catch_alerts;
139+
bool ignore_alerts;
140140
} ottf_test_config_t;
141141

142142
/**

sw/device/silicon_creator/lib/otbn_boot_services_functest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h" // Generated.
1919

20-
OTTF_DEFINE_TEST_CONFIG(.catch_alerts = true);
20+
OTTF_DEFINE_TEST_CONFIG();
2121

2222
// Keymgr handle for this test.
2323
static dif_keymgr_t keymgr;

sw/device/silicon_creator/rom/e2e/chip_specific_startup/chip_specific_startup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "hw/top/sensor_ctrl_regs.h"
2828
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h"
2929

30-
OTTF_DEFINE_TEST_CONFIG();
30+
OTTF_DEFINE_TEST_CONFIG(.ignore_alerts = true);
3131

3232
enum {
3333
kAstInitEnOffset = OTP_CTRL_PARAM_CREATOR_SW_CFG_AST_INIT_EN_OFFSET -

sw/device/silicon_creator/rom/e2e/rstmgr/alert_info_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "hw/top/uart_regs.h"
1515

1616
// Test handles alerts directly, disable OTTF catcher.
17-
OTTF_DEFINE_TEST_CONFIG(.catch_alerts = false);
17+
OTTF_DEFINE_TEST_CONFIG(.ignore_alerts = true);
1818

1919
static const dt_uart_t kUartDt = kDtUart0;
2020

sw/device/silicon_creator/rom/e2e/shutdown_alert/rom_e2e_alert_config_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include "hw/top/otp_ctrl_regs.h"
1212

13-
OTTF_DEFINE_TEST_CONFIG();
13+
OTTF_DEFINE_TEST_CONFIG(.ignore_alerts = true);
1414

1515
/**
1616
* Check that the alert_handler register CRC32 matches OTP value.

sw/device/silicon_creator/rom/e2e/shutdown_alert/rom_e2e_shutdown_alert_config_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "hw/top/uart_regs.h"
1414
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h"
1515

16-
OTTF_DEFINE_TEST_CONFIG();
16+
OTTF_DEFINE_TEST_CONFIG(.ignore_alerts = true);
1717

1818
enum {
1919
/**

sw/device/silicon_creator/rom_ext/e2e/attestation/print_certs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "sw/device/silicon_creator/lib/drivers/flash_ctrl.h"
1010
#include "sw/device/silicon_creator/manuf/base/perso_tlv_data.h"
1111

12-
OTTF_DEFINE_TEST_CONFIG(.catch_alerts = true);
12+
OTTF_DEFINE_TEST_CONFIG();
1313

1414
const char kBase64[] =
1515
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

sw/device/tests/aes_masking_off_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static dt_edn_t kTestEdn = (dt_edn_t)0;
4343
dif_edn_t edn;
4444
dif_csrng_t csrng;
4545

46-
OTTF_DEFINE_TEST_CONFIG(.catch_alerts = true);
46+
OTTF_DEFINE_TEST_CONFIG();
4747

4848
status_t execute_test(const dif_csrng_t *csrng, const dif_edn_t *edn0) {
4949
// Perform the known-answer testing on the CSRNG SW application interface.

0 commit comments

Comments
 (0)