diff --git a/nx/Makefile b/nx/Makefile index e8650fbe..dd4e4b9b 100644 --- a/nx/Makefile +++ b/nx/Makefile @@ -24,7 +24,7 @@ VERSION := $(LIBNX_MAJOR).$(LIBNX_MINOR).$(LIBNX_PATCH) #--------------------------------------------------------------------------------- TARGET := nx #BUILD := build -SOURCES := source source/srv +SOURCES := source/kernel source/services DATA := data INCLUDES := include diff --git a/nx/include/switch.h b/nx/include/switch.h index 7b59b881..b67c8f48 100644 --- a/nx/include/switch.h +++ b/nx/include/switch.h @@ -13,6 +13,8 @@ extern "C" { #include #include +#include + #ifdef __cplusplus } #endif diff --git a/nx/include/switch/ipc.h b/nx/include/switch/ipc.h index eaf9542e..f047635d 100644 --- a/nx/include/switch/ipc.h +++ b/nx/include/switch/ipc.h @@ -1,3 +1,4 @@ +// Copyright 2017 plutoo #define SFCI_MAGIC 0x49434653 #define SFCO_MAGIC 0x4f434653 diff --git a/nx/include/switch/services/sm.h b/nx/include/switch/services/sm.h new file mode 100644 index 00000000..a667e419 --- /dev/null +++ b/nx/include/switch/services/sm.h @@ -0,0 +1,2 @@ +Result smInitialize(); +Result smGetService(Handle* handle_out, const char* name); diff --git a/nx/include/switch/svc.h b/nx/include/switch/svc.h index e9f3bcc7..93fff431 100644 --- a/nx/include/switch/svc.h +++ b/nx/include/switch/svc.h @@ -23,9 +23,9 @@ Result svcCloseHandle(Handle handle); Result svcWaitSynchronization(s32* index, const Handle* handles, s32 handleCount, u64 timeout); Result svcConnectToNamedPort(Handle* session, const char* name); Result svcSendSyncRequest(Handle session); -Result svcBreak(u32 BreakReason, u64 inval1, u64 inval2); +Result svcBreak(u32 breakReason, u64 inval1, u64 inval2); Result svcAcceptSession(Handle *session_handle, Handle port_handle); Result svcReplyAndReceive(s32* index, const Handle* handles, s32 handleCount, Handle replyTarget, u64 timeout); -Result svcQueryPhysicalAddress(u64* out, u64 virtaddr);//3 output u64s are written to out. +Result svcQueryPhysicalAddress(u64 out[3], u64 virtaddr); Result svcQueryIoMapping(u64* virtaddr, u64 physaddr, u64 size); Result svcManageNamedPort(Handle* portServer, const char* name, s32 maxSessions); diff --git a/nx/source/svc.s b/nx/source/kernel/svc.s similarity index 100% rename from nx/source/svc.s rename to nx/source/kernel/svc.s diff --git a/nx/source/srv/sm.c b/nx/source/services/sm.c similarity index 100% rename from nx/source/srv/sm.c rename to nx/source/services/sm.c