diff options
| author | 2020-11-20 14:06:37 -0800 | |
|---|---|---|
| committer | 2020-11-20 14:06:37 -0800 | |
| commit | c47c3d723f5b33c608ee6bf7d766b513d453a66f (patch) | |
| tree | 8d2c5ff2c0dfcf77cab2145f7474dcfb114ff806 /src | |
| parent | Merge pull request #4941 from lioncash/config (diff) | |
| parent | olsc: Move member initialization to after member functions. (diff) | |
| download | yuzu-c47c3d723f5b33c608ee6bf7d766b513d453a66f.tar.gz yuzu-c47c3d723f5b33c608ee6bf7d766b513d453a66f.tar.xz yuzu-c47c3d723f5b33c608ee6bf7d766b513d453a66f.zip | |
Merge pull request #4951 from bunnei/olsc-stub
hle: service: Stub OLSC Initialize and SetSaveDataBackupSettingEnabled functions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/logging/backend.cpp | 1 | ||||
| -rw-r--r-- | src/common/logging/log.h | 1 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/olsc/olsc.cpp | 69 | ||||
| -rw-r--r-- | src/core/hle/service/olsc/olsc.h | 16 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 2 |
6 files changed, 91 insertions, 0 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 90dfa22ca..7859344b9 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -222,6 +222,7 @@ void DebuggerBackend::Write(const Entry& entry) { | |||
| 222 | SUB(Service, NPNS) \ | 222 | SUB(Service, NPNS) \ |
| 223 | SUB(Service, NS) \ | 223 | SUB(Service, NS) \ |
| 224 | SUB(Service, NVDRV) \ | 224 | SUB(Service, NVDRV) \ |
| 225 | SUB(Service, OLSC) \ | ||
| 225 | SUB(Service, PCIE) \ | 226 | SUB(Service, PCIE) \ |
| 226 | SUB(Service, PCTL) \ | 227 | SUB(Service, PCTL) \ |
| 227 | SUB(Service, PCV) \ | 228 | SUB(Service, PCV) \ |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 13a4f1e30..835894918 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -95,6 +95,7 @@ enum class Class : ClassType { | |||
| 95 | Service_NPNS, ///< The NPNS service | 95 | Service_NPNS, ///< The NPNS service |
| 96 | Service_NS, ///< The NS services | 96 | Service_NS, ///< The NS services |
| 97 | Service_NVDRV, ///< The NVDRV (Nvidia driver) service | 97 | Service_NVDRV, ///< The NVDRV (Nvidia driver) service |
| 98 | Service_OLSC, ///< The OLSC service | ||
| 98 | Service_PCIE, ///< The PCIe service | 99 | Service_PCIE, ///< The PCIe service |
| 99 | Service_PCTL, ///< The PCTL (Parental control) service | 100 | Service_PCTL, ///< The PCTL (Parental control) service |
| 100 | Service_PCV, ///< The PCV service | 101 | Service_PCV, ///< The PCV service |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index a1d8dcfa5..e370fd225 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -458,6 +458,8 @@ add_library(core STATIC | |||
| 458 | hle/service/nvflinger/buffer_queue.h | 458 | hle/service/nvflinger/buffer_queue.h |
| 459 | hle/service/nvflinger/nvflinger.cpp | 459 | hle/service/nvflinger/nvflinger.cpp |
| 460 | hle/service/nvflinger/nvflinger.h | 460 | hle/service/nvflinger/nvflinger.h |
| 461 | hle/service/olsc/olsc.cpp | ||
| 462 | hle/service/olsc/olsc.h | ||
| 461 | hle/service/pcie/pcie.cpp | 463 | hle/service/pcie/pcie.cpp |
| 462 | hle/service/pcie/pcie.h | 464 | hle/service/pcie/pcie.h |
| 463 | hle/service/pctl/module.cpp | 465 | hle/service/pctl/module.cpp |
diff --git a/src/core/hle/service/olsc/olsc.cpp b/src/core/hle/service/olsc/olsc.cpp new file mode 100644 index 000000000..aad4ca706 --- /dev/null +++ b/src/core/hle/service/olsc/olsc.cpp | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | // Copyright 2020 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/kernel/hle_ipc.h" | ||
| 7 | #include "core/hle/service/olsc/olsc.h" | ||
| 8 | #include "core/hle/service/service.h" | ||
| 9 | #include "core/hle/service/sm/sm.h" | ||
| 10 | |||
| 11 | namespace Service::OLSC { | ||
| 12 | |||
| 13 | class OLSC final : public ServiceFramework<OLSC> { | ||
| 14 | public: | ||
| 15 | explicit OLSC() : ServiceFramework{"olsc:u"} { | ||
| 16 | // clang-format off | ||
| 17 | static const FunctionInfo functions[] = { | ||
| 18 | {0, &OLSC::Initialize, "Initialize"}, | ||
| 19 | {10, nullptr, "VerifySaveDataBackupLicenseAsync"}, | ||
| 20 | {13, nullptr, "GetSaveDataBackupSetting"}, | ||
| 21 | {14, &OLSC::SetSaveDataBackupSettingEnabled, "SetSaveDataBackupSettingEnabled"}, | ||
| 22 | {15, nullptr, "SetCustomData"}, | ||
| 23 | {16, nullptr, "DeleteSaveDataBackupSetting"}, | ||
| 24 | {18, nullptr, "GetSaveDataBackupInfoCache"}, | ||
| 25 | {19, nullptr, "UpdateSaveDataBackupInfoCacheAsync"}, | ||
| 26 | {22, nullptr, "DeleteSaveDataBackupAsync"}, | ||
| 27 | {25, nullptr, "ListDownloadableSaveDataBackupInfoAsync"}, | ||
| 28 | {26, nullptr, "DownloadSaveDataBackupAsync"}, | ||
| 29 | {9010, nullptr, "VerifySaveDataBackupLicenseAsyncForDebug"}, | ||
| 30 | {9013, nullptr, "GetSaveDataBackupSettingForDebug"}, | ||
| 31 | {9014, nullptr, "SetSaveDataBackupSettingEnabledForDebug"}, | ||
| 32 | {9015, nullptr, "SetCustomDataForDebug"}, | ||
| 33 | {9016, nullptr, "DeleteSaveDataBackupSettingForDebug"}, | ||
| 34 | {9018, nullptr, "GetSaveDataBackupInfoCacheForDebug"}, | ||
| 35 | {9019, nullptr, "UpdateSaveDataBackupInfoCacheAsyncForDebug"}, | ||
| 36 | {9022, nullptr, "DeleteSaveDataBackupAsyncForDebug"}, | ||
| 37 | {9025, nullptr, "ListDownloadableSaveDataBackupInfoAsyncForDebug"}, | ||
| 38 | {9026, nullptr, "DownloadSaveDataBackupAsyncForDebug"}, | ||
| 39 | }; | ||
| 40 | // clang-format on | ||
| 41 | |||
| 42 | RegisterHandlers(functions); | ||
| 43 | } | ||
| 44 | |||
| 45 | private: | ||
| 46 | void Initialize(Kernel::HLERequestContext& ctx) { | ||
| 47 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | ||
| 48 | |||
| 49 | initialized = true; | ||
| 50 | |||
| 51 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 52 | rb.Push(RESULT_SUCCESS); | ||
| 53 | } | ||
| 54 | |||
| 55 | void SetSaveDataBackupSettingEnabled(Kernel::HLERequestContext& ctx) { | ||
| 56 | LOG_WARNING(Service_OLSC, "(STUBBED) called"); | ||
| 57 | |||
| 58 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 59 | rb.Push(RESULT_SUCCESS); | ||
| 60 | } | ||
| 61 | |||
| 62 | bool initialized{}; | ||
| 63 | }; | ||
| 64 | |||
| 65 | void InstallInterfaces(SM::ServiceManager& service_manager) { | ||
| 66 | std::make_shared<OLSC>()->InstallAsService(service_manager); | ||
| 67 | } | ||
| 68 | |||
| 69 | } // namespace Service::OLSC | ||
diff --git a/src/core/hle/service/olsc/olsc.h b/src/core/hle/service/olsc/olsc.h new file mode 100644 index 000000000..edee4376b --- /dev/null +++ b/src/core/hle/service/olsc/olsc.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | // Copyright 2020 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 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::OLSC { | ||
| 12 | |||
| 13 | /// Registers all SSL services with the specified service manager. | ||
| 14 | void InstallInterfaces(SM::ServiceManager& service_manager); | ||
| 15 | |||
| 16 | } // namespace Service::OLSC | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index ba9159ee0..fbfda2d5b 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -51,6 +51,7 @@ | |||
| 51 | #include "core/hle/service/ns/ns.h" | 51 | #include "core/hle/service/ns/ns.h" |
| 52 | #include "core/hle/service/nvdrv/nvdrv.h" | 52 | #include "core/hle/service/nvdrv/nvdrv.h" |
| 53 | #include "core/hle/service/nvflinger/nvflinger.h" | 53 | #include "core/hle/service/nvflinger/nvflinger.h" |
| 54 | #include "core/hle/service/olsc/olsc.h" | ||
| 54 | #include "core/hle/service/pcie/pcie.h" | 55 | #include "core/hle/service/pcie/pcie.h" |
| 55 | #include "core/hle/service/pctl/module.h" | 56 | #include "core/hle/service/pctl/module.h" |
| 56 | #include "core/hle/service/pcv/pcv.h" | 57 | #include "core/hle/service/pcv/pcv.h" |
| @@ -231,6 +232,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system) { | |||
| 231 | NPNS::InstallInterfaces(*sm); | 232 | NPNS::InstallInterfaces(*sm); |
| 232 | NS::InstallInterfaces(*sm, system); | 233 | NS::InstallInterfaces(*sm, system); |
| 233 | Nvidia::InstallInterfaces(*sm, *nv_flinger, system); | 234 | Nvidia::InstallInterfaces(*sm, *nv_flinger, system); |
| 235 | OLSC::InstallInterfaces(*sm); | ||
| 234 | PCIe::InstallInterfaces(*sm); | 236 | PCIe::InstallInterfaces(*sm); |
| 235 | PCTL::InstallInterfaces(*sm); | 237 | PCTL::InstallInterfaces(*sm); |
| 236 | PCV::InstallInterfaces(*sm); | 238 | PCV::InstallInterfaces(*sm); |