blob: 6544756caa4699173e8e1c08ab28a9212061bfb3 [file] [log] [blame]
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#ifndef OPENTITAN_SW_DEVICE_LIB_TESTING_ALERT_HANDLER_TESTUTILS_H_
#define OPENTITAN_SW_DEVICE_LIB_TESTING_ALERT_HANDLER_TESTUTILS_H_
#include "sw/device/lib/dif/dif_alert_handler.h"
#include "sw/device/lib/dif/dif_base.h"
/**
* Configures alert handler with all required runtime information.
*
* This operation is lock-protected, meaning once the configuration is locked,
* it cannot be reconfigured until after a system reset. If `locked` is set to
* `kDifToggleEnabled`, then every lockable configuration will be locked.
* Otherwise, configurations may only be locked by performing subsequent calls
* to each component-specific locking DIF: `dif_alert_handler_lock_*(...)`.
*
* @param alert_handler An alert handler handle.
* @param config Runtime configuration parameters.
* @param locked The locked state to set for each configuration.
*/
void alert_handler_testutils_configure_all(
const dif_alert_handler_t *alert_handler, dif_alert_handler_config_t config,
dif_toggle_t locked);
#endif // OPENTITAN_SW_DEVICE_LIB_TESTING_ALERT_HANDLER_TESTUTILS_H_