Skip to content
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
1 change: 1 addition & 0 deletions nx/include/switch/services/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,4 @@ Result pmshellGetApplicationProcessIdForShell(u64* pid_out);
Result pmshellBoostSystemMemoryResourceLimit(u64 boost_size);
Result pmshellBoostApplicationThreadResourceLimit(void);
Result pmshellBoostSystemThreadResourceLimit(void);
Result pmshellGetProcessId(u64* pid_out, u64 program_id);
2 changes: 1 addition & 1 deletion nx/source/kernel/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "../internal.h"
#include "../runtime/alloc.h"

#define USER_TLS_BEGIN 0x108
#define USER_TLS_BEGIN 0x180
#define USER_TLS_END (0x200 - sizeof(ThreadVars))
#define NUM_TLS_SLOTS ((USER_TLS_END - USER_TLS_BEGIN) / sizeof(void*))

Expand Down
4 changes: 4 additions & 0 deletions nx/source/runtime/switch_crt0.s
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ __nx_mod0:
.word __relro_start - __nx_mod0
.word __data_start - __nx_mod0

.ascii "LNY2"
.word 0x1 // Version/Fix field, increment on recompile-the-worlds as needed
.word 0x0 // Reserved

.section .bss.__stack_top, "aw", %nobits
.global __stack_top
.align 3
Expand Down
5 changes: 5 additions & 0 deletions nx/source/services/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,8 @@ Result pmshellBoostSystemThreadResourceLimit(void) {
if (!hosversionIsAtmosphere() && hosversionBefore(14,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _pmCmdVoid(&g_pmshellSrv, 10);
}

Result pmshellGetProcessId(u64* pid_out, u64 program_id) {
if (!hosversionIsAtmosphere() && hosversionBefore(19,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _pmCmdInU64OutU64(pid_out, program_id, &g_pmshellSrv, 12);
}