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.
99
+
/// Enables physical address extensions and 2MB physical frames. Required in long mode.
89
100
const PHYSICAL_ADDRESS_EXTENSION = 1 << 5;
90
101
/// Enables the machine-check exception mechanism.
91
102
const MACHINE_CHECK_EXCEPTION = 1 << 6;
92
-
/// Enables the global-page mechanism, which allows to make page translations global
93
-
/// to all processes.
103
+
/// Enables the globalpage feature, allowing some page translations to
104
+
/// be marked as global (see [`PageTableFlags::GLOBAL`]).
94
105
const PAGE_GLOBAL = 1 << 7;
95
-
/// Allows software running at any privilege level to use the RDPMC instruction.
106
+
/// Allows software running at any privilege level to use the `RDPMC` instruction.
96
107
const PERFORMANCE_MONITOR_COUNTER = 1 << 8;
97
-
/// Enable the use of legacy SSE instructions; allows using FXSAVE/FXRSTOR for saving
108
+
/// Enables the use of legacy SSE instructions; allows using `FXSAVE`/`FXRSTOR` for saving
98
109
/// processor state of 128-bit media instructions.
99
110
const OSFXSR = 1 << 9;
100
-
/// Enables the SIMD floating-point exception (#XF) for handling unmasked 256-bit and
111
+
/// Enables the SIMD floating-point exception (`#XF`) for handling unmasked 256-bit and
101
112
/// 128-bit media floating-point errors.
102
113
const OSXMMEXCPT_ENABLE = 1 << 10;
103
-
/// Prevents the execution of the SGDT, SIDT, SLDT, SMSW, and STR instructions by
114
+
/// Prevents the execution of the `SGDT`, `SIDT`, `SLDT`, `SMSW`, and `STR` instructions by
104
115
/// user-mode software.
105
116
const USER_MODE_INSTRUCTION_PREVENTION = 1 << 11;
106
-
/// Enables 5-level paging on supported CPUs.
117
+
/// Enables 5-level paging on supported CPUs (Intel Only).
107
118
const L5_PAGING = 1 << 12;
108
-
/// Enables VMX insturctions.
119
+
/// Enables VMX instructions (Intel Only).
109
120
const VIRTUAL_MACHINE_EXTENSIONS = 1 << 13;
110
-
/// Enables SMX instructions.
121
+
/// Enables SMX instructions (Intel Only).
111
122
const SAFER_MODE_EXTENSIONS = 1 << 14;
112
123
/// Enables software running in 64-bit mode at any privilege level to read and write
113
124
/// the FS.base and GS.base hidden segment register state.
114
125
const FSGSBASE = 1 << 16;
115
126
/// Enables process-context identifiers (PCIDs).
116
127
const PCID = 1 << 17;
117
-
/// Enables extendet processor state management instructions, including XGETBV and XSAVE.
128
+
/// Enables extended processor state management instructions, including `XGETBV` and `XSAVE`.
118
129
const OSXSAVE = 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.
130
+
/// Enables the Key Locker feature (Intel Only).
131
+
///
132
+
/// This enables creation and use of opaque AES key handles; see the
/// Enables 4-level and 5-level paging to associate each linear address with a protection key in user mode.
142
+
/// Enables protection keys for user-mode pages.
143
+
///
144
+
/// Also enables access to the PKRU register (via the `RDPKRU`/`WRPKRU`
145
+
/// instructions) to set user-mode protection key access controls.
128
146
const PROTECTION_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
150
+
/// via `RET` and `IRET` have not been corrupted.
130
151
const CONTROL_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.
152
+
/// Enables protection keys for supervisor-mode pages (Intel Only).
153
+
///
154
+
/// Also enables the `IA32_PKRS` MSR to set supervisor-mode protection
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
pub struct XCr0Flags: u64 {
11
-
/// Enables x87 FPU
14
+
/// Enables using the x87 FPU state
15
+
/// with `XSAVE`/`XRSTOR`.
16
+
///
17
+
/// Must be set.
12
18
const X87 = 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
const SSE = 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
const YMM = 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
const BNDREG = 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
const BNDCSR = 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
const OPMASK = 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
const ZMM_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
const HI16_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
const MPK = 1<<9;
32
-
/// When set the Lightweight Profiling extensions are enabled
45
+
/// Enables Lightweight Profiling extensions and managing LWP state
0 commit comments