feature (libnx): updated syscall bindings to match the documented SysABI

This commit is contained in:
antifallobst 2023-05-29 18:43:03 +02:00
parent 22778ccf21
commit d5ed088f54
2 changed files with 11 additions and 5 deletions

View File

@ -27,7 +27,8 @@ uint64_t nx_proc_thread_start (uint64_t tid);
uint64_t nx_proc_thread_pause (uint64_t tid);
uint64_t nx_proc_thread_kill (uint64_t tid);
uint64_t nx_drv_register (uint64_t fd, void* conf);
uint64_t nx_drv_register (uint64_t fd);
uint64_t nx_drv_init (void* conf);
uint64_t nx_drv_create_command_buffer (void* addr, uint64_t len);
uint64_t nx_drv_flush_command_buffer (void* addr);

View File

@ -27,8 +27,9 @@ typedef enum {
NX_PROC_THREAD_KILL = 0x0207,
NX_DRV_REGISTER = 0x0301,
NX_DRV_CREATE_COMMAND_BUFFER = 0x0302,
NX_DRV_FLUSH_COMMAND_BUFFER = 0x0303,
NX_DRV_INIT = 0x0302,
NX_DRV_CREATE_COMMAND_BUFFER = 0x0303,
NX_DRV_FLUSH_COMMAND_BUFFER = 0x0304,
} syscall_E;
uint64_t nx_fs_open(string_t path, uint64_t len, uint64_t* fd) {
@ -106,8 +107,12 @@ uint64_t nx_proc_thread_kill(uint64_t tid) {
}
uint64_t nx_drv_register(uint64_t fd, void* conf) {
return syscall_perform(NX_DRV_REGISTER, fd, (uint64_t)conf, 0, 0);
uint64_t nx_drv_register(uint64_t fd) {
return syscall_perform(NX_DRV_REGISTER, fd, 0, 0, 0);
}
uint64_t nx_drv_init(void* conf) {
return syscall_perform(NX_DRV_INIT, (uint64_t#)conf, 0, 0, 0);
}
uint64_t nx_drv_create_command_buffer(void* addr, uint64_t len) {