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