Struct raw_cpuid::SgxInfo

source ·
pub struct SgxInfo { /* 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 SgxInfo

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

Iterator over SGX sub-leafs.

Trait Implementations§

source§

impl Debug for SgxInfo

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.