-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add EDMM support from https://github.com/mingweishih/openenclave/tree…
- Loading branch information
1 parent
7b16408
commit 591cb80
Showing
33 changed files
with
4,933 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Copyright (c) Open Enclave SDK contributors. | ||
// Licensed under the MIT License. | ||
|
||
#include "asmdefs.h" | ||
#include "asmcommon.inc" | ||
|
||
//============================================================================== | ||
// This file implements the necessary wrappers of Intel SGX primitives required | ||
// by the Enclave Memory Manager (emm) library that supports the Enclave Dynamic | ||
// Memory Management (EDMM) feature on SGX2 CPUs. | ||
//============================================================================== | ||
|
||
.globl do_eaccept | ||
.type do_eaccept, @function | ||
do_eaccept: | ||
.cfi_startproc | ||
|
||
push %rbx | ||
push %rcx | ||
movq %rdi, %rbx | ||
movq %rsi, %rcx | ||
|
||
// Execute EACCEPT. | ||
movq $ENCLU_EACCEPT, %rax | ||
ENCLU | ||
|
||
pop %rcx | ||
pop %rbx | ||
|
||
ret | ||
.cfi_endproc | ||
|
||
.globl do_eacceptcopy | ||
.type do_eacceptcopy, @function | ||
do_eacceptcopy: | ||
.cfi_startproc | ||
push %rbx | ||
push %rcx | ||
movq %rdi, %rbx | ||
movq %rsi, %rcx | ||
|
||
// Execute EACCEPTCOPY | ||
movq $ENCLU_EACCEPTCOPY, %rax | ||
ENCLU | ||
|
||
pop %rcx | ||
pop %rbx | ||
|
||
ret | ||
.cfi_endproc | ||
|
||
.globl do_emodpe | ||
.type do_emodpe, @function | ||
do_emodpe: | ||
.cfi_startproc | ||
push %rbx | ||
push %rcx | ||
movq %rdi, %rbx | ||
movq %rsi, %rcx | ||
|
||
// Execute EMODPE | ||
movq $ENCLU_EMODPE, %rax | ||
ENCLU | ||
|
||
pop %rcx | ||
pop %rbx | ||
|
||
ret | ||
.cfi_endproc |
Oops, something went wrong.