Pavona Software APIs
rstmgr_regs.h
Go to the documentation of this file.
1/**
2 * @file
3 * @brief Generated register defines for rstmgr
4 */
5
6// Copyright information found in source file:
7// Copyright lowRISC contributors (OpenTitan project).Copyright zeroRISC Inc.
8
9// Licensing information found in source file:
10// Licensed under the Apache License, Version 2.0, see LICENSE for details.
11// SPDX-License-Identifier: Apache-2.0
12
13#ifndef _RSTMGR_REG_DEFS_
14#define _RSTMGR_REG_DEFS_
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19// Read width for crash info
20#define RSTMGR_PARAM_RD_WIDTH 32
21
22// Index width for crash info
23#define RSTMGR_PARAM_IDX_WIDTH 4
24
25// Number of hardware reset requests, inclusive of debug resets and pwrmgr's
26// internal resets
27#define RSTMGR_PARAM_NUM_HW_RESETS 4
28
29// Number of software resets
30#define RSTMGR_PARAM_NUM_SW_RESETS 3
31
32// Number of total reset requests, inclusive of hw/sw, por and low power exit
33#define RSTMGR_PARAM_NUM_TOTAL_RESETS 7
34
35// Number of alerts
36#define RSTMGR_PARAM_NUM_ALERTS 2
37
38// Register width
39#define RSTMGR_PARAM_REG_WIDTH 32
40
41// Alert Test Register
42#define RSTMGR_ALERT_TEST_REG_OFFSET 0x0
43#define RSTMGR_ALERT_TEST_REG_RESVAL 0x0u
44#define RSTMGR_ALERT_TEST_FATAL_FAULT_BIT 0
45#define RSTMGR_ALERT_TEST_FATAL_CNSTY_FAULT_BIT 1
46
47// Software requested system reset.
48#define RSTMGR_RESET_REQ_REG_OFFSET 0x4
49#define RSTMGR_RESET_REQ_REG_RESVAL 0x9u
50#define RSTMGR_RESET_REQ_VAL_MASK 0xfu
51#define RSTMGR_RESET_REQ_VAL_OFFSET 0
52#define RSTMGR_RESET_REQ_VAL_FIELD \
53 ((bitfield_field32_t) { .mask = RSTMGR_RESET_REQ_VAL_MASK, .index = RSTMGR_RESET_REQ_VAL_OFFSET })
54
55// Device reset reason.
56#define RSTMGR_RESET_INFO_REG_OFFSET 0x8
57#define RSTMGR_RESET_INFO_REG_RESVAL 0x1u
58#define RSTMGR_RESET_INFO_POR_BIT 0
59#define RSTMGR_RESET_INFO_LOW_POWER_EXIT_BIT 1
60#define RSTMGR_RESET_INFO_SW_RESET_BIT 2
61#define RSTMGR_RESET_INFO_HW_REQ_MASK 0xfu
62#define RSTMGR_RESET_INFO_HW_REQ_OFFSET 3
63#define RSTMGR_RESET_INFO_HW_REQ_FIELD \
64 ((bitfield_field32_t) { .mask = RSTMGR_RESET_INFO_HW_REQ_MASK, .index = RSTMGR_RESET_INFO_HW_REQ_OFFSET })
65
66// Cpu write enable
67#define RSTMGR_CPU_REGWEN_REG_OFFSET 0xc
68#define RSTMGR_CPU_REGWEN_REG_RESVAL 0x1u
69#define RSTMGR_CPU_REGWEN_EN_BIT 0
70
71// Cpu info dump controls.
72#define RSTMGR_CPU_INFO_CTRL_REG_OFFSET 0x10
73#define RSTMGR_CPU_INFO_CTRL_REG_RESVAL 0x0u
74#define RSTMGR_CPU_INFO_CTRL_EN_BIT 0
75#define RSTMGR_CPU_INFO_CTRL_INDEX_MASK 0xfu
76#define RSTMGR_CPU_INFO_CTRL_INDEX_OFFSET 4
77#define RSTMGR_CPU_INFO_CTRL_INDEX_FIELD \
78 ((bitfield_field32_t) { .mask = RSTMGR_CPU_INFO_CTRL_INDEX_MASK, .index = RSTMGR_CPU_INFO_CTRL_INDEX_OFFSET })
79
80// Cpu info dump attributes.
81#define RSTMGR_CPU_INFO_ATTR_REG_OFFSET 0x14
82#define RSTMGR_CPU_INFO_ATTR_REG_RESVAL 0x0u
83#define RSTMGR_CPU_INFO_ATTR_CNT_AVAIL_MASK 0xfu
84#define RSTMGR_CPU_INFO_ATTR_CNT_AVAIL_OFFSET 0
85#define RSTMGR_CPU_INFO_ATTR_CNT_AVAIL_FIELD \
86 ((bitfield_field32_t) { .mask = RSTMGR_CPU_INFO_ATTR_CNT_AVAIL_MASK, .index = RSTMGR_CPU_INFO_ATTR_CNT_AVAIL_OFFSET })
87
88// Cpu dump information prior to last reset.
89#define RSTMGR_CPU_INFO_REG_OFFSET 0x18
90#define RSTMGR_CPU_INFO_REG_RESVAL 0x0u
91
92// Register write enable for software controllable resets.
93#define RSTMGR_SW_RST_REGWEN_EN_FIELD_WIDTH 1
94#define RSTMGR_SW_RST_REGWEN_MULTIREG_COUNT 3
95
96// Register write enable for software controllable resets.
97#define RSTMGR_SW_RST_REGWEN_0_REG_OFFSET 0x1c
98#define RSTMGR_SW_RST_REGWEN_0_REG_RESVAL 0x1u
99#define RSTMGR_SW_RST_REGWEN_0_EN_0_BIT 0
100
101// Register write enable for software controllable resets.
102#define RSTMGR_SW_RST_REGWEN_1_REG_OFFSET 0x20
103#define RSTMGR_SW_RST_REGWEN_1_REG_RESVAL 0x1u
104#define RSTMGR_SW_RST_REGWEN_1_EN_1_BIT 0
105
106// Register write enable for software controllable resets.
107#define RSTMGR_SW_RST_REGWEN_2_REG_OFFSET 0x24
108#define RSTMGR_SW_RST_REGWEN_2_REG_RESVAL 0x1u
109#define RSTMGR_SW_RST_REGWEN_2_EN_2_BIT 0
110
111// Software controllable resets.
112#define RSTMGR_SW_RST_CTRL_N_VAL_FIELD_WIDTH 1
113#define RSTMGR_SW_RST_CTRL_N_MULTIREG_COUNT 3
114
115// Software controllable resets.
116#define RSTMGR_SW_RST_CTRL_N_0_REG_OFFSET 0x28
117#define RSTMGR_SW_RST_CTRL_N_0_REG_RESVAL 0x1u
118#define RSTMGR_SW_RST_CTRL_N_0_VAL_0_BIT 0
119
120// Software controllable resets.
121#define RSTMGR_SW_RST_CTRL_N_1_REG_OFFSET 0x2c
122#define RSTMGR_SW_RST_CTRL_N_1_REG_RESVAL 0x1u
123#define RSTMGR_SW_RST_CTRL_N_1_VAL_1_BIT 0
124
125// Software controllable resets.
126#define RSTMGR_SW_RST_CTRL_N_2_REG_OFFSET 0x30
127#define RSTMGR_SW_RST_CTRL_N_2_REG_RESVAL 0x1u
128#define RSTMGR_SW_RST_CTRL_N_2_VAL_2_BIT 0
129
130// A bit vector of all the errors that have occurred in reset manager
131#define RSTMGR_ERR_CODE_REG_OFFSET 0x34
132#define RSTMGR_ERR_CODE_REG_RESVAL 0x0u
133#define RSTMGR_ERR_CODE_REG_INTG_ERR_BIT 0
134#define RSTMGR_ERR_CODE_RESET_CONSISTENCY_ERR_BIT 1
135#define RSTMGR_ERR_CODE_FSM_ERR_BIT 2
136
137#ifdef __cplusplus
138} // extern "C"
139#endif
140#endif // _RSTMGR_REG_DEFS_
141// End generated register defines for rstmgr