Commit Graph

171 Commits

Author SHA1 Message Date
Michael Scire
5d5d13c9d6 svc: WaitIfEqual64 is value 3 2024-11-24 21:44:07 +01:00
Michael Scire
2bbf49377e svc: add new info type 2024-11-24 21:44:07 +01:00
Michael Scire
81bed00b5b svc: update WaitForAddress 2024-11-24 21:44:07 +01:00
Michael Scire
c8c4406467 svc: Add new InfoTypes 2024-05-30 21:41:06 +02:00
Ghabry
a215ae2da2 Add NX_ prefix to PACKED, NORETURN, IGNORE_ARG and DEPRECATED macros 2023-11-20 19:22:12 +01:00
Michael Scire
933c5a12f0 svc: fix query/insecure names 2023-11-01 19:06:56 +01:00
Michael Scire
140400d566 svc: add PermissionLocked attribute 2023-10-21 00:18:04 +02:00
MasaGratoR
d219884bfa
tmem: Add tmemCloseHandle(), tmemWaitForPermission(), use those functions in nv.c to fix a race condition (#606) 2023-04-14 18:33:16 +02:00
Michael Scire
de4d19df1a MapDeviceAddressSpace svcs now take option, not perm 2022-10-12 09:03:04 -07:00
Michael Scire
1543e84627 svc: add MapInsecureMemory/UnmapInsecureMemory 2022-10-11 20:18:30 -07:00
Michael Scire
f9a27d6cc7 svc: add new info type 2022-04-07 21:43:32 -04:00
yellows8
0a88426a6a
svc: ret for svcCallSecureMonitor is void. 2022-03-06 14:00:40 -05:00
averne
3d9e1a9c7b Fix MemoryInfo field order 2022-01-29 16:38:34 +01:00
Michael Scire
49507b86a8 svc: add 13.0.0 svc changes 2021-09-18 12:34:58 +02:00
fincs
649f308d4b
Delete old virtmem API 🦀🦀 2021-01-17 17:05:29 +01:00
masagrator
c3aeb885e7 Fix svcSetHeapSize error in comment section 2020-12-08 12:25:47 +01:00
SciresM
c3b63e8723
svc: add new InfoType_FreeThreadCount (#514) 2020-12-05 03:11:49 +01:00
fincs
74b295827f
Add svcGetResourceLimitPeakValue [11.0.0+] 2020-12-01 13:49:15 +01:00
fincs
091f88915d
virtmemRemoveReservation: add forgotten mutex note to docs 2020-10-31 14:06:48 +01:00
fincs
22a3efcbe1
virtmem: Deprecate virtmemReserve/virtmemFree 2020-10-30 16:10:52 +01:00
fincs
8310f438ca
virtmem: Add memory reservation system
jit: Use virtmemFindCodeMemory on both codepaths; use virtmem reservations
in order to support the JitType_SetProcessMemoryPermission codepath
2020-10-30 16:07:38 +01:00
fincs
490d96e6eb
virtmem: Add virtmemFindCodeMemory to work around a quirk in 1.x kernel 2020-10-30 00:16:03 +01:00
fincs
eecf2a9d32
Add detectMesosphere() 2020-10-29 16:52:16 +01:00
fincs
a05a44fca8
virtmem: Major rewrite to support ASLR, see details:
- Added virtmemLock/Unlock, needed for atomic find-and-map operations
- Added virtmemFindAslr, which looks for a random free area in AslrRegion
  - virtmemReserve still exists for legacy callers who rely on sequential
    allocation in order to avoid race conditions from concurrent uses
- Added virtmemFindStack, which searches within StackRegion instead
  - Removed virtmemReserveStack/FreeStack
- Changed shmem/thread/tmem/codememory-jit to use the new virtmem API
  - Legacy jit still uses virtmemReserve
2020-10-27 12:27:32 +01:00
fincs
7c6d7849f5
Remove obsolete kernel detection code 2020-10-27 12:27:32 +01:00
fincs
4c6abe1e41
svcBreak: fix prototype, add and use BreakReason enum 2020-10-27 12:27:31 +01:00
fincs
e0c1dfe2ce
Add light event synchronization primitive [4.0.0+] 2020-10-27 12:27:20 +01:00
Michael Scire
3d726ed78c mutex: rewrite to optimize 2020-05-17 17:46:59 +02:00
fincs
b0494c1acb
Update outdated comments and naming in jit.h/c 2020-04-27 13:46:55 +02:00
Michael Scire
e09ce419ac svc: real definition for 10.x QueryIoMapping 2020-04-14 21:29:38 +02:00
Michael Scire
cb7c1f87a8 svc: QueryIoMapping ABI change in 10.x 2020-04-14 21:29:38 +02:00
yellows8
0a9f8261cb
svc: Fixed off-by-one in syscall-number docs. 2020-04-11 15:25:00 -04:00
SciresM
4746827513
thread: add threadGetSelf(), add main thread to thread list. (#392) 2020-04-07 01:47:06 +02:00
Michael Scire
43549f4596 svc: fix definitions to better match kernel 2020-03-29 18:42:19 +02:00
fincs
6535d6f871
Remove U64_MAX in favor of using UINT64_MAX 2020-03-16 16:21:33 +01:00
SciresM
e5c501e5b6 svc: Add all missing SVC stubs (#364) 2020-01-18 21:39:05 +01:00
fincs
ce394330a8
svcSignalProcessWideKey doesn't actually return anything 2019-12-18 00:40:27 +01:00
fincs
2f7d9bf026
Delete old IPC 🎉 2019-12-12 02:25:05 +01:00
SciresM
afe030f08b rwlock: revamp completely (#350)
Implements rwlockTryReadLock and rwlockTryWriteLock.
Also implements rwlockIsWriteLockHeldByCurrentThread and
rwlockIsOwnedByCurrentThread.

Also re-designs RwLock to have semantics identical to
Nintendo's (nn::os::ReaderWriterLock). The upshot is mostly
that the lock is now fully recursive/write-preferring.
2019-12-03 23:16:40 +01:00
yellows8
bcac85852a
Added InfoType_IsApplication. 2019-11-18 22:30:19 -05:00
Michael Scire
07ad046acf svc: change TitleId to ProgramId 2019-10-28 12:17:55 +01:00
SciresM
415adf5b93 threads: support using existing mem as stack (#336) 2019-10-19 04:25:23 +02:00
fincs
0a3592d4dd
Deprecate current IPC interface 2019-09-19 02:58:12 +02:00
yellows8
4177031ebe
Use the same style for all system-versions. 2019-08-26 13:05:49 -04:00
Robin Lambertz
37fdcb5726 svcGetInfo id0 should be an u32
svcGetInfo uses an u32 for id0 in the kernel (which moves W1 and not X1).
2019-08-09 21:18:57 +02:00
Michael Scire
a7522f1d4c Mark arguments to svcCreateProcess as const. 2019-06-28 02:35:44 +02:00
SciresM
e1a6a463c2 Add enums for GetInfo/GetSystemInfo (#292) 2019-06-22 00:05:56 +02:00
yellows8
836bb367aa
Renamed ipc_buffer_size to pointer_buffer_size for ipcAddSendSmart/ipcAddRecvSmart. 2019-05-11 11:17:33 -04:00
fincs
d911c47d2e Miscellaneous documentation fixes 2019-05-03 14:32:02 +02:00
Michael Scire
6b50fddd9b Implement svcQueryProcessMemory 2019-04-21 13:48:59 +02:00