Skip to main content

McgCap

Struct McgCap 

Source
pub struct McgCap(/* private fields */);
Expand description

X86X_MSR_MCG_CAP (MSR 0x179): global machine-check capability register.

Layout per the Intel SDM Volume 3B, Section 18.3.1.1 / Figure 18-2 (doc 325384-092).

Implementations§

Source§

impl McgCap

Source

pub const fn new() -> Self

Creates a new default initialized bitfield.

Source

pub const fn from_bits(bits: u64) -> Self

Convert from bits.

Source

pub const fn into_bits(self) -> u64

Convert into bits.

Source

pub const fn count(&self) -> u8

Number of hardware unit error-reporting banks.

Bits: 0..8

Source

pub const fn with_count_checked(self, value: u8) -> Result<Self, ()>

Number of hardware unit error-reporting banks.

Bits: 0..8

Source

pub const fn with_count(self, value: u8) -> Self

Number of hardware unit error-reporting banks.

Bits: 0..8

Source

pub const fn set_count(&mut self, value: u8)

Number of hardware unit error-reporting banks.

Bits: 0..8

Source

pub const fn set_count_checked(&mut self, value: u8) -> Result<(), ()>

Number of hardware unit error-reporting banks.

Bits: 0..8

Source

pub const fn ctl_p(&self) -> bool

MCG_CTL_P: IA32_MCG_CTL MSR is present.

Bits: 8..9

Source

pub const fn with_ctl_p_checked(self, value: bool) -> Result<Self, ()>

MCG_CTL_P: IA32_MCG_CTL MSR is present.

Bits: 8..9

Source

pub const fn with_ctl_p(self, value: bool) -> Self

MCG_CTL_P: IA32_MCG_CTL MSR is present.

Bits: 8..9

Source

pub const fn set_ctl_p(&mut self, value: bool)

MCG_CTL_P: IA32_MCG_CTL MSR is present.

Bits: 8..9

Source

pub const fn set_ctl_p_checked(&mut self, value: bool) -> Result<(), ()>

MCG_CTL_P: IA32_MCG_CTL MSR is present.

Bits: 8..9

Source

pub const fn ext_p(&self) -> bool

MCG_EXT_P: extended machine-check state MSRs (at 0x180) are present.

Bits: 9..10

Source

pub const fn with_ext_p_checked(self, value: bool) -> Result<Self, ()>

MCG_EXT_P: extended machine-check state MSRs (at 0x180) are present.

Bits: 9..10

Source

pub const fn with_ext_p(self, value: bool) -> Self

MCG_EXT_P: extended machine-check state MSRs (at 0x180) are present.

Bits: 9..10

Source

pub const fn set_ext_p(&mut self, value: bool)

MCG_EXT_P: extended machine-check state MSRs (at 0x180) are present.

Bits: 9..10

Source

pub const fn set_ext_p_checked(&mut self, value: bool) -> Result<(), ()>

MCG_EXT_P: extended machine-check state MSRs (at 0x180) are present.

Bits: 9..10

Source

pub const fn cmci_p(&self) -> bool

MCG_CMCI_P: corrected MC error counting/signaling extension present.

Bits: 10..11

Source

pub const fn with_cmci_p_checked(self, value: bool) -> Result<Self, ()>

MCG_CMCI_P: corrected MC error counting/signaling extension present.

Bits: 10..11

Source

pub const fn with_cmci_p(self, value: bool) -> Self

MCG_CMCI_P: corrected MC error counting/signaling extension present.

Bits: 10..11

Source

pub const fn set_cmci_p(&mut self, value: bool)

MCG_CMCI_P: corrected MC error counting/signaling extension present.

Bits: 10..11

Source

pub const fn set_cmci_p_checked(&mut self, value: bool) -> Result<(), ()>

MCG_CMCI_P: corrected MC error counting/signaling extension present.

Bits: 10..11

Source

pub const fn tes_p(&self) -> bool

MCG_TES_P: threshold-based error status present.

Bits: 11..12

Source

pub const fn with_tes_p_checked(self, value: bool) -> Result<Self, ()>

MCG_TES_P: threshold-based error status present.

Bits: 11..12

Source

pub const fn with_tes_p(self, value: bool) -> Self

MCG_TES_P: threshold-based error status present.

Bits: 11..12

Source

pub const fn set_tes_p(&mut self, value: bool)

MCG_TES_P: threshold-based error status present.

Bits: 11..12

Source

pub const fn set_tes_p_checked(&mut self, value: bool) -> Result<(), ()>

MCG_TES_P: threshold-based error status present.

Bits: 11..12

Source

pub const fn seam_nr_p(&self) -> bool

MCG_SEAM_NR_P: IA32_MCG_STATUS.SEAM_NR (bit 12) is supported.

Bits: 12..13

Source

pub const fn with_seam_nr_p_checked(self, value: bool) -> Result<Self, ()>

MCG_SEAM_NR_P: IA32_MCG_STATUS.SEAM_NR (bit 12) is supported.

Bits: 12..13

Source

pub const fn with_seam_nr_p(self, value: bool) -> Self

MCG_SEAM_NR_P: IA32_MCG_STATUS.SEAM_NR (bit 12) is supported.

