Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Return status to syscall for nvram #791

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading