Skip to content

Commit

Permalink
Merge pull request #90 from PengXuanyao/nemu-dev
Browse files Browse the repository at this point in the history
fix bug in enclave.c
  • Loading branch information
fengerhu1 authored May 17, 2023
2 parents fc8452b + 06ff232 commit a203408
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion opensbi-0.9/include/sm/platform/pmp/platform_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
void platform_enter_enclave_world();
void platform_exit_enclave_world();
int platform_check_in_enclave_world();
int platform_check_enclave_authentication();
int platform_check_enclave_authentication(struct enclave_t* enclave);
void platform_switch_to_enclave_ptbr(struct thread_state_t* thread, uintptr_t ptbr);
void platform_switch_to_host_ptbr(struct thread_state_t* thread, uintptr_t ptbr);

Expand Down
2 changes: 1 addition & 1 deletion opensbi-0.9/include/sm/platform/spmp/platform_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void platform_exit_enclave_world();

int platform_check_in_enclave_world();

int platform_check_enclave_authentication();
int platform_check_enclave_authentication(struct enclave_t* enclave);

void platform_switch_to_enclave_ptbr(struct thread_state_t* thread, uintptr_t ptbr);

Expand Down
4 changes: 2 additions & 2 deletions opensbi-0.9/lib/sbi/sm/enclave.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ int check_in_enclave_world()
return 0;
}

static int check_enclave_authentication()
static int check_enclave_authentication(struct enclave_t* enclave)
{
if(platform_check_enclave_authentication() < 0)
if(platform_check_enclave_authentication(enclave) < 0)
return -1;

return 0;
Expand Down
2 changes: 1 addition & 1 deletion opensbi-1.0/include/sm/platform/pmp/platform_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
void platform_enter_enclave_world();
void platform_exit_enclave_world();
int platform_check_in_enclave_world();
int platform_check_enclave_authentication();
int platform_check_enclave_authentication(struct enclave_t* enclave);
void platform_switch_to_enclave_ptbr(struct thread_state_t* thread, uintptr_t ptbr);
void platform_switch_to_host_ptbr(struct thread_state_t* thread, uintptr_t ptbr);

Expand Down
2 changes: 1 addition & 1 deletion opensbi-1.0/include/sm/platform/spmp/platform_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void platform_exit_enclave_world();

int platform_check_in_enclave_world();

int platform_check_enclave_authentication();
int platform_check_enclave_authentication(struct enclave_t* enclave);

void platform_switch_to_enclave_ptbr(struct thread_state_t* thread, uintptr_t ptbr);

Expand Down
4 changes: 2 additions & 2 deletions opensbi-1.0/lib/sbi/sm/enclave.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ int check_in_enclave_world()
return 0;
}

static int check_enclave_authentication()
static int check_enclave_authentication(struct enclave_t* enclave)
{
if(platform_check_enclave_authentication() < 0)
if(platform_check_enclave_authentication(enclave) < 0)
return -1;

return 0;
Expand Down

0 comments on commit a203408

Please sign in to comment.