Commit Graph

50 Commits

Author SHA1 Message Date
JPikachu e0795f2b40 Service: Add AliasRegionExtraSize
Thanks to Briar for finding and testing the Service
Credit: Antique - [Sudachi] Dev (https://sudachi.emuplace.app/)
2025-04-12 16:23:47 +01:00
JPikachu 4957950b55 revert 789bbd7ab5
This needs to be put aside for now, but may be implemented again later
2025-04-10 03:45:51 +00:00
Zephyron 789bbd7ab5 kernel: Implement SystemResourceSize info type for VAMM initialization
Adds support for InfoType::SystemResourceSize (0x1C) which is required for
proper initialization of the Virtual Address Memory Manager (VAMM). This
implementation:

1. Adds SystemResourceSize to the InfoType enum in svc_types.h
2. Implements the GetInfo handler for SystemResourceSize in svc_info.cpp
3. Returns 512MB (0x20000000 bytes) as the system resource size
4. Adds debug logging for the SVC call

The 512MB value is chosen based on typical system resource allocations
needed for VAMM initialization on the Nintendo Switch.

This fixes crashes in games that rely on VAMM functionality, particularly
during nn::os::detail::VammManager::InitializeIfEnabled().
2025-04-04 03:40:49 +02:00
FearlessTobi 4d55e58ee4 scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
2024-02-19 16:00:46 +01:00
Liam bf50a0e0c2 kernel: fix debugger and process list lifetime 2024-01-12 18:31:33 -05:00
Viktor Szépe cff668e1c4 Fix typos in src/core (#12625)
* Fix typos in src/core

* Fix typo correction

* Fix indentation of MemoryStateNames

* Fix indent
2024-01-08 13:31:48 -06:00
Liam a7ff872a4c kernel: restrict nce to applications 2023-12-22 21:52:49 -05:00
Liam 5244690809 k_server_session: process for guest servers 2023-12-22 21:52:49 -05:00
liamwhite 4907a83298 Merge pull request #12296 from liamwhite/client-session
kernel: implement remaining IPC syscalls
2023-12-09 19:03:56 -05:00
Liam f486fe3971 kernel: implement light IPC 2023-12-07 09:13:43 -05:00
Liam dcc9df5dd2 kernel: implement remaining IPC syscalls 2023-12-06 17:33:00 -05:00
Liam 3d5c6a73cb core: refactor emulated cpu core activation 2023-12-04 10:37:16 -05:00
Liam 713f292a25 kernel: add KPageTableBase
Co-authored-by: Kelebek1 <eeeedddccc@hotmail.co.uk>
2023-11-10 12:01:35 -05:00
Liam 62e106dbe8 kernel: update KProcess 2023-10-21 20:03:41 -04:00
Liam 92a65b4947 kernel: fix format string error 2023-10-20 02:41:32 -04:00
Liam d73dbceba6 k_page_table: implement PermissionLocked 2023-10-20 02:34:15 -04:00
Liam 97d79bf8a6 kernel: implement transfer memory 2023-10-04 22:32:27 -04:00
Liam efef3d8487 core: improve debug workflow 2023-09-14 16:44:15 -04:00
Liam 50ce2f0b7b kernel: remove relative task registration 2023-08-14 18:12:06 -04:00
Liam 46234254b1 core: reduce TOCTTOU memory access 2023-07-22 11:19:29 -04:00
Liam b47ce23b31 kernel: reduce page table region checking 2023-07-14 22:33:10 -04:00
Liam 6b6f0b21b9 k_process: PageTable -> GetPageTable 2023-07-14 21:43:15 -04:00
Morph abe7f7c0a0 kernel: Synchronize 2023-07-01 16:21:22 -04:00
Kelebek1 c7430e51e3 Remove memory allocations in some hot paths 2023-06-22 08:05:10 +01:00
Morph 52a219cfe9 core_timing: Fix SingleCore cycle timer 2023-06-07 21:44:42 -04:00
Morph 2856fadaa0 core_timing: Use CNTPCT as the guest CPU tick
Previously, we were mixing the raw CPU frequency and CNTFRQ.
The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available.
2023-06-07 21:44:42 -04:00
Liam 6eaef51cf2 memory: rename global memory references to application memory 2023-03-23 20:28:47 -04:00
liamwhite 2b74ab00aa Merge pull request #9964 from liamwhite/typed-address
kernel: use KTypedAddress for addresses
2023-03-23 10:00:19 -04:00
Liam 156516e399 kernel: use KTypedAddress for addresses 2023-03-22 09:35:16 -04:00
Liam 48f1221b35 kernel: fix LOG_TRACE in ipc 2023-03-19 10:02:20 -04:00
Liam b8da5b73b2 kernel: convert KProcess to new style 2023-03-12 22:09:27 -04:00
Liam 46d09ae364 kernel: convert KThread to new style 2023-03-12 22:09:09 -04:00
Liam d0e11c27d9 kernel: prefer std::addressof 2023-03-12 22:09:09 -04:00
Liam 0c6375446c kernel/svc: convert to new style 2023-03-12 22:09:08 -04:00
Liam 3c93638acf kernel: convert KPort, KSession 2023-03-12 22:06:53 -04:00
Liam 5be8a74b0c general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
liamwhite fc5226669b Merge pull request #9916 from liamwhite/fpu
kernel: clone fpu status on CreateThread
2023-03-09 09:19:15 -05:00
Liam 1484a6536d kernel: clone fpu status on CreateThread 2023-03-07 19:18:06 -05:00
Liam 1d9ac8a979 kernel: fix WaitSynchronization 2023-03-05 10:29:10 -05:00
liamwhite 7b8304614c Merge pull request #9832 from liamwhite/hle-mp
service: HLE multiprocess
2023-03-01 10:38:20 -05:00
Merry 38f528134f svc: Fix type consistency (exposed on macOS) 2023-02-21 21:39:17 +00:00
Liam 1c3a93e7c4 service: refactor server architecture
Converts services to have their own processes
2023-02-21 12:19:25 -05:00
Liam edda4ad9ae kernel: add KObjectName 2023-02-17 09:16:05 -05:00
liamwhite 207fdfe57d Merge pull request #9796 from liamwhite/current
general: rename CurrentProcess to ApplicationProcess
2023-02-15 17:42:45 -05:00
arades79 60a68839ee remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:35:39 -05:00
arades79 adcef452e0 add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:33:11 -05:00
Liam 832e1e2ca4 kernel: use GetCurrentProcess 2023-02-13 11:05:14 -05:00
Colin Kinloch d0ca9973a7 kernel/svc: Fix undefined info_id 2023-02-11 18:00:34 +00:00
Liam b91913334e kernel/svc: switch to generated wrappers 2023-02-06 23:57:44 -05:00
Liam 2d0892da7f kernel/svc: Split implementations into separate files 2023-02-04 22:37:43 -05:00