diff options
| author | 2023-02-19 14:42:12 -0500 | |
|---|---|---|
| committer | 2023-03-01 10:39:49 -0500 | |
| commit | 65be230fdda302b25447f2f09b06e3238bd09e79 (patch) | |
| tree | 68250d7bc8151041b236dcd79483df98938952cd /src/core/hle/service/ns | |
| parent | sm:: remove unused member (diff) | |
| download | yuzu-65be230fdda302b25447f2f09b06e3238bd09e79.tar.gz yuzu-65be230fdda302b25447f2f09b06e3238bd09e79.tar.xz yuzu-65be230fdda302b25447f2f09b06e3238bd09e79.zip | |
service: move hle_ipc from kernel
Diffstat (limited to 'src/core/hle/service/ns')
| -rw-r--r-- | src/core/hle/service/ns/iplatform_service_manager.cpp | 14 | ||||
| -rw-r--r-- | src/core/hle/service/ns/iplatform_service_manager.h | 12 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.cpp | 15 | ||||
| -rw-r--r-- | src/core/hle/service/ns/ns.h | 14 | ||||
| -rw-r--r-- | src/core/hle/service/ns/pdm_qry.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/ns/pdm_qry.h | 2 |
6 files changed, 30 insertions, 31 deletions
diff --git a/src/core/hle/service/ns/iplatform_service_manager.cpp b/src/core/hle/service/ns/iplatform_service_manager.cpp index 1fab2f0dd..cd2705881 100644 --- a/src/core/hle/service/ns/iplatform_service_manager.cpp +++ b/src/core/hle/service/ns/iplatform_service_manager.cpp | |||
| @@ -15,11 +15,11 @@ | |||
| 15 | #include "core/file_sys/registered_cache.h" | 15 | #include "core/file_sys/registered_cache.h" |
| 16 | #include "core/file_sys/romfs.h" | 16 | #include "core/file_sys/romfs.h" |
| 17 | #include "core/file_sys/system_archive/system_archive.h" | 17 | #include "core/file_sys/system_archive/system_archive.h" |
| 18 | #include "core/hle/ipc_helpers.h" | ||
| 19 | #include "core/hle/kernel/k_shared_memory.h" | 18 | #include "core/hle/kernel/k_shared_memory.h" |
| 20 | #include "core/hle/kernel/kernel.h" | 19 | #include "core/hle/kernel/kernel.h" |
| 21 | #include "core/hle/kernel/physical_memory.h" | 20 | #include "core/hle/kernel/physical_memory.h" |
| 22 | #include "core/hle/service/filesystem/filesystem.h" | 21 | #include "core/hle/service/filesystem/filesystem.h" |
| 22 | #include "core/hle/service/ipc_helpers.h" | ||
| 23 | #include "core/hle/service/ns/iplatform_service_manager.h" | 23 | #include "core/hle/service/ns/iplatform_service_manager.h" |
| 24 | 24 | ||
| 25 | namespace Service::NS { | 25 | namespace Service::NS { |
| @@ -208,7 +208,7 @@ IPlatformServiceManager::IPlatformServiceManager(Core::System& system_, const ch | |||
| 208 | 208 | ||
| 209 | IPlatformServiceManager::~IPlatformServiceManager() = default; | 209 | IPlatformServiceManager::~IPlatformServiceManager() = default; |
| 210 | 210 | ||
| 211 | void IPlatformServiceManager::RequestLoad(Kernel::HLERequestContext& ctx) { | 211 | void IPlatformServiceManager::RequestLoad(HLERequestContext& ctx) { |
| 212 | IPC::RequestParser rp{ctx}; | 212 | IPC::RequestParser rp{ctx}; |
| 213 | const u32 shared_font_type{rp.Pop<u32>()}; | 213 | const u32 shared_font_type{rp.Pop<u32>()}; |
| 214 | // Games don't call this so all fonts should be loaded | 214 | // Games don't call this so all fonts should be loaded |
| @@ -218,7 +218,7 @@ void IPlatformServiceManager::RequestLoad(Kernel::HLERequestContext& ctx) { | |||
| 218 | rb.Push(ResultSuccess); | 218 | rb.Push(ResultSuccess); |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | void IPlatformServiceManager::GetLoadState(Kernel::HLERequestContext& ctx) { | 221 | void IPlatformServiceManager::GetLoadState(HLERequestContext& ctx) { |
| 222 | IPC::RequestParser rp{ctx}; | 222 | IPC::RequestParser rp{ctx}; |
| 223 | const u32 font_id{rp.Pop<u32>()}; | 223 | const u32 font_id{rp.Pop<u32>()}; |
| 224 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 224 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| @@ -228,7 +228,7 @@ void IPlatformServiceManager::GetLoadState(Kernel::HLERequestContext& ctx) { | |||
| 228 | rb.Push<u32>(static_cast<u32>(LoadState::Done)); | 228 | rb.Push<u32>(static_cast<u32>(LoadState::Done)); |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | void IPlatformServiceManager::GetSize(Kernel::HLERequestContext& ctx) { | 231 | void IPlatformServiceManager::GetSize(HLERequestContext& ctx) { |
| 232 | IPC::RequestParser rp{ctx}; | 232 | IPC::RequestParser rp{ctx}; |
| 233 | const u32 font_id{rp.Pop<u32>()}; | 233 | const u32 font_id{rp.Pop<u32>()}; |
| 234 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 234 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| @@ -238,7 +238,7 @@ void IPlatformServiceManager::GetSize(Kernel::HLERequestContext& ctx) { | |||
| 238 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).size); | 238 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).size); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | void IPlatformServiceManager::GetSharedMemoryAddressOffset(Kernel::HLERequestContext& ctx) { | 241 | void IPlatformServiceManager::GetSharedMemoryAddressOffset(HLERequestContext& ctx) { |
| 242 | IPC::RequestParser rp{ctx}; | 242 | IPC::RequestParser rp{ctx}; |
| 243 | const u32 font_id{rp.Pop<u32>()}; | 243 | const u32 font_id{rp.Pop<u32>()}; |
| 244 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); | 244 | LOG_DEBUG(Service_NS, "called, font_id={}", font_id); |
| @@ -248,7 +248,7 @@ void IPlatformServiceManager::GetSharedMemoryAddressOffset(Kernel::HLERequestCon | |||
| 248 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).offset); | 248 | rb.Push<u32>(impl->GetSharedFontRegion(font_id).offset); |
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | void IPlatformServiceManager::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { | 251 | void IPlatformServiceManager::GetSharedMemoryNativeHandle(HLERequestContext& ctx) { |
| 252 | // Map backing memory for the font data | 252 | // Map backing memory for the font data |
| 253 | LOG_DEBUG(Service_NS, "called"); | 253 | LOG_DEBUG(Service_NS, "called"); |
| 254 | 254 | ||
| @@ -261,7 +261,7 @@ void IPlatformServiceManager::GetSharedMemoryNativeHandle(Kernel::HLERequestCont | |||
| 261 | rb.PushCopyObjects(&kernel.GetFontSharedMem()); | 261 | rb.PushCopyObjects(&kernel.GetFontSharedMem()); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | void IPlatformServiceManager::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) { | 264 | void IPlatformServiceManager::GetSharedFontInOrderOfPriority(HLERequestContext& ctx) { |
| 265 | IPC::RequestParser rp{ctx}; | 265 | IPC::RequestParser rp{ctx}; |
| 266 | const u64 language_code{rp.Pop<u64>()}; // TODO(ogniK): Find out what this is used for | 266 | const u64 language_code{rp.Pop<u64>()}; // TODO(ogniK): Find out what this is used for |
| 267 | LOG_DEBUG(Service_NS, "called, language_code={:X}", language_code); | 267 | LOG_DEBUG(Service_NS, "called, language_code={:X}", language_code); |
diff --git a/src/core/hle/service/ns/iplatform_service_manager.h b/src/core/hle/service/ns/iplatform_service_manager.h index ed6eda89f..03071e02b 100644 --- a/src/core/hle/service/ns/iplatform_service_manager.h +++ b/src/core/hle/service/ns/iplatform_service_manager.h | |||
| @@ -42,12 +42,12 @@ public: | |||
| 42 | ~IPlatformServiceManager() override; | 42 | ~IPlatformServiceManager() override; |
| 43 | 43 | ||
| 44 | private: | 44 | private: |
| 45 | void RequestLoad(Kernel::HLERequestContext& ctx); | 45 | void RequestLoad(HLERequestContext& ctx); |
| 46 | void GetLoadState(Kernel::HLERequestContext& ctx); | 46 | void GetLoadState(HLERequestContext& ctx); |
| 47 | void GetSize(Kernel::HLERequestContext& ctx); | 47 | void GetSize(HLERequestContext& ctx); |
| 48 | void GetSharedMemoryAddressOffset(Kernel::HLERequestContext& ctx); | 48 | void GetSharedMemoryAddressOffset(HLERequestContext& ctx); |
| 49 | void GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx); | 49 | void GetSharedMemoryNativeHandle(HLERequestContext& ctx); |
| 50 | void GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx); | 50 | void GetSharedFontInOrderOfPriority(HLERequestContext& ctx); |
| 51 | 51 | ||
| 52 | struct Impl; | 52 | struct Impl; |
| 53 | std::unique_ptr<Impl> impl; | 53 | std::unique_ptr<Impl> impl; |
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 062e96ef9..d6f0faea2 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp | |||
| @@ -7,8 +7,8 @@ | |||
| 7 | #include "core/file_sys/control_metadata.h" | 7 | #include "core/file_sys/control_metadata.h" |
| 8 | #include "core/file_sys/patch_manager.h" | 8 | #include "core/file_sys/patch_manager.h" |
| 9 | #include "core/file_sys/vfs.h" | 9 | #include "core/file_sys/vfs.h" |
| 10 | #include "core/hle/ipc_helpers.h" | ||
| 11 | #include "core/hle/service/glue/glue_manager.h" | 10 | #include "core/hle/service/glue/glue_manager.h" |
| 11 | #include "core/hle/service/ipc_helpers.h" | ||
| 12 | #include "core/hle/service/ns/errors.h" | 12 | #include "core/hle/service/ns/errors.h" |
| 13 | #include "core/hle/service/ns/iplatform_service_manager.h" | 13 | #include "core/hle/service/ns/iplatform_service_manager.h" |
| 14 | #include "core/hle/service/ns/language.h" | 14 | #include "core/hle/service/ns/language.h" |
| @@ -329,7 +329,7 @@ IApplicationManagerInterface::IApplicationManagerInterface(Core::System& system_ | |||
| 329 | 329 | ||
| 330 | IApplicationManagerInterface::~IApplicationManagerInterface() = default; | 330 | IApplicationManagerInterface::~IApplicationManagerInterface() = default; |
| 331 | 331 | ||
| 332 | void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestContext& ctx) { | 332 | void IApplicationManagerInterface::GetApplicationControlData(HLERequestContext& ctx) { |
| 333 | IPC::RequestParser rp{ctx}; | 333 | IPC::RequestParser rp{ctx}; |
| 334 | const auto flag = rp.PopRaw<u64>(); | 334 | const auto flag = rp.PopRaw<u64>(); |
| 335 | LOG_DEBUG(Service_NS, "called with flag={:016X}", flag); | 335 | LOG_DEBUG(Service_NS, "called with flag={:016X}", flag); |
| @@ -388,7 +388,7 @@ void IApplicationManagerInterface::GetApplicationControlData(Kernel::HLERequestC | |||
| 388 | rb.Push<u32>(static_cast<u32>(out.size())); | 388 | rb.Push<u32>(static_cast<u32>(out.size())); |
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | void IApplicationManagerInterface::GetApplicationDesiredLanguage(Kernel::HLERequestContext& ctx) { | 391 | void IApplicationManagerInterface::GetApplicationDesiredLanguage(HLERequestContext& ctx) { |
| 392 | IPC::RequestParser rp{ctx}; | 392 | IPC::RequestParser rp{ctx}; |
| 393 | const auto supported_languages = rp.Pop<u32>(); | 393 | const auto supported_languages = rp.Pop<u32>(); |
| 394 | 394 | ||
| @@ -440,7 +440,7 @@ ResultVal<u8> IApplicationManagerInterface::GetApplicationDesiredLanguage( | |||
| 440 | } | 440 | } |
| 441 | 441 | ||
| 442 | void IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode( | 442 | void IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode( |
| 443 | Kernel::HLERequestContext& ctx) { | 443 | HLERequestContext& ctx) { |
| 444 | IPC::RequestParser rp{ctx}; | 444 | IPC::RequestParser rp{ctx}; |
| 445 | const auto application_language = rp.Pop<u8>(); | 445 | const auto application_language = rp.Pop<u8>(); |
| 446 | 446 | ||
| @@ -604,8 +604,7 @@ IReadOnlyApplicationControlDataInterface::IReadOnlyApplicationControlDataInterfa | |||
| 604 | 604 | ||
| 605 | IReadOnlyApplicationControlDataInterface::~IReadOnlyApplicationControlDataInterface() = default; | 605 | IReadOnlyApplicationControlDataInterface::~IReadOnlyApplicationControlDataInterface() = default; |
| 606 | 606 | ||
| 607 | void IReadOnlyApplicationControlDataInterface::GetApplicationControlData( | 607 | void IReadOnlyApplicationControlDataInterface::GetApplicationControlData(HLERequestContext& ctx) { |
| 608 | Kernel::HLERequestContext& ctx) { | ||
| 609 | enum class ApplicationControlSource : u8 { | 608 | enum class ApplicationControlSource : u8 { |
| 610 | CacheOnly, | 609 | CacheOnly, |
| 611 | Storage, | 610 | Storage, |
| @@ -753,7 +752,7 @@ public: | |||
| 753 | } | 752 | } |
| 754 | 753 | ||
| 755 | private: | 754 | private: |
| 756 | void OpenSystemUpdateControl(Kernel::HLERequestContext& ctx) { | 755 | void OpenSystemUpdateControl(HLERequestContext& ctx) { |
| 757 | LOG_DEBUG(Service_NS, "called"); | 756 | LOG_DEBUG(Service_NS, "called"); |
| 758 | 757 | ||
| 759 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 758 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -777,7 +776,7 @@ public: | |||
| 777 | } | 776 | } |
| 778 | 777 | ||
| 779 | private: | 778 | private: |
| 780 | void NeedsUpdateVulnerability(Kernel::HLERequestContext& ctx) { | 779 | void NeedsUpdateVulnerability(HLERequestContext& ctx) { |
| 781 | LOG_WARNING(Service_NS, "(STUBBED) called"); | 780 | LOG_WARNING(Service_NS, "(STUBBED) called"); |
| 782 | 781 | ||
| 783 | IPC::ResponseBuilder rb{ctx, 3}; | 782 | IPC::ResponseBuilder rb{ctx, 3}; |
diff --git a/src/core/hle/service/ns/ns.h b/src/core/hle/service/ns/ns.h index 797e69a13..203388e1f 100644 --- a/src/core/hle/service/ns/ns.h +++ b/src/core/hle/service/ns/ns.h | |||
| @@ -32,9 +32,9 @@ public: | |||
| 32 | ResultVal<u64> ConvertApplicationLanguageToLanguageCode(u8 application_language); | 32 | ResultVal<u64> ConvertApplicationLanguageToLanguageCode(u8 application_language); |
| 33 | 33 | ||
| 34 | private: | 34 | private: |
| 35 | void GetApplicationControlData(Kernel::HLERequestContext& ctx); | 35 | void GetApplicationControlData(HLERequestContext& ctx); |
| 36 | void GetApplicationDesiredLanguage(Kernel::HLERequestContext& ctx); | 36 | void GetApplicationDesiredLanguage(HLERequestContext& ctx); |
| 37 | void ConvertApplicationLanguageToLanguageCode(Kernel::HLERequestContext& ctx); | 37 | void ConvertApplicationLanguageToLanguageCode(HLERequestContext& ctx); |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | class IApplicationVersionInterface final : public ServiceFramework<IApplicationVersionInterface> { | 40 | class IApplicationVersionInterface final : public ServiceFramework<IApplicationVersionInterface> { |
| @@ -80,7 +80,7 @@ public: | |||
| 80 | ~IReadOnlyApplicationControlDataInterface() override; | 80 | ~IReadOnlyApplicationControlDataInterface() override; |
| 81 | 81 | ||
| 82 | private: | 82 | private: |
| 83 | void GetApplicationControlData(Kernel::HLERequestContext& ctx); | 83 | void GetApplicationControlData(HLERequestContext& ctx); |
| 84 | }; | 84 | }; |
| 85 | 85 | ||
| 86 | class NS final : public ServiceFramework<NS> { | 86 | class NS final : public ServiceFramework<NS> { |
| @@ -92,7 +92,7 @@ public: | |||
| 92 | 92 | ||
| 93 | private: | 93 | private: |
| 94 | template <typename T, typename... Args> | 94 | template <typename T, typename... Args> |
| 95 | void PushInterface(Kernel::HLERequestContext& ctx) { | 95 | void PushInterface(HLERequestContext& ctx) { |
| 96 | LOG_DEBUG(Service_NS, "called"); | 96 | LOG_DEBUG(Service_NS, "called"); |
| 97 | 97 | ||
| 98 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 98 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -100,7 +100,7 @@ private: | |||
| 100 | rb.PushIpcInterface<T>(system); | 100 | rb.PushIpcInterface<T>(system); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void PushIApplicationManagerInterface(Kernel::HLERequestContext& ctx) { | 103 | void PushIApplicationManagerInterface(HLERequestContext& ctx) { |
| 104 | LOG_DEBUG(Service_NS, "called"); | 104 | LOG_DEBUG(Service_NS, "called"); |
| 105 | 105 | ||
| 106 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 106 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| @@ -110,7 +110,7 @@ private: | |||
| 110 | 110 | ||
| 111 | template <typename T, typename... Args> | 111 | template <typename T, typename... Args> |
| 112 | std::shared_ptr<T> GetInterface(Args&&... args) const { | 112 | std::shared_ptr<T> GetInterface(Args&&... args) const { |
| 113 | static_assert(std::is_base_of_v<Kernel::SessionRequestHandler, T>, | 113 | static_assert(std::is_base_of_v<SessionRequestHandler, T>, |
| 114 | "Not a base of ServiceFrameworkBase"); | 114 | "Not a base of ServiceFrameworkBase"); |
| 115 | 115 | ||
| 116 | return std::make_shared<T>(std::forward<Args>(args)...); | 116 | return std::make_shared<T>(std::forward<Args>(args)...); |
diff --git a/src/core/hle/service/ns/pdm_qry.cpp b/src/core/hle/service/ns/pdm_qry.cpp index aac8f573f..ce0ee30e0 100644 --- a/src/core/hle/service/ns/pdm_qry.cpp +++ b/src/core/hle/service/ns/pdm_qry.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "common/uuid.h" | 7 | #include "common/uuid.h" |
| 8 | #include "core/hle/ipc_helpers.h" | 8 | #include "core/hle/service/ipc_helpers.h" |
| 9 | #include "core/hle/service/ns/pdm_qry.h" | 9 | #include "core/hle/service/ns/pdm_qry.h" |
| 10 | #include "core/hle/service/service.h" | 10 | #include "core/hle/service/service.h" |
| 11 | 11 | ||
| @@ -42,7 +42,7 @@ PDM_QRY::PDM_QRY(Core::System& system_) : ServiceFramework{system_, "pdm:qry"} { | |||
| 42 | 42 | ||
| 43 | PDM_QRY::~PDM_QRY() = default; | 43 | PDM_QRY::~PDM_QRY() = default; |
| 44 | 44 | ||
| 45 | void PDM_QRY::QueryPlayStatisticsByApplicationIdAndUserAccountId(Kernel::HLERequestContext& ctx) { | 45 | void PDM_QRY::QueryPlayStatisticsByApplicationIdAndUserAccountId(HLERequestContext& ctx) { |
| 46 | IPC::RequestParser rp{ctx}; | 46 | IPC::RequestParser rp{ctx}; |
| 47 | const auto unknown = rp.Pop<bool>(); | 47 | const auto unknown = rp.Pop<bool>(); |
| 48 | rp.Pop<u8>(); // Padding | 48 | rp.Pop<u8>(); // Padding |
diff --git a/src/core/hle/service/ns/pdm_qry.h b/src/core/hle/service/ns/pdm_qry.h index abcc3bef3..c98e01660 100644 --- a/src/core/hle/service/ns/pdm_qry.h +++ b/src/core/hle/service/ns/pdm_qry.h | |||
| @@ -26,7 +26,7 @@ public: | |||
| 26 | ~PDM_QRY() override; | 26 | ~PDM_QRY() override; |
| 27 | 27 | ||
| 28 | private: | 28 | private: |
| 29 | void QueryPlayStatisticsByApplicationIdAndUserAccountId(Kernel::HLERequestContext& ctx); | 29 | void QueryPlayStatisticsByApplicationIdAndUserAccountId(HLERequestContext& ctx); |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | } // namespace Service::NS | 32 | } // namespace Service::NS |