Bits: 12..13

Source

pub const fn set_seam_nr_p(&mut self, value: bool)

MCG_SEAM_NR_P: IA32_MCG_STATUS.SEAM_NR (bit 12) is supported.

Bits: 12..13

Source

pub const fn set_seam_nr_p_checked(&mut self, value: bool) -> Result<(), ()>

MCG_SEAM_NR_P: IA32_MCG_STATUS.SEAM_NR (bit 12) is supported.

Bits: 12..13

Source

pub const fn ext_cnt(&self) -> u8

MCG_EXT_CNT: number of extended machine-check state registers (meaningful only when ext_p is set).

Bits: 16..24

Source

pub const fn with_ext_cnt_checked(self, value: u8) -> Result<Self, ()>

MCG_EXT_CNT: number of extended machine-check state registers (meaningful only when ext_p is set).

Bits: 16..24

Source

pub const fn with_ext_cnt(self, value: u8) -> Self

MCG_EXT_CNT: number of extended machine-check state registers (meaningful only when ext_p is set).

Bits: 16..24

Source

pub const fn set_ext_cnt(&mut self, value: u8)

MCG_EXT_CNT: number of extended machine-check state registers (meaningful only when ext_p is set).

Bits: 16..24

Source

pub const fn set_ext_cnt_checked(&mut self, value: u8) -> Result<(), ()>

MCG_EXT_CNT: number of extended machine-check state registers (meaningful only when ext_p is set).

Bits: 16..24

Source

pub const fn ser_p(&self) -> bool

MCG_SER_P: software error recovery is supported.

Bits: 24..25

Source

pub const fn with_ser_p_checked(self, value: bool) -> Result<Self, ()>

MCG_SER_P: software error recovery is supported.

Bits: 24..25

Source

pub const fn with_ser_p(self, value: bool) -> Self

MCG_SER_P: software error recovery is supported.

Bits: 24..25

Source

pub const fn set_ser_p(&mut self, value: bool)

MCG_SER_P: software error recovery is supported.

Bits: 24..25

Source

pub const fn set_ser_p_checked(&mut self, value: bool) -> Result<(), ()>

MCG_SER_P: software error recovery is supported.

Bits: 24..25

Source

pub const fn emc_p(&self) -> bool

MCG_EMC_P: enhanced machine-check capability (firmware-first signaling) is supported.

Bits: 25..26

Source

pub const fn with_emc_p_checked(self, value: bool) -> Result<Self, ()>

MCG_EMC_P: enhanced machine-check capability (firmware-first signaling) is supported.

Bits: 25..26

Source

pub const fn with_emc_p(self, value: bool) -> Self

MCG_EMC_P: enhanced machine-check capability (firmware-first signaling) is supported.

Bits: 25..26

Source

pub const fn set_emc_p(&mut self, value: bool)

MCG_EMC_P: enhanced machine-check capability (firmware-first signaling) is supported.

Bits: 25..26

Source

pub const fn set_emc_p_checked(&mut self, value: bool) -> Result<(), ()>

MCG_EMC_P: enhanced machine-check capability (firmware-first signaling) is supported.

Bits: 25..26

Source

pub const fn elog_p(&self) -> bool

MCG_ELOG_P: extended error logging is supported.

Bits: 26..27

Source

pub const fn with_elog_p_checked(self, value: bool) -> Result<Self, ()>

MCG_ELOG_P: extended error logging is supported.

Bits: 26..27

Source

pub const fn with_elog_p(self, value: bool) -> Self

MCG_ELOG_P: extended error logging is supported.

Bits: 26..27

Source

pub const fn set_elog_p(&mut self, value: bool)

MCG_ELOG_P: extended error logging is supported.

Bits: 26..27

Source

pub const fn set_elog_p_checked(&mut self, value: bool) -> Result<(), ()>

MCG_ELOG_P: extended error logging is supported.

Bits: 26..27

Source

pub const fn lmce_p(&self) -> bool

MCG_LMCE_P: local machine-check exception is supported.

Bits: 27..28

Source

pub const fn with_lmce_p_checked(self, value: bool) -> Result<Self, ()>

MCG_LMCE_P: local machine-check exception is supported.

Bits: 27..28

Source

pub const fn with_lmce_p(self, value: bool) -> Self

MCG_LMCE_P: local machine-check exception is supported.

Bits: 27..28

Source

pub const fn set_lmce_p(&mut self, value: bool)

MCG_LMCE_P: local machine-check exception is supported.

Bits: 27..28

Source

pub const fn set_lmce_p_checked(&mut self, value: bool) -> Result<(), ()>

MCG_LMCE_P: local machine-check exception is supported.

Bits: 27..28

Trait Implementations§

Source§

impl Clone for McgCap

Source§

fn clone(&self) -> McgCap

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for McgCap

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for McgCap

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<McgCap> for u64

Source§

fn from(v: McgCap) -> u64

Converts to this type from the input type.
Source§

impl From<u64> for McgCap

Source§

fn from(v: u64) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for McgCap

Source§

fn eq(&self, other: &McgCap) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for McgCap

Source§

impl Eq for McgCap

Source§

impl StructuralPartialEq for McgCap

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.