41-2 Vol. 3D
SGX INSTRUCTION REFERENCES
41.1.3
Information and Error Codes
Information and error codes are reported by various instruction leaf functions to show an abnormal termination of
the instruction or provide information which may be useful to the developer. Table 41-3 shows the various codes
and the instruction which generated the code. Details of the meaning of the code is provided in the individual
instruction.
Table 41-2. Register Usage of Unprivileged Enclave Instruction Leaf Functions
Instr. Leaf
EAX
RBX
RCX
RDX
EREPORT
00H (In)
TARGETINFO (In, EA)
REPORTDATA (In, EA)
OUTPUTDATA (In, EA)
EGETKEY
01H (In)
KEYREQUEST (In, EA)
KEY (In, EA)
EENTER
02H (In)
TCS (In, EA)
AEP (In, EA)
RBX.CSSA (Out)
Return (Out, EA)
ERESUME
03H (In)
TCS (In, EA)
AEP (In, EA)
EEXIT
04H (In)
Target (In, EA)
Current AEP (Out)
EACCEPT
05H (In)
SECINFO (In, EA)
EPCPAGE (In, EA)
EMODPE
06H (In)
SECINFO (In, EA)
EPCPAGE (In, EA)
EACCEPTCOPY
07H (In)
SECINFO (In, EA)
EPCPAGE (In, EA)
EPCPAGE (In, EA)
EA: Effective Address
Table 41-3. Error or Information Codes for IntelĀ® SGX Instructions
Name
Value
Returned By
No Error
0
SGX_INVALID_SIG_STRUCT
1
EINIT
SGX_INVALID_ATTRIBUTE
2
EINIT, EGETKEY
SGX_BLSTATE
3
EBLOCK
SGX_INVALID_MEASUREMENT
4
EINIT
SGX_NOTBLOCKABLE
5
EBLOCK
SGX_PG_INVLD
6
EBLOCK
SGX_LOCKFAIL
7
EBLOCK, EMODPR, EMODT
SGX_INVALID_SIGNATURE
8
EINIT
SGX_MAC_COMPARE_FAIL
9
ELDB, ELDU
SGX_PAGE_NOT_BLOCKED
10
EWB
SGX_NOT_TRACKED
11
EWB, EACCEPT
SGX_VA_SLOT_OCCUPIED
12
EWB
SGX_CHILD_PRESENT
13
EWB, EREMOVE
SGX_ENCLAVE_ACT
14
EREMOVE
SGX_ENTRYEPOCH_LOCKED
15
EBLOCK
SGX_INVALID_EINIT_TOKEN
16
EINIT
SGX_PREV_TRK_INCMPL
17
ETRACK
SGX_PG_IS_SECS
18
EBLOCK
SGX_PAGE_ATTRIBUTES_MISMATCH
19
EACCEPT, EACCEPTCOPY
SGX_PAGE_NOT_MODIFIABLE
20
EMODPR, EMODT
SGX_PAGE_NOT_DEBUGGABLE
21
EDEGRD, EDBGWR