Commit graph

6408 commits

Author SHA1 Message Date
MonsterDruide1 d746cfc018 net: translate ECONNRESET network error 2023-02-21 20:47:59 +01:00
Liam 72e5552409 sm:: fix lingering session initialization issues 2023-02-21 12:19:25 -05:00
Liam 6e0a33089b sm:: support service registration deferral 2023-02-21 12:19:25 -05:00
Liam a936972614 service: refactor server architecture
Converts services to have their own processes
2023-02-21 12:19:25 -05:00
liamwhite 898c5d35a5
Merge pull request #9771 from ameerj/host-thread-id
kernel: Refactor thread_local variable usage
2023-02-19 13:12:43 -05:00
Liam 1773a1039f kernel: add KObjectName 2023-02-17 09:16:05 -05:00
liamwhite 6d77de96da
Merge pull request #9796 from liamwhite/current
general: rename CurrentProcess to ApplicationProcess
2023-02-15 17:42:45 -05:00
liamwhite 04d2d2ef5f
Merge pull request #9782 from arades79/fix-consexpr-value-declaration-usage
Fix consexpr value declaration usage
2023-02-15 17:42:38 -05:00
Liam 79fbdfca17 service: remove deleted services 2023-02-14 12:38:21 -05:00
arades79 683019878f 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 26e44a3be4 apply clang-format
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:35:39 -05:00
arades79 45e13b03f3 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 ceda2d280e general: rename CurrentProcess to ApplicationProcess 2023-02-13 19:03:12 -05:00
Liam 4363ca304a kernel: use GetCurrentProcess 2023-02-13 11:05:14 -05:00
bunnei 8b74047b1b
Merge pull request #9757 from german77/gyro
core: hid: Use gyro thresholds modes set by the game
2023-02-12 00:19:22 -08:00
Colin Kinloch 868ab0d3b4 kernel/svc: Fix undefined info_id 2023-02-11 18:00:34 +00:00
liamwhite 709879cfc1
Merge pull request #9773 from bunnei/fix-process-resource
core: kernel: k_process: Use application system resource.
2023-02-11 10:28:50 -05:00
bunnei abd826ba87
Merge pull request #9742 from liamwhite/svc-wrap-only
kernel/svc: switch to generated wrappers
2023-02-10 21:41:22 -08:00
bunnei e79270507b core: kernel: k_process: Use application system resource. 2023-02-10 21:03:39 -08:00
ameerj 5e746da981 kernel: Refactor thread_local variable usage
On MSVC at least, there seems to be a non-trivial overhead to calling GetHostThreadId().

This slightly reworks the host_thread_id variable to reduce some of the complexity around its usage, along with some small refactors around current_thread and dummy thread
2023-02-10 20:43:06 -05:00
Liam 36b70dec05 kernel: avoid usage of bit_cast 2023-02-10 09:13:58 -05:00
Narr the Reg 5e9fa5def5 core: hid: Use gyro thresholds modes set by the game 2023-02-09 19:07:50 -06:00
liamwhite f6477b91f9
Merge pull request #9747 from german77/SetSupportedNpadIdTypes
service: hid: Return error if arguments of SetSupportedNpadIdType is invalid
2023-02-08 10:09:26 -05:00
Narr the Reg c27006e99d service: hid: Return error if arguments of SetSupportedNpadIdType is invalid 2023-02-07 21:11:39 -06:00
Liam 2415d37ea2 kernel/svc: switch to generated wrappers 2023-02-06 23:57:44 -05:00
Liam 82c2a3da9f kernel: fix compilation with older gcc 2023-02-06 13:14:27 -05:00
Liam 92eb091ddb kernel/svc: Split implementations into separate files 2023-02-04 22:37:43 -05:00
ameerj 979e4d9950 fsp_srv: Copy HLE Read Buffer for OutputAccessLogToSdCard 2023-02-03 00:12:16 -05:00
ameerj 2d2522693e Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"
This reverts commit 25fc5c0e11, reversing
changes made to af20e25081.
2023-02-03 00:08:45 -05:00
bunnei 25fc5c0e11
Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span
Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer"
2023-02-02 19:04:50 -08:00
liamwhite b01698775b
Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer" 2023-02-02 15:53:28 -05:00
Liam 7d1c3a3f59 kernel: add KDeviceAddressSpace 2023-02-01 17:18:21 -05:00
bunnei 92c5ab33b7
Merge pull request #9696 from german77/please_forgive_me_for_this_sin
input_common: Implement turbo buttons
2023-02-01 12:08:34 -08:00
german77 75e81885b0 input_common: Implement turbo buttons 2023-02-01 12:42:05 -06:00
bunnei de28cd0c2d
Merge pull request #9697 from liamwhite/kcap
kernel: add KCapabilities
2023-01-31 10:51:10 -08:00
bunnei ed4a88bd93
Merge pull request #9508 from ameerj/hle-ipc-buffer-span
hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer
2023-01-30 12:17:09 -08:00
Liam 67a8740af6 kernel: add KCapabilities 2023-01-29 22:08:28 -05:00
Levi Behunin d5fc56db4b Move to Clang Format 15
Depends on https://github.com/yuzu-emu/build-environments/pull/69

