Software APIs
dif_rv_dm.h
Go to the documentation of this file.
1 // Copyright lowRISC contributors (OpenTitan project).
2 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef OPENTITAN_SW_DEVICE_LIB_DIF_DIF_RV_DM_H_
6 #define OPENTITAN_SW_DEVICE_LIB_DIF_DIF_RV_DM_H_
7 
8 /**
9  * @file
10  * @brief <a href="/book/hw/ip/rv_dm/">RV_DM</a> Device Interface Functions
11  */
12 
13 #include <stdint.h>
14 
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif // __cplusplus
20 
21 /**
22  * Late debug enable/disable configuration.
23  *
24  * RV_DM is gated by the life cycle controller so that it is only usable in
25  * `TEST_UNLOCKED`, `DEV` and `RMA` states. In `DEV` life cycle state, this
26  * block supports late debug enablement via firmware, which allows the `ROM` or
27  * `ROM_EXT` to implement a debug enablement policy. The debug enablement
28  * functionality can be activated by calling this function.
29  *
30  * @param rv_dm A RV_DM handle.
31  * @param enable Enable or disable late debug.
32  * @return The result of the operation.
33  */
36  dif_toggle_t enable);
37 
38 /**
39  * Locks the late debug enable/disable configuration.
40  *
41  * This function locks the late debug enable/disable configuration register.
42  * Once locked, the late debug enable/disable configuration cannot be changed
43  * until the next reset.
44  *
45  * @param rv_dm A RV_DM handle.
46  * @return The result of the operation.
47  */
50 
51 /**
52  * Checks whether the late debug enable/disable configuration is locked.
53  *
54  * @param rv_dm A RV_DM handle.
55  * @param[out] is_locked Out-param for whether the configuration is locked.
56  * @return The result of the operation.
57  */
60  bool *is_locked);
61 
62 #ifdef __cplusplus
63 } // extern "C"
64 #endif // __cplusplus
65 
66 #endif // OPENTITAN_SW_DEVICE_LIB_DIF_DIF_RV_DM_H_