Vol. 3D 41-1
SGX INSTRUCTION REFERENCES
CHAPTER 41
SGX INSTRUCTION REFERENCES
This chapter describes the supervisor and user level instructions provided by Intel
®
Software Guard Extensions
(Intel
®
SGX). In general, a various functionality is encoded as leaf functions within the ENCLS (supervisor) and
ENCLU (user) instruction mnemonics. Different leaf functions are encoded by specifying an input value in the EAX
register of the respective instruction mnemonic.
41.1
INTEL® SGX INSTRUCTION SYNTAX AND OPERATION
ENCLS and ENCLU instruction mnemonics for all leaf functions are covered in this section.
For all instructions, the value of CS.D is ignored; addresses and operands are 64 bits in 64-bit mode and are other-
wise 32 bits. Aside from EAX specifying the leaf number as input, each instruction leaf may require all or some
subset of the RBX/RCX/RDX as input parameters. Some leaf functions may return data or status information in one
or more of the general purpose registers.
41.1.1
ENCLS Register Usage Summary
Table 41-1 summarizes the implicit register usage of supervisor mode enclave instructions.
41.1.2
ENCLU Register Usage Summary
Table 41-2 Summarized the implicit register usage of user mode enclave instructions.
Table 41-1. Register Usage of Privileged Enclave Instruction Leaf Functions
Instr. Leaf
EAX
RBX
RCX
RDX
ECREATE
00H (In)
PAGEINFO (In, EA)
EPCPAGE (In, EA)
EADD
01H (In)
PAGEINFO (In, EA)
EPCPAGE (In, EA)
EINIT
02H (In)
SIGSTRUCT (In, EA)
SECS (In, EA)
EINITTOKEN (In, EA)
EREMOVE
03H (In)
EPCPAGE (In, EA)
EDBGRD
04H (In)
Result Data (Out)
EPCPAGE (In, EA)
EDBGWR
05H (In)
Source Data (In)
EPCPAGE (In, EA)
EEXTEND
06H (In)
SECS (In, EA)
EPCPAGE (In, EA)
ELDB
07H (In)
PAGEINFO (In, EA)
EPCPAGE (In, EA)
VERSION (In, EA)
ELDU
08H (In)
PAGEINFO (In, EA)
EPCPAGE (In, EA)
VERSION (In, EA)
EBLOCK
09H (In)
EPCPAGE (In, EA)
EPA
0AH (In)
PT_VA (In)
EPCPAGE (In, EA)
EWB
0BH (In)
PAGEINFO (In, EA)
EPCPAGE (In, EA)
VERSION (In, EA)
ETRACK
0CH (In)
EPCPAGE (In, EA)
EAUG
0DH (In)
PAGEINFO (In, EA)
EPCPAGE (In, EA)
LINADDR
EMODPR
0EH (In)
SECINFO (In, EA)
EPCPAGE (In, EA)
EMODT
0FH (In)
SECINFO (In, EA)
EPCPAGE (In, EA)
EA: Effective Address