clang-15 primary run
2023-01-29 17:49:42 -07:00
bunnei 32b2a72e7b
Merge pull request #9666 from liamwhite/wait-for-me
kernel: fix incorrect locking order in suspension
2023-01-27 15:06:09 -08:00
Liam e9e1e7aa3a kernel: unbreak min/max template deduction on Apple Clang 2023-01-26 17:43:37 -05:00
bunnei 2158ccda3b
Merge pull request #9604 from liamwhite/pt
kernel: KPageTable: update
2023-01-25 22:27:48 -08:00
Liam 693cad8e9b kernel: split SetAddressKey into user and kernel variants 2023-01-23 20:31:03 -05:00
Liam 5086380a63 kernel: fix incorrect locking order in suspension 2023-01-23 17:14:41 -05:00
Liam 31e54c4573 kernel: KPageTable: update 2023-01-22 13:17:29 -05:00
Narr the Reg 4a307a7b3a core: hid: Only set the polling mode to the correct side 2023-01-19 18:05:23 -06:00
german77 d05ea2f3eb input_common: Fix issue where ring and irs are enabled at the same time 2023-01-19 18:05:22 -06:00
Narr the Reg 459fb2b213 input_common: Implement joycon ir camera 2023-01-19 18:05:22 -06:00
german77 5cb437703f yuzu: Add ring controller test button 2023-01-19 18:05:22 -06:00
Narr the Reg 1c08d532e0 core: hid: Fix input regressions 2023-01-19 18:05:22 -06:00
Narr the Reg 36d5e0a411 service: hid: Set led pattern and fix color detection 2023-01-19 18:05:20 -06:00
Narr the Reg a4074001fe core: hid: Migrate ring from emulated devices to emulated controller 2023-01-19 18:05:20 -06:00
bunnei 413df0811d
Merge pull request #9619 from liamwhite/timing-spaghetti
timing: wait for completion on unregister
2023-01-18 15:13:38 -08:00
Liam 0953cdd271 timing: wait for completion on unregister 2023-01-14 15:48:01 -05:00
Liam 2f2ef5b147 nvnflinger: correct swap interval handling 2023-01-11 22:05:08 -05:00
bunnei a5693afa03
Revert "Revert "k_page_group: synchronize"" 2023-01-07 15:32:10 -08:00
liamwhite bbeb6e460c
Merge pull request #9518 from gidoly/revert-9504-pg2
Revert "k_page_group: synchronize"
2023-01-03 21:40:57 -05:00
german77 80bcc18788 service: nifm: Initialize request state 2023-01-01 20:58:08 -06:00
german77 ebd811b535 service: nifm: Match documentation names 2023-01-01 20:58:01 -06:00
gidoly 10eaf31af3
Revert "k_page_group: synchronize" 2022-12-29 17:39:42 +09:00
ameerj b0722591c9 hle_ipc: Use thread_local ReadBuffer 2022-12-28 18:46:54 -05:00
ameerj a1490d77ac hle_ipc: Rename ReadBufferSpan to ReadBuffer 2022-12-28 18:46:54 -05:00
ameerj 59c0f85407 hle_ipc: Rename ReadBuffer to ReadBufferCopy
Indicates explicitly that a copy is occurring
2022-12-28 18:46:54 -05:00
ameerj 7c1bf68bb4 bsd: Use std::span for read payloads
Allows the use of HLERequestContext::ReadBufferSpan
2022-12-28 18:46:54 -05:00
ameerj f517f82416 nvdrv: Use std::span for inputs
Allows the use of HLERequestContext::ReadBufferSpan
2022-12-28 18:46:53 -05:00
ameerj e7032d9e64 hidbus: Use ReadBufferSpan 2022-12-28 18:46:53 -05:00
ameerj 32d01a39b0 nvflinger: Split Parcel class into InputParcel and OutputParcel
The usages of the Parcel class were already unique to either Read or Write operations.
Avoids needing a vector of the input payload for the InputParcel use-case, instead it can remain as a span.
2022-12-25 17:19:10 -05:00
ameerj 7ffd624248 service: Use ReadBufferSpan where it is trivial to do so 2022-12-25 17:04:02 -05:00
Liam 28d9c30861 k_page_table: remove HACK_OpenPages/ClosePages 2022-12-25 13:43:49 -05:00
ameerj fbc375f0de fsp_srv: Use ReadBufferSpan 2022-12-25 13:21:15 -05:00
ameerj 9349f06963 hle_ipc: Add ReadBufferSpan function
Returns a std::span to the buffer address, rather than create a copy of the memory into a std::vector
2022-12-25 13:20:59 -05:00
Liam 3392fdac9b k_page_group: synchronize 2022-12-25 12:55:21 -05:00
liamwhite c6767704fb
Merge pull request #9496 from liamwhite/shm3
kernel: workaround static shared memory initialization
2022-12-25 12:51:16 -05:00
Liam 99eccf581e kernel: workaround static shared memory initialization 2022-12-23 13:40:30 -05:00
Liam 80670a5b6c time: add LockFreeAtomicType 2022-12-21 22:36:55 -05:00
Liam c770f25ccb kernel: remove TimeManager 2022-12-18 20:21:24 -05:00
Liam 67c0d714c5 kernel: add KHardwareTimer 2022-12-18 16:37:19 -05:00
german77 79f1f326c7 service: nfc: Silence ListDevices 2022-12-18 11:57:33 -06:00
liamwhite 4faea2bbf4
Merge pull request #9452 from ameerj/hle-read-buffer-resreve
hle_ipc: Refactor ReadBuffer to set buffer size upon initialization
2022-12-17 10:21:30 -05:00
liamwhite bbb202ceed
Merge pull request #6354 from ogniK5377/device-name
Set: Allow setting device nickname
2022-12-16 14:05:00 -05:00
liamwhite 789da737af
Merge pull request #9450 from ameerj/hle-ipc-vector-reserve
hle_ipc: Reserve vectors before populating
2022-12-16 11:57:48 -05:00
ameerj b1d633532f hle_ipc: Refactor ReadBuffer to set buffer size upon initialization
Initializing the vector size during initialization is more efficient than a later call to resize()
2022-12-15 23:22:11 -05:00
ameerj 12c0f682e6 hle_ipc: Reserve vectors before populating 2022-12-15 22:30:42 -05:00
Narr the Reg 20cbf6f3db kernel: svc: Fix duplicated InfoType enum 2022-12-15 14:18:30 -06:00
Narr the Reg dca4f0687a kernel: process: Implement GetFreeThreadCount
Used by Just Dance® 2023 Edition
2022-12-15 13:44:21 -06:00
bunnei beba9c9b61
Revert "hle: service: audio: Use default service thread." 2022-12-14 14:57:33 -08:00
Chloe Marcec c5f519e1e4 Set: Allow setting device nickname 2022-12-13 19:54:17 -05:00
bunnei 339a37f8cb
Merge pull request #9398 from liamwhite/fail
general: improve handling of system startup failure
2022-12-12 14:37:42 -08:00
Salvage c586ac9be2
Remove the lock entirely as per PR discussion
Correctly unlock mutex before its destruction

