summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/logging/backend.cpp1
-rw-r--r--src/common/logging/log.h1
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/audio/audren_u.cpp13
-rw-r--r--src/core/hle/service/nfp/nfp.cpp48
-rw-r--r--src/core/hle/service/nfp/nfp.h2
-rw-r--r--src/core/hle/service/nfp/nfp_user.cpp2
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp1
-rw-r--r--src/core/hle/service/prepo/prepo.cpp43
-rw-r--r--src/core/hle/service/prepo/prepo.h23
-rw-r--r--src/core/hle/service/service.cpp4
-rw-r--r--src/core/hle/service/ssl/ssl.cpp12
-rw-r--r--src/core/hle/service/ssl/ssl.h1
13 files changed, 140 insertions, 13 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 26cd75a3e..618be0864 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -48,6 +48,7 @@ namespace Log {
48 SUB(Service, NS) \ 48 SUB(Service, NS) \
49 SUB(Service, NVDRV) \ 49 SUB(Service, NVDRV) \
50 SUB(Service, PCTL) \ 50 SUB(Service, PCTL) \
51 SUB(Service, PREPO) \
51 SUB(Service, SET) \ 52 SUB(Service, SET) \
52 SUB(Service, SM) \ 53 SUB(Service, SM) \
53 SUB(Service, SPL) \ 54 SUB(Service, SPL) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index 45821850c..ade44d9c7 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -65,6 +65,7 @@ enum class Class : ClassType {
65 Service_NS, ///< The NS services 65 Service_NS, ///< The NS services
66 Service_NVDRV, ///< The NVDRV (Nvidia driver) service 66 Service_NVDRV, ///< The NVDRV (Nvidia driver) service
67 Service_PCTL, ///< The PCTL (Parental control) service 67 Service_PCTL, ///< The PCTL (Parental control) service
68 Service_PREPO, ///< The PREPO(Play report) service
68 Service_SET, ///< The SET (Settings) service 69 Service_SET, ///< The SET (Settings) service
69 Service_SM, ///< The SM (Service manager) service 70 Service_SM, ///< The SM (Service manager) service
70 Service_SPL, ///< The SPL service 71 Service_SPL, ///< The SPL service
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index f4be926e4..45dbd6796 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -185,6 +185,8 @@ add_library(core STATIC
185 hle/service/pctl/module.h 185 hle/service/pctl/module.h
186 hle/service/pctl/pctl.cpp 186 hle/service/pctl/pctl.cpp
187 hle/service/pctl/pctl.h 187 hle/service/pctl/pctl.h
188 hle/service/prepo/prepo.cpp
189 hle/service/prepo/prepo.h
188 hle/service/service.cpp 190 hle/service/service.cpp
189 hle/service/service.h 191 hle/service/service.h
190 hle/service/set/set.cpp 192 hle/service/set/set.cpp
diff --git a/src/core/hle/service/audio/audren_u.cpp b/src/core/hle/service/audio/audren_u.cpp
index 72810b436..291885db8 100644
--- a/src/core/hle/service/audio/audren_u.cpp
+++ b/src/core/hle/service/audio/audren_u.cpp
@@ -162,12 +162,13 @@ public:
162 {0x3, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceName"}, 162 {0x3, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceName"},
163 {0x4, &IAudioDevice::QueryAudioDeviceSystemEvent, "QueryAudioDeviceSystemEvent"}, 163 {0x4, &IAudioDevice::QueryAudioDeviceSystemEvent, "QueryAudioDeviceSystemEvent"},
164 {0x5, &IAudioDevice::GetActiveChannelCount, "GetActiveChannelCount"}, 164 {0x5, &IAudioDevice::GetActiveChannelCount, "GetActiveChannelCount"},
165 {0x6, nullptr, "ListAudioDeviceNameAuto"}, 165 {0x6, &IAudioDevice::ListAudioDeviceName,
166 {0x7, nullptr, "SetAudioDeviceOutputVolumeAuto"}, 166 "ListAudioDeviceNameAuto"}, // TODO(ogniK): Confirm if autos are identical to non auto
167 {0x7, &IAudioDevice::SetAudioDeviceOutputVolume, "SetAudioDeviceOutputVolumeAuto"},
167 {0x8, nullptr, "GetAudioDeviceOutputVolumeAuto"}, 168 {0x8, nullptr, "GetAudioDeviceOutputVolumeAuto"},
168 {0x10, nullptr, "GetActiveAudioDeviceNameAuto"}, 169 {0xa, &IAudioDevice::GetActiveAudioDeviceName, "GetActiveAudioDeviceNameAuto"},
169 {0x11, nullptr, "QueryAudioDeviceInputEvent"}, 170 {0xb, nullptr, "QueryAudioDeviceInputEvent"},
170 {0x12, nullptr, "QueryAudioDeviceOutputEvent"}}; 171 {0xc, nullptr, "QueryAudioDeviceOutputEvent"}};
171 RegisterHandlers(functions); 172 RegisterHandlers(functions);
172 173
173 buffer_event = 174 buffer_event =
@@ -257,7 +258,7 @@ void AudRenU::GetAudioRendererWorkBufferSize(Kernel::HLERequestContext& ctx) {
257 IPC::ResponseBuilder rb{ctx, 4}; 258 IPC::ResponseBuilder rb{ctx, 4};
258 259
259 rb.Push(RESULT_SUCCESS); 260 rb.Push(RESULT_SUCCESS);
260 rb.Push<u64>(0x400); 261 rb.Push<u64>(0x4000);
261 262
262 NGLOG_WARNING(Service_Audio, "(STUBBED) called"); 263 NGLOG_WARNING(Service_Audio, "(STUBBED) called");
263} 264}
diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp
index 6627aaddc..a1cd6b24a 100644
--- a/src/core/hle/service/nfp/nfp.cpp
+++ b/src/core/hle/service/nfp/nfp.cpp
@@ -12,10 +12,52 @@ namespace Service::NFP {
12Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) 12Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
13 : ServiceFramework(name), module(std::move(module)) {} 13 : ServiceFramework(name), module(std::move(module)) {}
14 14
15void Module::Interface::Unknown(Kernel::HLERequestContext& ctx) { 15class IUser final : public ServiceFramework<IUser> {
16 NGLOG_WARNING(Service_NFP, "(STUBBED) called"); 16public:
17 IPC::ResponseBuilder rb{ctx, 2}; 17 IUser() : ServiceFramework("IUser") {
18 static const FunctionInfo functions[] = {
19 {0, &IUser::Initialize, "Initialize"},
20 {1, nullptr, "Unknown1"},
21 {2, nullptr, "Unknown2"},
22 {3, nullptr, "Unknown3"},
23 {4, nullptr, "Unknown4"},
24 {5, nullptr, "Unknown5"},
25 {6, nullptr, "Unknown6"},
26 {7, nullptr, "Unknown7"},
27 {8, nullptr, "Unknown8"},
28 {9, nullptr, "Unknown9"},
29 {10, nullptr, "Unknown10"},
30 {11, nullptr, "Unknown11"},
31 {12, nullptr, "Unknown12"},
32 {13, nullptr, "Unknown13"},
33 {14, nullptr, "Unknown14"},
34 {15, nullptr, "Unknown15"},
35 {16, nullptr, "Unknown16"},
36 {17, nullptr, "Unknown17"},
37 {18, nullptr, "Unknown18"},
38 {19, nullptr, "Unknown19"},
39 {20, nullptr, "Unknown20"},
40 {21, nullptr, "Unknown21"},
41 {22, nullptr, "Unknown22"},
42 {23, nullptr, "Unknown23"},
43 {24, nullptr, "Unknown24"},
44 };
45 RegisterHandlers(functions);
46 }
47
48private:
49 void Initialize(Kernel::HLERequestContext& ctx) {
50 LOG_WARNING(Service_NFP, "(STUBBED) called");
51 IPC::ResponseBuilder rb{ctx, 2};
52 rb.Push(RESULT_SUCCESS);
53 }
54};
55
56void Module::Interface::CreateUserInterface(Kernel::HLERequestContext& ctx) {
57 LOG_WARNING(Service_NFP, "(STUBBED) called");
58 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
18 rb.Push(RESULT_SUCCESS); 59 rb.Push(RESULT_SUCCESS);
60 rb.PushIpcInterface<IUser>();
19} 61}
20 62
21void InstallInterfaces(SM::ServiceManager& service_manager) { 63void InstallInterfaces(SM::ServiceManager& service_manager) {
diff --git a/src/core/hle/service/nfp/nfp.h b/src/core/hle/service/nfp/nfp.h
index 095209ad8..262a666cb 100644
--- a/src/core/hle/service/nfp/nfp.h
+++ b/src/core/hle/service/nfp/nfp.h
@@ -14,7 +14,7 @@ public:
14 public: 14 public:
15 Interface(std::shared_ptr<Module> module, const char* name); 15 Interface(std::shared_ptr<Module> module, const char* name);
16 16
17 void Unknown(Kernel::HLERequestContext& ctx); 17 void CreateUserInterface(Kernel::HLERequestContext& ctx);
18 18
19 protected: 19 protected:
20 std::shared_ptr<Module> module; 20 std::shared_ptr<Module> module;
diff --git a/src/core/hle/service/nfp/nfp_user.cpp b/src/core/hle/service/nfp/nfp_user.cpp
index e94c271e7..b608fe693 100644
--- a/src/core/hle/service/nfp/nfp_user.cpp
+++ b/src/core/hle/service/nfp/nfp_user.cpp
@@ -9,7 +9,7 @@ namespace Service::NFP {
9NFP_User::NFP_User(std::shared_ptr<Module> module) 9NFP_User::NFP_User(std::shared_ptr<Module> module)
10 : Module::Interface(std::move(module), "nfp:user") { 10 : Module::Interface(std::move(module), "nfp:user") {
11 static const FunctionInfo functions[] = { 11 static const FunctionInfo functions[] = {
12 {0, &NFP_User::Unknown, "Unknown"}, 12 {0, &NFP_User::CreateUserInterface, "CreateUserInterface"},
13 }; 13 };
14 RegisterHandlers(functions); 14 RegisterHandlers(functions);
15} 15}
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
index 1e457ae6e..3c78ecaea 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
@@ -79,6 +79,7 @@ u32 nvhost_ctrl_gpu::GetTPCMasks(const std::vector<u8>& input, std::vector<u8>&
79 std::memcpy(&params, input.data(), input.size()); 79 std::memcpy(&params, input.data(), input.size());
80 NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, mask={:#X}, mask_buf_addr={:#X}", 80 NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, mask={:#X}, mask_buf_addr={:#X}",
81 params.mask_buf_size, params.mask_buf_addr); 81 params.mask_buf_size, params.mask_buf_addr);
82 params.unk = 0xcafe; // TODO(ogniK): Needs to be non 0, what does this actually do?
82 std::memcpy(output.data(), &params, sizeof(params)); 83 std::memcpy(output.data(), &params, sizeof(params));
83 return 0; 84 return 0;
84} 85}
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp
new file mode 100644
index 000000000..3c43b8d8c
--- /dev/null
+++ b/src/core/hle/service/prepo/prepo.cpp
@@ -0,0 +1,43 @@
1#include <cinttypes>
2#include "common/logging/log.h"
3#include "core/hle/ipc_helpers.h"
4#include "core/hle/kernel/event.h"
5#include "core/hle/service/prepo/prepo.h"
6
7namespace Service::PlayReport {
8PlayReport::PlayReport(const char* name) : ServiceFramework(name) {
9 static const FunctionInfo functions[] = {
10 {10100, nullptr, "SaveReport"},
11 {10101, &PlayReport::SaveReportWithUser, "SaveReportWithUser"},
12 {10200, nullptr, "RequestImmediateTransmission"},
13 {10300, nullptr, "GetTransmissionStatus"},
14 {20100, nullptr, "SaveSystemReport"},
15 {20200, nullptr, "SetOperationMode"},
16 {20101, nullptr, "SaveSystemReportWithUser"},
17 {30100, nullptr, "ClearStorage"},
18 {40100, nullptr, "IsUserAgreementCheckEnabled"},
19 {40101, nullptr, "SetUserAgreementCheckEnabled"},
20 {90100, nullptr, "GetStorageUsage"},
21 {90200, nullptr, "GetStatistics"},
22 {90201, nullptr, "GetThroughputHistory"},
23 {90300, nullptr, "GetLastUploadError"},
24 };
25 RegisterHandlers(functions);
26};
27
28void PlayReport::SaveReportWithUser(Kernel::HLERequestContext& ctx) {
29 // TODO(ogniK): Do we want to add play report?
30 LOG_WARNING(Service_PREPO, "(STUBBED) called");
31
32 IPC::ResponseBuilder rb{ctx, 2};
33 rb.Push(RESULT_SUCCESS);
34};
35
36void InstallInterfaces(SM::ServiceManager& service_manager) {
37 std::make_shared<PlayReport>("prepo:a")->InstallAsService(service_manager);
38 std::make_shared<PlayReport>("prepo:m")->InstallAsService(service_manager);
39 std::make_shared<PlayReport>("prepo:s")->InstallAsService(service_manager);
40 std::make_shared<PlayReport>("prepo:u")->InstallAsService(service_manager);
41}
42
43} // namespace Service::PlayReport
diff --git a/src/core/hle/service/prepo/prepo.h b/src/core/hle/service/prepo/prepo.h
new file mode 100644
index 000000000..3708e0dcb
--- /dev/null
+++ b/src/core/hle/service/prepo/prepo.h
@@ -0,0 +1,23 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <memory>
6#include <string>
7#include "core/hle/kernel/event.h"
8#include "core/hle/service/service.h"
9
10namespace Service::PlayReport {
11
12class PlayReport final : public ServiceFramework<PlayReport> {
13public:
14 explicit PlayReport(const char* name);
15 ~PlayReport() = default;
16
17private:
18 void SaveReportWithUser(Kernel::HLERequestContext& ctx);
19};
20
21void InstallInterfaces(SM::ServiceManager& service_manager);
22
23} // namespace Service::PlayReport
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index a85c406be..34d691b90 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -29,7 +29,8 @@
29#include "core/hle/service/nifm/nifm.h" 29#include "core/hle/service/nifm/nifm.h"
30#include "core/hle/service/ns/ns.h" 30#include "core/hle/service/ns/ns.h"
31#include "core/hle/service/nvdrv/nvdrv.h" 31#include "core/hle/service/nvdrv/nvdrv.h"
32#include "core/hle/service/pctl/module.h" 32#include "core/hle/service/pctl/pctl.h"
33#include "core/hle/service/prepo/prepo.h"
33#include "core/hle/service/service.h" 34#include "core/hle/service/service.h"
34#include "core/hle/service/set/settings.h" 35#include "core/hle/service/set/settings.h"
35#include "core/hle/service/sm/controller.h" 36#include "core/hle/service/sm/controller.h"
@@ -192,6 +193,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
192 NS::InstallInterfaces(*sm); 193 NS::InstallInterfaces(*sm);
193 Nvidia::InstallInterfaces(*sm); 194 Nvidia::InstallInterfaces(*sm);
194 PCTL::InstallInterfaces(*sm); 195 PCTL::InstallInterfaces(*sm);
196 PlayReport::InstallInterfaces(*sm);
195 Sockets::InstallInterfaces(*sm); 197 Sockets::InstallInterfaces(*sm);
196 SPL::InstallInterfaces(*sm); 198 SPL::InstallInterfaces(*sm);
197 SSL::InstallInterfaces(*sm); 199 SSL::InstallInterfaces(*sm);
diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp
index c7788da5c..8a85df91a 100644
--- a/src/core/hle/service/ssl/ssl.cpp
+++ b/src/core/hle/service/ssl/ssl.cpp
@@ -96,12 +96,22 @@ SSL::SSL() : ServiceFramework("ssl") {
96 {2, nullptr, "GetCertificates"}, 96 {2, nullptr, "GetCertificates"},
97 {3, nullptr, "GetCertificateBufSize"}, 97 {3, nullptr, "GetCertificateBufSize"},
98 {4, nullptr, "DebugIoctl"}, 98 {4, nullptr, "DebugIoctl"},
99 {5, nullptr, "SetInterfaceVersion"}, 99 {5, &SSL::SetInterfaceVersion, "SetInterfaceVersion"},
100 {6, nullptr, "FlushSessionCache"}, 100 {6, nullptr, "FlushSessionCache"},
101 }; 101 };
102 RegisterHandlers(functions); 102 RegisterHandlers(functions);
103} 103}
104 104
105void SSL::SetInterfaceVersion(Kernel::HLERequestContext& ctx) {
106 LOG_WARNING(Service_SSL, "(STUBBED) called");
107 IPC::RequestParser rp{ctx};
108 u32 unk1 = rp.Pop<u32>(); // Probably minor/major?
109 u32 unk2 = rp.Pop<u32>(); // TODO(ogniK): Figure out what this does
110
111 IPC::ResponseBuilder rb{ctx, 2};
112 rb.Push(RESULT_SUCCESS);
113}
114
105void InstallInterfaces(SM::ServiceManager& service_manager) { 115void InstallInterfaces(SM::ServiceManager& service_manager) {
106 std::make_shared<SSL>()->InstallAsService(service_manager); 116 std::make_shared<SSL>()->InstallAsService(service_manager);
107} 117}
diff --git a/src/core/hle/service/ssl/ssl.h b/src/core/hle/service/ssl/ssl.h
index 87538a639..8fef13022 100644
--- a/src/core/hle/service/ssl/ssl.h
+++ b/src/core/hle/service/ssl/ssl.h
@@ -15,6 +15,7 @@ public:
15 15
16private: 16private:
17 void CreateContext(Kernel::HLERequestContext& ctx); 17 void CreateContext(Kernel::HLERequestContext& ctx);
18 void SetInterfaceVersion(Kernel::HLERequestContext& ctx);
18}; 19};
19 20
20/// Registers all SSL services with the specified service manager. 21/// Registers all SSL services with the specified service manager.