Commit graph

179 commits

Author SHA1 Message Date
Ben
182ffa4243
APT: implement Set and GetWirelessRebootInfo (#5328)
* APT: implement Set and GetWirelessRebootInfo

* make wireless_reboot_info a member of APT::Module

* Removed stubbed from log message
2020-11-23 15:52:35 +01:00
Lioncash
ba2ae9616a fs_user: std::move vectors where applicable
Allows removing some allocation churn in some locations by moving
std::vectors into Path where applicable.
2020-05-04 12:07:57 -04:00
Mat M
e9819b61a6
service: Mark variables as [[maybe_unused]] where applicable (#5318)
Quite a few service functions are stubbed but still pop all their
arguments, which can lead to unused variable warnings.

We can mark the unused arguments with [[maybe_unused]] to silence these
warnings until a full implementation of these functions are made.
2020-05-04 12:22:33 +02:00
Sebastian Valle
3597921ec5
Merge pull request #5235 from lioncash/move
ipc_helpers: Make PushStaticBuffer take std::vector by value
2020-04-19 21:51:52 -05:00
Ben
1856752b61
Merge pull request #5203 from Subv/apt_title_allowed
Services/APT: Implemented the IsTitleAllowed function.
2020-04-19 16:50:47 +02:00
Lioncash
7eabcdf1c3 apt/applet_manager: std::move parameter in GlanceParameter()
Same behavior, minus a redundant copy.
2020-04-18 19:22:03 -04:00
Lioncash
a6e37b48e9 ipc_helpers: Make PushStaticBuffer take std::vector by value
Allows interfaces to move the vector into the calls, avoiding any
reallocations.

Many existing call sites already std::move into the parameter, expecting
a move to occur. Only a few remain where this wasn't already
being done, which we can convert over.
2020-04-18 19:17:11 -04:00
Sebastian Valle
75c9784239
Services/APT: Implemented the GetCaptureInfo function. (#5194)
This one is similar to the ReceiveCaptureBufferInfo function except it doesn't clear the capture buffer, according to 3dbrew.

This function is used by the Home Menu
2020-04-18 20:48:09 +02:00
Subv
07f49e588e Services/APT: Implemented the IsTitleAllowed function.
The Home Menu uses this to determine whether it is allowed to launch an app (call StartApplication)

This is a no-op for us, we allow any and all titles to be launched. The official APT module holds a list of some forbidden titles like some versions of IronFall and Flipnote Studio 3D.
2020-04-18 00:26:08 -05:00
Pengfei Zhu
8967b403b9
Merge pull request #5196 from Subv/apt_sys_menu_arg
Services/APT: Implemented the Store/LoadSysMenuArg functions.
2020-04-18 13:24:10 +08:00
Subv
0d8c3ee1d3 Services/APT: Implemented the Store/LoadSysMenuArg functions.
They are called by the Home Menu during initialization.

These functions will not see much use until we actually implement application jumping and system rebooting. For now we just need them to prevent some unmapped reads in the Home Menu due to the static buffers not being properly set up.
2020-04-15 22:32:11 -05:00
Hamish Milne
6760ea18b6 Serialize ArchiveManager and other code review actions 2020-03-29 18:56:25 +01:00
Hamish Milne
d041901a30 Some more CI fixes 2020-02-13 17:41:20 +08:00
Hamish Milne
c7106e232f Fix a bug on mingw 2020-02-13 17:41:16 +08:00
Hamish Milne
7b846ffa98 clang-format fixes 2020-02-13 17:39:15 +08:00
Hamish Milne
d482fb359c Attempting to fix mingw on windows 2020-02-13 17:38:25 +08:00
Hamish Milne
3ed8d95866 Serialize FS service; some compiler fixes 2020-02-13 17:38:24 +08:00
Hamish Milne
1185d62792 BOSS service serialization 2020-02-13 17:38:22 +08:00
Hamish Milne
5265c79056 APT service serialization 2020-02-13 17:38:21 +08:00
Valentin Vanelslande
2959b002cd applet_manager: remove the "we are going to disable loading LLE applets before further fixes are done" comments
LLE Applets are enabled again in #4500, but @wwylele didn't remove these comments.
2019-08-29 20:41:16 -05:00
James Rowe
331a9fc12b Change over to std::shared_ptr 2019-08-14 21:30:49 -06:00
James Rowe
61ebeca765 NS: Lowercase NS:S to ns:s like it should be 2019-08-14 21:23:06 -06:00
James Rowe
6c8faaf2c2 HLE: Remove BaseInterface and add ns.cpp back 2019-08-14 21:23:06 -06:00
James Rowe
f2167d76a8 Service: Add BaseInterface and NSInterface 2019-08-14 21:23:03 -06:00
James Rowe
b62ca12e88 HLE: Move NS:S into APT and remove NS 2019-08-14 21:21:33 -06:00
Weiyi Wang
05058863b5 cleanup includes 2019-03-26 10:50:41 -04:00
Weiyi Wang
5f11c5f733 Kernel: replace boost::intrusive_ptr with std::shared_ptr 2019-03-24 14:32:11 -04:00
Weiyi Wang
6ce58248b0 APT: use member system instead of global instance 2019-03-10 11:10:24 -04:00
Weiyi Wang
b49f2d2958 APT: enable LLE applet 2018-12-10 22:25:02 -05:00
Lioncash
1cb9bea504 kernel/shared_memory: Make data members private
Rather than allow unfettered access to the class internals, we hide all
members by default and create and API that other code can operate
against.
2018-11-23 16:20:18 +01:00
Weiyi Wang
cfa9a322c7 Kernel/SharedMemory: set and reset source memory state 2018-11-16 00:24:08 -05:00
Weiyi Wang
8c65433ab5 Kernel, APT: SharedFont/SharedMemoryOnSharedDevice should always use old linear heap VAddr 2018-11-08 00:19:19 -05:00
Weiyi Wang
2067946f59
Kernel: reimplement memory management on physical FCRAM (#4392)
* Kernel: reimplement memory management on physical FCRAM

* Kernel/Process: Unmap does not care the source memory permission

What game usually does is after mapping the memory, they reprotect the source memory as no permission to avoid modification there

* Kernel/SharedMemory: zero initialize new-allocated memory

* Process/Thread: zero new TLS entry

* Kernel: fix a bug where code segments memory usage are accumulated twice

It is added to both misc and heap (done inside HeapAlloc), which results a doubled number reported by svcGetProcessInfo. While we are on it, we just merge the three number misc, heap and linear heap usage together, as there is no where they are distinguished.

Question: is TLS page also added to this number?

* Kernel/SharedMemory: add more object info on mapping error

* Process: lower log level; SharedMemory: store phys offset

* VMManager: add helper function to retrieve backing block list for a range
2018-11-06 15:00:47 -05:00
Weiyi Wang
8fb3d8ff38 kernel/process: move current process to kernel instance
Two functional change:
QueryProcessMemory uses the process passed from handle instead current_process
Thread::Stop() uses TLS from owner_process instead of current_process
2018-10-22 21:32:34 -04:00
Weiyi Wang
87426b29ff kernel: pass ref to shared memory 2018-10-18 21:41:36 -04:00
Weiyi Wang
7449ba85a6 Kernel: pass ref in Mutex 2018-10-18 21:41:36 -04:00
Weiyi Wang
eec11a94cb Kernel: pass Kernel ref in Event 2018-10-18 21:41:36 -04:00
Weiyi Wang
1de63f9b16
Merge pull request #4328 from B3n30/remove_current_module
remove GetCurrentModule() functions in HLE Services
2018-10-18 21:39:24 -04:00
B3n30
eb3af0f16a Add GetModule() helper functions, for HID, CAM, and CFG 2018-10-12 11:50:50 +02:00
B3n30
1b1de23a98 Fixup: Remove unneeded GetUsername 2018-10-11 20:05:45 +02:00
B3n30
9d53136f20 remove GetCurrentModule() functions in HLE Services 2018-10-11 19:23:14 +02:00
Weiyi Wang
9adc407112
Merge pull request #4304 from B3n30/std_optional
Replace boost::optional with std::optional where possible
2018-10-11 12:40:00 -04:00
Subv
8ec2a9817c Services/APT: Better implementation of PrepareToDoApplicationJump and DoApplicationJump.
The real console can't launch an Application directly from within another Application so it has to go through the Home Menu. We do not have such limitation and can directly launch the requested title.
2018-10-06 17:08:24 -05:00
Weiyi Wang
b163502744
Core: pass down Core::System reference to all services (#4272)
* Core: pass down Core::System reference to all services

This has to be done at once due to unified interface used by HLE/LLE switcher

* apt: eliminate Core::System::GetInstance

* gpu_gsp: eliminate Core::System::GetInstance in service

* hid: eliminate Core::System::GetInstance

* nwm: eliminate Core::System::GetInstance

* err_f: eliminate Core::System::GetInstance
2018-10-05 10:59:43 -04:00
B3n30
2306af3600 Handle cases when std::optional does not contain a value 2018-10-05 16:51:33 +02:00
B3n30
d37a2270d6 Replace boost::optional with std::optional where possible 2018-10-05 13:51:09 +02:00
Weiyi Wang
94b273ac20 APT: access FS via backend directly 2018-09-28 14:08:30 -04:00
Weiyi Wang
20e42592ff
Merge pull request #4249 from FearlessTobi/port-760
Port yuzu-emu/yuzu#760: "file_util: Use an enum class for GetUserPath()"
2018-09-22 23:42:59 -04:00
Lioncash
b3221c3180 file_util: Use an enum class for GetUserPath()
Instead of using an unsigned int as a parameter and expecting a user to
always pass in the correct values, we can just convert the enum into an
enum class and use that type as the parameter type instead, which makes
the interface more type safe.

We also get rid of the bookkeeping "NUM_" element in the enum by just
using an unordered map. This function is generally low-frequency in
terms of calls (and I'd hope so, considering otherwise would mean we're
slamming the disk with IO all the time) so I'd consider this acceptable
in this case.
2018-09-22 21:18:56 +02:00
Lioncash
46da908a00 service: Use nested namespace specifiers where applicable
There were a few places where nested namespace specifiers weren't being
used where they could be within the service code. This amends that to
make the namespacing a tiny bit more compact.
2018-09-22 16:14:10 +02:00