Skip to content

Conversation

@csegarragonz
Copy link
Collaborator

@csegarragonz csegarragonz commented Feb 17, 2022

In this PR I replace the existing implementation of the ECall API (in src/enclave/inside/enclave.cpp) by two different files:

  • src/enclave/inside/ecalls.cpp: declaration of all ECalls and declaration of a map with WASM modules. In general, for each ECall, we (i) acquire a lock on the map, (ii) get a pointer to the module, (iiii) release the lock, and (iv) run the implementation of the ECall inside the EnclaveWasmModule.
  • src/enclave/inside/EnclaveWasmModule.cpp: simplified version of the WAMRWasmModule.

In the PR I include only the changes necessary to do this port, and I leave further changes/improvements to subsequent PRs. For instance, I would like to re-factor the ECalls to camelCase, but I'd rather leave that to a separate PR.

@csegarragonz csegarragonz self-assigned this Feb 17, 2022
@csegarragonz csegarragonz force-pushed the wasm-module branch 2 times, most recently from c70eb43 to 5a16a20 Compare February 17, 2022 15:48
sgx_enclave_id_t enclave_id,
faasm_sgx_status_t* ret_val,
const uint32_t thread_id);
uint32_t faaslet_id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually it would be good to change to pascal case across all the SGX-related code, but that can be done in its own PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, next PR is a re-factor of ECalls to pascal case.

@csegarragonz csegarragonz merged commit 093353b into main Feb 18, 2022
@csegarragonz csegarragonz deleted the wasm-module branch February 18, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants