Software APIs
cheriot_mem_sys_regs.h
Go to the documentation of this file.
1/**
2 * @file
3 * @brief Generated register defines for cheriot_mem_sys
4 */
5
6// Copyright information found in source file:
7// Copyright lowRISC contributors (OpenTitan project).
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 _CHERIOT_MEM_SYS_REG_DEFS_
14#define _CHERIOT_MEM_SYS_REG_DEFS_
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19// Width of TBRE_NUM_CAPS. A sweep reads two words per capability, and that
20// word count
21#define CHERIOT_MEM_SYS_PARAM_TBRE_NUM_CAPS_W 31
22
23// Width of TBRE_EPOCH.count, the sweep count above the active bit.
24#define CHERIOT_MEM_SYS_PARAM_TBRE_EPOCH_W 31
25
26// Number of alerts
27#define CHERIOT_MEM_SYS_PARAM_NUM_ALERTS 1
28
29// Register width
30#define CHERIOT_MEM_SYS_PARAM_REG_WIDTH 32
31
32// Common Interrupt Offsets
33#define CHERIOT_MEM_SYS_INTR_COMMON_TBRE_DONE_BIT 0
34
35// Interrupt State Register
36#define CHERIOT_MEM_SYS_INTR_STATE_REG_OFFSET 0x0
37#define CHERIOT_MEM_SYS_INTR_STATE_REG_RESVAL 0x0u
38#define CHERIOT_MEM_SYS_INTR_STATE_TBRE_DONE_BIT 0
39
40// Interrupt Enable Register
41#define CHERIOT_MEM_SYS_INTR_ENABLE_REG_OFFSET 0x4
42#define CHERIOT_MEM_SYS_INTR_ENABLE_REG_RESVAL 0x0u
43#define CHERIOT_MEM_SYS_INTR_ENABLE_TBRE_DONE_BIT 0
44
45// Interrupt Test Register
46#define CHERIOT_MEM_SYS_INTR_TEST_REG_OFFSET 0x8
47#define CHERIOT_MEM_SYS_INTR_TEST_REG_RESVAL 0x0u
48#define CHERIOT_MEM_SYS_INTR_TEST_TBRE_DONE_BIT 0
49
50// Alert Test Register
51#define CHERIOT_MEM_SYS_ALERT_TEST_REG_OFFSET 0xc
52#define CHERIOT_MEM_SYS_ALERT_TEST_REG_RESVAL 0x80000000u
53#define CHERIOT_MEM_SYS_ALERT_TEST_FATAL_FAULT_BIT 0
54#define CHERIOT_MEM_SYS_ALERT_TEST_REGWEN_BIT 31
55
56// Write enable for the revocation engine registers.
57#define CHERIOT_MEM_SYS_TBRE_REGWEN_REG_OFFSET 0x10
58#define CHERIOT_MEM_SYS_TBRE_REGWEN_REG_RESVAL 0x1u
59#define CHERIOT_MEM_SYS_TBRE_REGWEN_EN_BIT 0
60
61// Address of the first capability the revocation engine sweeps.
62#define CHERIOT_MEM_SYS_TBRE_BASE_ADDR_REG_OFFSET 0x14
63#define CHERIOT_MEM_SYS_TBRE_BASE_ADDR_REG_RESVAL 0x0u
64#define CHERIOT_MEM_SYS_TBRE_BASE_ADDR_ADDR_MASK 0x1fffffffu
65#define CHERIOT_MEM_SYS_TBRE_BASE_ADDR_ADDR_OFFSET 3
66#define CHERIOT_MEM_SYS_TBRE_BASE_ADDR_ADDR_FIELD \
67 ((bitfield_field32_t) { .mask = CHERIOT_MEM_SYS_TBRE_BASE_ADDR_ADDR_MASK, .index = CHERIOT_MEM_SYS_TBRE_BASE_ADDR_ADDR_OFFSET })
68
69// Number of capabilities the revocation engine sweeps, each of them two
70// 32-bit words.
71#define CHERIOT_MEM_SYS_TBRE_NUM_CAPS_REG_OFFSET 0x18
72#define CHERIOT_MEM_SYS_TBRE_NUM_CAPS_REG_RESVAL 0x0u
73#define CHERIOT_MEM_SYS_TBRE_NUM_CAPS_NUM_MASK 0x7fffffffu
74#define CHERIOT_MEM_SYS_TBRE_NUM_CAPS_NUM_OFFSET 0
75#define CHERIOT_MEM_SYS_TBRE_NUM_CAPS_NUM_FIELD \
76 ((bitfield_field32_t) { .mask = CHERIOT_MEM_SYS_TBRE_NUM_CAPS_NUM_MASK, .index = CHERIOT_MEM_SYS_TBRE_NUM_CAPS_NUM_OFFSET })
77
78// Starts a sweep over the capabilities !!TBRE_BASE_ADDR and !!TBRE_NUM_CAPS
79// describe.
80#define CHERIOT_MEM_SYS_TBRE_START_REG_OFFSET 0x1c
81#define CHERIOT_MEM_SYS_TBRE_START_REG_RESVAL 0x0u
82#define CHERIOT_MEM_SYS_TBRE_START_START_BIT 0
83
84// Status of the revocation engine.
85#define CHERIOT_MEM_SYS_TBRE_STATUS_REG_OFFSET 0x20
86#define CHERIOT_MEM_SYS_TBRE_STATUS_REG_RESVAL 0x0u
87#define CHERIOT_MEM_SYS_TBRE_STATUS_BUSY_BIT 0
88#define CHERIOT_MEM_SYS_TBRE_STATUS_START_ERR_BIT 8
89#define CHERIOT_MEM_SYS_TBRE_STATUS_SWEEP_ERR_BIT 9
90
91// Sweep epoch, twice the number of sweeps that ended without an error, plus
92// one while the
93#define CHERIOT_MEM_SYS_TBRE_EPOCH_REG_OFFSET 0x24
94#define CHERIOT_MEM_SYS_TBRE_EPOCH_REG_RESVAL 0x0u
95#define CHERIOT_MEM_SYS_TBRE_EPOCH_ACTIVE_BIT 0
96#define CHERIOT_MEM_SYS_TBRE_EPOCH_COUNT_MASK 0x7fffffffu
97#define CHERIOT_MEM_SYS_TBRE_EPOCH_COUNT_OFFSET 1
98#define CHERIOT_MEM_SYS_TBRE_EPOCH_COUNT_FIELD \
99 ((bitfield_field32_t) { .mask = CHERIOT_MEM_SYS_TBRE_EPOCH_COUNT_MASK, .index = CHERIOT_MEM_SYS_TBRE_EPOCH_COUNT_OFFSET })
100
101#ifdef __cplusplus
102} // extern "C"
103#endif
104#endif // _CHERIOT_MEM_SYS_REG_DEFS_
105// End generated register defines for cheriot_mem_sys