Skip to content

Commit

Permalink
Add a syscall to set OS values
Browse files Browse the repository at this point in the history
  • Loading branch information
srasoamiaramanana-ledger committed Dec 13, 2024
1 parent ff5a153 commit bdaeaf1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/os_ux.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,4 @@ SYSCALL unsigned int os_ux_get_status(unsigned int ux_id);
#endif // HAVE_BLE

SYSCALL PERMISSION(APPLICATION_FLAG_BOLOS_UX) void os_dashboard_mbx(uint32_t cmd, uint32_t param);
SYSCALL PERMISSION(APPLICATION_FLAG_BOLOS_UX) void os_ux_set_global(uint8_t param_type, uint8_t *param, size_t param_len);
1 change: 1 addition & 0 deletions include/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
#endif // HAVE_LEDGER_PKI

#define SYSCALL_os_dashboard_mbx_ID 0x02000150
#define SYSCALL_os_ux_set_global_ID 0x03000151

#ifdef HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS
#define SYSCALL_CERT_get_ID 0x01000CA0
Expand Down
9 changes: 9 additions & 0 deletions src/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1578,6 +1578,15 @@ void os_dashboard_mbx(uint32_t cmd, uint32_t param)
SVC_Call(SYSCALL_os_dashboard_mbx_ID, parameters);
}

void os_ux_set_global(uint8_t param_type, uint8_t *param, size_t param_len)
{
unsigned int parameters[3];
parameters[0] = (unsigned int) param_type;
parameters[1] = (unsigned int) param;
parameters[2] = (unsigned int) param_len;
SVC_Call(SYSCALL_os_ux_set_global_ID, parameters);
}

void os_lib_call(unsigned int *call_parameters)
{
unsigned int parameters[2];
Expand Down

0 comments on commit bdaeaf1

Please sign in to comment.