Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
reg.h
Go to the documentation of this file.
1 /*******************************************************************************/
2 /* © Université de Lille, The Pip Development Team (2015-2021) */
3 /* */
4 /* This software is a computer program whose purpose is to run a minimal, */
5 /* hypervisor relying on proven properties such as memory isolation. */
6 /* */
7 /* This software is governed by the CeCILL license under French law and */
8 /* abiding by the rules of distribution of free software. You can use, */
9 /* modify and/ or redistribute the software under the terms of the CeCILL */
10 /* license as circulated by CEA, CNRS and INRIA at the following URL */
11 /* "http://www.cecill.info". */
12 /* */
13 /* As a counterpart to the access to the source code and rights to copy, */
14 /* modify and redistribute granted by the license, users are provided only */
15 /* with a limited warranty and the software's author, the holder of the */
16 /* economic rights, and the successive licensors have only limited */
17 /* liability. */
18 /* */
19 /* In this respect, the user's attention is drawn to the risks associated */
20 /* with loading, using, modifying and/or developing or reproducing the */
21 /* software by the user in light of its specific status of free software, */
22 /* that may mean that it is complicated to manipulate, and that also */
23 /* therefore means that it is reserved for developers and experienced */
24 /* professionals having in-depth computer knowledge. Users are therefore */
25 /* encouraged to load and test the software's suitability as regards their */
26 /* requirements in conditions enabling the security of their systems and/or */
27 /* data to be ensured and, more generally, to use and operate it in the */
28 /* same conditions as regards security. */
29 /* */
30 /* The fact that you are presently reading this means that you have had */
31 /* knowledge of the CeCILL license and that you accept its terms. */
32 /*******************************************************************************/
33 
34 #ifndef DEF_REG_H_
35 #define DEF_REG_H_
36 
37 /* B4.1.89 */
38 typedef union reg_mmfr0_u {
39  unsigned aslong;
40  struct {
41  unsigned vmsa_support:4;
42  unsigned pmsa_support:4;
43  unsigned outermost_share:4;
44  unsigned share_levels:4;
45  unsigned tcm_support:4;
46  unsigned aux_registers:4;
47  unsigned fcse_support:4;
48  unsigned innermost_share:4;
49  };
50 } reg_mmfr0_t;
51 
52 /* B4.1.42 CTR, Cache Type Register, VMSA */
53 typedef union reg_ctr_u {
54  unsigned aslong;
55  struct {
56  unsigned IminLine:4;
57  unsigned zero1:10;
58  unsigned L1Ip:2;
59  unsigned DminLine:4;
60  unsigned ERG:4;
61  unsigned CWG:4;
62  unsigned zero2:1;
63  unsigned format:3;
64  };
65 } reg_ctr_t;
66 
67 /* B4.1.20 CLIDR, Cache Level ID Register, VMSA */
68 typedef union reg_clidr_u {
69  unsigned aslong;
70  struct {
71  unsigned Ctype1:3;
72  unsigned Ctype2:3;
73  unsigned Ctype3:3;
74  unsigned Ctype4:3;
75  unsigned Ctype5:3;
76  unsigned Ctype6:3;
77  unsigned Ctype7:3;
78  unsigned LoUIS:3;
79  unsigned LoC:3;
80  unsigned LoUU:3;
81  };
82 } reg_clidr_t;
83 
84 /* B4.1.19 CCSIDR, Cache Size ID Registers, VMSA */
85 typedef union reg_csidr_u {
86  unsigned aslong;
87  struct {
88  unsigned LineSize:3;
89  unsigned Associativity:10;
90  unsigned NumSets:15;
91  unsigned WA:1;
92  unsigned RA:1;
93  unsigned WB:1;
94  unsigned WT:1;
95  };
96 } reg_csidr_t;
97 
98 /* B4.1.153 TTBCR, Translation Table Base Control Register,
99  VMSA, Short format (implies that EAE = 0) */
100 typedef union reg_ttbcr_u {
101  unsigned aslong;
102  struct {
103  unsigned N:3; /* With of TTBR0 */
104  unsigned zero:1;
105  unsigned PD0:1; /* Only when security extensions */
106  unsigned PD1:1; /* Only when security extensions */
107  unsigned reserved:25;
108  unsigned EAE:1; /* Must be zero*/
109  };
110 } reg_ttbcr_t;
111 
112 /* B4.1.105 MIDR, Main ID Register, VMSA */
113 typedef union reg_midr_u {
114  unsigned aslong;
115  struct {
116  unsigned revision:4;
117  unsigned part_number:12;
118  unsigned architecture:4;
119  unsigned variant:4;
120  unsigned implementor:8;
121  };
122 } reg_midr_t;
123 
124 #endif
unsigned Ctype1
Definition: reg.h:71
unsigned variant
Definition: reg.h:119
unsigned part_number
Definition: reg.h:117
union reg_ttbcr_u reg_ttbcr_t
unsigned aslong
Definition: reg.h:69
unsigned RA
Definition: reg.h:92
unsigned zero1
Definition: reg.h:57
unsigned reserved
Definition: reg.h:107
unsigned aux_registers
Definition: reg.h:46
unsigned aslong
Definition: reg.h:54
unsigned L1Ip
Definition: reg.h:58
unsigned revision
Definition: reg.h:116
unsigned NumSets
Definition: reg.h:90
unsigned aslong
Definition: reg.h:39
unsigned Ctype6
Definition: reg.h:76
unsigned share_levels
Definition: reg.h:44
unsigned Ctype4
Definition: reg.h:74
unsigned format
Definition: reg.h:63
Definition: reg.h:85
union reg_ctr_u reg_ctr_t
unsigned PD1
Definition: reg.h:106
union reg_csidr_u reg_csidr_t
unsigned fcse_support
Definition: reg.h:47
unsigned IminLine
Definition: reg.h:56
unsigned Ctype7
Definition: reg.h:77
unsigned vmsa_support
Definition: reg.h:41
unsigned WT
Definition: reg.h:94
unsigned aslong
Definition: reg.h:114
Definition: reg.h:113
unsigned Ctype5
Definition: reg.h:75
unsigned pmsa_support
Definition: reg.h:42
Definition: reg.h:68
unsigned Ctype2
Definition: reg.h:72
unsigned aslong
Definition: reg.h:101
unsigned outermost_share
Definition: reg.h:43
unsigned LoC
Definition: reg.h:79
unsigned LoUU
Definition: reg.h:80
unsigned implementor
Definition: reg.h:120
Definition: reg.h:38
unsigned EAE
Definition: reg.h:108
unsigned Associativity
Definition: reg.h:89
union reg_mmfr0_u reg_mmfr0_t
unsigned zero
Definition: reg.h:104
unsigned WB
Definition: reg.h:93
union reg_midr_u reg_midr_t
unsigned CWG
Definition: reg.h:61
union reg_clidr_u reg_clidr_t
unsigned LoUIS
Definition: reg.h:78
unsigned tcm_support
Definition: reg.h:45
unsigned DminLine
Definition: reg.h:59
unsigned Ctype3
Definition: reg.h:73
Definition: reg.h:53
unsigned LineSize
Definition: reg.h:88
Definition: reg.h:100
unsigned PD0
Definition: reg.h:105
unsigned zero2
Definition: reg.h:62
unsigned WA
Definition: reg.h:91
unsigned aslong
Definition: reg.h:86
unsigned architecture
Definition: reg.h:118
unsigned N
Definition: reg.h:103
unsigned ERG
Definition: reg.h:60
unsigned innermost_share
Definition: reg.h:48