background image

41-92 Vol. 3D

SGX INSTRUCTION REFERENCES

EMODPE—Extend an EPC Page Permissions  

Instruction Operand Encoding

Description

This leaf function extends the access rights associated with an existing EPC page in the running enclave. THE RWX 
bits of the SECINFO parameter are treated as a permissions mask; supplying a value that does not extend the page 
permissions will have no effect. This instruction leaf can only be executed when inside the enclave. 
RBX contains the effective address of a SECINFO structure while RCX contains the effective address of an EPC page. 
The table below provides additional information on the memory parameter of the EMODPE leaf function.

EMODPE Memory Parameter Semantics

The instruction faults if any of the following: 

EMODPE Faulting Conditions

Concurrency Restrictions

Opcode/

Instruction

Op/En

64/32 

bit Mode 

Support

CPUID 

Feature 

Flag

Description

 EAX = 06H

IR

V/V

SGX2

This leaf function extends the access rights of an existing EPC 

page.

ENCLU[EMODPE]

Op/En

EAX

RBX

RCX

IR

EMODPE (In)

Address of a SECINFO (In)

Address of the destination EPC page (In)

SECINFO

EPCPAGE

Read access permitted by Non 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.

RBX does not contain an effective address in an EPC page in the running enclave.

The EPC page is not valid.

RCX does not contain an effective address of an EPC page in the running enclave.

SECINFO contains an invalid request.

Table 41-60.  Concurrency Restrictions of EMODPE with Other Intel® SGX Operations 1 of 2

Operation

EEXIT

EADD

EBLOCK

ECRE

ATE

EDBGRD/

WR

EENTER/

ERESUME

EEXTEND

EGETKEY

EINIT

ELDB/ELDU

EP

A

Param TCS SSA SECS Targ SECS Targ SECS SECS

Targ SECS TCS SSA SECS Targ SECS Param SECS SECS Targ VA SECS VA

EMODPE

Targ

Y

Y

Y

Y

SECIN

FO

U

Y

U

U

Table 41-61.  Concurrency Restrictions of EMODPE 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 SEC

S

Targ SEC

S

Targ SECI

NFO

SECS Targ SR

C

SECI

NFO

EMODP

E

Targ

Y

N

Y

N

N

N

Y

Y

Y

SECIN

FO

U

Y

Y

Y

Y

Y

Y