Commit 97e6e1d4 authored by Stefanie Dukovac's avatar Stefanie Dukovac
Browse files

Update README.txt

parent 314743fb
# SGX Sample CMake
This repo contains a CMakeLists.txt for the [SampleEnclave](https://github.com/intel/linux-sgx/tree/master/SampleCode/SampleEnclave) code found in the [Linux Intel SGX SDK](https://github.com/intel/linux-sgx).
------------------------ ------------------------
Purpose of SampleEnclave Purpose of SampleEnclave
------------------------ ------------------------
...@@ -12,54 +16,57 @@ How to Build/Execute the Sample Code ...@@ -12,54 +16,57 @@ How to Build/Execute the Sample Code
------------------------------------ ------------------------------------
1. Install Intel(R) SGX SDK for Linux* OS 1. Install Intel(R) SGX SDK for Linux* OS
2. Make sure your environment is set: 2. Make sure your environment is set:
$ source ${sgx-sdk-install-path}/environment
3. $ mkdir build && cd build && cmake .. $ source ${sgx-sdk-install-path}/environment
3. Create the build directory and run cmake:
$ mkdir build && cd build && cmake ..
4. Build the project with the prepared Makefile: 4. Build the project with the prepared Makefile:
a. Hardware Mode, Debug build: a. Hardware Mode, Debug build:
$ make $ make
b. Hardware Mode, Pre-release build: b. Hardware Mode, Pre-release build:
$ make SGX_PRERELEASE=1 SGX_DEBUG=0 $ make SGX_PRERELEASE=1 SGX_DEBUG=0
c. Hardware Mode, Release build: c. Hardware Mode, Release build:
$ make SGX_DEBUG=0 $ make SGX_DEBUG=0
d. Simulation Mode, Debug build: d. Simulation Mode, Debug build:
$ make SGX_MODE=SIM $ make SGX_MODE=SIM
e. Simulation Mode, Pre-release build: e. Simulation Mode, Pre-release build:
$ make SGX_MODE=SIM SGX_PRERELEASE=1 SGX_DEBUG=0 $ make SGX_MODE=SIM SGX_PRERELEASE=1 SGX_DEBUG=0
f. Simulation Mode, Release build: f. Simulation Mode, Release build:
$ make SGX_MODE=SIM SGX_DEBUG=0 $ make SGX_MODE=SIM SGX_DEBUG=0
5. Execute the binary directly: 5. Execute the binary directly:
$ ./app
6. Remember to "make clean" before switching build mode $ ./app
6. Remember to ```make clean``` before switching build mode
------------------------------------------ ------------------------------------------
Explanation about Configuration Parameters Explanation about Configuration Parameters
------------------------------------------ ------------------------------------------
TCSMaxNum, TCSNum, TCSMinPool * TCSMaxNum, TCSNum, TCSMinPool
These three parameters will determine whether a thread will be created These three parameters will determine whether a thread will be created dynamically when there is no available thread to do the work.
dynamically when there is no available thread to do the work.
StackMaxSize, StackMinSize * StackMaxSize, StackMinSize
For a dynamically created thread, StackMinSize is the amount of stack available For a dynamically created thread, StackMinSize is the amount of stack available once the thread is created and StackMaxSize is the total amount of stack that thread can use. The gap between StackMinSize and StackMaxSize is the stack dynamically expanded as necessary at runtime.
once the thread is created and StackMaxSize is the total amount of stack that
thread can use. The gap between StackMinSize and StackMaxSize is the stack
dynamically expanded as necessary at runtime.
For a static thread, only StackMaxSize is relevant which specifies the total For a static thread, only StackMaxSize is relevant which specifies the total amount of stack available to the thread.
amount of stack available to the thread.
HeapMaxSize, HeapInitSize, HeapMinSize * HeapMaxSize, HeapInitSize, HeapMinSize
HeapMinSize is the amount of heap available once the enclave is initialized. HeapMinSize is the amount of heap available once the enclave is initialized.
HeapMaxSize is the total amount of heap an enclave can use. The gap between HeapMaxSize is the total amount of heap an enclave can use. The gap between HeapMinSize and HeapMaxSize is the heap dynamically expanded as necessary at runtime.
HeapMinSize and HeapMaxSize is the heap dynamically expanded as necessary
at runtime.
HeapInitSize is here for compatibility. HeapInitSize is here for compatibility.
------------------------------------------------- -------------------------------------------------
Sample configuration files for the Sample Enclave Sample configuration files for the Sample Enclave
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment