raw_cpuid

Struct SgxInfo

source
pub struct SgxInfo<R: CpuIdReader> { /* private fields */ }
Expand description

Intel SGX Capability Enumeration Leaf (LEAF=0x12).

Two sub-leafs: (EAX = 12H, ECX = 0 and ECX = 1)

§Platforms

❌ AMD ✅ Intel

Implementations§

source§

impl<F: CpuIdReader> SgxInfo<F>

source

pub fn has_sgx1(&self) -> bool

Has SGX1 support.

source

pub fn has_sgx2(&self) -> bool

Has SGX2 support.

source

pub fn has_enclv_leaves_einvirtchild_edecvirtchild_esetcontext(&self) -> bool

Supports ENCLV instruction leaves EINCVIRTCHILD, EDECVIRTCHILD, and ESETCONTEXT.

source

pub fn has_encls_leaves_etrackc_erdinfo_eldbc_elduc(&self) -> bool

Supports ENCLS instruction leaves ETRACKC, ERDINFO, ELDBC, and ELDUC.

source

pub fn miscselect(&self) -> u32

Bit vector of supported extended SGX features.

source

pub fn max_enclave_size_non_64bit(&self) -> u8

The maximum supported enclave size in non-64-bit mode is 2^retval.

source

pub fn max_enclave_size_64bit(&self) -> u8

The maximum supported enclave size in 64-bit mode is 2^retval.

source

pub fn secs_attributes(&self) -> (u64, u64)

Reports the valid bits of SECS.ATTRIBUTES[127:0] that software can set with ECREATE.

source

pub fn iter(&self) -> SgxSectionIter<F>

Iterator over SGX sub-leafs.

Trait Implementations§

source§

impl<R: CpuIdReader> Debug for SgxInfo<R>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<R> Freeze for SgxInfo<R>
where R: Freeze,

§

impl<R> RefUnwindSafe for SgxInfo<R>
where R: RefUnwindSafe,

§

impl<R> Send for SgxInfo<R>
where R: Send,

§

impl<R> Sync for SgxInfo<R>
where R: Sync,

§

impl<R> Unpin for SgxInfo<R>
where R: Unpin,

§

impl<R> UnwindSafe for SgxInfo<R>
where R: UnwindSafe,

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> 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, 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.