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.txt4
-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/pcv/pcv.cpp84
-rw-r--r--src/core/hle/service/pcv/pcv.h15
-rw-r--r--src/core/hle/service/service.cpp4
8 files changed, 183 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..d325ea359 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
@@ -247,6 +249,8 @@ add_library(core STATIC
247 hle/service/pctl/module.h 249 hle/service/pctl/module.h
248 hle/service/pctl/pctl.cpp 250 hle/service/pctl/pctl.cpp
249 hle/service/pctl/pctl.h 251 hle/service/pctl/pctl.h
252 hle/service/pcv/pcv.cpp
253 hle/service/pcv/pcv.h
250 hle/service/pm/pm.cpp 254 hle/service/pm/pm.cpp
251 hle/service/pm/pm.h 255 hle/service/pm/pm.h
252 hle/service/prepo/prepo.cpp 256 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/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);