summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/cpu_interrupt_handler.h4
-rw-r--r--src/core/hle/ipc_helpers.h9
-rw-r--r--src/core/hle/kernel/hle_ipc.h6
-rw-r--r--src/core/hle/service/acc/acc.cpp1
-rw-r--r--src/core/hle/service/am/applet_ae.cpp2
-rw-r--r--src/core/hle/service/aoc/aoc_u.cpp1
-rw-r--r--src/core/hle/service/apm/apm.cpp1
-rw-r--r--src/core/hle/service/bcat/module.cpp1
-rw-r--r--src/core/hle/service/btdrv/btdrv.cpp1
-rw-r--r--src/core/hle/service/btm/btm.cpp1
-rw-r--r--src/core/hle/service/caps/caps_u.cpp25
-rw-r--r--src/core/hle/service/caps/caps_u.h1
-rw-r--r--src/core/hle/service/friend/friend.cpp1
-rw-r--r--src/core/hle/service/glue/arp.cpp1
-rw-r--r--src/core/hle/service/ldr/ldr.cpp1
-rw-r--r--src/core/hle/service/lm/lm.cpp1
-rw-r--r--src/core/hle/service/nvdrv/nvdrv.cpp1
-rw-r--r--src/core/hle/service/pm/pm.cpp1
-rw-r--r--src/core/hle/service/prepo/prepo.cpp1
19 files changed, 42 insertions, 18 deletions
diff --git a/src/core/arm/cpu_interrupt_handler.h b/src/core/arm/cpu_interrupt_handler.h
index 71e582f79..c20c280f1 100644
--- a/src/core/arm/cpu_interrupt_handler.h
+++ b/src/core/arm/cpu_interrupt_handler.h
@@ -21,8 +21,8 @@ public:
21 CPUInterruptHandler(const CPUInterruptHandler&) = delete; 21 CPUInterruptHandler(const CPUInterruptHandler&) = delete;
22 CPUInterruptHandler& operator=(const CPUInterruptHandler&) = delete; 22 CPUInterruptHandler& operator=(const CPUInterruptHandler&) = delete;
23 23
24 CPUInterruptHandler(CPUInterruptHandler&&) = default; 24 CPUInterruptHandler(CPUInterruptHandler&&) = delete;
25 CPUInterruptHandler& operator=(CPUInterruptHandler&&) = default; 25 CPUInterruptHandler& operator=(CPUInterruptHandler&&) = delete;
26 26
27 bool IsInterrupted() const { 27 bool IsInterrupted() const {
28 return is_interrupted; 28 return is_interrupted;
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h
index 1c354037d..d57776ce9 100644
--- a/src/core/hle/ipc_helpers.h
+++ b/src/core/hle/ipc_helpers.h
@@ -12,7 +12,6 @@
12#include <utility> 12#include <utility>
13#include "common/assert.h" 13#include "common/assert.h"
14#include "common/common_types.h" 14#include "common/common_types.h"
15#include "core/core.h"
16#include "core/hle/ipc.h" 15#include "core/hle/ipc.h"
17#include "core/hle/kernel/client_port.h" 16#include "core/hle/kernel/client_port.h"
18#include "core/hle/kernel/client_session.h" 17#include "core/hle/kernel/client_session.h"
@@ -73,14 +72,12 @@ public:
73 AlwaysMoveHandles = 1, 72 AlwaysMoveHandles = 1,
74 }; 73 };
75 74
76 explicit ResponseBuilder(u32* command_buffer) : RequestHelperBase(command_buffer) {}
77
78 explicit ResponseBuilder(Kernel::HLERequestContext& context, u32 normal_params_size, 75 explicit ResponseBuilder(Kernel::HLERequestContext& context, u32 normal_params_size,
79 u32 num_handles_to_copy = 0, u32 num_objects_to_move = 0, 76 u32 num_handles_to_copy = 0, u32 num_objects_to_move = 0,
80 Flags flags = Flags::None) 77 Flags flags = Flags::None)
81
82 : RequestHelperBase(context), normal_params_size(normal_params_size), 78 : RequestHelperBase(context), normal_params_size(normal_params_size),
83 num_handles_to_copy(num_handles_to_copy), num_objects_to_move(num_objects_to_move) { 79 num_handles_to_copy(num_handles_to_copy),
80 num_objects_to_move(num_objects_to_move), kernel{context.kernel} {
84 81
85 memset(cmdbuf, 0, sizeof(u32) * IPC::COMMAND_BUFFER_LENGTH); 82 memset(cmdbuf, 0, sizeof(u32) * IPC::COMMAND_BUFFER_LENGTH);
86 83
@@ -140,7 +137,6 @@ public:
140 if (context->Session()->IsDomain()) { 137 if (context->Session()->IsDomain()) {
141 context->AddDomainObject(std::move(iface)); 138 context->AddDomainObject(std::move(iface));
142 } else { 139 } else {
143 auto& kernel = Core::System::GetInstance().Kernel();
144 auto [client, server] = Kernel::Session::Create(kernel, iface->GetServiceName()); 140 auto [client, server] = Kernel::Session::Create(kernel, iface->GetServiceName());
145 context->AddMoveObject(std::move(client)); 141 context->AddMoveObject(std::move(client));
146 iface->ClientConnected(std::move(server)); 142 iface->ClientConnected(std::move(server));
@@ -214,6 +210,7 @@ private:
214 u32 num_handles_to_copy{}; 210 u32 num_handles_to_copy{};
215 u32 num_objects_to_move{}; ///< Domain objects or move handles, context dependent 211 u32 num_objects_to_move{}; ///< Domain objects or move handles, context dependent
216 std::ptrdiff_t datapayload_index{}; 212 std::ptrdiff_t datapayload_index{};
213 Kernel::KernelCore& kernel;
217}; 214};
218 215
219/// Push /// 216/// Push ///
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h
index f3277b766..c31a65476 100644
--- a/src/core/hle/kernel/hle_ipc.h
+++ b/src/core/hle/kernel/hle_ipc.h
@@ -24,6 +24,10 @@ namespace Core::Memory {
24class Memory; 24class Memory;
25} 25}
26 26
27namespace IPC {
28class ResponseBuilder;
29}
30
27namespace Service { 31namespace Service {
28class ServiceFrameworkBase; 32class ServiceFrameworkBase;
29} 33}
@@ -287,6 +291,8 @@ public:
287 } 291 }
288 292
289private: 293private:
294 friend class IPC::ResponseBuilder;
295
290 void ParseCommandBuffer(const HandleTable& handle_table, u32_le* src_cmdbuf, bool incoming); 296 void ParseCommandBuffer(const HandleTable& handle_table, u32_le* src_cmdbuf, bool incoming);
291 297
292 std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf; 298 std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf;
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 2850dd805..ded52ea0b 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -11,6 +11,7 @@
11#include "common/string_util.h" 11#include "common/string_util.h"
12#include "common/swap.h" 12#include "common/swap.h"
13#include "core/constants.h" 13#include "core/constants.h"
14#include "core/core.h"
14#include "core/core_timing.h" 15#include "core/core_timing.h"
15#include "core/file_sys/control_metadata.h" 16#include "core/file_sys/control_metadata.h"
16#include "core/file_sys/patch_manager.h" 17#include "core/file_sys/patch_manager.h"
diff --git a/src/core/hle/service/am/applet_ae.cpp b/src/core/hle/service/am/applet_ae.cpp
index 9df286d17..be23ca747 100644
--- a/src/core/hle/service/am/applet_ae.cpp
+++ b/src/core/hle/service/am/applet_ae.cpp
@@ -3,8 +3,8 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "common/logging/log.h" 5#include "common/logging/log.h"
6#include "core/core.h"
6#include "core/hle/ipc_helpers.h" 7#include "core/hle/ipc_helpers.h"
7#include "core/hle/kernel/process.h"
8#include "core/hle/service/am/am.h" 8#include "core/hle/service/am/am.h"
9#include "core/hle/service/am/applet_ae.h" 9#include "core/hle/service/am/applet_ae.h"
10#include "core/hle/service/nvflinger/nvflinger.h" 10#include "core/hle/service/nvflinger/nvflinger.h"
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp
index 8e79f707b..e58b2c518 100644
--- a/src/core/hle/service/aoc/aoc_u.cpp
+++ b/src/core/hle/service/aoc/aoc_u.cpp
@@ -6,6 +6,7 @@
6#include <numeric> 6#include <numeric>
7#include <vector> 7#include <vector>
8#include "common/logging/log.h" 8#include "common/logging/log.h"
9#include "core/core.h"
9#include "core/file_sys/content_archive.h" 10#include "core/file_sys/content_archive.h"
10#include "core/file_sys/control_metadata.h" 11#include "core/file_sys/control_metadata.h"
11#include "core/file_sys/nca_metadata.h" 12#include "core/file_sys/nca_metadata.h"
diff --git a/src/core/hle/service/apm/apm.cpp b/src/core/hle/service/apm/apm.cpp
index 85bbf5988..e2d8f0027 100644
--- a/src/core/hle/service/apm/apm.cpp
+++ b/src/core/hle/service/apm/apm.cpp
@@ -2,6 +2,7 @@
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/core.h"
5#include "core/hle/ipc_helpers.h" 6#include "core/hle/ipc_helpers.h"
6#include "core/hle/service/apm/apm.h" 7#include "core/hle/service/apm/apm.h"
7#include "core/hle/service/apm/interface.h" 8#include "core/hle/service/apm/interface.h"
diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp
index db0e06ca1..68deb0600 100644
--- a/src/core/hle/service/bcat/module.cpp
+++ b/src/core/hle/service/bcat/module.cpp
@@ -8,6 +8,7 @@
8#include "common/hex_util.h" 8#include "common/hex_util.h"
9#include "common/logging/log.h" 9#include "common/logging/log.h"
10#include "common/string_util.h" 10#include "common/string_util.h"
11#include "core/core.h"
11#include "core/file_sys/vfs.h" 12#include "core/file_sys/vfs.h"
12#include "core/hle/ipc_helpers.h" 13#include "core/hle/ipc_helpers.h"
13#include "core/hle/kernel/process.h" 14#include "core/hle/kernel/process.h"
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp
index f311afa2f..d4f0dd1ab 100644
--- a/src/core/hle/service/btdrv/btdrv.cpp
+++ b/src/core/hle/service/btdrv/btdrv.cpp
@@ -3,6 +3,7 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "common/logging/log.h" 5#include "common/logging/log.h"
6#include "core/core.h"
6#include "core/hle/ipc_helpers.h" 7#include "core/hle/ipc_helpers.h"
7#include "core/hle/kernel/hle_ipc.h" 8#include "core/hle/kernel/hle_ipc.h"
8#include "core/hle/kernel/kernel.h" 9#include "core/hle/kernel/kernel.h"
diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp
index 0d251c6d0..c8f8ddbd5 100644
--- a/src/core/hle/service/btm/btm.cpp
+++ b/src/core/hle/service/btm/btm.cpp
@@ -5,6 +5,7 @@
5#include <memory> 5#include <memory>
6 6
7#include "common/logging/log.h" 7#include "common/logging/log.h"
8#include "core/core.h"
8#include "core/hle/ipc_helpers.h" 9#include "core/hle/ipc_helpers.h"
9#include "core/hle/kernel/hle_ipc.h" 10#include "core/hle/kernel/hle_ipc.h"
10#include "core/hle/kernel/kernel.h" 11#include "core/hle/kernel/kernel.h"
diff --git a/src/core/hle/service/caps/caps_u.cpp b/src/core/hle/service/caps/caps_u.cpp
index 8e2b83629..f9479bdb3 100644
--- a/src/core/hle/service/caps/caps_u.cpp
+++ b/src/core/hle/service/caps/caps_u.cpp
@@ -41,7 +41,7 @@ CAPS_U::CAPS_U() : ServiceFramework("caps:u") {
41 {130, nullptr, "PrecheckToCreateContentsForApplication"}, 41 {130, nullptr, "PrecheckToCreateContentsForApplication"},
42 {140, nullptr, "GetAlbumFileList1AafeAruidDeprecated"}, 42 {140, nullptr, "GetAlbumFileList1AafeAruidDeprecated"},
43 {141, nullptr, "GetAlbumFileList2AafeUidAruidDeprecated"}, 43 {141, nullptr, "GetAlbumFileList2AafeUidAruidDeprecated"},
44 {142, nullptr, "GetAlbumFileList3AaeAruid"}, 44 {142, &CAPS_U::GetAlbumFileList3AaeAruid, "GetAlbumFileList3AaeAruid"},
45 {143, nullptr, "GetAlbumFileList4AaeUidAruid"}, 45 {143, nullptr, "GetAlbumFileList4AaeUidAruid"},
46 {60002, nullptr, "OpenAccessorSessionForApplication"}, 46 {60002, nullptr, "OpenAccessorSessionForApplication"},
47 }; 47 };
@@ -77,17 +77,24 @@ void CAPS_U::GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& c
77 77
78 // TODO: Update this when we implement the album. 78 // TODO: Update this when we implement the album.
79 // Currently we do not have a method of accessing album entries, set this to 0 for now. 79 // Currently we do not have a method of accessing album entries, set this to 0 for now.
80 constexpr s32 total_entries{0}; 80 constexpr u32 total_entries_1{};
81 constexpr u32 total_entries_2{};
81 82
82 LOG_WARNING(Service_Capture, 83 LOG_WARNING(
83 "(STUBBED) called. pid={}, content_type={}, start_posix_time={}, " 84 Service_Capture,
84 "end_posix_time={}, applet_resource_user_id={}, total_entries={}", 85 "(STUBBED) called. pid={}, content_type={}, start_posix_time={}, "
85 pid, content_type, start_posix_time, end_posix_time, applet_resource_user_id, 86 "end_posix_time={}, applet_resource_user_id={}, total_entries_1={}, total_entries_2={}",
86 total_entries); 87 pid, content_type, start_posix_time, end_posix_time, applet_resource_user_id,
88 total_entries_1, total_entries_2);
87 89
88 IPC::ResponseBuilder rb{ctx, 3}; 90 IPC::ResponseBuilder rb{ctx, 4};
89 rb.Push(RESULT_SUCCESS); 91 rb.Push(RESULT_SUCCESS);
90 rb.Push(total_entries); 92 rb.Push(total_entries_1);
93 rb.Push(total_entries_2);
94}
95
96void CAPS_U::GetAlbumFileList3AaeAruid(Kernel::HLERequestContext& ctx) {
97 GetAlbumContentsFileListForApplication(ctx);
91} 98}
92 99
93} // namespace Service::Capture 100} // namespace Service::Capture
diff --git a/src/core/hle/service/caps/caps_u.h b/src/core/hle/service/caps/caps_u.h
index e04e56bbc..4b80f3156 100644
--- a/src/core/hle/service/caps/caps_u.h
+++ b/src/core/hle/service/caps/caps_u.h
@@ -20,6 +20,7 @@ public:
20private: 20private:
21 void SetShimLibraryVersion(Kernel::HLERequestContext& ctx); 21 void SetShimLibraryVersion(Kernel::HLERequestContext& ctx);
22 void GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& ctx); 22 void GetAlbumContentsFileListForApplication(Kernel::HLERequestContext& ctx);
23 void GetAlbumFileList3AaeAruid(Kernel::HLERequestContext& ctx);
23}; 24};
24 25
25} // namespace Service::Capture 26} // namespace Service::Capture
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp
index b7adaffc7..ebb323da2 100644
--- a/src/core/hle/service/friend/friend.cpp
+++ b/src/core/hle/service/friend/friend.cpp
@@ -5,6 +5,7 @@
5#include <queue> 5#include <queue>
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/core.h"
8#include "core/hle/ipc_helpers.h" 9#include "core/hle/ipc_helpers.h"
9#include "core/hle/kernel/readable_event.h" 10#include "core/hle/kernel/readable_event.h"
10#include "core/hle/kernel/writable_event.h" 11#include "core/hle/kernel/writable_event.h"
diff --git a/src/core/hle/service/glue/arp.cpp b/src/core/hle/service/glue/arp.cpp
index b591ce31b..c6252ff89 100644
--- a/src/core/hle/service/glue/arp.cpp
+++ b/src/core/hle/service/glue/arp.cpp
@@ -5,6 +5,7 @@
5#include <memory> 5#include <memory>
6 6
7#include "common/logging/log.h" 7#include "common/logging/log.h"
8#include "core/core.h"
8#include "core/file_sys/control_metadata.h" 9#include "core/file_sys/control_metadata.h"
9#include "core/hle/ipc_helpers.h" 10#include "core/hle/ipc_helpers.h"
10#include "core/hle/kernel/hle_ipc.h" 11#include "core/hle/kernel/hle_ipc.h"
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp
index eeaca44b6..65c209725 100644
--- a/src/core/hle/service/ldr/ldr.cpp
+++ b/src/core/hle/service/ldr/ldr.cpp
@@ -9,6 +9,7 @@
9#include "common/alignment.h" 9#include "common/alignment.h"
10#include "common/hex_util.h" 10#include "common/hex_util.h"
11#include "common/scope_exit.h" 11#include "common/scope_exit.h"
12#include "core/core.h"
12#include "core/hle/ipc_helpers.h" 13#include "core/hle/ipc_helpers.h"
13#include "core/hle/kernel/errors.h" 14#include "core/hle/kernel/errors.h"
14#include "core/hle/kernel/memory/page_table.h" 15#include "core/hle/kernel/memory/page_table.h"
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp
index dec96b771..49a42a9c9 100644
--- a/src/core/hle/service/lm/lm.cpp
+++ b/src/core/hle/service/lm/lm.cpp
@@ -7,6 +7,7 @@
7 7
8#include "common/logging/log.h" 8#include "common/logging/log.h"
9#include "common/scope_exit.h" 9#include "common/scope_exit.h"
10#include "core/core.h"
10#include "core/hle/ipc_helpers.h" 11#include "core/hle/ipc_helpers.h"
11#include "core/hle/service/lm/lm.h" 12#include "core/hle/service/lm/lm.h"
12#include "core/hle/service/lm/manager.h" 13#include "core/hle/service/lm/manager.h"
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp
index a46755cdc..046a1f28c 100644
--- a/src/core/hle/service/nvdrv/nvdrv.cpp
+++ b/src/core/hle/service/nvdrv/nvdrv.cpp
@@ -5,6 +5,7 @@
5#include <utility> 5#include <utility>
6 6
7#include <fmt/format.h> 7#include <fmt/format.h>
8#include "core/core.h"
8#include "core/hle/ipc_helpers.h" 9#include "core/hle/ipc_helpers.h"
9#include "core/hle/kernel/readable_event.h" 10#include "core/hle/kernel/readable_event.h"
10#include "core/hle/kernel/writable_event.h" 11#include "core/hle/kernel/writable_event.h"
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp
index f43122ad2..a771a51b4 100644
--- a/src/core/hle/service/pm/pm.cpp
+++ b/src/core/hle/service/pm/pm.cpp
@@ -2,6 +2,7 @@
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/core.h"
5#include "core/hle/ipc_helpers.h" 6#include "core/hle/ipc_helpers.h"
6#include "core/hle/kernel/kernel.h" 7#include "core/hle/kernel/kernel.h"
7#include "core/hle/kernel/process.h" 8#include "core/hle/kernel/process.h"
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp
index cde3312da..b9ef86b72 100644
--- a/src/core/hle/service/prepo/prepo.cpp
+++ b/src/core/hle/service/prepo/prepo.cpp
@@ -4,6 +4,7 @@
4 4
5#include "common/hex_util.h" 5#include "common/hex_util.h"
6#include "common/logging/log.h" 6#include "common/logging/log.h"
7#include "core/core.h"
7#include "core/hle/ipc_helpers.h" 8#include "core/hle/ipc_helpers.h"
8#include "core/hle/kernel/process.h" 9#include "core/hle/kernel/process.h"
9#include "core/hle/service/acc/profile_manager.h" 10#include "core/hle/service/acc/profile_manager.h"