Vol. 3D 41-69
SGX INSTRUCTION REFERENCES
EACCEPTCOPY—Initialize a Pending Page
Instruction Operand Encoding
Description
This leaf function copies the contents of an existing EPC page into an uninitialized EPC page (created by EAUG).
After initialization, the instruction may also modify the access rights associated with the destination EPC page. This
instruction leaf can only be executed when inside the enclave.
RBX contains the effective address of a SECINFO structure while RCX and RDX each contain the effective address
of an EPC page. The table below provides additional information on the memory parameter of the EACCEPTCOPY
leaf function.
EACCEPTCOPY Memory Parameter Semantics
The instruction faults if any of the following:
EACCEPTCOPY Faulting Conditions
The error codes are:
Opcode/
Instruction
Op/En
64/32
bit Mode
Support
CPUID
Feature
Flag
Description
EAX = 07H
IR
V/V
SGX2
This leaf function initializes a dynamically allocated EPC page
from another page in the EPC.
ENCLU[EACCEPTCOPY]
Op/En
EAX
RBX
RCX
RDX
IR
EACCEPTCOPY (In)
Return Error Code
(Out)
Address of a SECINFO (In)
Address of the destina-
tion EPC page (In)
Address of the
source EPC page (In)
SECINFO
EPCPAGE (Destination)
EPCPAGE (Source)
Read access permitted by Non Enclave
Read/Write access permitted by Enclave
Read access permitted by Enclave
The operands are not properly aligned.
If security attributes of the SECINFO page make the page inaccessible.
The EPC page is locked by another thread.
If security attributes of the source EPC page make the page inaccessible.
The EPC page is not valid.
RBX does not contain an effective address in an EPC page in the running enclave.
SECINFO contains an invalid request.
RCX/RDX does not contain an effective address of an EPC page in the running
enclave.
Table 41-49. EACCEPTCOPY Return Value in RAX
Error Code (see Table 41-3)
Description
No Error
EACCEPTCOPY successful
SGX_PAGE_ATTRIBUTES_MISMATCH
The attributes of the target EPC page do not match the expected values