Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
48 Views

How to get SGX memory size of the hardware in linux

Hi,

I can find if SGX is enabled or not from CPUID instruction.

I want to get SGX memory size in Linux. 

Please let me know how to find it.

Thanks,

Rajendra

0 Kudos
3 Replies
Highlighted
48 Views

I assume, you are referring to the SGX Memory available for use after the device bootup and SGX is enabled in BIOS.

You can check/print it in isgx_page_cache_init(.. ) the size param, which will be the  EPC Size available  for SGX Use.

Regards

Shivananda

0 Kudos
Highlighted
Beginner
48 Views

To get it though sgx_page_cache_init() , we should have SDK installed.

What if SDK is not installed and we need to check SGX memory?

Is there a way that, I can get it from CPUID instruction? , The way we are getting SGX enabled or not from CPUID instruction by passing 07H in EAX register.

0 Kudos
Highlighted
48 Views

CPUID leaf 12H sub-leaves 2 and higher report physical memory resources available for use with Intel SGX. These physical memory sections are typically configured by BIOS as Processor Reserved Memory, and available to the OS to manage as EPC. 

Pls refer to below programming guide for more info . Page 17

https://software.intel.com/sites/default/files/managed/48/88/329298-002.pdf

Regards

Shivananda

 

0 Kudos