You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Enables physical address extension and 2MB physical frames; required in long mode.
101
+
/// Enables physical address extensions and 2MB physical frames; required in long mode.
89
102
constPHYSICAL_ADDRESS_EXTENSION = 1 << 5;
90
103
/// Enables the machine-check exception mechanism.
91
104
constMACHINE_CHECK_EXCEPTION = 1 << 6;
92
-
/// Enables the global-page mechanism, which allows to make page translations global
93
-
/// to all processes.
105
+
/// Enables the globalpage feature, allowing some page translations to
106
+
/// be marked as global (see [`PageTableFlags::GLOBAL`]).
94
107
constPAGE_GLOBAL = 1 << 7;
95
-
/// Allows software running at any privilege level to use the RDPMC instruction.
108
+
/// Allows software running at any privilege level to use the `RDPMC` instruction.
96
109
constPERFORMANCE_MONITOR_COUNTER = 1 << 8;
97
-
/// Enable the use of legacy SSE instructions; allows using FXSAVE/FXRSTOR for saving
110
+
/// Enable the use of legacy SSE instructions; allows using `FXSAVE`/`FXRSTOR` for saving
98
111
/// processor state of 128-bit media instructions.
99
112
constOSFXSR = 1 << 9;
100
-
/// Enables the SIMD floating-point exception (#XF) for handling unmasked 256-bit and
113
+
/// Enables the SIMD floating-point exception (`#XF`) for handling unmasked 256-bit and
101
114
/// 128-bit media floating-point errors.
102
115
constOSXMMEXCPT_ENABLE = 1 << 10;
103
-
/// Prevents the execution of the SGDT, SIDT, SLDT, SMSW, and STR instructions by
116
+
/// Prevents the execution of the `SGDT`, `SIDT`, `SLDT`, `SMSW`, and `STR` instructions by
104
117
/// user-mode software.
105
118
constUSER_MODE_INSTRUCTION_PREVENTION = 1 << 11;
106
-
/// Enables 5-level paging on supported CPUs.
119
+
/// Enables 5-level paging on supported CPUs (Intel Only).
107
120
constL5_PAGING = 1 << 12;
108
-
/// Enables VMX insturctions.
121
+
/// Enables VMX insturctions (Intel Only).
109
122
constVIRTUAL_MACHINE_EXTENSIONS = 1 << 13;
110
-
/// Enables SMX instructions.
123
+
/// Enables SMX instructions (Intel Only).
111
124
constSAFER_MODE_EXTENSIONS = 1 << 14;
112
125
/// Enables software running in 64-bit mode at any privilege level to read and write
113
126
/// the FS.base and GS.base hidden segment register state.
114
127
constFSGSBASE = 1 << 16;
115
128
/// Enables process-context identifiers (PCIDs).
116
129
constPCID = 1 << 17;
117
-
/// Enables extendet processor state management instructions, including XGETBV and XSAVE.
130
+
/// Enables extended processor state management instructions, including `XGETBV` and `XSAVE`.
118
131
constOSXSAVE = 1 << 18;
119
-
/// When set, the `LOADIWKEY` instruction is available; additionally, if system firmware has activated the AES key locker instructions, register EBX of CPUID leaf 0x19, bit 0 (AESKLE) is set and the AES key locker instructions are enabled. See the [Intel Key Locker Specification](https://software.intel.com/content/www/us/en/develop/download/intel-key-locker-specification.html) for information on this feature.
132
+
/// Enables the Key Locker feature (Intel Only).
133
+
///
134
+
/// This enables creation/use opaque AES key handles; see the
/// Enables restrictions for supervisor-mode software when reading data from user-mode
125
142
/// pages.
126
143
constSUPERVISOR_MODE_ACCESS_PREVENTION = 1 << 21;
127
-
/// Enables 4-level and 5-level paging to associate each linear address with a protection key in user mode.
144
+
/// Enables protection keys for user-mode pages.
145
+
///
146
+
/// Also enables access to the PKRU register (via the `RDPKRU`/`WRPKRU`
147
+
/// instructions) to set protection key access controls.
128
148
constPROTECTION_KEY = 1 << 22;
129
-
/// When set, enables intel control-flow enforcement technology. See chapter 18 of the Intel software developer manuals, volume 1, for more information.
/// This enables the shadow stack feature, ensuring return addresses read
152
+
/// via `RET` and `IRET` have not been corrupted.
130
153
constCONTROL_FLOW_ENFORCEMENT = 1 << 23;
131
-
/// When set, allows 4-level and 5-level paging implementations to use the `IA32_PKRS` MSR to specify, for each protection key, whether supervisor-mode linear addresses with a particular protection key can be read or written.
154
+
/// Enables protection keys for supervisor-mode pages (Intel Only).
155
+
///
156
+
/// Also enables the `IA32_PKRS` MSR to set protection key access controls.
Copy file name to clipboardExpand all lines: src/registers/xcontrol.rs
+27-13
Original file line number
Diff line number
Diff line change
@@ -7,29 +7,43 @@ pub struct XCr0;
7
7
8
8
bitflags!{
9
9
/// Configuration flags of the XCr0 register.
10
+
///
11
+
/// For MPX, [`BNDREG`](XCr0Flags::BNDREG) and [`BNDCSR`](XCr0Flags::BNDCSR) must be set/unset simultaneously.
12
+
/// For AVX-512, [`OPMASK`](XCr0Flags::OPMASK), [`ZMM_HI256`](XCr0Flags::ZMM_HI256), and [`HI16_ZMM`](XCr0Flags::HI16_ZMM) must be set/unset simultaneously.
10
13
pubstructXCr0Flags:u64{
11
-
/// Enables x87 FPU
14
+
/// Enables using the x87 FPU state
15
+
/// with `XSAVE`/`XRSTOR`.
16
+
///
17
+
/// Must be set.
12
18
constX87 = 1;
13
-
/// Enables 128-bit (legacy) SSE
14
-
/// Must be set to enable AVX and YMM
19
+
/// Enables using MXCSR and the XMM registers
20
+
/// with `XSAVE`/`XRSTOR`.
21
+
///
22
+
/// Must be set if [`YMM`](XCr0Flags::YMM) is set.
15
23
constSSE = 1<<1;
16
-
/// Enables 256-bit SSE
17
-
/// Must be set to enable AVX
24
+
/// Enables AVX instructions and using the upper halves of the YMM registers
25
+
/// with `XSAVE`/`XRSTOR`.
18
26
constYMM = 1<<2;
19
-
/// When set, MPX instructions are enabled and the bound registers BND0-BND3 can be managed by XSAVE.
27
+
/// Enables MPX instructions and using the BND0-BND3 bound registers
28
+
/// with `XSAVE`/`XRSTOR` (Intel Only).
20
29
constBNDREG = 1 << 3;
21
-
/// When set, MPX instructions can be executed and XSAVE can manage the BNDCFGU and BNDSTATUS registers.
30
+
/// Enables MPX instructions and using the BNDCFGU and BNDSTATUS registers
31
+
/// with `XSAVE`/`XRSTOR` (Intel Only).
22
32
constBNDCSR = 1 << 4;
23
-
/// If set, AVX-512 instructions can be executed and XSAVE can manage the K0-K7 mask registers.
33
+
/// Enables AVX-512 instructions and using the K0-K7 mask registers
34
+
/// with `XSAVE`/`XRSTOR` (Intel Only).
24
35
constOPMASK = 1 << 5;
25
-
/// If set, AVX-512 instructions can be executed and XSAVE can be used to manage the upper halves of the lower ZMM registers.
36
+
/// Enables AVX-512 instructions and using the upper halves of the lower ZMM registers
37
+
/// with `XSAVE`/`XRSTOR` (Intel Only).
26
38
constZMM_HI256 = 1 << 6;
27
-
/// If set, AVX-512 instructions can be executed and XSAVE can manage the upper ZMM registers.
39
+
/// Enables AVX-512 instructions and using the upper ZMM registers
40
+
/// with `XSAVE`/`XRSTOR` (Intel Only).
28
41
constHI16_ZMM = 1 << 7;
29
-
/// When set, PKRU state management is supported by
30
-
/// XSAVE/XRSTOR
42
+
/// Enables using the PKRU register
43
+
/// with `XSAVE`/`XRSTOR`.
31
44
constMPK = 1<<9;
32
-
/// When set the Lightweight Profiling extensions are enabled
45
+
/// Enables Lightweight Profiling extensions and managing LWP state
0 commit comments