Commit graph

6301 commits

Author SHA1 Message Date
Lioncash
ae74f46e78 buffer_item_consumer: Pass fence by const-ref in ReleaseBuffer()
This isn't directly modified.

Also allows rvalues to be used with it.
2022-11-28 19:16:20 -05:00
Lioncash
3020f72b0c buffer_queue_consumer: std::move std::shared_ptr in Connect()
Avoids an unnecessary reference count increment and decrement
2022-11-28 19:12:26 -05:00
Lioncash
c0c4f6dfa6 consumer_base: Pass shared_ptr by const reference
Avoids churning atomic reference count increments and decrements.
2022-11-28 19:09:44 -05:00
Lioncash
260a495a23 consumer_base: Remove redundant virtual
override already serves this purpose
2022-11-28 19:06:34 -05:00
Lioncash
7a329ae56c syncpoint_manager: Mark IsSyncpointAllocated() as const
This doesn't modify class state at all.
2022-11-28 16:08:21 -05:00
Lioncash
d0883027d6 syncpoint_manager: Reduce number of bounds checks
The only time we need to check bounds is on the first access.
2022-11-28 16:06:01 -05:00
Lioncash
ad787b20ca nvdrv: Simplify builder declarations
We can just use auto here. If one of these ever happens to not be
derived from nvdevice, then this will cause a compilation error.

We can also move the devices into the collection to get rid of an
unnecessary atomic reference count increment and decrement.
2022-11-28 10:43:48 -05:00
Lioncash
97f273e94e service: Make use of buffer element count helpers 2022-11-23 13:43:20 -05:00
Lioncash
59335f6796 hle_ipc: Add helper functions for getting number of buffer elements 2022-11-23 13:15:19 -05:00
Lioncash
c31f19b6d1 hle_ipc: Mark relevant member functions as [[nodiscard]]
Will allow the compiler to complain about cases where ignoring the
return value would be a bug.
2022-11-23 13:08:52 -05:00
Liam
9737615948 general: fix compile for Apple Clang 2022-11-22 22:22:28 -05:00
liamwhite
168c9ee341
Merge pull request #9299 from lioncash/cast
k_handle_table: Remove cast to void* in GetObjectForIpc
2022-11-22 17:47:53 -05:00
Lioncash
8d99aae45b k_handle_table: Remove cast to void* in GetObjectForIpc
This was used to get around the KProcess class being incomplete. We can
just move this to the cpp file and eliminate the cast entirely, letting
the compiler do its work.
2022-11-22 13:58:42 -05:00
Narr the Reg
db7bcd51ae
Merge branch 'master' into nfc_impl 2022-11-20 09:31:20 -06:00
bunnei
57a05b1653
Merge pull request #9238 from german77/cabinet_applet
service: am: Implement cabinet applet
2022-11-20 00:48:39 -08:00
liamwhite
bcbc25eeb3
Merge pull request #9191 from german77/touching_souls
core: hid: Implement true multitouch support
2022-11-19 13:21:01 -05:00
Narr the Reg
327d225c3e service: nfc: Implement nfc user 2022-11-19 08:51:59 -06:00
german77
aa075a0c08 service: hid: Only overclock npad controllers 2022-11-19 08:44:42 -06:00
bunnei
1fb33bd1e1
Merge pull request #9234 from liamwhite/data-cash-money
kernel: implement data cache management operations
2022-11-18 13:18:36 -08:00
bunnei
405d685101
Merge pull request #9244 from liamwhite/lost-wakeup
nvnflinger: fix lost wakeup
2022-11-17 17:15:47 -08:00
Morph
e5a446a0df
Merge pull request #9229 from Docteh/achy_breaky_heart
Add break for default cases
2022-11-17 19:20:18 -05:00
bunnei
9e27624a19
Merge pull request #9243 from german77/result
core: Update result module
2022-11-14 20:36:38 -08:00
Liam
cf202f3718 nvnflinger: fix lost wakeup 2022-11-14 21:18:52 -05:00
Narr the Reg
18fcc03b3c core: Update result module 2022-11-14 20:08:47 -06:00
Kyle Kienapfel
6fa3faec65 Add break for default cases
Visual Studio has an option to search all files in a solution, so I
did a search in there for "default:" looking for any missing break
statements.

