Software APIs
sw
device
lib
dif
autogen
dif_rstmgr_autogen.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_AUTOGEN_DIF_RSTMGR_AUTOGEN_H_
6
#define OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_RSTMGR_AUTOGEN_H_
7
8
// THIS FILE HAS BEEN GENERATED, DO NOT EDIT MANUALLY. COMMAND:
9
// util/make_new_dif.py --mode=regen --only=autogen
10
11
/**
12
* @file
13
* @brief <a href="/book/hw/ip/rstmgr/">RSTMGR</a> Device Interface Functions
14
*/
15
16
#include <
stdbool.h
>
17
#include <
stdint.h
>
18
19
#include "
sw/device/lib/base/macros.h
"
20
#include "
sw/device/lib/base/mmio.h
"
21
#include "
sw/device/lib/dif/dif_base.h
"
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
// __cplusplus
26
27
/**
28
* A handle to rstmgr.
29
*
30
* This type should be treated as opaque by users.
31
*/
32
typedef
struct
dif_rstmgr
{
33
/**
34
* The base address for the rstmgr hardware registers.
35
*/
36
mmio_region_t
base_addr
;
37
}
dif_rstmgr_t
;
38
39
/**
40
* Creates a new handle for a(n) rstmgr peripheral.
41
*
42
* This function does not actuate the hardware.
43
*
44
* @param base_addr The MMIO base address of the rstmgr peripheral.
45
* @param[out] rstmgr Out param for the initialized handle.
46
* @return The result of the operation.
47
*/
48
OT_WARN_UNUSED_RESULT
49
dif_result_t
dif_rstmgr_init
(
mmio_region_t
base_addr,
dif_rstmgr_t
*rstmgr);
50
51
/**
52
* A rstmgr alert type.
53
*/
54
typedef
enum
dif_rstmgr_alert
{
55
/**
56
* This fatal alert is triggered when a fatal structural fault is detected.
57
* Structural faults include errors such as sparse fsm errors and tlul
58
* integrity errors.
59
*/
60
kDifRstmgrAlertFatalFault
= 0,
61
/**
62
* This fatal alert is triggered when a reset consistency fault is detected.
63
* It is separated from the category above for clearer error collection and
64
* debug.
65
*/
66
kDifRstmgrAlertFatalCnstyFault
= 1,
67
}
dif_rstmgr_alert_t
;
68
69
/**
70
* Forces a particular alert, causing it to be escalated as if the hardware
71
* had raised it.
72
*
73
* @param rstmgr A rstmgr handle.
74
* @param alert The alert to force.
75
* @return The result of the operation.
76
*/
77
OT_WARN_UNUSED_RESULT
78
dif_result_t
dif_rstmgr_alert_force
(
const
dif_rstmgr_t
*rstmgr,
79
dif_rstmgr_alert_t
alert);
80
81
#ifdef __cplusplus
82
}
// extern "C"
83
#endif
// __cplusplus
84
85
#endif
// OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_RSTMGR_AUTOGEN_H_
Return to
OpenTitan Documentation