Skip to content

Commit

Permalink
Merge pull request #791 from LedgerHQ/FWEO-1223_Flash_Diagnostic
Browse files Browse the repository at this point in the history
Add Return status to syscall for nvram.
  • Loading branch information
kmeudic-ledger authored Oct 7, 2024
2 parents 44611f0 + 53d681e commit b23f770
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 b23f770

Please sign in to comment.