diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/interface.cpp (renamed from src/core/hle/service/nvdrv/nvdrv_a.cpp) | 18 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/interface.h (renamed from src/core/hle/service/nvdrv/nvdrv_a.h) | 6 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/nvdrv.cpp | 6 |
4 files changed, 18 insertions, 16 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index f5c92a5aa..2eab81ad6 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -48,8 +48,8 @@ set(SRCS | |||
| 48 | hle/service/nvdrv/devices/nvdisp_disp0.cpp | 48 | hle/service/nvdrv/devices/nvdisp_disp0.cpp |
| 49 | hle/service/nvdrv/devices/nvhost_as_gpu.cpp | 49 | hle/service/nvdrv/devices/nvhost_as_gpu.cpp |
| 50 | hle/service/nvdrv/devices/nvmap.cpp | 50 | hle/service/nvdrv/devices/nvmap.cpp |
| 51 | hle/service/nvdrv/interface.cpp | ||
| 51 | hle/service/nvdrv/nvdrv.cpp | 52 | hle/service/nvdrv/nvdrv.cpp |
| 52 | hle/service/nvdrv/nvdrv_a.cpp | ||
| 53 | hle/service/pctl/pctl.cpp | 53 | hle/service/pctl/pctl.cpp |
| 54 | hle/service/pctl/pctl_a.cpp | 54 | hle/service/pctl/pctl_a.cpp |
| 55 | hle/service/service.cpp | 55 | hle/service/service.cpp |
| @@ -136,8 +136,8 @@ set(HEADERS | |||
| 136 | hle/service/nvdrv/devices/nvdisp_disp0.h | 136 | hle/service/nvdrv/devices/nvdisp_disp0.h |
| 137 | hle/service/nvdrv/devices/nvhost_as_gpu.h | 137 | hle/service/nvdrv/devices/nvhost_as_gpu.h |
| 138 | hle/service/nvdrv/devices/nvmap.h | 138 | hle/service/nvdrv/devices/nvmap.h |
| 139 | hle/service/nvdrv/interface.h | ||
| 139 | hle/service/nvdrv/nvdrv.h | 140 | hle/service/nvdrv/nvdrv.h |
| 140 | hle/service/nvdrv/nvdrv_a.h | ||
| 141 | hle/service/pctl/pctl.h | 141 | hle/service/pctl/pctl.h |
| 142 | hle/service/pctl/pctl_a.h | 142 | hle/service/pctl/pctl_a.h |
| 143 | hle/service/service.h | 143 | hle/service/service.h |
diff --git a/src/core/hle/service/nvdrv/nvdrv_a.cpp b/src/core/hle/service/nvdrv/interface.cpp index 5d3e68792..0670ca155 100644 --- a/src/core/hle/service/nvdrv/nvdrv_a.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp | |||
| @@ -4,13 +4,13 @@ | |||
| 4 | 4 | ||
| 5 | #include "common/logging/log.h" | 5 | #include "common/logging/log.h" |
| 6 | #include "core/hle/ipc_helpers.h" | 6 | #include "core/hle/ipc_helpers.h" |
| 7 | #include "core/hle/service/nvdrv/interface.h" | ||
| 7 | #include "core/hle/service/nvdrv/nvdrv.h" | 8 | #include "core/hle/service/nvdrv/nvdrv.h" |
| 8 | #include "core/hle/service/nvdrv/nvdrv_a.h" | ||
| 9 | 9 | ||
| 10 | namespace Service { | 10 | namespace Service { |
| 11 | namespace Nvidia { | 11 | namespace Nvidia { |
| 12 | 12 | ||
| 13 | void NVDRV_A::Open(Kernel::HLERequestContext& ctx) { | 13 | void NVDRV::Open(Kernel::HLERequestContext& ctx) { |
| 14 | LOG_WARNING(Service, "(STUBBED) called"); | 14 | LOG_WARNING(Service, "(STUBBED) called"); |
| 15 | 15 | ||
| 16 | auto buffer = ctx.BufferDescriptorA()[0]; | 16 | auto buffer = ctx.BufferDescriptorA()[0]; |
| @@ -24,7 +24,7 @@ void NVDRV_A::Open(Kernel::HLERequestContext& ctx) { | |||
| 24 | rb.Push<u32>(0); | 24 | rb.Push<u32>(0); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | void NVDRV_A::Ioctl(Kernel::HLERequestContext& ctx) { | 27 | void NVDRV::Ioctl(Kernel::HLERequestContext& ctx) { |
| 28 | LOG_WARNING(Service, "(STUBBED) called"); | 28 | LOG_WARNING(Service, "(STUBBED) called"); |
| 29 | 29 | ||
| 30 | IPC::RequestParser rp{ctx}; | 30 | IPC::RequestParser rp{ctx}; |
| @@ -48,19 +48,19 @@ void NVDRV_A::Ioctl(Kernel::HLERequestContext& ctx) { | |||
| 48 | rb.Push(nv_result); | 48 | rb.Push(nv_result); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | void NVDRV_A::Initialize(Kernel::HLERequestContext& ctx) { | 51 | void NVDRV::Initialize(Kernel::HLERequestContext& ctx) { |
| 52 | LOG_WARNING(Service, "(STUBBED) called"); | 52 | LOG_WARNING(Service, "(STUBBED) called"); |
| 53 | IPC::RequestBuilder rb{ctx, 3}; | 53 | IPC::RequestBuilder rb{ctx, 3}; |
| 54 | rb.Push(RESULT_SUCCESS); | 54 | rb.Push(RESULT_SUCCESS); |
| 55 | rb.Push<u32>(0); | 55 | rb.Push<u32>(0); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | NVDRV_A::NVDRV_A(std::shared_ptr<Module> nvdrv) | 58 | NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name) |
| 59 | : ServiceFramework("nvdrv:a"), nvdrv(std::move(nvdrv)) { | 59 | : ServiceFramework(name), nvdrv(std::move(nvdrv)) { |
| 60 | static const FunctionInfo functions[] = { | 60 | static const FunctionInfo functions[] = { |
| 61 | {0, &NVDRV_A::Open, "Open"}, | 61 | {0, &NVDRV::Open, "Open"}, |
| 62 | {1, &NVDRV_A::Ioctl, "Ioctl"}, | 62 | {1, &NVDRV::Ioctl, "Ioctl"}, |
| 63 | {3, &NVDRV_A::Initialize, "Initialize"}, | 63 | {3, &NVDRV::Initialize, "Initialize"}, |
| 64 | }; | 64 | }; |
| 65 | RegisterHandlers(functions); | 65 | RegisterHandlers(functions); |
| 66 | } | 66 | } |
diff --git a/src/core/hle/service/nvdrv/nvdrv_a.h b/src/core/hle/service/nvdrv/interface.h index 743870555..8c95b7217 100644 --- a/src/core/hle/service/nvdrv/nvdrv_a.h +++ b/src/core/hle/service/nvdrv/interface.h | |||
| @@ -12,10 +12,10 @@ | |||
| 12 | namespace Service { | 12 | namespace Service { |
| 13 | namespace Nvidia { | 13 | namespace Nvidia { |
| 14 | 14 | ||
| 15 | class NVDRV_A final : public ServiceFramework<NVDRV_A> { | 15 | class NVDRV final : public ServiceFramework<NVDRV> { |
| 16 | public: | 16 | public: |
| 17 | NVDRV_A(std::shared_ptr<Module> nvdrv); | 17 | NVDRV(std::shared_ptr<Module> nvdrv, const char* name); |
| 18 | ~NVDRV_A() = default; | 18 | ~NVDRV() = default; |
| 19 | 19 | ||
| 20 | private: | 20 | private: |
| 21 | void Open(Kernel::HLERequestContext& ctx); | 21 | void Open(Kernel::HLERequestContext& ctx); |
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index be9946505..cf525a875 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp | |||
| @@ -2,12 +2,13 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 5 | #include "core/hle/service/nvdrv/devices/nvdevice.h" | 6 | #include "core/hle/service/nvdrv/devices/nvdevice.h" |
| 6 | #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" | 7 | #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" |
| 7 | #include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h" | 8 | #include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h" |
| 8 | #include "core/hle/service/nvdrv/devices/nvmap.h" | 9 | #include "core/hle/service/nvdrv/devices/nvmap.h" |
| 9 | #include "core/hle/service/nvdrv/nvdrv.h" | 10 | #include "core/hle/service/nvdrv/nvdrv.h" |
| 10 | #include "core/hle/service/nvdrv/nvdrv_a.h" | 11 | #include "core/hle/service/nvdrv/interface.h" |
| 11 | 12 | ||
| 12 | namespace Service { | 13 | namespace Service { |
| 13 | namespace Nvidia { | 14 | namespace Nvidia { |
| @@ -16,7 +17,8 @@ std::weak_ptr<Module> nvdrv; | |||
| 16 | 17 | ||
| 17 | void InstallInterfaces(SM::ServiceManager& service_manager) { | 18 | void InstallInterfaces(SM::ServiceManager& service_manager) { |
| 18 | auto module_ = std::make_shared<Module>(); | 19 | auto module_ = std::make_shared<Module>(); |
| 19 | std::make_shared<NVDRV_A>(module_)->InstallAsService(service_manager); | 20 | std::make_shared<NVDRV>(module_, "nvdrv")->InstallAsService(service_manager); |
| 21 | std::make_shared<NVDRV>(module_, "nvdrv:a")->InstallAsService(service_manager); | ||
| 20 | nvdrv = module_; | 22 | nvdrv = module_; |
| 21 | } | 23 | } |
| 22 | 24 | ||