I've left out default statements that return something, and that throw
something, even if via ThrowInvalidType. UNREACHABLE leads towards throw

R_THROW macro leads towards a return
2022-11-13 16:30:55 -08:00
german77
75e6ec85e1 general: Address review comments 2022-11-13 17:13:43 -06:00
german77
a253d1557d service: am: Fix cabinet applet result 2022-11-13 14:25:00 -06:00
german77
fb57cd26a1 service: am: Implement cabinet applet backend 2022-11-13 11:07:48 -06:00
german77
6c045c9beb service: nfc: fix tagprotocol and implement GetApplicationAreaId 2022-11-13 10:52:48 -06:00
liamwhite
040a01a5dd
Merge pull request #9225 from liamwhite/debugger-instance
Debugger improvements
2022-11-12 21:04:00 -05:00
Liam
651f6598ac kernel: implement FlushProcessDataCache 2022-11-12 11:27:04 -05:00
bunnei
b51c1544b9
Merge pull request #9224 from liamwhite/services-arent-processes
service_thread: remove explicit KProcess
2022-11-11 22:37:04 -08:00
bunnei
0d6a8824d0 hle: service: audio: Use default service thread.
- This was arbitrarily added by me, and does not appear to be helpful.
2022-11-11 17:34:39 -08:00
bunnei
d05b183f21
Merge pull request #9198 from liamwhite/arm64
Initial ARM64 support
2022-11-10 17:11:27 -08:00
Liam
18123ff958 gdbstub: add ams monitor commands 2022-11-10 19:20:57 -05:00
Liam
b34d3d5882 service_thread: remove explicit KProcess 2022-11-10 16:14:03 -05:00
Liam
4eece4d35d kernel/svc_types: refresh 2022-11-09 19:05:08 -05:00
bunnei
770f23db34
Merge pull request #9182 from liamwhite/services-are-processes
kernel: assign KProcess to service threads
2022-11-09 15:52:23 -08:00
Liam
cbaf642ffe Initial ARM64 support 2022-11-09 16:58:49 -05:00
Fernando S
3161b34ff6
Merge pull request #9215 from liamwhite/swordfight
Ensure correctness of atomic store ordering
2022-11-09 14:50:49 +01:00
Liam
71c0e20f95 Ensure correctness of atomic store ordering 2022-11-09 08:09:50 -05:00
Liam
6a0d8b2aa1 service_thread: fix deletion 2022-11-06 19:50:51 -05:00
liamwhite
4c198bbf06
Merge pull request #9173 from bunnei/kern-update-15
Kernel: Various updates for FW 15.0.x
2022-11-05 13:25:29 -04:00
Liam
cf0f821565 core: hle: kernel: Address review comments. 2022-11-05 12:23:47 -04:00
Liam
e6fe40428c service_thread: register service threads to the logical owner process 2022-11-04 09:18:57 -04:00
Liam
85527cc7c7 kernel: avoid racy behavior in global suspension 2022-11-04 09:18:57 -04:00
bunnei
37de88040c
Merge pull request #9135 from liamwhite/service-thread-event
kernel: invert session request handling flow
2022-11-03 21:45:56 -07:00
bunnei
05ae0cab0e core: hle: kernel: k_page_table: Remove unnecessary casts. 2022-11-03 21:17:08 -07:00
bunnei
119315af08 core: hle: kernel: k_page_table: Manually open/close pages for IPC methods. 2022-11-03 21:17:08 -07:00
bunnei
661fe06d9d core: hle: kernel: k_page_table: Implement IPC memory methods. 2022-11-03 21:17:07 -07:00
bunnei
ba21ba0c5c core: hle: kernel: k_memory_manager: Refresh. 2022-11-03 21:17:07 -07:00
bunnei
32d7faafa8 core: hle: kernel: Integrate system KSystemResource. 2022-11-03 21:17:07 -07:00
bunnei
b7b47f3099 core: hle: kernel: k_dynamic_page_manager: Refresh. 2022-11-03 21:17:07 -07:00
bunnei
6f941121e6 core: hle: kernel: Add KSystemResource. 2022-11-03 21:17:07 -07:00
bunnei
6636b81573 core: hle: kernel: k_handle_table: Refresh. 2022-11-03 21:17:07 -07:00
bunnei
1f21fa866d core: hle: kernel: k_memory_layout: Refresh. 2022-11-03 21:17:07 -07:00
bunnei
84d130f143 core: hle: kernel: k_memory_region_type: Refresh. 2022-11-03 21:17:07 -07:00
bunnei
d928ba8e40 core: hle: kernel: slab_helpers: Add KAutoObjectWithSlabHeap. 2022-11-03 21:17:06 -07:00
bunnei
3aab7d4473 core: hle: kernel: k_dynamic_resource_manager: Add KBlockInfoManager, KBlockInfoSlabHeap. 2022-11-03 21:17:06 -07:00
bunnei
6b6c02f541 core: hle: kernel: k_page_bitmap: Refresh. 2022-11-03 21:17:06 -07:00
bunnei
50bfacca88 core: hle: kernel: k_memory_block: Refresh. 2022-11-03 21:17:06 -07:00
bunnei
0cb9bc12fc core: hle: kernel: k_page_heap: Refresh. 2022-11-03 21:17:06 -07:00
bunnei
6257461684 core: hle: kernel: k_page_group: Add KPageBufferSlabHeap. 2022-11-03 21:17:06 -07:00
bunnei
d353c45f7d core: hle: kernel: k_system_control: Add SecureAppletMemorySize. 2022-11-03 21:17:06 -07:00
bunnei
f76b4417e6 core: hle: kernel: k_page_buffer: Add KPageBufferSlabHeap. 2022-11-03 21:17:06 -07:00
bunnei
0897f4f96c core: hle: kernel: Add KPageTableManager. 2022-11-03 21:17:06 -07:00
bunnei
6d4f411c08 core: hle: kernel: Add KPageTableSlabHeap. 2022-11-03 21:17:06 -07:00
bunnei
37b17252d1 core: hle: kernel: Add KEventInfo. 2022-11-03 21:17:06 -07:00
bunnei
ddd3f48736 core: hle: kernel: Add KDebug. 2022-11-03 21:17:06 -07:00
bunnei
46322be735 core: hle: result: Fix code for compilers. 2022-11-03 21:17:06 -07:00
bunnei
75ab52f05b core: hle: service: acc: Fix ListOpenContextStoredUsers/StoreOpenContext.
- These APIs are used to capture the opened users and allow that state to be persisted across processes.
- They are not intended to just return the system opened users, that is what ListOpenUsers is for.
- Fixes the launch hang with Bayonetta 3.
2022-11-02 16:09:30 -07:00
Liam
77b74f5d95 sm:: avoid excessive port recreation 2022-10-31 17:47:39 -04:00
Liam
633411c20f kernel: fix single core for service threads 2022-10-31 17:45:46 -04:00
Liam
2228383322 kernel: fix port tracking 2022-10-31 17:45:46 -04:00
Liam
7aa91c8d9c k_server_session: add SendReplyHLE 2022-10-31 17:45:45 -04:00
Liam
7837185f0a service_thread: convert to map for session management 2022-10-31 17:44:07 -04:00
Liam
983f2b7074 kernel: invert session request handling flow 2022-10-31 17:44:06 -04:00
Liam
4e9adae5da kernel: more complete fix for KPort reference counting 2022-10-31 08:23:29 -04:00
Liam
eec3184bb0 k_thread: fix single core 2022-10-30 18:44:29 -04:00
bunnei
ccfdb7c1af
Merge pull request #9149 from german77/volum
service: am: Stub SetRecordVolumeMuted
2022-10-29 23:36:15 -07:00
german77
6f0f7f1547 service: am: Stub SetRecordVolumeMuted
Used by bayonetta 3
2022-10-30 00:34:33 -05:00
Liam
d867ae5ab6 k_server_session: fix crashes 2022-10-29 23:05:56 -04:00
bunnei
c4d91488d9
Merge pull request #9137 from liamwhite/hbmenu
Improved support for nx-hbmenu
2022-10-29 16:11:26 -07:00
Liam
2cdfbbc07d nvnflinger: release queued handles immediately on disconnection 2022-10-27 08:28:02 -04:00
Liam
cdb9fe978f vi: implement CloseDisplay 2022-10-27 08:27:38 -04:00
liamwhite
86a3a0b1b4
Merge pull request #9134 from lioncash/init
audio_in/out_system: Pass Initialize members by value where applicable
2022-10-27 08:10:24 -04:00
bunnei
2dd6a2352d
Merge pull request #9125 from liamwhite/dummy-scheduler
kernel: refactor dummy thread wakeups
2022-10-26 09:51:44 -07:00
Lioncash
e0ec9ffc36 audio_in/out_system: Pass Initialize members by value where applicable
applet_resource_user_id isn't actually modified and is just assigned to
a member variable, so this doesn't need to be a mutable reference.

