summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/logging/backend.cpp2
-rw-r--r--src/common/logging/log.h2
-rw-r--r--src/core/CMakeLists.txt8
-rw-r--r--src/core/hle/service/bpc/bpc.cpp57
-rw-r--r--src/core/hle/service/bpc/bpc.h15
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp4
-rw-r--r--src/core/hle/service/filesystem/fsp_ldr.cpp24
-rw-r--r--src/core/hle/service/filesystem/fsp_ldr.h16
-rw-r--r--src/core/hle/service/filesystem/fsp_pr.cpp25
-rw-r--r--src/core/hle/service/filesystem/fsp_pr.h16
-rw-r--r--src/core/hle/service/pcv/pcv.cpp84
-rw-r--r--src/core/hle/service/pcv/pcv.h15
-rw-r--r--src/core/hle/service/service.cpp4
13 files changed, 272 insertions, 0 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index d86c40d26..ba0677fa4 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -169,6 +169,7 @@ void FileBackend::Write(const Entry& entry) {
169 SUB(Service, AOC) \ 169 SUB(Service, AOC) \
170 SUB(Service, APM) \ 170 SUB(Service, APM) \
171 SUB(Service, BCAT) \ 171 SUB(Service, BCAT) \
172 SUB(Service, BPC) \
172 SUB(Service, BTM) \ 173 SUB(Service, BTM) \
173 SUB(Service, Fatal) \ 174 SUB(Service, Fatal) \
174 SUB(Service, FGM) \ 175 SUB(Service, FGM) \
@@ -188,6 +189,7 @@ void FileBackend::Write(const Entry& entry) {
188 SUB(Service, NVDRV) \ 189 SUB(Service, NVDRV) \
189 SUB(Service, PCIE) \ 190 SUB(Service, PCIE) \
190 SUB(Service, PCTL) \ 191 SUB(Service, PCTL) \
192 SUB(Service, PCV) \
191 SUB(Service, PREPO) \ 193 SUB(Service, PREPO) \
192 SUB(Service, SET) \ 194 SUB(Service, SET) \
193 SUB(Service, SM) \ 195 SUB(Service, SM) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index 140cd8e47..8fd552233 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -56,6 +56,7 @@ enum class Class : ClassType {
56 Service_APM, ///< The APM (Performance) service 56 Service_APM, ///< The APM (Performance) service
57 Service_Audio, ///< The Audio (Audio control) service 57 Service_Audio, ///< The Audio (Audio control) service
58 Service_BCAT, ///< The BCAT service 58 Service_BCAT, ///< The BCAT service
59 Service_BPC, ///< The BPC service
59 Service_BTM, ///< The BTM service 60 Service_BTM, ///< The BTM service
60 Service_Fatal, ///< The Fatal service 61 Service_Fatal, ///< The Fatal service
61 Service_FGM, ///< The FGM service 62 Service_FGM, ///< The FGM service
@@ -75,6 +76,7 @@ enum class Class : ClassType {
75 Service_NVDRV, ///< The NVDRV (Nvidia driver) service 76 Service_NVDRV, ///< The NVDRV (Nvidia driver) service
76 Service_PCIE, ///< The PCIe service 77 Service_PCIE, ///< The PCIe service
77 Service_PCTL, ///< The PCTL (Parental control) service 78 Service_PCTL, ///< The PCTL (Parental control) service
79 Service_PCV, ///< The PCV (Parental control) service
78 Service_PREPO, ///< The PREPO (Play report) service 80 Service_PREPO, ///< The PREPO (Play report) service
79 Service_SET, ///< The SET (Settings) service 81 Service_SET, ///< The SET (Settings) service
80 Service_SM, ///< The SM (Service manager) service 82 Service_SM, ///< The SM (Service manager) service
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index ccb0695e4..7d615104e 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -154,6 +154,8 @@ add_library(core STATIC
154 hle/service/bcat/bcat.h 154 hle/service/bcat/bcat.h
155 hle/service/bcat/module.cpp 155 hle/service/bcat/module.cpp
156 hle/service/bcat/module.h 156 hle/service/bcat/module.h
157 hle/service/bpc/bpc.cpp
158 hle/service/bpc/bpc.h
157 hle/service/btdrv/btdrv.cpp 159 hle/service/btdrv/btdrv.cpp
158 hle/service/btdrv/btdrv.h 160 hle/service/btdrv/btdrv.h
159 hle/service/btm/btm.cpp 161 hle/service/btm/btm.cpp
@@ -172,6 +174,10 @@ add_library(core STATIC
172 hle/service/fatal/fatal_u.h 174 hle/service/fatal/fatal_u.h
173 hle/service/filesystem/filesystem.cpp 175 hle/service/filesystem/filesystem.cpp
174 hle/service/filesystem/filesystem.h 176 hle/service/filesystem/filesystem.h
177 hle/service/filesystem/fsp_ldr.cpp
178 hle/service/filesystem/fsp_ldr.h
179 hle/service/filesystem/fsp_pr.cpp
180 hle/service/filesystem/fsp_pr.h
175 hle/service/filesystem/fsp_srv.cpp 181 hle/service/filesystem/fsp_srv.cpp
176 hle/service/filesystem/fsp_srv.h 182 hle/service/filesystem/fsp_srv.h
177 hle/service/fgm/fgm.cpp 183 hle/service/fgm/fgm.cpp
@@ -247,6 +253,8 @@ add_library(core STATIC
247 hle/service/pctl/module.h 253 hle/service/pctl/module.h
248 hle/service/pctl/pctl.cpp 254 hle/service/pctl/pctl.cpp
249 hle/service/pctl/pctl.h 255 hle/service/pctl/pctl.h
256 hle/service/pcv/pcv.cpp
257 hle/service/pcv/pcv.h
250 hle/service/pm/pm.cpp 258 hle/service/pm/pm.cpp
251 hle/service/pm/pm.h 259 hle/service/pm/pm.h
252 hle/service/prepo/prepo.cpp 260 hle/service/prepo/prepo.cpp
diff --git a/src/core/hle/service/bpc/bpc.cpp b/src/core/hle/service/bpc/bpc.cpp
new file mode 100644
index 000000000..1c1ecdb60
--- /dev/null
+++ b/src/core/hle/service/bpc/bpc.cpp
@@ -0,0 +1,57 @@
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
7#include "core/hle/service/bpc/bpc.h"
8#include "core/hle/service/service.h"
9#include "core/hle/service/sm/sm.h"
10
11namespace Service::BPC {
12
13class BPC final : public ServiceFramework<BPC> {
14public:
15 explicit BPC() : ServiceFramework{"bpc"} {
16 // clang-format off
17 static const FunctionInfo functions[] = {
18 {0, nullptr, "ShutdownSystem"},
19 {1, nullptr, "RebootSystem"},
20 {2, nullptr, "GetWakeupReason"},
21 {3, nullptr, "GetShutdownReason"},
22 {4, nullptr, "GetAcOk"},
23 {5, nullptr, "GetBoardPowerControlEvent"},
24 {6, nullptr, "GetSleepButtonState"},
25 {7, nullptr, "GetPowerEvent"},
26 {8, nullptr, "Unknown1"},
27 {9, nullptr, "Unknown2"},
28 {10, nullptr, "Unknown3"},
29 };
30 // clang-format on
31
32 RegisterHandlers(functions);
33 }
34};
35
36class BPC_R final : public ServiceFramework<BPC_R> {
37public:
38 explicit BPC_R() : ServiceFramework{"bpc:r"} {
39 // clang-format off
40 static const FunctionInfo functions[] = {
41 {0, nullptr, "GetExternalRtcValue"},
42 {1, nullptr, "SetExternalRtcValue"},
43 {2, nullptr, "ReadExternalRtcResetFlag"},
44 {3, nullptr, "ClearExternalRtcResetFlag"},
45 };
46 // clang-format on
47
48 RegisterHandlers(functions);
49 }
50};
51
52void InstallInterfaces(SM::ServiceManager& sm) {
53 std::make_shared<BPC>()->InstallAsService(sm);
54 std::make_shared<BPC_R>()->InstallAsService(sm);
55}
56
57} // namespace Service::BPC
diff --git a/src/core/hle/service/bpc/bpc.h b/src/core/hle/service/bpc/bpc.h
new file mode 100644
index 000000000..eaa37be8d
--- /dev/null
+++ b/src/core/hle/service/bpc/bpc.h
@@ -0,0 +1,15 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::BPC {
12
13void InstallInterfaces(SM::ServiceManager& sm);
14
15} // namespace Service::BPC
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index fdd2fda18..e17d637e4 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -14,6 +14,8 @@
14#include "core/file_sys/vfs_offset.h" 14#include "core/file_sys/vfs_offset.h"
15#include "core/file_sys/vfs_real.h" 15#include "core/file_sys/vfs_real.h"
16#include "core/hle/service/filesystem/filesystem.h" 16#include "core/hle/service/filesystem/filesystem.h"
17#include "core/hle/service/filesystem/fsp_ldr.h"
18#include "core/hle/service/filesystem/fsp_pr.h"
17#include "core/hle/service/filesystem/fsp_srv.h" 19#include "core/hle/service/filesystem/fsp_srv.h"
18 20
19namespace Service::FileSystem { 21namespace Service::FileSystem {
@@ -298,6 +300,8 @@ void RegisterFileSystems() {
298 300
299void InstallInterfaces(SM::ServiceManager& service_manager) { 301void InstallInterfaces(SM::ServiceManager& service_manager) {
300 RegisterFileSystems(); 302 RegisterFileSystems();
303 std::make_shared<FSP_LDR>()->InstallAsService(service_manager);
304 std::make_shared<FSP_PR>()->InstallAsService(service_manager);
301 std::make_shared<FSP_SRV>()->InstallAsService(service_manager); 305 std::make_shared<FSP_SRV>()->InstallAsService(service_manager);
302} 306}
303 307
diff --git a/src/core/hle/service/filesystem/fsp_ldr.cpp b/src/core/hle/service/filesystem/fsp_ldr.cpp
new file mode 100644
index 000000000..ee6d4d055
--- /dev/null
+++ b/src/core/hle/service/filesystem/fsp_ldr.cpp
@@ -0,0 +1,24 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/filesystem/fsp_ldr.h"
8#include "core/hle/service/service.h"
9
10namespace Service::FileSystem {
11
12FSP_LDR::FSP_LDR() : ServiceFramework{"fsp:ldr"} {
13 // clang-format off
14 static const FunctionInfo functions[] = {
15 {0, nullptr, "OpenCodeFileSystem"},
16 {1, nullptr, "IsArchivedProgram"},
17 {2, nullptr, "SetCurrentProcess"},
18 };
19 // clang-format on
20
21 RegisterHandlers(functions);
22}
23
24} // namespace Service::FileSystem
diff --git a/src/core/hle/service/filesystem/fsp_ldr.h b/src/core/hle/service/filesystem/fsp_ldr.h
new file mode 100644
index 000000000..fa8e11b4c
--- /dev/null
+++ b/src/core/hle/service/filesystem/fsp_ldr.h
@@ -0,0 +1,16 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service::FileSystem {
10
11class FSP_LDR final : public ServiceFramework<FSP_LDR> {
12public:
13 explicit FSP_LDR();
14};
15
16} // namespace Service::FileSystem
diff --git a/src/core/hle/service/filesystem/fsp_pr.cpp b/src/core/hle/service/filesystem/fsp_pr.cpp
new file mode 100644
index 000000000..0b51385ee
--- /dev/null
+++ b/src/core/hle/service/filesystem/fsp_pr.cpp
@@ -0,0 +1,25 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/filesystem/fsp_pr.h"
8#include "core/hle/service/service.h"
9
10namespace Service::FileSystem {
11
12FSP_PR::FSP_PR() : ServiceFramework{"fsp:pr"} {
13 // clang-format off
14 static const FunctionInfo functions[] = {
15 {0, nullptr, "RegisterProgram"},
16 {1, nullptr, "UnregisterProgram"},
17 {2, nullptr, "SetCurrentProcess"},
18 {256, nullptr, "SetEnabledProgramVerification"},
19 };
20 // clang-format on
21
22 RegisterHandlers(functions);
23}
24
25} // namespace Service::FileSystem
diff --git a/src/core/hle/service/filesystem/fsp_pr.h b/src/core/hle/service/filesystem/fsp_pr.h
new file mode 100644
index 000000000..62edcd08a
--- /dev/null
+++ b/src/core/hle/service/filesystem/fsp_pr.h
@@ -0,0 +1,16 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service::FileSystem {
10
11class FSP_PR final : public ServiceFramework<FSP_PR> {
12public:
13 explicit FSP_PR();
14};
15
16} // namespace Service::FileSystem
diff --git a/src/core/hle/service/pcv/pcv.cpp b/src/core/hle/service/pcv/pcv.cpp
new file mode 100644
index 000000000..d6891a659
--- /dev/null
+++ b/src/core/hle/service/pcv/pcv.cpp
@@ -0,0 +1,84 @@
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
7#include "core/hle/service/pcv/pcv.h"
8#include "core/hle/service/service.h"
9#include "core/hle/service/sm/sm.h"
10
11namespace Service::PCV {
12
13class PCV final : public ServiceFramework<PCV> {
14public:
15 explicit PCV() : ServiceFramework{"pcv"} {
16 // clang-format off
17 static const FunctionInfo functions[] = {
18 {0, nullptr, "SetPowerEnabled"},
19 {1, nullptr, "SetClockEnabled"},
20 {2, nullptr, "SetClockRate"},
21 {3, nullptr, "GetClockRate"},
22 {4, nullptr, "GetState"},
23 {5, nullptr, "GetPossibleClockRates"},
24 {6, nullptr, "SetMinVClockRate"},
25 {7, nullptr, "SetReset"},
26 {8, nullptr, "SetVoltageEnabled"},
27 {9, nullptr, "GetVoltageEnabled"},
28 {10, nullptr, "GetVoltageRange"},
29 {11, nullptr, "SetVoltageValue"},
30 {12, nullptr, "GetVoltageValue"},
31 {13, nullptr, "GetTemperatureThresholds"},
32 {14, nullptr, "SetTemperature"},
33 {15, nullptr, "Initialize"},
34 {16, nullptr, "IsInitialized"},
35 {17, nullptr, "Finalize"},
36 {18, nullptr, "PowerOn"},
37 {19, nullptr, "PowerOff"},
38 {20, nullptr, "ChangeVoltage"},
39 {21, nullptr, "GetPowerClockInfoEvent"},
40 {22, nullptr, "GetOscillatorClock"},
41 {23, nullptr, "GetDvfsTable"},
42 {24, nullptr, "GetModuleStateTable"},
43 {25, nullptr, "GetPowerDomainStateTable"},
44 {26, nullptr, "GetFuseInfo"},
45 };
46 // clang-format on
47
48 RegisterHandlers(functions);
49 }
50};
51
52class PCV_ARB final : public ServiceFramework<PCV_ARB> {
53public:
54 explicit PCV_ARB() : ServiceFramework{"pcv:arb"} {
55 // clang-format off
56 static const FunctionInfo functions[] = {
57 {0, nullptr, "ReleaseControl"},
58 };
59 // clang-format on
60
61 RegisterHandlers(functions);
62 }
63};
64
65class PCV_IMM final : public ServiceFramework<PCV_IMM> {
66public:
67 explicit PCV_IMM() : ServiceFramework{"pcv:imm"} {
68 // clang-format off
69 static const FunctionInfo functions[] = {
70 {0, nullptr, "SetClockRate"},
71 };
72 // clang-format on
73
74 RegisterHandlers(functions);
75 }
76};
77
78void InstallInterfaces(SM::ServiceManager& sm) {
79 std::make_shared<PCV>()->InstallAsService(sm);
80 std::make_shared<PCV_ARB>()->InstallAsService(sm);
81 std::make_shared<PCV_IMM>()->InstallAsService(sm);
82}
83
84} // namespace Service::PCV
diff --git a/src/core/hle/service/pcv/pcv.h b/src/core/hle/service/pcv/pcv.h
new file mode 100644
index 000000000..219a893c3
--- /dev/null
+++ b/src/core/hle/service/pcv/pcv.h
@@ -0,0 +1,15 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::PCV {
12
13void InstallInterfaces(SM::ServiceManager& sm);
14
15} // namespace Service::PCV
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index fccc4c461..747a2252e 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -21,6 +21,7 @@
21#include "core/hle/service/apm/apm.h" 21#include "core/hle/service/apm/apm.h"
22#include "core/hle/service/audio/audio.h" 22#include "core/hle/service/audio/audio.h"
23#include "core/hle/service/bcat/bcat.h" 23#include "core/hle/service/bcat/bcat.h"
24#include "core/hle/service/bpc/bpc.h"
24#include "core/hle/service/btdrv/btdrv.h" 25#include "core/hle/service/btdrv/btdrv.h"
25#include "core/hle/service/btm/btm.h" 26#include "core/hle/service/btm/btm.h"
26#include "core/hle/service/erpt/erpt.h" 27#include "core/hle/service/erpt/erpt.h"
@@ -47,6 +48,7 @@
47#include "core/hle/service/nvdrv/nvdrv.h" 48#include "core/hle/service/nvdrv/nvdrv.h"
48#include "core/hle/service/pcie/pcie.h" 49#include "core/hle/service/pcie/pcie.h"
49#include "core/hle/service/pctl/pctl.h" 50#include "core/hle/service/pctl/pctl.h"
51#include "core/hle/service/pcv/pcv.h"
50#include "core/hle/service/pm/pm.h" 52#include "core/hle/service/pm/pm.h"
51#include "core/hle/service/prepo/prepo.h" 53#include "core/hle/service/prepo/prepo.h"
52#include "core/hle/service/service.h" 54#include "core/hle/service/service.h"
@@ -204,6 +206,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
204 APM::InstallInterfaces(*sm); 206 APM::InstallInterfaces(*sm);
205 Audio::InstallInterfaces(*sm); 207 Audio::InstallInterfaces(*sm);
206 BCAT::InstallInterfaces(*sm); 208 BCAT::InstallInterfaces(*sm);
209 BPC::InstallInterfaces(*sm);
207 BtDrv::InstallInterfaces(*sm); 210 BtDrv::InstallInterfaces(*sm);
208 BTM::InstallInterfaces(*sm); 211 BTM::InstallInterfaces(*sm);
209 ERPT::InstallInterfaces(*sm); 212 ERPT::InstallInterfaces(*sm);
@@ -230,6 +233,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
230 Nvidia::InstallInterfaces(*sm); 233 Nvidia::InstallInterfaces(*sm);
231 PCIe::InstallInterfaces(*sm); 234 PCIe::InstallInterfaces(*sm);
232 PCTL::InstallInterfaces(*sm); 235 PCTL::InstallInterfaces(*sm);
236 PCV::InstallInterfaces(*sm);
233 PlayReport::InstallInterfaces(*sm); 237 PlayReport::InstallInterfaces(*sm);
234 PM::InstallInterfaces(*sm); 238 PM::InstallInterfaces(*sm);
235 Set::InstallInterfaces(*sm); 239 Set::InstallInterfaces(*sm);