README.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ------------------------
  2. Purpose of SampleEnclave
  3. ------------------------
  4. The project demonstrates several fundamental usages of Intel(R) Software Guard
  5. Extensions (Intel(R) SGX) SDK:
  6. - Initializing and destroying an enclave
  7. - Creating ECALLs or OCALLs
  8. - Calling trusted libraries inside the enclave
  9. ------------------------------------
  10. How to Build/Execute the Sample Code
  11. ------------------------------------
  12. 1. Install Intel(R) SGX SDK for Linux* OS
  13. 2. Make sure your environment is set:
  14. $ source ${sgx-sdk-install-path}/environment
  15. 3. Build the project with the prepared Makefile:
  16. a. Hardware Mode, Debug build:
  17. $ make
  18. b. Hardware Mode, Pre-release build:
  19. $ make SGX_PRERELEASE=1 SGX_DEBUG=0
  20. c. Hardware Mode, Release build:
  21. $ make SGX_DEBUG=0
  22. d. Simulation Mode, Debug build:
  23. $ make SGX_MODE=SIM
  24. e. Simulation Mode, Pre-release build:
  25. $ make SGX_MODE=SIM SGX_PRERELEASE=1 SGX_DEBUG=0
  26. f. Simulation Mode, Release build:
  27. $ make SGX_MODE=SIM SGX_DEBUG=0
  28. 4. Execute the binary directly:
  29. $ ./app
  30. 5. Remember to "make clean" before switching build mode
  31. ------------------------------------------
  32. Explanation about Configuration Parameters
  33. ------------------------------------------
  34. TCSMaxNum, TCSNum, TCSMinPool
  35. These three parameters will determine whether a thread will be created
  36. dynamically when there is no available thread to do the work.
  37. StackMaxSize, StackMinSize
  38. For a dynamically created thread, StackMinSize is the amount of stack available
  39. once the thread is created and StackMaxSize is the total amount of stack that
  40. thread can use. The gap between StackMinSize and StackMaxSize is the stack
  41. dynamically expanded as necessary at runtime.
  42. For a static thread, only StackMaxSize is relevant which specifies the total
  43. amount of stack available to the thread.
  44. HeapMaxSize, HeapInitSize, HeapMinSize
  45. HeapMinSize is the amount of heap available once the enclave is initialized.
  46. HeapMaxSize is the total amount of heap an enclave can use. The gap between
  47. HeapMinSize and HeapMaxSize is the heap dynamically expanded as necessary
  48. at runtime.
  49. HeapInitSize is here for compatibility.
  50. -------------------------------------------------
  51. Sample configuration files for the Sample Enclave
  52. -------------------------------------------------
  53. config.01.xml: There is no dynamic thread, no dynamic heap expansion.
  54. config.02.xml: There is no dynamic thread. But dynamic heap expansion can happen.
  55. config.03.xml: There are dynamic threads. For a dynamic thread, there's no stack expansion.
  56. config.04.xml: There are dynamic threads. For a dynamic thread, stack will expanded as necessary.