Similarly, the device name itself isn't modified and is only moved. We
pass by value here, since we can still perform the move, but eliminate a
sneaky set of calls that can unintentionally destroy the original
string. Given how nested the calls are, it's good to get rid of this
potential vector for a use-after-move bug.
2022-10-26 11:21:48 -04:00
Morph
8b4d5aeb4f concepts: Use the std::contiguous_iterator concept
This also covers std::span, which does not have a const iterator.

Also renames IsSTLContainer to IsContiguousContainer to explicitly convey its semantics.
2022-10-26 00:41:54 -04:00
liamwhite
e59bd6c335
Merge pull request #9113 from german77/peer_pressure
service: nfp: Allow amiibos without keys
2022-10-25 12:13:31 -04:00
liamwhite
77803d96be
Merge pull request #9107 from german77/gidoly_rules
input_common: cache vibration tests
2022-10-25 12:13:18 -04:00
liamwhite
3c38bd7cf0
Merge pull request #9119 from liamwhite/shutdown-barrier
core: barrier service thread shutdown
2022-10-25 06:45:51 -04:00
Liam
1a378a7769 kernel: refactor dummy thread wakeups 2022-10-24 19:52:01 -04:00
Fernando S
2e782a154d
Merge pull request #9122 from liamwhite/burnt-chicken
nvdrv: fix container destruction order
2022-10-24 12:41:46 +02:00
Liam
05f2673648 nvdrv: fix container destruction order 2022-10-23 19:25:57 -04:00
Liam
2d90a927c9 core: barrier service thread shutdown 2022-10-23 05:45:45 -04:00
Morph
347432524c ipc_helpers: Ignore GCC compiler warnings only on GCC
Clang and ICC for whatever reason also defines __GNUC__. Exclude them from this check.
2022-10-22 15:02:04 -04:00
Morph
e6ab1f673b general: Enforce C4800 everywhere except in video_core 2022-10-22 15:02:04 -04:00
Narr the Reg
3e0aaeba98 service: nfp: Allow amiibos without keys 2022-10-21 23:08:07 -05:00
Narr the Reg
82fdfb33ac service: nfp: remove unnecessary include 2022-10-21 21:54:31 -05:00