CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Toggle main menu visibility
Loading...
Searching...
No Matches
sdk
include
platform
ibex
ibex-csr.h
Go to the documentation of this file.
1
// Copyright Microsoft and CHERIoT Contributors.
2
// SPDX-License-Identifier: MIT
3
4
#pragma once
5
6
/**
7
* @file
8
*
9
* Ibex defines some custom M-mode CSRs to control some of its extensions:
10
*
11
* - cpuctrlsts: "CPU Control and Status Register"
12
* - secureseed: "Security Feature Seed Register"
13
*
14
* See https://ibex-core.readthedocs.io/en/latest/03_reference/cs_registers.html
15
*
16
* The convention for these names is that they begin with `IbexCSR_` followed
17
* by the upstream name of the CSR. `_index` then gives that CSR's index. Each
18
* field within has two preprocessor macros associated: one, named by the field
19
* without suffix, provides a numeric value with a span of asserted bits
20
* covering all associated bits within the 32-bit CSR word, and the other, named
21
* with a `_shift` suffix, gives the 0-based bit index of the least significant
22
* bit of the field's span.
23
*/
24
25
/*
26
* The symbols herein are all integer literals and named not as the C
27
* preprocessor macros they are but rather as if they were constants defined by
28
* assembly-helpers.h's EXPORT_ASSEMBLY_... macros.
29
*
30
* NOLINTBEGIN(readability-identifier-naming)
31
*/
32
33
/**
34
* Index of the cpuctrlsts CSR.
35
*
36
* See
37
* https://ibex-core.readthedocs.io/en/latest/03_reference/cs_registers.html#cpu-control-and-status-register-cpuctrlsts
38
*/
39
#define IbexCSR_Cpuctrlsts_index 0x7C0U
40
41
/// Instruction cache enable, active high
42
#define IbexCSR_Cpuctrlsts_IcacheEnable 0x001U
43
#define IbexCSR_Cpuctrlsts_IcacheEnable_shift 0
44
45
/// Data independent timing features enabled, active high
46
#define IbexCSR_Cpuctrlsts_DataIndependentTiming 0x002U
47
#define IbexCSR_Cpuctrlsts_DataIndependentTiming_shift 1
48
49
/**
50
* Dummy instruction insertion enabled, active high.
51
*
52
* See
53
* https://ibex-core.readthedocs.io/en/latest/03_reference/security.html#security
54
*/
55
#define IbexCSR_Cpuctrlsts_DummyInstructionInsertion 0x004U
56
#define IbexCSR_Cpuctrlsts_DummyInstructionInsertion_shift 2
57
58
/**
59
* Dummy instruction insertion rate.
60
*
61
* See
62
* https://ibex-core.readthedocs.io/en/latest/03_reference/security.html#security
63
*/
64
#define IbexCSR_Cpuctrlsts_DummyInstructionRate 0x038U
65
#define IbexCSR_Cpuctrlsts_DummyInstructionRate_shift 3
66
67
/// Synchronous exception taken and core has not yet executed `mret`
68
#define IbexCSR_Cpuctrlsts_SynchronousExceptionSeen 0x040U
69
#define IbexCSR_Cpuctrlsts_SynchronousExceptionSeen_shift 6
70
71
/// Synchronous exception taken while SYNC_EXC_SEEN was asserted
72
#define IbexCSR_Cpuctrlsts_DoubleFaultSeen 0x080U
73
#define IbexCSR_Cpuctrlsts_DoubleFaultSeen_shift 7
74
75
/// Instruction cache scrambling key is valid
76
#define IbexCSR_Cpuctrlsts_IcacheScrambleKeyValid 0x100U
77
#define IbexCSR_Cpuctrlsts_IcacheScrambleKeyValid_shift 8
78
79
/**
80
* Index of the secureseed CSR.
81
*
82
* See
83
* https://ibex-core.readthedocs.io/en/latest/03_reference/cs_registers.html#cpu-control-and-status-register-secureseed
84
*
85
* This CSR holds a single, 32-bit, numeric value.
86
*/
87
#define IbexCSR_Secureseed_index 0x7C1U
88
89
// NOLINTEND(readability-identifier-naming)
Generated by
1.18.0