README.txt 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. Build the project with the prepared Makefile:
  14. a. Hardware Mode, Debug build:
  15. $ make
  16. b. Hardware Mode, Pre-release build:
  17. $ make SGX_PRERELEASE=1 SGX_DEBUG=0
  18. c. Hardware Mode, Release build:
  19. $ make SGX_DEBUG=0
  20. d. Simulation Mode, Debug build:
  21. $ make SGX_MODE=SIM
  22. e. Simulation Mode, Pre-release build:
  23. $ make SGX_MODE=SIM SGX_PRERELEASE=1 SGX_DEBUG=0
  24. f. Simulation Mode, Release build:
  25. $ make SGX_MODE=SIM SGX_DEBUG=0
  26. 3. Execute the binary directly:
  27. $ ./app
  28. 4. Remember to "make clean" before switching build mode
  29. ------------------------------------------
  30. Explanation about Configuration Parameters
  31. ------------------------------------------
  32. TCSMaxNum, TCSNum, TCSMinPool
  33. These three parameters will determine whether a thread will be created
  34. dynamically when there is no available thread to do the work.
  35. StackMaxSize, StackMinSize
  36. For a dynamically created thread, StackMinSize is the amount of stack available
  37. once the thread is created and StackMaxSize is the total amount of stack that
  38. thread can use. The gap between StackMinSize and StackMaxSize is the stack
  39. dynamically expanded as necessary at runtime.
  40. For a static thread, only StackMaxSize is relevant which specifies the total
  41. amount of stack available to the thread.
  42. HeapMaxSize, HeapInitSize, HeapMinSize
  43. HeapMinSize is the amount of heap available once the enclave is initialized.
  44. HeapMaxSize is the total amount of heap an enclave can use. The gap between
  45. HeapMinSize and HeapMaxSize is the heap dynamically expanded as necessary
  46. at runtime.
  47. HeapInitSize is here for compatibility.
  48. -------------------------------------------------
  49. Sample configuration files for the Sample Enclave
  50. -------------------------------------------------
  51. config.01.xml: There is no dynamic thread, no dynamic heap expansion.
  52. config.02.xml: There is no dynamic thread. But dynamic heap expansion can happen.
  53. config.03.xml: There are dynamic threads. For a dynamic thread, there's no stack expansion.
  54. config.04.xml: There are dynamic threads. For a dynamic thread, stack will expanded as necessary.