41-36 Vol. 3D
SGX INSTRUCTION REFERENCES
Concurrency Restrictions
Operation
Temp Variables in EINIT Operational Flow
(* make sure SIGSTRUCT and SECS are aligned *)
IF ( (DS:RBX is not 4KByte Aligned) or (DS:RCX is not 4KByte Aligned) )
THEN #GP(0); FI;
(* make sure the EINITTOKEN is aligned *)
IF (DS:RDX is not 512Byte Aligned)
THEN #GP(0); FI;
(* make sure the SECS is inside the EPC *)
IF (DS:RCX does not resolve within an EPC)
THEN #PF(DS:RCX); FI;
TMP_SIG[14463:0] DS:RBX[14463:0]; // 1808 bytes
TMP_TOKEN[2423:0] DS:RDX[2423:0]; // 304 bytes
(* Verify SIGSTRUCT Header. *)
IF ( (TMP_SIG.HEADER ≠ 06000000E10000000000010000000000h) or
((TMP_SIG.VENDOR ≠ 0) and (TMP_SIG.VENDOR ≠ 00008086h) ) or
(TMP_SIG HEADER2 ≠ 01010000600000006000000001000000h) or
Table 41-23. Concurrency Restrictions of EINIT with Other Intel® SGX Operations 1 of 2
Operation
EEXIT
EADD
EBLOCK
ECRE
ATE
EDBGRD/
WR
EENTER/
ERESUME
EEXTEND
EGETKEY
EINIT
ELDB/ELDU
EPA
Param TCS SSA SECS Targ SECS Targ SECS SECS
Targ SECS TCS SSA SECS Targ SECS Param SECS SECS Targ VA
SECS VA
EINIT
SECS
N
N
N
Y
Y
N
N
Y
N
N
N
N
N
N
Y
N
Table 41-24. Concurrency Restrictions of EINIT with Other Intel® SGX Operations 2 of 2
Operation
EREMOVE
EREPORT
ETRACK
EWB
EAUG
EMODPE
EMODPR
EMODT
EACCEPT
EACCEPTCOPY
Param Targ SECS Param SECS SECS
SRC VA SECS Targ SECS Targ SECI
NFO
Targ SECS Targ SECS Targ SECI
NFO
SECS Targ SR
C
SECI
NFO
EINIT
SECS
N
Y
N
Y
N
Y
N
N
N
N
N
N
Name
Type
Size
Description
TMP_SIG
SIGSTRUCT
1808Bytes Temp space for SIGSTRUCT.
TMP_TOKEN
EINITTOKEN
304Bytes
Temp space for EINITTOKEN.
TMP_MRENCLAVE
32Bytes
Temp
space for calculating MRENCLAVE.
TMP_MRSIGNER
32Bytes
Temp space for calculating MRSIGNER.
CONTROLLED_ATTRIBU
TES
ATTRIBUTES
16Bytes
Constant mask of all ATTRIBUTE bits that can only be set for authorized
enclaves.
TMP_KEYDEPENDENCIE
S
Buffer
224Bytes
Temp space for key derivation.
TMP_EINITTOKENKEY
16Bytes
Temp space for the derived EINITTOKEN Key.
TMP_SIG_PADDING
PKCS Padding
Buffer
352Bytes
The value of the top 352 bytes from the computation of Signature
3
modulo MRSIGNER.