File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ bitflags! {
12
12
/// Configuration flags of the Cr0 register.
13
13
pub struct Cr0Flags : u64 {
14
14
/// Enables protected mode.
15
- const PROTECTED_MODE_ENABLE = 1 << 0 ;
15
+ const PROTECTED_MODE_ENABLE = 1 ;
16
16
/// Enables monitoring of the coprocessor, typical for x87 instructions.
17
17
///
18
18
/// Controls together with the `TASK_SWITCHED` flag whether a `wait` or `fwait`
@@ -73,7 +73,7 @@ bitflags! {
73
73
pub struct Cr4Flags : u64 {
74
74
/// Enables hardware-supported performance enhancements for software running in
75
75
/// virtual-8086 mode.
76
- const VIRTUAL_8086_MODE_EXTENSIONS = 1 << 0 ;
76
+ const VIRTUAL_8086_MODE_EXTENSIONS = 1 ;
77
77
/// Enables support for protected-mode virtual interrupts.
78
78
const PROTECTED_MODE_VIRTUAL_INTERRUPTS = 1 << 1 ;
79
79
/// When set, only privilege-level 0 can execute the RDTSC or RDTSCP instructions.
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ bitflags! {
85
85
/// Flags of the Extended Feature Enable Register.
86
86
pub struct EferFlags : u64 {
87
87
/// Enables the `syscall` and `sysret` instructions.
88
- const SYSTEM_CALL_EXTENSIONS = 1 << 0 ;
88
+ const SYSTEM_CALL_EXTENSIONS = 1 ;
89
89
/// Activates long mode, requires activating paging.
90
90
const LONG_MODE_ENABLE = 1 << 8 ;
91
91
/// Indicates that long mode is active.
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ bitflags! {
58
58
const PARITY_FLAG = 1 << 2 ;
59
59
/// Set by hardware if last arithmetic operation generated a carry out of the
60
60
/// most-significant bit of the result.
61
- const CARRY_FLAG = 1 << 0 ;
61
+ const CARRY_FLAG = 1 ;
62
62
}
63
63
}
64
64
Original file line number Diff line number Diff line change @@ -824,7 +824,7 @@ bitflags! {
824
824
pub struct PageFaultErrorCode : u64 {
825
825
/// If this flag is set, the page fault was caused by a page-protection violation,
826
826
/// else the page fault was caused by a not-present page.
827
- const PROTECTION_VIOLATION = 1 << 0 ;
827
+ const PROTECTION_VIOLATION = 1 ;
828
828
829
829
/// If this flag is set, the memory access that caused the page fault was a write.
830
830
/// Else the access that caused the page fault is a memory read. This bit does not
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ bitflags! {
114
114
/// Possible flags for a page table entry.
115
115
pub struct PageTableFlags : u64 {
116
116
/// Specifies whether the mapped frame or page table is loaded in memory.
117
- const PRESENT = 1 << 0 ;
117
+ const PRESENT = 1 ;
118
118
/// Controls whether writes to the mapped frames are allowed.
119
119
///
120
120
/// If this bit is unset in a level 1 page table entry, the mapped frame is read-only.
You can’t perform that action at this time.
0 commit comments