Commit Graph

493 Commits

Author SHA1 Message Date
bunnei 74ebab21ce Merge pull request #8504 from comex/mesosphere-current-process
Support `InfoType_MesosphereCurrentProcess`
2022-06-27 13:05:07 -07:00
comex 0c3a934b6e Re-add missing `case` and braces, and trim whitespace 2022-06-25 18:01:56 -07:00
comex 593f978ad2 Update src/core/hle/kernel/svc.cpp
Co-authored-by: liamwhite <liamwhite@users.noreply.github.com>
2022-06-25 18:00:29 -07:00
comex 9decdbabab Support InfoType_MesosphereCurrentProcess 2022-06-25 16:23:23 -07:00
Liam 83f1ecb73b kernel: make current thread pointer thread local 2022-06-23 00:28:00 -04:00
Nikita Strygin 5f5739ea2c Implement ExitProcess svc
Currently this just stops all the emulation
This works under assumption that only application will try to use
ExitProcess, with services not touching it
If application exits - it quite makes sense to end the emulation
2022-06-16 21:35:34 +03:00
Fernando S 1d8e860c47 Merge pull request #8457 from liamwhite/kprocess-suspend
kernel: implement KProcess suspension
2022-06-16 02:41:12 +02:00
Mai 8894ac44d2 Merge pull request #8464 from liamwhite/break-debug
kernel: notify debugger on break SVC
2022-06-15 11:55:54 -04:00
Liam 0755b274fa kernel: notify debugger on break SVC 2022-06-14 21:06:23 -04:00
Liam a6c1036ddc core: centralize profile scope for Dynarmic 2022-06-14 18:19:04 -04:00
Liam 59a6d88625 kernel: implement KProcess suspension 2022-06-14 10:04:11 -04:00
Liam c1771c98f3 common: Change semantics of UNREACHABLE to unconditionally crash 2022-06-13 20:09:00 -04:00
Morph 88052d8c09 kernel: svc: Replace -1ULL with 0xFFFFFFFFFFFFFFFF
Resolves the C4146 compiler warning on MSVC.
2022-04-24 17:40:47 -04:00
Morph 2b87305d31 general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
tech-ticks 53f7a78e9e hle: kernel: Invalidate entire icache in UnmapProcessMemory and UnmapCodeMemory (fixes #8174) 2022-04-09 13:29:19 +02:00
bunnei 3beb4d4273 hle: kernel: svc: MapProcessMemory: Fix usage of KPageLinkedList to use physical address space. 2022-03-26 01:35:37 -07:00
bunnei f84511eb4f hle: kernel: svc: CreateCodeMemory: Remove log of 'out' host pointer.
- This does not seem terribly useful and is inconsistent with other usage.
2022-03-26 01:34:29 -07:00
bunnei 58a4c17e98 hle: kernel: svc: UnmapProcessCodeMemory: Fix inverted alignment check. 2022-03-26 01:01:55 -07:00
bunnei 64ae76bff6 core: hle: kernel: KEvent: Pass in owner KProcess on event creation.
- This is necessary to ensure resource limits are freed from the right process.
2022-02-21 12:41:06 -08:00
Sergi Granell dbfe017c9f kernel: svc: Add OutputDebugString32, CreateCodeMemory32, ControlCodeMemory32
Very straightforward, they are just wrappers to the 64-bit version of
the SVC.
2022-02-15 00:45:19 +01:00
Narr the Reg d5873beb51 svc: Set unique names for function tables 2022-02-08 21:03:31 -06:00
tech-ticks be026c6b6d service: pm: Implement AtmosphereGetProcessInfo 2022-02-04 01:41:36 +01:00
Narr the Reg 33594225c7 svc: Add 32 bit SynchronizePreemptionState
Used by Espgaluda II
2022-01-31 19:02:41 -06:00
bunnei ebb9ec197e core: hle: kernel: Rename Un/Map to Un/MapMeory. 2022-01-22 01:33:26 -08:00
bunnei d45b65b4d9 hle: kernel: k_page_table: Update SetProcessMemoryPermission. 2022-01-11 16:28:11 -08:00
bunnei 0942533d2f hle: kernel: k_page_table: Rename *ProcessCodeMemory -> *CodeMemory. 2022-01-11 16:28:11 -08:00
bunnei b227426ae5 core: hle: kernel: svc: Updates to SetMemoryAttribute and SetMemoryPermission. 2022-01-08 12:18:14 -08:00
bunnei b12695ddc4 core: hle: kernel: Implement thread pinning.
- We largely had the mechanics in place for thread pinning, this change hooks these up.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_thread_pinning.cpp.
2021-12-30 15:50:45 -08:00
bunnei 714dcea191 core: hle: kernel: Updated implementation of svcSetHeapSize.
- Updates our svcSetHeapSize with latest HOS, furthermore allowing heap size to properly be extended/shrunk.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_set_heap_size.cpp.
2021-12-28 01:25:20 -08:00
bunnei 555481005d core: hle: kernel: Implement SetMemoryPermission.
- Not seen in any games yet, but validated with kernel tests.
2021-12-23 01:10:36 -08:00
bunnei a1f637a6d0 hle: kernel: svc: GetInfo: Fix error checking with IdleTickCount.
- Enforce tha the supplied handle is invalid, not valid.
- This gets Witcher 3 booting.
2021-12-21 22:41:23 -08:00
bunnei 5192e8e092 core: hle: Remove global HLE lock.
- This was added early on as a hack to protect against some concurrency issues.
- It's not clear that this serves any purpose anymore, and if it does, individual components should be fixed rather than using a global recursive mutex.
2021-12-17 16:05:51 -08:00
bunnei 5273e0665e Merge pull request #7462 from bunnei/kernel-improve-scheduling
Kernel: Improve threading & scheduling V3
2021-12-12 22:43:25 -08:00
bunnei 43d706c7d2 hle: kernel: svc: Fix deadlock that can occur with single core. 2021-12-06 16:39:18 -08:00
bunnei f81a6a07c0 hle: kernel: KServerSession: Migrate to updated KThreadQueue. 2021-12-06 16:39:17 -08:00
bunnei 0ad0543cde hle: kernel: KThread: Remove tracking of sync object from threads. 2021-12-06 16:39:17 -08:00
bunnei cae0bef7ec core: hle: kernel: Reflect non-emulated threads as core 3. 2021-12-06 16:39:16 -08:00
itsmeft24 033c9dff92 kernel: svc: Implement Map/UnmapProcessMemory and Create/ControlCodeMemory
Used by Skyline modding framework
2021-12-05 15:04:08 -05:00
Morph 463793ccb5 kernel: svc: Move all IsValid functions to an anonymous namespace 2021-11-20 22:49:13 -05:00
Morph 64079bc2f2 kernel: svc: Implement SetProcessMemoryPermission
- Used by Skyline modding framework
2021-11-20 22:18:56 -05:00
Morph 10508e7af2 general: Rename GetTitleID to GetProgramID 2021-11-04 16:57:16 -04:00
ameerj d27abf5546 core: Remove unused includes 2021-11-03 21:42:57 -04:00
Morph c3c09ca222 svc: Correct WaitSynchronization num_handles param type
num_handles is a s32
2021-11-02 22:31:04 -04:00
bunnei 58377818a1 Merge pull request #7227 from vonchenplus/fix_memory_leak_v2
Fix memory leak v2
2021-11-01 20:11:30 -07:00
Feng Chen c13d1e0b0f Fix memory leak 2021-10-27 09:06:22 +08:00
Fernando Sahmkow 69b1cad803 SVC: Implement svcInfo:IdleTickCount
Used by the Witcher 3
2021-10-16 20:33:44 +02:00
Feng Chen 974547f98f Fix KScopedAutoObject object leak when SendSyncRequest 2021-09-25 22:16:21 +08:00
bunnei 5e600cba3a Revert "kernel: Various improvements to scheduler" 2021-08-25 20:59:28 -07:00
Valeri 190e12a072 Fix check is thread current in GetThreadContext
Misplaced break made it only check for the first core.
2021-08-19 16:46:30 +03:00
bunnei 951143ba57 core: hle: kernel: Reflect non-emulated threads as core 3. 2021-08-07 12:18:47 -07:00