Skip to content

Commit

Permalink
Merge pull request #59 from jiazhang0/master
Browse files Browse the repository at this point in the history
test-sgx: Support to show the status of SGX Launch Control
  • Loading branch information
ayeks authored Apr 12, 2019
2 parents 7c4bb49 + 3ed97aa commit 57f2211
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test-sgx.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ int main(int argc, char **argv)
//CPUID.(EAX=07H, ECX=0H):EBX.SGX = 1,
printf("sgx available: %d\n", (ebx >> 2) & 0x1);

//CPUID.(EAX=07H, ECX=0H):ECX.SGX_LC = 1
printf("sgx launch control: %d\n", (ecx >> 30) & 0x01);

/* SGX has to be enabled in MSR.IA32_Feature_Control.SGX_Enable
check with msr-tools: rdmsr -ax 0x3a
SGX_Enable is Bit 18
Expand Down

0 comments on commit 57f2211

Please sign in to comment.