As per https://en.cppreference.com/w/cpp/thread/mutex/~mutex destroying a locked mutex is undefined behavior and MSVC++ decides to throw in this case

Swap out unique for scoped lock and readd comment
2022-12-09 16:39:59 +01:00
Liam 9704acb982 general: improve handling of system startup failure 2022-12-06 16:13:42 -05:00
liamwhite a86af1b776
Merge pull request #9386 from lioncash/init
kernel: Ensure relevant class members are always initialized on construction
2022-12-06 11:26:38 -05:00
liamwhite 04779b3d2a
Merge pull request #9369 from german77/mifare
service: nfc: Implement mifare service
2022-12-05 22:17:32 -05:00
Lioncash efa8711bf3 kernel/k_shared_memory: Ensure device_memory is always initialized 2022-12-05 15:27:57 -05:00
Lioncash c3fd211b43 kernel/k_memory_block: Ensure members are always initialized 2022-12-05 15:27:47 -05:00
Lioncash dcca650599 kernel/physical_core: Ensure is_interrupted is always initialized 2022-12-05 15:19:37 -05:00
Lioncash dddc9bb8f1 kernel/thread: Ensure stack_top and argument are always initialized 2022-12-05 15:19:36 -05:00
Lioncash 4769d798f9 kernel/kernel: Ensure shutdown threads are always initialized 2022-12-05 15:19:36 -05:00
Mai a52d0b82a6
Merge pull request #9381 from liamwhite/uninit
service_thread: fix uninitialized memory usage
2022-12-04 22:30:16 +00:00
Liam cec3a3cd5a service_thread: fix uninitialized memory usage 2022-12-04 16:02:24 -05:00
liamwhite 3b9db85646
Merge pull request #9232 from bunnei/audio-default-thread
hle: service: audio: Use default service thread.
2022-12-04 15:31:40 -05:00
liamwhite 22aff09b33
Merge pull request #9289 from liamwhite/fruit-company
general: fix compile for Apple Clang
2022-12-03 12:09:21 -05:00