diff options
| -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/pcie/pcie.cpp | 64 | ||||
| -rw-r--r-- | src/core/hle/service/pcie/pcie.h | 15 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 2 |
6 files changed, 85 insertions, 0 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 55de535c0..b8f7f473d 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -185,6 +185,7 @@ void FileBackend::Write(const Entry& entry) { | |||
| 185 | SUB(Service, NIFM) \ | 185 | SUB(Service, NIFM) \ |
| 186 | SUB(Service, NS) \ | 186 | SUB(Service, NS) \ |
| 187 | SUB(Service, NVDRV) \ | 187 | SUB(Service, NVDRV) \ |
| 188 | SUB(Service, PCIE) \ | ||
| 188 | SUB(Service, PCTL) \ | 189 | SUB(Service, PCTL) \ |
| 189 | SUB(Service, PREPO) \ | 190 | SUB(Service, PREPO) \ |
| 190 | SUB(Service, SET) \ | 191 | SUB(Service, SET) \ |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index e8d98de99..e770f660b 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -72,6 +72,7 @@ enum class Class : ClassType { | |||
| 72 | Service_NIFM, ///< The NIFM (Network interface) service | 72 | Service_NIFM, ///< The NIFM (Network interface) service |
| 73 | Service_NS, ///< The NS services | 73 | Service_NS, ///< The NS services |
| 74 | Service_NVDRV, ///< The NVDRV (Nvidia driver) service | 74 | Service_NVDRV, ///< The NVDRV (Nvidia driver) service |
| 75 | Service_PCIE, ///< The PCIe service | ||
| 75 | Service_PCTL, ///< The PCTL (Parental control) service | 76 | Service_PCTL, ///< The PCTL (Parental control) service |
| 76 | Service_PREPO, ///< The PREPO (Play report) service | 77 | Service_PREPO, ///< The PREPO (Play report) service |
| 77 | Service_SET, ///< The SET (Settings) service | 78 | Service_SET, ///< The SET (Settings) service |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 3386c2231..6bb066145 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -225,6 +225,8 @@ add_library(core STATIC | |||
| 225 | hle/service/nvflinger/buffer_queue.h | 225 | hle/service/nvflinger/buffer_queue.h |
| 226 | hle/service/nvflinger/nvflinger.cpp | 226 | hle/service/nvflinger/nvflinger.cpp |
| 227 | hle/service/nvflinger/nvflinger.h | 227 | hle/service/nvflinger/nvflinger.h |
| 228 | hle/service/pcie/pcie.cpp | ||
| 229 | hle/service/pcie/pcie.h | ||
| 228 | hle/service/pctl/module.cpp | 230 | hle/service/pctl/module.cpp |
| 229 | hle/service/pctl/module.h | 231 | hle/service/pctl/module.h |
| 230 | hle/service/pctl/pctl.cpp | 232 | hle/service/pctl/pctl.cpp |
diff --git a/src/core/hle/service/pcie/pcie.cpp b/src/core/hle/service/pcie/pcie.cpp new file mode 100644 index 000000000..39cf05eba --- /dev/null +++ b/src/core/hle/service/pcie/pcie.cpp | |||
| @@ -0,0 +1,64 @@ | |||
| 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/pcie/pcie.h" | ||
| 8 | #include "core/hle/service/service.h" | ||
| 9 | #include "core/hle/service/sm/sm.h" | ||
| 10 | |||
| 11 | namespace Service::PCIe { | ||
| 12 | |||
| 13 | class ISession final : public ServiceFramework<ISession> { | ||
| 14 | public: | ||
| 15 | explicit ISession() : ServiceFramework{"ISession"} { | ||
| 16 | // clang-format off | ||
| 17 | static const FunctionInfo functions[] = { | ||
| 18 | {0, nullptr, "QueryFunctions"}, | ||
| 19 | {1, nullptr, "AcquireFunction"}, | ||
| 20 | {2, nullptr, "ReleaseFunction"}, | ||
| 21 | {3, nullptr, "GetFunctionState"}, | ||
| 22 | {4, nullptr, "GetBarProfile"}, | ||
| 23 | {5, nullptr, "ReadConfig"}, | ||
| 24 | {6, nullptr, "WriteConfig"}, | ||
| 25 | {7, nullptr, "ReadBarRegion"}, | ||
| 26 | {8, nullptr, "WriteBarRegion"}, | ||
| 27 | {9, nullptr, "FindCapability"}, | ||
| 28 | {10, nullptr, "FindExtendedCapability"}, | ||
| 29 | {11, nullptr, "MapDma"}, | ||
| 30 | {12, nullptr, "UnmapDma"}, | ||
| 31 | {13, nullptr, "UnmapDmaBusAddress"}, | ||
| 32 | {14, nullptr, "GetDmaBusAddress"}, | ||
| 33 | {15, nullptr, "GetDmaBusAddressRange"}, | ||
| 34 | {16, nullptr, "SetDmaEnable"}, | ||
| 35 | {17, nullptr, "AcquireIrq"}, | ||
| 36 | {18, nullptr, "ReleaseIrq"}, | ||
| 37 | {19, nullptr, "SetIrqEnable"}, | ||
| 38 | {20, nullptr, "SetAspmEnable"}, | ||
| 39 | }; | ||
| 40 | // clang-format on | ||
| 41 | |||
| 42 | RegisterHandlers(functions); | ||
| 43 | } | ||
| 44 | }; | ||
| 45 | |||
| 46 | class PCIe final : public ServiceFramework<PCIe> { | ||
| 47 | public: | ||
| 48 | explicit PCIe() : ServiceFramework{"pcie"} { | ||
| 49 | // clang-format off | ||
| 50 | static const FunctionInfo functions[] = { | ||
| 51 | {0, nullptr, "RegisterClassDriver"}, | ||
| 52 | {1, nullptr, "QueryFunctionsUnregistered"}, | ||
| 53 | }; | ||
| 54 | // clang-format on | ||
| 55 | |||
| 56 | RegisterHandlers(functions); | ||
| 57 | } | ||
| 58 | }; | ||
| 59 | |||
| 60 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 61 | std::make_shared<PCIe>()->InstallAsService(sm); | ||
| 62 | } | ||
| 63 | |||
| 64 | } // namespace Service::PCIe | ||
diff --git a/src/core/hle/service/pcie/pcie.h b/src/core/hle/service/pcie/pcie.h new file mode 100644 index 000000000..59c22ca45 --- /dev/null +++ b/src/core/hle/service/pcie/pcie.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 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::PCIe { | ||
| 12 | |||
| 13 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 14 | |||
| 15 | } // namespace Service::PCIe | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 3cad64837..bbaf7f601 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -44,6 +44,7 @@ | |||
| 44 | #include "core/hle/service/nim/nim.h" | 44 | #include "core/hle/service/nim/nim.h" |
| 45 | #include "core/hle/service/ns/ns.h" | 45 | #include "core/hle/service/ns/ns.h" |
| 46 | #include "core/hle/service/nvdrv/nvdrv.h" | 46 | #include "core/hle/service/nvdrv/nvdrv.h" |
| 47 | #include "core/hle/service/pcie/pcie.h" | ||
| 47 | #include "core/hle/service/pctl/pctl.h" | 48 | #include "core/hle/service/pctl/pctl.h" |
| 48 | #include "core/hle/service/pm/pm.h" | 49 | #include "core/hle/service/pm/pm.h" |
| 49 | #include "core/hle/service/prepo/prepo.h" | 50 | #include "core/hle/service/prepo/prepo.h" |
| @@ -225,6 +226,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) { | |||
| 225 | NIM::InstallInterfaces(*sm); | 226 | NIM::InstallInterfaces(*sm); |
| 226 | NS::InstallInterfaces(*sm); | 227 | NS::InstallInterfaces(*sm); |
| 227 | Nvidia::InstallInterfaces(*sm); | 228 | Nvidia::InstallInterfaces(*sm); |
| 229 | PCIe::InstallInterfaces(*sm); | ||
| 228 | PCTL::InstallInterfaces(*sm); | 230 | PCTL::InstallInterfaces(*sm); |
| 229 | PlayReport::InstallInterfaces(*sm); | 231 | PlayReport::InstallInterfaces(*sm); |
| 230 | PM::InstallInterfaces(*sm); | 232 | PM::InstallInterfaces(*sm); |