summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-01-23 19:43:59 -0500
committerGravatar bunnei2018-01-24 22:21:33 -0500
commitf9dae990066cb0fa3730a811353781e9e7bffa19 (patch)
tree1122f389ab4ffd56e622fe9e89c7e9130937954f /src
parentipc_helpers: Make interface domain agnostic and add header validation. (diff)
downloadyuzu-f9dae990066cb0fa3730a811353781e9e7bffa19.tar.gz
yuzu-f9dae990066cb0fa3730a811353781e9e7bffa19.tar.xz
yuzu-f9dae990066cb0fa3730a811353781e9e7bffa19.zip
service: Fix all incorrect IPC response headers.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/acc/acc_u0.cpp4
-rw-r--r--src/core/hle/service/am/applet_oe.cpp22
-rw-r--r--src/core/hle/service/apm/apm.cpp2
-rw-r--r--src/core/hle/service/audio/audout_u.cpp2
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp4
-rw-r--r--src/core/hle/service/hid/hid.cpp13
-rw-r--r--src/core/hle/service/lm/lm.cpp18
-rw-r--r--src/core/hle/service/pctl/pctl_a.cpp2
-rw-r--r--src/core/hle/service/service.cpp2
-rw-r--r--src/core/hle/service/sm/controller.cpp3
-rw-r--r--src/core/hle/service/sm/sm.cpp6
-rw-r--r--src/core/hle/service/time/time.cpp35
-rw-r--r--src/core/hle/service/vi/vi.cpp8
-rw-r--r--src/core/hle/service/vi/vi_m.cpp3
14 files changed, 42 insertions, 82 deletions
diff --git a/src/core/hle/service/acc/acc_u0.cpp b/src/core/hle/service/acc/acc_u0.cpp
index 7f0192fd3..5b0c3bcb5 100644
--- a/src/core/hle/service/acc/acc_u0.cpp
+++ b/src/core/hle/service/acc/acc_u0.cpp
@@ -54,7 +54,7 @@ void ACC_U0::GetUserExistence(Kernel::HLERequestContext& ctx) {
54} 54}
55 55
56void ACC_U0::GetProfile(Kernel::HLERequestContext& ctx) { 56void ACC_U0::GetProfile(Kernel::HLERequestContext& ctx) {
57 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 57 IPC::RequestBuilder rb{ctx, 2, 0, 1};
58 rb.Push(RESULT_SUCCESS); 58 rb.Push(RESULT_SUCCESS);
59 rb.PushIpcInterface<IProfile>(); 59 rb.PushIpcInterface<IProfile>();
60 LOG_DEBUG(Service, "called"); 60 LOG_DEBUG(Service, "called");
@@ -67,7 +67,7 @@ void ACC_U0::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) {
67} 67}
68 68
69void ACC_U0::GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx) { 69void ACC_U0::GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx) {
70 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 70 IPC::RequestBuilder rb{ctx, 2, 0, 1};
71 rb.Push(RESULT_SUCCESS); 71 rb.Push(RESULT_SUCCESS);
72 rb.PushIpcInterface<IManagerForApplication>(); 72 rb.PushIpcInterface<IManagerForApplication>();
73 LOG_DEBUG(Service, "called"); 73 LOG_DEBUG(Service, "called");
diff --git a/src/core/hle/service/am/applet_oe.cpp b/src/core/hle/service/am/applet_oe.cpp
index 7d16b45f3..3e15e4970 100644
--- a/src/core/hle/service/am/applet_oe.cpp
+++ b/src/core/hle/service/am/applet_oe.cpp
@@ -291,7 +291,7 @@ private:
291 std::vector<u8> buffer; 291 std::vector<u8> buffer;
292 292
293 void Open(Kernel::HLERequestContext& ctx) { 293 void Open(Kernel::HLERequestContext& ctx) {
294 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 294 IPC::RequestBuilder rb{ctx, 2, 0, 1};
295 295
296 rb.Push(RESULT_SUCCESS); 296 rb.Push(RESULT_SUCCESS);
297 rb.PushIpcInterface<AM::IStorageAccessor>(buffer); 297 rb.PushIpcInterface<AM::IStorageAccessor>(buffer);
@@ -328,7 +328,7 @@ private:
328 328
329 std::vector<u8> buffer(data, data + sizeof(data)); 329 std::vector<u8> buffer(data, data + sizeof(data));
330 330
331 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 331 IPC::RequestBuilder rb{ctx, 2, 0, 1};
332 332
333 rb.Push(RESULT_SUCCESS); 333 rb.Push(RESULT_SUCCESS);
334 rb.PushIpcInterface<AM::IStorage>(buffer); 334 rb.PushIpcInterface<AM::IStorage>(buffer);
@@ -402,56 +402,56 @@ public:
402 402
403private: 403private:
404 void GetAudioController(Kernel::HLERequestContext& ctx) { 404 void GetAudioController(Kernel::HLERequestContext& ctx) {
405 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 405 IPC::RequestBuilder rb{ctx, 2, 0, 1};
406 rb.Push(RESULT_SUCCESS); 406 rb.Push(RESULT_SUCCESS);
407 rb.PushIpcInterface<IAudioController>(); 407 rb.PushIpcInterface<IAudioController>();
408 LOG_DEBUG(Service, "called"); 408 LOG_DEBUG(Service, "called");
409 } 409 }
410 410
411 void GetDisplayController(Kernel::HLERequestContext& ctx) { 411 void GetDisplayController(Kernel::HLERequestContext& ctx) {
412 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 412 IPC::RequestBuilder rb{ctx, 2, 0, 1};
413 rb.Push(RESULT_SUCCESS); 413 rb.Push(RESULT_SUCCESS);
414 rb.PushIpcInterface<IDisplayController>(); 414 rb.PushIpcInterface<IDisplayController>();
415 LOG_DEBUG(Service, "called"); 415 LOG_DEBUG(Service, "called");
416 } 416 }
417 417
418 void GetDebugFunctions(Kernel::HLERequestContext& ctx) { 418 void GetDebugFunctions(Kernel::HLERequestContext& ctx) {
419 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 419 IPC::RequestBuilder rb{ctx, 2, 0, 1};
420 rb.Push(RESULT_SUCCESS); 420 rb.Push(RESULT_SUCCESS);
421 rb.PushIpcInterface<IDebugFunctions>(); 421 rb.PushIpcInterface<IDebugFunctions>();
422 LOG_DEBUG(Service, "called"); 422 LOG_DEBUG(Service, "called");
423 } 423 }
424 424
425 void GetWindowController(Kernel::HLERequestContext& ctx) { 425 void GetWindowController(Kernel::HLERequestContext& ctx) {
426 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 426 IPC::RequestBuilder rb{ctx, 2, 0, 1};
427 rb.Push(RESULT_SUCCESS); 427 rb.Push(RESULT_SUCCESS);
428 rb.PushIpcInterface<IWindowController>(); 428 rb.PushIpcInterface<IWindowController>();
429 LOG_DEBUG(Service, "called"); 429 LOG_DEBUG(Service, "called");
430 } 430 }
431 431
432 void GetSelfController(Kernel::HLERequestContext& ctx) { 432 void GetSelfController(Kernel::HLERequestContext& ctx) {
433 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 433 IPC::RequestBuilder rb{ctx, 2, 0, 1};
434 rb.Push(RESULT_SUCCESS); 434 rb.Push(RESULT_SUCCESS);
435 rb.PushIpcInterface<ISelfController>(nvflinger); 435 rb.PushIpcInterface<ISelfController>(nvflinger);
436 LOG_DEBUG(Service, "called"); 436 LOG_DEBUG(Service, "called");
437 } 437 }
438 438
439 void GetCommonStateGetter(Kernel::HLERequestContext& ctx) { 439 void GetCommonStateGetter(Kernel::HLERequestContext& ctx) {
440 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 440 IPC::RequestBuilder rb{ctx, 2, 0, 1};
441 rb.Push(RESULT_SUCCESS); 441 rb.Push(RESULT_SUCCESS);
442 rb.PushIpcInterface<ICommonStateGetter>(); 442 rb.PushIpcInterface<ICommonStateGetter>();
443 LOG_DEBUG(Service, "called"); 443 LOG_DEBUG(Service, "called");
444 } 444 }
445 445
446 void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) { 446 void GetLibraryAppletCreator(Kernel::HLERequestContext& ctx) {
447 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 447 IPC::RequestBuilder rb{ctx, 2, 0, 1};
448 rb.Push(RESULT_SUCCESS); 448 rb.Push(RESULT_SUCCESS);
449 rb.PushIpcInterface<ILibraryAppletCreator>(); 449 rb.PushIpcInterface<ILibraryAppletCreator>();
450 LOG_DEBUG(Service, "called"); 450 LOG_DEBUG(Service, "called");
451 } 451 }
452 452
453 void GetApplicationFunctions(Kernel::HLERequestContext& ctx) { 453 void GetApplicationFunctions(Kernel::HLERequestContext& ctx) {
454 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 454 IPC::RequestBuilder rb{ctx, 2, 0, 1};
455 rb.Push(RESULT_SUCCESS); 455 rb.Push(RESULT_SUCCESS);
456 rb.PushIpcInterface<IApplicationFunctions>(); 456 rb.PushIpcInterface<IApplicationFunctions>();
457 LOG_DEBUG(Service, "called"); 457 LOG_DEBUG(Service, "called");
@@ -461,7 +461,7 @@ private:
461}; 461};
462 462
463void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) { 463void AppletOE::OpenApplicationProxy(Kernel::HLERequestContext& ctx) {
464 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 464 IPC::RequestBuilder rb{ctx, 2, 0, 1};
465 rb.Push(RESULT_SUCCESS); 465 rb.Push(RESULT_SUCCESS);
466 rb.PushIpcInterface<IApplicationProxy>(nvflinger); 466 rb.PushIpcInterface<IApplicationProxy>(nvflinger);
467 LOG_DEBUG(Service, "called"); 467 LOG_DEBUG(Service, "called");
diff --git a/src/core/hle/service/apm/apm.cpp b/src/core/hle/service/apm/apm.cpp
index bf7e12288..a005db8a4 100644
--- a/src/core/hle/service/apm/apm.cpp
+++ b/src/core/hle/service/apm/apm.cpp
@@ -58,7 +58,7 @@ APM::APM() : ServiceFramework("apm") {
58} 58}
59 59
60void APM::OpenSession(Kernel::HLERequestContext& ctx) { 60void APM::OpenSession(Kernel::HLERequestContext& ctx) {
61 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 61 IPC::RequestBuilder rb{ctx, 2, 0, 1};
62 rb.Push(RESULT_SUCCESS); 62 rb.Push(RESULT_SUCCESS);
63 rb.PushIpcInterface<ISession>(); 63 rb.PushIpcInterface<ISession>();
64} 64}
diff --git a/src/core/hle/service/audio/audout_u.cpp b/src/core/hle/service/audio/audout_u.cpp
index df04d636e..265c8e03c 100644
--- a/src/core/hle/service/audio/audout_u.cpp
+++ b/src/core/hle/service/audio/audout_u.cpp
@@ -166,7 +166,7 @@ void AudOutU::ListAudioOuts(Kernel::HLERequestContext& ctx) {
166 166
167 Memory::WriteBlock(buffer.Address(), &audio_interface[0], audio_interface.size()); 167 Memory::WriteBlock(buffer.Address(), &audio_interface[0], audio_interface.size());
168 168
169 IPC::RequestBuilder rb = rp.MakeBuilder(3, 0, 0, 0); 169 IPC::RequestBuilder rb = rp.MakeBuilder(3, 0, 0);
170 170
171 rb.Push(RESULT_SUCCESS); 171 rb.Push(RESULT_SUCCESS);
172 // TODO(st4rk): we're currently returning only one audio interface 172 // TODO(st4rk): we're currently returning only one audio interface
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index ef1915e5a..c6b20199b 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -98,7 +98,7 @@ void FSP_SRV::Initalize(Kernel::HLERequestContext& ctx) {
98void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { 98void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) {
99 LOG_WARNING(Service_FS, "(STUBBED) called"); 99 LOG_WARNING(Service_FS, "(STUBBED) called");
100 100
101 IPC::RequestBuilder rb{ctx, 4}; 101 IPC::RequestBuilder rb{ctx, 3};
102 rb.Push(RESULT_SUCCESS); 102 rb.Push(RESULT_SUCCESS);
103 rb.Push<u32>(5); 103 rb.Push<u32>(5);
104} 104}
@@ -124,7 +124,7 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx) {
124 return; 124 return;
125 } 125 }
126 126
127 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 127 IPC::RequestBuilder rb{ctx, 2, 0, 1};
128 rb.Push(RESULT_SUCCESS); 128 rb.Push(RESULT_SUCCESS);
129 rb.PushIpcInterface<IStorage>(std::move(storage.Unwrap())); 129 rb.PushIpcInterface<IStorage>(std::move(storage.Unwrap()));
130} 130}
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index ae60cc7b4..4949fa1c9 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -169,19 +169,10 @@ private:
169 applet_resource = std::make_shared<IAppletResource>(); 169 applet_resource = std::make_shared<IAppletResource>();
170 } 170 }
171 171
172 // TODO(Subv): Verify if this should return the interface as a domain object when called
173 // from within a domain.
174
175 auto sessions = Kernel::ServerSession::CreateSessionPair(applet_resource->GetServiceName());
176 auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
177 auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
178 applet_resource->ClientConnected(server);
179
180 LOG_DEBUG(Service, "called, initialized IAppletResource -> session=%u",
181 client->GetObjectId());
182 IPC::RequestBuilder rb{ctx, 2, 0, 1}; 172 IPC::RequestBuilder rb{ctx, 2, 0, 1};
183 rb.Push(RESULT_SUCCESS); 173 rb.Push(RESULT_SUCCESS);
184 rb.PushMoveObjects(std::move(client)); 174 rb.PushIpcInterface<IAppletResource>(applet_resource);
175 LOG_DEBUG(Service, "called");
185 } 176 }
186}; 177};
187 178
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp
index b505cdcaf..d5dcc8eaf 100644
--- a/src/core/hle/service/lm/lm.cpp
+++ b/src/core/hle/service/lm/lm.cpp
@@ -65,7 +65,7 @@ private:
65 */ 65 */
66 void Log(Kernel::HLERequestContext& ctx) { 66 void Log(Kernel::HLERequestContext& ctx) {
67 // This function only succeeds - Get that out of the way 67 // This function only succeeds - Get that out of the way
68 IPC::RequestBuilder rb{ctx, 1}; 68 IPC::RequestBuilder rb{ctx, 2};
69 rb.Push(RESULT_SUCCESS); 69 rb.Push(RESULT_SUCCESS);
70 70
71 // Read MessageHeader, despite not doing anything with it right now 71 // Read MessageHeader, despite not doing anything with it right now
@@ -130,7 +130,7 @@ private:
130 } 130 }
131 output += message; 131 output += message;
132 132
133 LOG_DEBUG(Debug_Emulated, "%s", output.c_str()); 133 LOG_INFO(Debug_Emulated, "%s", output.c_str());
134 } 134 }
135}; 135};
136 136
@@ -146,21 +146,11 @@ void InstallInterfaces(SM::ServiceManager& service_manager) {
146 * 0: ResultCode 146 * 0: ResultCode
147 */ 147 */
148void LM::Initialize(Kernel::HLERequestContext& ctx) { 148void LM::Initialize(Kernel::HLERequestContext& ctx) {
149 // TODO(Subv): Verify if this should return the interface as a domain object when called from
150 // within a domain.
151
152 auto logger = std::make_shared<Logger>();
153 auto sessions = Kernel::ServerSession::CreateSessionPair(logger->GetServiceName());
154 auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
155 auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
156 logger->ClientConnected(server);
157
158 LOG_DEBUG(Service_SM, "called, initialized logger -> session=%u", client->GetObjectId());
159 IPC::RequestBuilder rb{ctx, 2, 0, 1}; 149 IPC::RequestBuilder rb{ctx, 2, 0, 1};
160 rb.Push(RESULT_SUCCESS); 150 rb.Push(RESULT_SUCCESS);
161 rb.PushMoveObjects(std::move(client)); 151 rb.PushIpcInterface<Logger>();
162 152
163 LOG_INFO(Service_SM, "called"); 153 LOG_DEBUG(Service, "called");
164} 154}
165 155
166LM::LM() : ServiceFramework("lm") { 156LM::LM() : ServiceFramework("lm") {
diff --git a/src/core/hle/service/pctl/pctl_a.cpp b/src/core/hle/service/pctl/pctl_a.cpp
index 7978aecb8..61e2e19bd 100644
--- a/src/core/hle/service/pctl/pctl_a.cpp
+++ b/src/core/hle/service/pctl/pctl_a.cpp
@@ -15,7 +15,7 @@ public:
15}; 15};
16 16
17void PCTL_A::GetService(Kernel::HLERequestContext& ctx) { 17void PCTL_A::GetService(Kernel::HLERequestContext& ctx) {
18 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 18 IPC::RequestBuilder rb{ctx, 2, 0, 1};
19 rb.Push(RESULT_SUCCESS); 19 rb.Push(RESULT_SUCCESS);
20 rb.PushIpcInterface<IParentalControlService>(); 20 rb.PushIpcInterface<IParentalControlService>();
21 LOG_DEBUG(Service, "called"); 21 LOG_DEBUG(Service, "called");
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 1b8565351..5fd2f1181 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -132,7 +132,7 @@ void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) {
132ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& context) { 132ResultCode ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& context) {
133 switch (context.GetCommandType()) { 133 switch (context.GetCommandType()) {
134 case IPC::CommandType::Close: { 134 case IPC::CommandType::Close: {
135 IPC::RequestBuilder rb{context, 1}; 135 IPC::RequestBuilder rb{context, 2};
136 rb.Push(RESULT_SUCCESS); 136 rb.Push(RESULT_SUCCESS);
137 return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead); 137 return ResultCode(ErrorModule::HIPC, ErrorDescription::RemoteProcessDead);
138 } 138 }
diff --git a/src/core/hle/service/sm/controller.cpp b/src/core/hle/service/sm/controller.cpp
index 3eead315a..1c1da9bbc 100644
--- a/src/core/hle/service/sm/controller.cpp
+++ b/src/core/hle/service/sm/controller.cpp
@@ -21,9 +21,8 @@ void Controller::ConvertSessionToDomain(Kernel::HLERequestContext& ctx) {
21} 21}
22 22
23void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) { 23void Controller::DuplicateSession(Kernel::HLERequestContext& ctx) {
24 IPC::RequestBuilder rb{ctx, 2, 0, 1}; 24 IPC::RequestBuilder rb{ctx, 2, 0, 1, true};
25 rb.Push(RESULT_SUCCESS); 25 rb.Push(RESULT_SUCCESS);
26 // TODO(Subv): Check if this is correct
27 rb.PushMoveObjects(ctx.Session()); 26 rb.PushMoveObjects(ctx.Session());
28 27
29 LOG_DEBUG(Service, "called"); 28 LOG_DEBUG(Service, "called");
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp
index c4078f02f..34ed93a80 100644
--- a/src/core/hle/service/sm/sm.cpp
+++ b/src/core/hle/service/sm/sm.cpp
@@ -83,7 +83,7 @@ std::shared_ptr<ServiceManager> g_service_manager;
83 * 0: ResultCode 83 * 0: ResultCode
84 */ 84 */
85void SM::Initialize(Kernel::HLERequestContext& ctx) { 85void SM::Initialize(Kernel::HLERequestContext& ctx) {
86 IPC::RequestBuilder rb{ctx, 1}; 86 IPC::RequestBuilder rb{ctx, 2};
87 rb.Push(RESULT_SUCCESS); 87 rb.Push(RESULT_SUCCESS);
88 LOG_DEBUG(Service_SM, "called"); 88 LOG_DEBUG(Service_SM, "called");
89} 89}
@@ -99,7 +99,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) {
99 99
100 auto client_port = service_manager->GetServicePort(name); 100 auto client_port = service_manager->GetServicePort(name);
101 if (client_port.Failed()) { 101 if (client_port.Failed()) {
102 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 0, 0); 102 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 0);
103 rb.Push(client_port.Code()); 103 rb.Push(client_port.Code());
104 LOG_ERROR(Service_SM, "called service=%s -> error 0x%08X", name.c_str(), 104 LOG_ERROR(Service_SM, "called service=%s -> error 0x%08X", name.c_str(),
105 client_port.Code().raw); 105 client_port.Code().raw);
@@ -112,7 +112,7 @@ void SM::GetService(Kernel::HLERequestContext& ctx) {
112 if (session.Succeeded()) { 112 if (session.Succeeded()) {
113 LOG_DEBUG(Service_SM, "called service=%s -> session=%u", name.c_str(), 113 LOG_DEBUG(Service_SM, "called service=%s -> session=%u", name.c_str(),
114 (*session)->GetObjectId()); 114 (*session)->GetObjectId());
115 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 1, 0); 115 IPC::RequestBuilder rb = rp.MakeBuilder(2, 0, 1, true);
116 rb.Push(session.Code()); 116 rb.Push(session.Code());
117 rb.PushMoveObjects(std::move(session).Unwrap()); 117 rb.PushMoveObjects(std::move(session).Unwrap());
118 } 118 }
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp
index 448ef8544..9816a33d0 100644
--- a/src/core/hle/service/time/time.cpp
+++ b/src/core/hle/service/time/time.cpp
@@ -83,49 +83,28 @@ private:
83}; 83};
84 84
85void Module::Interface::GetStandardUserSystemClock(Kernel::HLERequestContext& ctx) { 85void Module::Interface::GetStandardUserSystemClock(Kernel::HLERequestContext& ctx) {
86 // TODO(Subv): Verify if this should return the interface as a domain object when called from
87 // within a domain.
88 auto system_clock = std::make_shared<ISystemClock>();
89 auto sessions = Kernel::ServerSession::CreateSessionPair(system_clock->GetServiceName());
90 auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
91 auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
92 system_clock->ClientConnected(server);
93 LOG_DEBUG(Service, "called, initialized ISystemClock -> session=%u", client->GetObjectId());
94 IPC::RequestBuilder rb{ctx, 2, 0, 1}; 86 IPC::RequestBuilder rb{ctx, 2, 0, 1};
95 rb.Push(RESULT_SUCCESS); 87 rb.Push(RESULT_SUCCESS);
96 rb.PushMoveObjects(std::move(client)); 88 rb.PushIpcInterface<ISystemClock>();
89 LOG_DEBUG(Service, "called");
97} 90}
98 91
99void Module::Interface::GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx) { 92void Module::Interface::GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx) {
100 // TODO(Subv): Verify if this should return the interface as a domain object when called from
101 // within a domain.
102 auto system_clock = std::make_shared<ISystemClock>();
103 auto sessions = Kernel::ServerSession::CreateSessionPair(system_clock->GetServiceName());
104 auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
105 auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
106 system_clock->ClientConnected(server);
107 LOG_DEBUG(Service, "called, initialized ISystemClock -> session=%u", client->GetObjectId());
108 IPC::RequestBuilder rb{ctx, 2, 0, 1}; 93 IPC::RequestBuilder rb{ctx, 2, 0, 1};
109 rb.Push(RESULT_SUCCESS); 94 rb.Push(RESULT_SUCCESS);
110 rb.PushMoveObjects(std::move(client)); 95 rb.PushIpcInterface<ISystemClock>();
96 LOG_DEBUG(Service, "called");
111} 97}
112 98
113void Module::Interface::GetStandardSteadyClock(Kernel::HLERequestContext& ctx) { 99void Module::Interface::GetStandardSteadyClock(Kernel::HLERequestContext& ctx) {
114 // TODO(Subv): Verify if this should return the interface as a domain object when called from
115 // within a domain.
116 auto steady_clock = std::make_shared<ISteadyClock>();
117 auto sessions = Kernel::ServerSession::CreateSessionPair(steady_clock->GetServiceName());
118 auto server = std::get<Kernel::SharedPtr<Kernel::ServerSession>>(sessions);
119 auto client = std::get<Kernel::SharedPtr<Kernel::ClientSession>>(sessions);
120 steady_clock->ClientConnected(server);
121 LOG_DEBUG(Service, "called, initialized ISteadyClock -> session=%u", client->GetObjectId());
122 IPC::RequestBuilder rb{ctx, 2, 0, 1}; 100 IPC::RequestBuilder rb{ctx, 2, 0, 1};
123 rb.Push(RESULT_SUCCESS); 101 rb.Push(RESULT_SUCCESS);
124 rb.PushMoveObjects(std::move(client)); 102 rb.PushIpcInterface<ISteadyClock>();
103 LOG_DEBUG(Service, "called");
125} 104}
126 105
127void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) { 106void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) {
128 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 107 IPC::RequestBuilder rb{ctx, 2, 0, 1};
129 rb.Push(RESULT_SUCCESS); 108 rb.Push(RESULT_SUCCESS);
130 rb.PushIpcInterface<ITimeZoneService>(); 109 rb.PushIpcInterface<ITimeZoneService>();
131 LOG_DEBUG(Service, "called"); 110 LOG_DEBUG(Service, "called");
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index 6576f81db..3fcfa1013 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -597,7 +597,7 @@ private:
597void IApplicationDisplayService::GetRelayService(Kernel::HLERequestContext& ctx) { 597void IApplicationDisplayService::GetRelayService(Kernel::HLERequestContext& ctx) {
598 LOG_WARNING(Service, "(STUBBED) called"); 598 LOG_WARNING(Service, "(STUBBED) called");
599 599
600 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 600 IPC::RequestBuilder rb{ctx, 2, 0, 1};
601 rb.Push(RESULT_SUCCESS); 601 rb.Push(RESULT_SUCCESS);
602 rb.PushIpcInterface<IHOSBinderDriver>(nv_flinger); 602 rb.PushIpcInterface<IHOSBinderDriver>(nv_flinger);
603} 603}
@@ -605,7 +605,7 @@ void IApplicationDisplayService::GetRelayService(Kernel::HLERequestContext& ctx)
605void IApplicationDisplayService::GetSystemDisplayService(Kernel::HLERequestContext& ctx) { 605void IApplicationDisplayService::GetSystemDisplayService(Kernel::HLERequestContext& ctx) {
606 LOG_WARNING(Service, "(STUBBED) called"); 606 LOG_WARNING(Service, "(STUBBED) called");
607 607
608 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 608 IPC::RequestBuilder rb{ctx, 2, 0, 1};
609 rb.Push(RESULT_SUCCESS); 609 rb.Push(RESULT_SUCCESS);
610 rb.PushIpcInterface<ISystemDisplayService>(); 610 rb.PushIpcInterface<ISystemDisplayService>();
611} 611}
@@ -613,7 +613,7 @@ void IApplicationDisplayService::GetSystemDisplayService(Kernel::HLERequestConte
613void IApplicationDisplayService::GetManagerDisplayService(Kernel::HLERequestContext& ctx) { 613void IApplicationDisplayService::GetManagerDisplayService(Kernel::HLERequestContext& ctx) {
614 LOG_WARNING(Service, "(STUBBED) called"); 614 LOG_WARNING(Service, "(STUBBED) called");
615 615
616 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 616 IPC::RequestBuilder rb{ctx, 2, 0, 1};
617 rb.Push(RESULT_SUCCESS); 617 rb.Push(RESULT_SUCCESS);
618 rb.PushIpcInterface<IManagerDisplayService>(nv_flinger); 618 rb.PushIpcInterface<IManagerDisplayService>(nv_flinger);
619} 619}
@@ -622,7 +622,7 @@ void IApplicationDisplayService::GetIndirectDisplayTransactionService(
622 Kernel::HLERequestContext& ctx) { 622 Kernel::HLERequestContext& ctx) {
623 LOG_WARNING(Service, "(STUBBED) called"); 623 LOG_WARNING(Service, "(STUBBED) called");
624 624
625 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 625 IPC::RequestBuilder rb{ctx, 2, 0, 1};
626 rb.Push(RESULT_SUCCESS); 626 rb.Push(RESULT_SUCCESS);
627 rb.PushIpcInterface<IHOSBinderDriver>(nv_flinger); 627 rb.PushIpcInterface<IHOSBinderDriver>(nv_flinger);
628} 628}
diff --git a/src/core/hle/service/vi/vi_m.cpp b/src/core/hle/service/vi/vi_m.cpp
index 20b24658e..cba7cde1c 100644
--- a/src/core/hle/service/vi/vi_m.cpp
+++ b/src/core/hle/service/vi/vi_m.cpp
@@ -13,7 +13,8 @@ namespace VI {
13void VI_M::GetDisplayService(Kernel::HLERequestContext& ctx) { 13void VI_M::GetDisplayService(Kernel::HLERequestContext& ctx) {
14 LOG_WARNING(Service, "(STUBBED) called"); 14 LOG_WARNING(Service, "(STUBBED) called");
15 15
16 IPC::RequestBuilder rb{ctx, 2, 0, 0, 1}; 16 IPC::RequestBuilder rb{ctx, 2, 0, 1};
17 rb.Push(RESULT_SUCCESS);
17 rb.PushIpcInterface<IApplicationDisplayService>(nv_flinger); 18 rb.PushIpcInterface<IApplicationDisplayService>(nv_flinger);
18} 19}
19 20