@@ -4,7 +4,8 @@ EnclaveQueue *eq = EnclaveQueue::get_instance();
44
55/* *
66 * @description: A wrapper function, seal one G srd files under directory, can be called from multiple threads
7- * @param path -> the directory path
7+ * @param eid -> Enclave id
8+ * @return: Invoking ecall return status
89 */
910sgx_status_t Ecall_srd_increase (sgx_enclave_id_t eid)
1011{
@@ -23,8 +24,10 @@ sgx_status_t Ecall_srd_increase(sgx_enclave_id_t eid)
2324
2425/* *
2526 * @description: A wrapper function, decrease srd files under directory
26- * @param path -> the directory path
27+ * @param eid -> Enclave id
28+ * @param size (out) -> Pointer to decreased srd size
2729 * @param change -> reduction
30+ * @return: Invoking ecall return status
2831 */
2932sgx_status_t Ecall_srd_decrease (sgx_enclave_id_t eid, size_t *size, size_t change)
3033{
@@ -43,6 +46,8 @@ sgx_status_t Ecall_srd_decrease(sgx_enclave_id_t eid, size_t *size, size_t chang
4346
4447/* *
4548 * @description: A wrapper function, ecall main loop
49+ * @param eid -> Enclave id
50+ * @return: Invoking ecall return status
4651 */
4752sgx_status_t Ecall_main_loop (sgx_enclave_id_t eid)
4853{
@@ -61,6 +66,8 @@ sgx_status_t Ecall_main_loop(sgx_enclave_id_t eid)
6166
6267/* *
6368 * @description: A wrapper function, ecall stop all
69+ * @param eid -> Enclave id
70+ * @return: Invoking ecall return status
6471 */
6572sgx_status_t Ecall_stop_all (sgx_enclave_id_t eid)
6673{
@@ -79,7 +86,9 @@ sgx_status_t Ecall_stop_all(sgx_enclave_id_t eid)
7986
8087/* *
8188 * @description: A wrapper function, Restore enclave data from file
82- * @param status -> Pointer to restore result status
89+ * @param eid -> Enclave id
90+ * @param status (out) -> Pointer to restore result status
91+ * @return: Invoking ecall return status
8392 */
8493sgx_status_t Ecall_restore_metadata (sgx_enclave_id_t eid, crust_status_t *status)
8594{
@@ -98,9 +107,11 @@ sgx_status_t Ecall_restore_metadata(sgx_enclave_id_t eid, crust_status_t *status
98107
99108/* *
100109 * @description: A wrapper function, Compare chain account with enclave's
101- * @param status -> Pointer to compare result status
110+ * @param eid -> Enclave id
111+ * @param status (out) -> Pointer to compare result status
102112 * @param account_id (in) -> Pointer to account id
103113 * @param len -> account id length
114+ * @return: Invoking ecall return status
104115 */
105116sgx_status_t Ecall_cmp_chain_account_id (sgx_enclave_id_t eid, crust_status_t *status, const char *account_id, size_t len)
106117{
@@ -119,9 +130,11 @@ sgx_status_t Ecall_cmp_chain_account_id(sgx_enclave_id_t eid, crust_status_t *st
119130
120131/* *
121132 * @description: A wrapper function, Get signed validation report
122- * @param status -> Pointer to get result status
133+ * @param eid -> Enclave id
134+ * @param status (out) -> Pointer to get result status
123135 * @param block_hash (in) -> block hash
124- * @param block_height (in) -> block height
136+ * @param block_height -> block height
137+ * @return: Invoking ecall return status
125138 */
126139sgx_status_t Ecall_gen_and_upload_work_report (sgx_enclave_id_t eid, crust_status_t *status, const char *block_hash, size_t block_height)
127140{
@@ -140,6 +153,11 @@ sgx_status_t Ecall_gen_and_upload_work_report(sgx_enclave_id_t eid, crust_status
140153
141154/* *
142155 * @description: A wrapper function, generate ecc key pair and store it in enclave
156+ * @param eid -> Enclave id
157+ * @param status (out) -> Pointer to result status
158+ * @param account_id (in) -> Pointer to account id
159+ * @param len -> Account id length
160+ * @return: Invoking ecall return status
143161 */
144162sgx_status_t Ecall_gen_key_pair (sgx_enclave_id_t eid, sgx_status_t *status, const char *account_id, size_t len)
145163{
@@ -159,8 +177,11 @@ sgx_status_t Ecall_gen_key_pair(sgx_enclave_id_t eid, sgx_status_t *status, cons
159177/* *
160178 * @description: A wrapper function, get sgx report, our generated public key contained
161179 * in report data
180+ * @param eid -> Enclave id
181+ * @param status (out) -> Pointer to result status
162182 * @param report (out) -> Pointer to SGX report
163183 * @param target_info (in) -> Data used to generate report
184+ * @return: Invoking ecall return status
164185 */
165186sgx_status_t Ecall_get_quote_report (sgx_enclave_id_t eid, sgx_status_t *status, sgx_report_t *report, sgx_target_info_t *target_info)
166187{
@@ -179,6 +200,9 @@ sgx_status_t Ecall_get_quote_report(sgx_enclave_id_t eid, sgx_status_t *status,
179200
180201/* *
181202 * @description: A wrapper function, generate current code measurement
203+ * @param eid -> Enclave id
204+ * @param status (out) -> Pointer to result status
205+ * @return: Invoking ecall return status
182206 */
183207sgx_status_t Ecall_gen_sgx_measurement (sgx_enclave_id_t eid, sgx_status_t *status)
184208{
@@ -197,9 +221,11 @@ sgx_status_t Ecall_gen_sgx_measurement(sgx_enclave_id_t eid, sgx_status_t *statu
197221
198222/* *
199223 * @description: A wrapper function, verify IAS report
200- * @param status -> Pointer to verify result status
224+ * @param eid -> Enclave id
225+ * @param status (out) -> Pointer to verify result status
201226 * @param IASReport (in) -> Vector first address
202227 * @param len -> Count of Vector IASReport
228+ * @return: Invoking ecall return status
203229 */
204230sgx_status_t Ecall_verify_and_upload_identity (sgx_enclave_id_t eid, crust_status_t *status, char **IASReport, size_t len)
205231{
@@ -218,9 +244,10 @@ sgx_status_t Ecall_verify_and_upload_identity(sgx_enclave_id_t eid, crust_status
218244
219245/* *
220246 * @description: A wrapper function, Seal file according to given path and return new MerkleTree
221- * @param status -> Pointer to seal result status
222- * @param cid -> Ipfs content id
223- * @param file_size -> Pointer to sealed file size
247+ * @param eid -> Enclave id
248+ * @param status (out) -> Pointer to seal result status
249+ * @param cid (in) -> Ipfs content id
250+ * @return: Invoking ecall return status
224251 */
225252sgx_status_t Ecall_seal_file (sgx_enclave_id_t eid, crust_status_t *status, const char *cid)
226253{
@@ -239,12 +266,11 @@ sgx_status_t Ecall_seal_file(sgx_enclave_id_t eid, crust_status_t *status, const
239266
240267/* *
241268 * @description: A wrapper function, Unseal file according to given path
242- * @param status -> Pointer to unseal result status
243- * @param files (in) -> Files in root directory
244- * @param files_num -> Files number in root directory
245- * @param p_dir (in) -> Root directory path
246- * @param p_new_path (out) -> Pointer to unsealed data path
247- * @param path_len -> Root dir path length
269+ * @param eid -> Enclave id
270+ * @param status (out) -> Pointer to unseal result status
271+ * @param data (in) -> Pointer to sealed data
272+ * @param data_size -> Sealed data size
273+ * @return: Invoking ecall return status
248274 */
249275sgx_status_t Ecall_unseal_file (sgx_enclave_id_t eid, crust_status_t *status, const char *data, size_t data_size)
250276{
@@ -263,7 +289,11 @@ sgx_status_t Ecall_unseal_file(sgx_enclave_id_t eid, crust_status_t *status, con
263289
264290/* *
265291 * @description: Change srd number
292+ * @param eid -> Enclave id
293+ * @param status (out) -> Pointer to result status
266294 * @param change -> Will be changed srd number
295+ * @param real_change (out) -> Pointer to real changed srd size
296+ * @return: Invoking ecall return status
267297 */
268298sgx_status_t Ecall_change_srd_task (sgx_enclave_id_t eid, crust_status_t *status, long change, long *real_change)
269299{
@@ -282,8 +312,9 @@ sgx_status_t Ecall_change_srd_task(sgx_enclave_id_t eid, crust_status_t *status,
282312
283313/* *
284314 * @description: Update srd_g_hashs
285- * @param hashs -> Pointer to the address of to be deleted hashs array
286- * @param hashs_len -> Hashs array length
315+ * @param eid -> Enclave id
316+ * @param change -> To be deleted srd size
317+ * @return: Invoking ecall return status
287318 */
288319sgx_status_t Ecall_srd_remove_space (sgx_enclave_id_t eid, size_t change)
289320{
@@ -302,8 +333,10 @@ sgx_status_t Ecall_srd_remove_space(sgx_enclave_id_t eid, size_t change)
302333
303334/* *
304335 * @description: Delete file
305- * @param status -> Pointer to delete result status
306- * @param hash -> File root hash
336+ * @param eid -> Enclave id
337+ * @param status (out) -> Pointer to delete result status
338+ * @param hash (in) -> File root hash
339+ * @return: Invoking ecall return status
307340 */
308341sgx_status_t Ecall_delete_file (sgx_enclave_id_t eid, crust_status_t *status, const char *hash)
309342{
@@ -322,7 +355,10 @@ sgx_status_t Ecall_delete_file(sgx_enclave_id_t eid, crust_status_t *status, con
322355
323356/* *
324357 * @description: Generate upgrade metadata
325- * @param status -> Pointer to generate result status
358+ * @param eid -> Enclave id
359+ * @param status (out) -> Pointer to generate result status
360+ * @param block_height -> Chain block height
361+ * @return: Invoking ecall return status
326362 */
327363sgx_status_t Ecall_gen_upgrade_data (sgx_enclave_id_t eid, crust_status_t *status, size_t block_height)
328364{
@@ -341,7 +377,13 @@ sgx_status_t Ecall_gen_upgrade_data(sgx_enclave_id_t eid, crust_status_t *status
341377
342378/* *
343379 * @description: Generate upgrade metadata
344- * @param status -> Pointer to metadata
380+ * @param eid -> Enclave id
381+ * @param status (out) -> Pointer to result status
382+ * @param meta (in) -> Pointer to metadata
383+ * @param meta_len -> Meta length
384+ * @param total_size -> Metadata total size
385+ * @param transfer_end -> Indicate transfer end or not
386+ * @return: Invoking ecall return status
345387 */
346388sgx_status_t Ecall_restore_from_upgrade (sgx_enclave_id_t eid, crust_status_t *status, const char *meta, size_t meta_len, size_t total_size, bool transfer_end)
347389{
@@ -360,7 +402,10 @@ sgx_status_t Ecall_restore_from_upgrade(sgx_enclave_id_t eid, crust_status_t *st
360402
361403/* *
362404 * @description: Enable upgrade
405+ * @param eid -> Enclave id
406+ * @param status (out) -> Pointer to result status
363407 * @param block_height -> Current block height
408+ * @return: Invoking ecall return status
364409 */
365410sgx_status_t Ecall_enable_upgrade (sgx_enclave_id_t eid, crust_status_t *status, size_t block_height)
366411{
@@ -379,6 +424,8 @@ sgx_status_t Ecall_enable_upgrade(sgx_enclave_id_t eid, crust_status_t *status,
379424
380425/* *
381426 * @description: Disable upgrade
427+ * @param eid -> Enclave id
428+ * @return: Invoking ecall return status
382429 */
383430sgx_status_t Ecall_disable_upgrade (sgx_enclave_id_t eid)
384431{
@@ -397,6 +444,8 @@ sgx_status_t Ecall_disable_upgrade(sgx_enclave_id_t eid)
397444
398445/* *
399446 * @description: Get enclave id information
447+ * @param eid -> Enclave id
448+ * @return: Invoking ecall return status
400449 */
401450sgx_status_t Ecall_id_get_info (sgx_enclave_id_t eid)
402451{
@@ -415,6 +464,8 @@ sgx_status_t Ecall_id_get_info(sgx_enclave_id_t eid)
415464
416465/* *
417466 * @description: Get workload
467+ * @param eid -> Enclave id
468+ * @return: Invoking ecall return status
418469 */
419470sgx_status_t Ecall_get_workload (sgx_enclave_id_t eid)
420471{
0 commit comments