Implement ecall to handle commands from host to call enclave runtime APIs (#320)

This commit is contained in:
Wenyong Huang
2020-07-28 16:18:54 +08:00
committed by GitHub
parent 056b824ac4
commit 88af12501d
6 changed files with 1035 additions and 52 deletions

View File

@ -8,7 +8,11 @@ enclave {
trusted {
/* define ECALLs here. */
public void ecall_iwasm_main(void);
public void ecall_handle_command(unsigned cmd,
[in, out, size=cmd_buf_size]uint8_t *cmd_buf,
unsigned cmd_buf_size);
public void ecall_iwasm_main([user_check]uint8_t *wasm_file_buf,
uint32_t wasm_file_size);
};
untrusted {