Skip to content

Commit

Permalink
Add Return status to syscall for nvram
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin.meudic committed Oct 7, 2024
1 parent 44611f0 commit 53d681e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/os_nvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SYSCALL void nvm_erase(void *dst_adr PLENGTH(len), unsigned int len);
SUDOCALL void nvm_write_page(unsigned int page_adr, bool force);

// erase a nvm page at given address, only callable by the privileged APIs
SUDOCALL void nvm_erase_page(unsigned int page_adr);
SUDOCALL unsigned int nvm_erase_page(unsigned int page_adr);

// any application can wipe the global pin, global seed, user's keys
// disabled for security reasons // SYSCALL void
Expand Down
5 changes: 2 additions & 3 deletions src/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1843,13 +1843,12 @@ void nvm_write_page(unsigned int page_adr, bool force)
return;
}

void nvm_erase_page(unsigned int page_adr)
unsigned int nvm_erase_page(unsigned int page_adr)
{
unsigned int parameters[2];
parameters[0] = (unsigned int) page_adr;
parameters[1] = 0;
SVC_Call(SYSCALL_nvm_erase_page_ID, parameters);
return;
return (unsigned int) SVC_Call(SYSCALL_nvm_erase_page_ID, parameters);
}

try_context_t *try_context_get(void)
Expand Down

0 comments on commit 53d681e

Please sign in to comment.