Struct x86_64::structures::gdt::DescriptorFlags [−][src]
pub struct DescriptorFlags { /* fields omitted */ }
Expand description
Flags for a GDT descriptor. Not all flags are valid for all descriptor types.
Implementations
impl DescriptorFlags
[src]
impl DescriptorFlags
[src]pub const ACCESSED: DescriptorFlags
[src]
pub const ACCESSED: DescriptorFlags
[src]Set by the processor if this segment has been accessed. Only cleared by software. Setting this bit in software prevents GDT writes on first use.
pub const WRITABLE: DescriptorFlags
[src]
pub const WRITABLE: DescriptorFlags
[src]For 32-bit data segments, sets the segment as writable. For 32-bit code segments, sets the segment as readable. In 64-bit mode, ignored for all segments.
pub const CONFORMING: DescriptorFlags
[src]
pub const CONFORMING: DescriptorFlags
[src]For code segments, sets the segment as “conforming”, influencing the privilege checks that occur on control transfers. For 32-bit data segments, sets the segment as “expand down”. In 64-bit mode, ignored for data segments.
pub const EXECUTABLE: DescriptorFlags
[src]
pub const EXECUTABLE: DescriptorFlags
[src]This flag must be set for code segments and unset for data segments.
pub const USER_SEGMENT: DescriptorFlags
[src]
pub const USER_SEGMENT: DescriptorFlags
[src]This flag must be set for user segments (in contrast to system segments).
pub const DPL_RING_3: DescriptorFlags
[src]
pub const DPL_RING_3: DescriptorFlags
[src]The DPL for this descriptor is Ring 3. In 64-bit mode, ignored for data segments.
pub const PRESENT: DescriptorFlags
[src]
pub const PRESENT: DescriptorFlags
[src]Must be set for any segment, causes a segment not present exception if not set.
pub const AVAILABLE: DescriptorFlags
[src]
pub const AVAILABLE: DescriptorFlags
[src]Available for use by the Operating System
pub const LONG_MODE: DescriptorFlags
[src]
pub const LONG_MODE: DescriptorFlags
[src]Must be set for 64-bit code segments, unset otherwise.
pub const DEFAULT_SIZE: DescriptorFlags
[src]
pub const DEFAULT_SIZE: DescriptorFlags
[src]Use 32-bit (as opposed to 16-bit) operands. If LONG_MODE
is set,
this must be unset. In 64-bit mode, ignored for data segments.
pub const GRANULARITY: DescriptorFlags
[src]
pub const GRANULARITY: DescriptorFlags
[src]Limit field is scaled by 4096 bytes. In 64-bit mode, ignored for all segments.
pub const LIMIT_0_15: DescriptorFlags
[src]
pub const LIMIT_0_15: DescriptorFlags
[src]Bits 0..=15
of the limit field (ignored in 64-bit mode)
pub const LIMIT_16_19: DescriptorFlags
[src]
pub const LIMIT_16_19: DescriptorFlags
[src]Bits 16..=19
of the limit field (ignored in 64-bit mode)
pub const BASE_0_23: DescriptorFlags
[src]
pub const BASE_0_23: DescriptorFlags
[src]Bits 0..=23
of the base field (ignored in 64-bit mode, except for fs and gs)
pub const BASE_24_31: DescriptorFlags
[src]
pub const BASE_24_31: DescriptorFlags
[src]Bits 24..=31
of the base field (ignored in 64-bit mode, except for fs and gs)
pub const fn empty() -> DescriptorFlags
[src]
pub const fn empty() -> DescriptorFlags
[src]Returns an empty set of flags
pub const fn all() -> DescriptorFlags
[src]
pub const fn all() -> DescriptorFlags
[src]Returns the set containing all flags.
pub fn from_bits(bits: u64) -> Option<DescriptorFlags>
[src]
pub fn from_bits(bits: u64) -> Option<DescriptorFlags>
[src]Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u64) -> DescriptorFlags
[src]
pub const fn from_bits_truncate(bits: u64) -> DescriptorFlags
[src]Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u64) -> DescriptorFlags
[src]
pub const unsafe fn from_bits_unchecked(bits: u64) -> DescriptorFlags
[src]Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
pub const fn intersects(&self, other: DescriptorFlags) -> bool
[src]
pub const fn intersects(&self, other: DescriptorFlags) -> bool
[src]Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: DescriptorFlags) -> bool
[src]
pub const fn contains(&self, other: DescriptorFlags) -> bool
[src]Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: DescriptorFlags)
[src]
pub fn insert(&mut self, other: DescriptorFlags)
[src]Inserts the specified flags in-place.
pub fn remove(&mut self, other: DescriptorFlags)
[src]
pub fn remove(&mut self, other: DescriptorFlags)
[src]Removes the specified flags in-place.
pub fn toggle(&mut self, other: DescriptorFlags)
[src]
pub fn toggle(&mut self, other: DescriptorFlags)
[src]Toggles the specified flags in-place.
pub fn set(&mut self, other: DescriptorFlags, value: bool)
[src]
pub fn set(&mut self, other: DescriptorFlags, value: bool)
[src]Inserts or removes the specified flags depending on the passed value.
impl DescriptorFlags
[src]
impl DescriptorFlags
[src]The following constants define default values for common GDT entries. They
are all “flat” segments, meaning they can access the entire address space.
These values all set WRITABLE
and
ACCESSED
. They also match the values loaded
by the syscall
/sysret
and sysenter
/sysexit
instructions.
In short, these values disable segmentation, permission checks, and access tracking at the GDT level. Kernels using these values should use paging to implement this functionality.
pub const KERNEL_DATA: Self
[src]
pub const KERNEL_DATA: Self
[src]A kernel data segment (64-bit or flat 32-bit)
pub const KERNEL_CODE32: Self
[src]
pub const KERNEL_CODE32: Self
[src]A flat 32-bit kernel code segment
pub const KERNEL_CODE64: Self
[src]
pub const KERNEL_CODE64: Self
[src]A 64-bit kernel code segment
pub const USER_CODE32: Self
[src]
pub const USER_CODE32: Self
[src]A flat 32-bit user code segment
pub const USER_CODE64: Self
[src]
pub const USER_CODE64: Self
[src]A 64-bit user code segment
Trait Implementations
impl Binary for DescriptorFlags
[src]
impl Binary for DescriptorFlags
[src]impl BitAnd<DescriptorFlags> for DescriptorFlags
[src]
impl BitAnd<DescriptorFlags> for DescriptorFlags
[src]fn bitand(self, other: DescriptorFlags) -> DescriptorFlags
[src]
fn bitand(self, other: DescriptorFlags) -> DescriptorFlags
[src]Returns the intersection between the two sets of flags.
type Output = DescriptorFlags
type Output = DescriptorFlags
The resulting type after applying the &
operator.
impl BitAndAssign<DescriptorFlags> for DescriptorFlags
[src]
impl BitAndAssign<DescriptorFlags> for DescriptorFlags
[src]fn bitand_assign(&mut self, other: DescriptorFlags)
[src]
fn bitand_assign(&mut self, other: DescriptorFlags)
[src]Disables all flags disabled in the set.
impl BitOr<DescriptorFlags> for DescriptorFlags
[src]
impl BitOr<DescriptorFlags> for DescriptorFlags
[src]fn bitor(self, other: DescriptorFlags) -> DescriptorFlags
[src]
fn bitor(self, other: DescriptorFlags) -> DescriptorFlags
[src]Returns the union of the two sets of flags.
type Output = DescriptorFlags
type Output = DescriptorFlags
The resulting type after applying the |
operator.
impl BitOrAssign<DescriptorFlags> for DescriptorFlags
[src]
impl BitOrAssign<DescriptorFlags> for DescriptorFlags
[src]fn bitor_assign(&mut self, other: DescriptorFlags)
[src]
fn bitor_assign(&mut self, other: DescriptorFlags)
[src]Adds the set of flags.
impl BitXor<DescriptorFlags> for DescriptorFlags
[src]
impl BitXor<DescriptorFlags> for DescriptorFlags
[src]fn bitxor(self, other: DescriptorFlags) -> DescriptorFlags
[src]
fn bitxor(self, other: DescriptorFlags) -> DescriptorFlags
[src]Returns the left flags, but with all the right flags toggled.
type Output = DescriptorFlags
type Output = DescriptorFlags
The resulting type after applying the ^
operator.
impl BitXorAssign<DescriptorFlags> for DescriptorFlags
[src]
impl BitXorAssign<DescriptorFlags> for DescriptorFlags
[src]fn bitxor_assign(&mut self, other: DescriptorFlags)
[src]
fn bitxor_assign(&mut self, other: DescriptorFlags)
[src]Toggles the set of flags.
impl Clone for DescriptorFlags
[src]
impl Clone for DescriptorFlags
[src]fn clone(&self) -> DescriptorFlags
[src]
fn clone(&self) -> DescriptorFlags
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for DescriptorFlags
[src]
impl Debug for DescriptorFlags
[src]impl Extend<DescriptorFlags> for DescriptorFlags
[src]
impl Extend<DescriptorFlags> for DescriptorFlags
[src]fn extend<T: IntoIterator<Item = DescriptorFlags>>(&mut self, iterator: T)
[src]
fn extend<T: IntoIterator<Item = DescriptorFlags>>(&mut self, iterator: T)
[src]Extends a collection with the contents of an iterator. Read more
fn extend_one(&mut self, item: A)
[src]
fn extend_one(&mut self, item: A)
[src]extend_one
)Extends a collection with exactly one element.
fn extend_reserve(&mut self, additional: usize)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl FromIterator<DescriptorFlags> for DescriptorFlags
[src]
impl FromIterator<DescriptorFlags> for DescriptorFlags
[src]fn from_iter<T: IntoIterator<Item = DescriptorFlags>>(
iterator: T
) -> DescriptorFlags
[src]
fn from_iter<T: IntoIterator<Item = DescriptorFlags>>(
iterator: T
) -> DescriptorFlags
[src]Creates a value from an iterator. Read more
impl Hash for DescriptorFlags
[src]
impl Hash for DescriptorFlags
[src]impl LowerHex for DescriptorFlags
[src]
impl LowerHex for DescriptorFlags
[src]impl Not for DescriptorFlags
[src]
impl Not for DescriptorFlags
[src]fn not(self) -> DescriptorFlags
[src]
fn not(self) -> DescriptorFlags
[src]Returns the complement of this set of flags.
type Output = DescriptorFlags
type Output = DescriptorFlags
The resulting type after applying the !
operator.
impl Octal for DescriptorFlags
[src]
impl Octal for DescriptorFlags
[src]impl Ord for DescriptorFlags
[src]
impl Ord for DescriptorFlags
[src]impl PartialEq<DescriptorFlags> for DescriptorFlags
[src]
impl PartialEq<DescriptorFlags> for DescriptorFlags
[src]fn eq(&self, other: &DescriptorFlags) -> bool
[src]
fn eq(&self, other: &DescriptorFlags) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &DescriptorFlags) -> bool
[src]
fn ne(&self, other: &DescriptorFlags) -> bool
[src]This method tests for !=
.
impl PartialOrd<DescriptorFlags> for DescriptorFlags
[src]
impl PartialOrd<DescriptorFlags> for DescriptorFlags
[src]fn partial_cmp(&self, other: &DescriptorFlags) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &DescriptorFlags) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Sub<DescriptorFlags> for DescriptorFlags
[src]
impl Sub<DescriptorFlags> for DescriptorFlags
[src]fn sub(self, other: DescriptorFlags) -> DescriptorFlags
[src]
fn sub(self, other: DescriptorFlags) -> DescriptorFlags
[src]Returns the set difference of the two sets of flags.
type Output = DescriptorFlags
type Output = DescriptorFlags
The resulting type after applying the -
operator.
impl SubAssign<DescriptorFlags> for DescriptorFlags
[src]
impl SubAssign<DescriptorFlags> for DescriptorFlags
[src]fn sub_assign(&mut self, other: DescriptorFlags)
[src]
fn sub_assign(&mut self, other: DescriptorFlags)
[src]Disables all flags enabled in the set.
impl UpperHex for DescriptorFlags
[src]
impl UpperHex for DescriptorFlags
[src]