41-12 Vol. 3D
SGX INSTRUCTION REFERENCES
Operation
Temp Variables in EADD Operational Flow
IF (DS:RBX is not 32Byte Aligned)
THEN #GP(0); FI;
IF (DS:RCX is not 4KByte Aligned)
THEN #GP(0); FI;
IF (DS:RCX does not resolve within an EPC)
THEN #PF(DS:RCX); FI;
TMP_SRCPGE DS:RBX.SRCPGE;
TMP_SECS DS:RBX.SECS;
TMP_SECINFO DS:RBX.SECINFO;
TMP_LINADDR DS:RBX.LINADDR;
IF (DS:TMP_SRCPGE is not 4KByte aligned or DS:TMP_SECS is not 4KByte aligned or
DS:TMP_SECINFO is not 64Byte aligned or TMP_LINADDR is not 4KByte aligned)
THEN #GP(0); FI;
IF (DS:TMP_SECS does not resolve within an EPC)
THEN #PF(DS:TMP_SECS); FI;
SCRATCH_SECINFO DS:TMP_SECINFO;
(* Check for mis-configured SECINFO flags*)
IF (SCRATCH_SECINFO reserved fields are not zero or
! (SCRATCH_SECINFO.FLAGS.PT is PT_REG or SCRATCH_SECINFO.FLAGS.PT is PT_TCS) )
THEN #GP(0); FI;
Table 41-6. Concurrency Restrictions of EADD with Other Intel® SGX Operations 2 of 2
Operation
EREMOVE
EREPORT
ETRACK
EWB
EAUG
EMODPE
EMODPR
EMODT
EACCEPT
EACCEPTCOPY
Param Targ SECS Para
m
SECS SECS
SRC VA SECS Targ SECS Targ SECI
NFO
Targ SEC
S
Targ SEC
S
Targ SECI
NFO
SECS Targ SR
C
SECI
NFO
EADD
Targ
N
N
N
N
N
N
N
N
SECS
N
Y
N
Y
N
Y
N
N
N
N
N
N
Name
Type
Size (bits)
Description
TMP_SRCPGE
Effective Address
32/64
Effective address of the source page.
TMP_SECS
Effective Address
32/64
Effective address of the SECS destination page.
TMP_SECINFO
Effective Address
32/64
Effective address of an SECINFO structure which contains security
attributes of the page to be added.
SCRATCH_SECINFO
SECINFO
512
Scratch storage for holding the contents of DS:TMP_SECINFO.
TMP_LINADDR
Unsigned Integer
64
Holds the linear address to be stored in the EPCM and used to
calculate TMP_ENCLAVEOFFSET.
TMP_ENCLAVEOFFSET
Enclave Offset
64
The page displacement from the enclave base address.
TMPUPDATEFIELD
SHA256 Buffer
512
Buffer used to hold data being added to TMP_SECS.MRENCLAVE.