summaryrefslogtreecommitdiff
path: root/src/core/hle/service
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/ac_u.cpp2
-rw-r--r--src/core/hle/service/apt_u.cpp20
-rw-r--r--src/core/hle/service/cfg_u.cpp6
-rw-r--r--src/core/hle/service/dsp_dsp.cpp14
-rw-r--r--src/core/hle/service/fs_user.cpp54
-rw-r--r--src/core/hle/service/gsp_gpu.cpp18
-rw-r--r--src/core/hle/service/hid_user.cpp2
-rw-r--r--src/core/hle/service/ptm_u.cpp8
-rw-r--r--src/core/hle/service/service.cpp4
-rw-r--r--src/core/hle/service/service.h8
-rw-r--r--src/core/hle/service/srv.cpp8
11 files changed, 60 insertions, 84 deletions
diff --git a/src/core/hle/service/ac_u.cpp b/src/core/hle/service/ac_u.cpp
index 46aee40d6..4130feb9d 100644
--- a/src/core/hle/service/ac_u.cpp
+++ b/src/core/hle/service/ac_u.cpp
@@ -26,7 +26,7 @@ void GetWifiStatus(Service::Interface* self) {
26 cmd_buff[1] = 0; // No error 26 cmd_buff[1] = 0; // No error
27 cmd_buff[2] = 0; // Connection type set to none 27 cmd_buff[2] = 0; // Connection type set to none
28 28
29 WARN_LOG(KERNEL, "(STUBBED) called"); 29 LOG_WARNING(Service_AC, "(STUBBED) called");
30} 30}
31 31
32const Interface::FunctionInfo FunctionTable[] = { 32const Interface::FunctionInfo FunctionTable[] = {
diff --git a/src/core/hle/service/apt_u.cpp b/src/core/hle/service/apt_u.cpp
index 181763724..b6d5d101f 100644
--- a/src/core/hle/service/apt_u.cpp
+++ b/src/core/hle/service/apt_u.cpp
@@ -53,7 +53,7 @@ void Initialize(Service::Interface* self) {
53 53
54 cmd_buff[1] = 0; // No error 54 cmd_buff[1] = 0; // No error
55 55
56 DEBUG_LOG(KERNEL, "called"); 56 LOG_DEBUG(Service_APT, "called");
57} 57}
58 58
59void GetLockHandle(Service::Interface* self) { 59void GetLockHandle(Service::Interface* self) {
@@ -74,14 +74,14 @@ void GetLockHandle(Service::Interface* self) {
74 cmd_buff[4] = 0; 74 cmd_buff[4] = 0;
75 75
76 cmd_buff[5] = lock_handle; 76 cmd_buff[5] = lock_handle;
77 DEBUG_LOG(KERNEL, "called handle=0x%08X", cmd_buff[5]); 77 LOG_TRACE(Service_APT, "called handle=0x%08X", cmd_buff[5]);
78} 78}
79 79
80void Enable(Service::Interface* self) { 80void Enable(Service::Interface* self) {
81 u32* cmd_buff = Service::GetCommandBuffer(); 81 u32* cmd_buff = Service::GetCommandBuffer();
82 u32 unk = cmd_buff[1]; // TODO(bunnei): What is this field used for? 82 u32 unk = cmd_buff[1]; // TODO(bunnei): What is this field used for?
83 cmd_buff[1] = 0; // No error 83 cmd_buff[1] = 0; // No error
84 WARN_LOG(KERNEL, "(STUBBED) called unk=0x%08X", unk); 84 LOG_WARNING(Service_APT, "(STUBBED) called unk=0x%08X", unk);
85} 85}
86 86
87void InquireNotification(Service::Interface* self) { 87void InquireNotification(Service::Interface* self) {
@@ -89,7 +89,7 @@ void InquireNotification(Service::Interface* self) {
89 u32 app_id = cmd_buff[2]; 89 u32 app_id = cmd_buff[2];
90 cmd_buff[1] = 0; // No error 90 cmd_buff[1] = 0; // No error
91 cmd_buff[2] = static_cast<u32>(SignalType::None); // Signal type 91 cmd_buff[2] = static_cast<u32>(SignalType::None); // Signal type
92 WARN_LOG(KERNEL, "(STUBBED) called app_id=0x%08X", app_id); 92 LOG_WARNING(Service_APT, "(STUBBED) called app_id=0x%08X", app_id);
93} 93}
94 94
95/** 95/**
@@ -122,7 +122,7 @@ void ReceiveParameter(Service::Interface* self) {
122 cmd_buff[5] = 0; 122 cmd_buff[5] = 0;
123 cmd_buff[6] = 0; 123 cmd_buff[6] = 0;
124 cmd_buff[7] = 0; 124 cmd_buff[7] = 0;
125 WARN_LOG(KERNEL, "(STUBBED) called app_id=0x%08X, buffer_size=0x%08X", app_id, buffer_size); 125 LOG_WARNING(Service_APT, "(STUBBED) called app_id=0x%08X, buffer_size=0x%08X", app_id, buffer_size);
126} 126}
127 127
128/** 128/**
@@ -155,7 +155,7 @@ void GlanceParameter(Service::Interface* self) {
155 cmd_buff[6] = 0; 155 cmd_buff[6] = 0;
156 cmd_buff[7] = 0; 156 cmd_buff[7] = 0;
157 157
158 WARN_LOG(KERNEL, "(STUBBED) called app_id=0x%08X, buffer_size=0x%08X", app_id, buffer_size); 158 LOG_WARNING(Service_APT, "(STUBBED) called app_id=0x%08X, buffer_size=0x%08X", app_id, buffer_size);
159} 159}
160 160
161/** 161/**
@@ -181,7 +181,7 @@ void AppletUtility(Service::Interface* self) {
181 181
182 cmd_buff[1] = 0; // No error 182 cmd_buff[1] = 0; // No error
183 183
184 WARN_LOG(KERNEL, "(STUBBED) called unk=0x%08X, buffer1_size=0x%08x, buffer2_size=0x%08x, " 184 LOG_WARNING(Service_APT, "(STUBBED) called unk=0x%08X, buffer1_size=0x%08x, buffer2_size=0x%08x, "
185 "buffer1_addr=0x%08x, buffer2_addr=0x%08x", unk, buffer1_size, buffer2_size, 185 "buffer1_addr=0x%08x, buffer2_addr=0x%08x", unk, buffer1_size, buffer2_size,
186 buffer1_addr, buffer2_addr); 186 buffer1_addr, buffer2_addr);
187} 187}
@@ -194,7 +194,7 @@ void AppletUtility(Service::Interface* self) {
194 * 4 : Handle to shared font memory 194 * 4 : Handle to shared font memory
195 */ 195 */
196void GetSharedFont(Service::Interface* self) { 196void GetSharedFont(Service::Interface* self) {
197 DEBUG_LOG(KERNEL, "called"); 197 LOG_TRACE(Kernel_SVC, "called");
198 198
199 u32* cmd_buff = Service::GetCommandBuffer(); 199 u32* cmd_buff = Service::GetCommandBuffer();
200 200
@@ -210,7 +210,7 @@ void GetSharedFont(Service::Interface* self) {
210 cmd_buff[4] = shared_font_mem; 210 cmd_buff[4] = shared_font_mem;
211 } else { 211 } else {
212 cmd_buff[1] = -1; // Generic error (not really possible to verify this on hardware) 212 cmd_buff[1] = -1; // Generic error (not really possible to verify this on hardware)
213 ERROR_LOG(KERNEL, "called, but %s has not been loaded!", SHARED_FONT); 213 LOG_ERROR(Kernel_SVC, "called, but %s has not been loaded!", SHARED_FONT);
214 } 214 }
215} 215}
216 216
@@ -321,7 +321,7 @@ Interface::Interface() {
321 // Create shared font memory object 321 // Create shared font memory object
322 shared_font_mem = Kernel::CreateSharedMemory("APT_U:shared_font_mem"); 322 shared_font_mem = Kernel::CreateSharedMemory("APT_U:shared_font_mem");
323 } else { 323 } else {
324 WARN_LOG(KERNEL, "Unable to load shared font: %s", filepath.c_str()); 324 LOG_WARNING(Service_APT, "Unable to load shared font: %s", filepath.c_str());
325 shared_font_mem = 0; 325 shared_font_mem = 0;
326 } 326 }
327 327
diff --git a/src/core/hle/service/cfg_u.cpp b/src/core/hle/service/cfg_u.cpp
index 82bab5797..972cc0534 100644
--- a/src/core/hle/service/cfg_u.cpp
+++ b/src/core/hle/service/cfg_u.cpp
@@ -56,7 +56,7 @@ static void GetCountryCodeString(Service::Interface* self) {
56 u32 country_code_id = cmd_buffer[1]; 56 u32 country_code_id = cmd_buffer[1];
57 57
58 if (country_code_id >= country_codes.size() || 0 == country_codes[country_code_id]) { 58 if (country_code_id >= country_codes.size() || 0 == country_codes[country_code_id]) {
59 ERROR_LOG(KERNEL, "requested country code id=%d is invalid", country_code_id); 59 LOG_ERROR(Service_CFG, "requested country code id=%d is invalid", country_code_id);
60 cmd_buffer[1] = ResultCode(ErrorDescription::NotFound, ErrorModule::Config, ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw; 60 cmd_buffer[1] = ResultCode(ErrorDescription::NotFound, ErrorModule::Config, ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw;
61 return; 61 return;
62 } 62 }
@@ -79,7 +79,7 @@ static void GetCountryCodeID(Service::Interface* self) {
79 u16 country_code_id = 0; 79 u16 country_code_id = 0;
80 80
81 // The following algorithm will fail if the first country code isn't 0. 81 // The following algorithm will fail if the first country code isn't 0.
82 _dbg_assert_(HLE, country_codes[0] == 0); 82 _dbg_assert_(Service_CFG, country_codes[0] == 0);
83 83
84 for (size_t id = 0; id < country_codes.size(); ++id) { 84 for (size_t id = 0; id < country_codes.size(); ++id) {
85 if (country_codes[id] == country_code) { 85 if (country_codes[id] == country_code) {
@@ -89,7 +89,7 @@ static void GetCountryCodeID(Service::Interface* self) {
89 } 89 }
90 90
91 if (0 == country_code_id) { 91 if (0 == country_code_id) {
92 ERROR_LOG(KERNEL, "requested country code name=%c%c is invalid", country_code & 0xff, country_code >> 8); 92 LOG_ERROR(Service_CFG, "requested country code name=%c%c is invalid", country_code & 0xff, country_code >> 8);
93 cmd_buffer[1] = ResultCode(ErrorDescription::NotFound, ErrorModule::Config, ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw; 93 cmd_buffer[1] = ResultCode(ErrorDescription::NotFound, ErrorModule::Config, ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw;
94 cmd_buffer[2] = 0xFFFF; 94 cmd_buffer[2] = 0xFFFF;
95 return; 95 return;
diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cpp
index e89c8aae3..ce1c9938d 100644
--- a/src/core/hle/service/dsp_dsp.cpp
+++ b/src/core/hle/service/dsp_dsp.cpp
@@ -32,7 +32,7 @@ void ConvertProcessAddressFromDspDram(Service::Interface* self) {
32 cmd_buff[1] = 0; // No error 32 cmd_buff[1] = 0; // No error
33 cmd_buff[2] = (addr << 1) + (Memory::DSP_MEMORY_VADDR + 0x40000); 33 cmd_buff[2] = (addr << 1) + (Memory::DSP_MEMORY_VADDR + 0x40000);
34 34
35 DEBUG_LOG(KERNEL, "(STUBBED) called with address %u", addr); 35 LOG_WARNING(Service_DSP, "(STUBBED) called with address %u", addr);
36} 36}
37 37
38/** 38/**
@@ -55,7 +55,7 @@ void LoadComponent(Service::Interface* self) {
55 55
56 // TODO(bunnei): Implement real DSP firmware loading 56 // TODO(bunnei): Implement real DSP firmware loading
57 57
58 DEBUG_LOG(KERNEL, "(STUBBED) called"); 58 LOG_WARNING(Service_DSP, "(STUBBED) called");
59} 59}
60 60
61/** 61/**
@@ -70,7 +70,7 @@ void GetSemaphoreEventHandle(Service::Interface* self) {
70 cmd_buff[1] = 0; // No error 70 cmd_buff[1] = 0; // No error
71 cmd_buff[3] = semaphore_event; // Event handle 71 cmd_buff[3] = semaphore_event; // Event handle
72 72
73 DEBUG_LOG(KERNEL, "(STUBBED) called"); 73 LOG_WARNING(Service_DSP, "(STUBBED) called");
74} 74}
75 75
76/** 76/**
@@ -89,7 +89,7 @@ void RegisterInterruptEvents(Service::Interface* self) {
89 89
90 cmd_buff[1] = 0; // No error 90 cmd_buff[1] = 0; // No error
91 91
92 DEBUG_LOG(KERNEL, "(STUBBED) called"); 92 LOG_WARNING(Service_DSP, "(STUBBED) called");
93} 93}
94 94
95/** 95/**
@@ -106,7 +106,7 @@ void WriteReg0x10(Service::Interface* self) {
106 106
107 cmd_buff[1] = 0; // No error 107 cmd_buff[1] = 0; // No error
108 108
109 DEBUG_LOG(KERNEL, "(STUBBED) called"); 109 LOG_WARNING(Service_DSP, "(STUBBED) called");
110} 110}
111 111
112/** 112/**
@@ -140,7 +140,7 @@ void ReadPipeIfPossible(Service::Interface* self) {
140 Memory::Write16(addr + offset, canned_read_pipe[read_pipe_count]); 140 Memory::Write16(addr + offset, canned_read_pipe[read_pipe_count]);
141 read_pipe_count++; 141 read_pipe_count++;
142 } else { 142 } else {
143 ERROR_LOG(KERNEL, "canned read pipe log exceeded!"); 143 LOG_ERROR(Service_DSP, "canned read pipe log exceeded!");
144 break; 144 break;
145 } 145 }
146 } 146 }
@@ -148,7 +148,7 @@ void ReadPipeIfPossible(Service::Interface* self) {
148 cmd_buff[1] = 0; // No error 148 cmd_buff[1] = 0; // No error
149 cmd_buff[2] = (read_pipe_count - initial_size) * sizeof(u16); 149 cmd_buff[2] = (read_pipe_count - initial_size) * sizeof(u16);
150 150
151 DEBUG_LOG(KERNEL, "(STUBBED) called size=0x%08X, buffer=0x%08X", size, addr); 151 LOG_WARNING(Service_DSP, "(STUBBED) called size=0x%08X, buffer=0x%08X", size, addr);
152} 152}
153 153
154const Interface::FunctionInfo FunctionTable[] = { 154const Interface::FunctionInfo FunctionTable[] = {
diff --git a/src/core/hle/service/fs_user.cpp b/src/core/hle/service/fs_user.cpp
index 51e8b579e..9bda4fe8a 100644
--- a/src/core/hle/service/fs_user.cpp
+++ b/src/core/hle/service/fs_user.cpp
@@ -23,7 +23,7 @@ static void Initialize(Service::Interface* self) {
23 // http://3dbrew.org/wiki/FS:Initialize#Request 23 // http://3dbrew.org/wiki/FS:Initialize#Request
24 cmd_buff[1] = RESULT_SUCCESS.raw; 24 cmd_buff[1] = RESULT_SUCCESS.raw;
25 25
26 DEBUG_LOG(KERNEL, "called"); 26 LOG_DEBUG(Service_FS, "called");
27} 27}
28 28
29/** 29/**
@@ -55,17 +55,15 @@ static void OpenFile(Service::Interface* self) {
55 u32 filename_ptr = cmd_buff[9]; 55 u32 filename_ptr = cmd_buff[9];
56 FileSys::Path file_path(filename_type, filename_size, filename_ptr); 56 FileSys::Path file_path(filename_type, filename_size, filename_ptr);
57 57
58 DEBUG_LOG(KERNEL, "path=%s, mode=%d attrs=%u", file_path.DebugStr().c_str(), mode.hex, attributes); 58 LOG_DEBUG(Service_FS, "path=%s, mode=%d attrs=%u", file_path.DebugStr().c_str(), mode.hex, attributes);
59 59
60 ResultVal<Handle> handle = Kernel::OpenFileFromArchive(archive_handle, file_path, mode); 60 ResultVal<Handle> handle = Kernel::OpenFileFromArchive(archive_handle, file_path, mode);
61 cmd_buff[1] = handle.Code().raw; 61 cmd_buff[1] = handle.Code().raw;
62 if (handle.Succeeded()) { 62 if (handle.Succeeded()) {
63 cmd_buff[3] = *handle; 63 cmd_buff[3] = *handle;
64 } else { 64 } else {
65 ERROR_LOG(KERNEL, "failed to get a handle for file %s", file_path.DebugStr().c_str()); 65 LOG_ERROR(Service_FS, "failed to get a handle for file %s", file_path.DebugStr().c_str());
66 } 66 }
67
68 DEBUG_LOG(KERNEL, "called");
69} 67}
70 68
71/** 69/**
@@ -102,11 +100,11 @@ static void OpenFileDirectly(Service::Interface* self) {
102 FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr); 100 FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr);
103 FileSys::Path file_path(filename_type, filename_size, filename_ptr); 101 FileSys::Path file_path(filename_type, filename_size, filename_ptr);
104 102
105 DEBUG_LOG(KERNEL, "archive_path=%s file_path=%s, mode=%u attributes=%d", 103 LOG_DEBUG(Service_FS, "archive_path=%s file_path=%s, mode=%u attributes=%d",
106 archive_path.DebugStr().c_str(), file_path.DebugStr().c_str(), mode.hex, attributes); 104 archive_path.DebugStr().c_str(), file_path.DebugStr().c_str(), mode.hex, attributes);
107 105
108 if (archive_path.GetType() != FileSys::Empty) { 106 if (archive_path.GetType() != FileSys::Empty) {
109 ERROR_LOG(KERNEL, "archive LowPath type other than empty is currently unsupported"); 107 LOG_ERROR(Service_FS, "archive LowPath type other than empty is currently unsupported");
110 cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw; 108 cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw;
111 return; 109 return;
112 } 110 }
@@ -116,7 +114,7 @@ static void OpenFileDirectly(Service::Interface* self) {
116 ResultVal<Handle> archive_handle = Kernel::OpenArchive(archive_id); 114 ResultVal<Handle> archive_handle = Kernel::OpenArchive(archive_id);
117 cmd_buff[1] = archive_handle.Code().raw; 115 cmd_buff[1] = archive_handle.Code().raw;
118 if (archive_handle.Failed()) { 116 if (archive_handle.Failed()) {
119 ERROR_LOG(KERNEL, "failed to get a handle for archive"); 117 LOG_ERROR(Service_FS, "failed to get a handle for archive");
120 return; 118 return;
121 } 119 }
122 // cmd_buff[2] isn't used according to 3dmoo's implementation. 120 // cmd_buff[2] isn't used according to 3dmoo's implementation.
@@ -127,10 +125,8 @@ static void OpenFileDirectly(Service::Interface* self) {
127 if (handle.Succeeded()) { 125 if (handle.Succeeded()) {
128 cmd_buff[3] = *handle; 126 cmd_buff[3] = *handle;
129 } else { 127 } else {
130 ERROR_LOG(KERNEL, "failed to get a handle for file %s", file_path.DebugStr().c_str()); 128 LOG_ERROR(Service_FS, "failed to get a handle for file %s", file_path.DebugStr().c_str());
131 } 129 }
132
133 DEBUG_LOG(KERNEL, "called");
134} 130}
135 131
136/* 132/*
@@ -156,12 +152,10 @@ void DeleteFile(Service::Interface* self) {
156 152
157 FileSys::Path file_path(filename_type, filename_size, filename_ptr); 153 FileSys::Path file_path(filename_type, filename_size, filename_ptr);
158 154
159 DEBUG_LOG(KERNEL, "type=%d size=%d data=%s", 155 LOG_DEBUG(Service_FS, "type=%d size=%d data=%s",
160 filename_type, filename_size, file_path.DebugStr().c_str()); 156 filename_type, filename_size, file_path.DebugStr().c_str());
161 157
162 cmd_buff[1] = Kernel::DeleteFileFromArchive(archive_handle, file_path).raw; 158 cmd_buff[1] = Kernel::DeleteFileFromArchive(archive_handle, file_path).raw;
163
164 DEBUG_LOG(KERNEL, "called");
165} 159}
166 160
167/* 161/*
@@ -197,13 +191,11 @@ void RenameFile(Service::Interface* self) {
197 FileSys::Path src_file_path(src_filename_type, src_filename_size, src_filename_ptr); 191 FileSys::Path src_file_path(src_filename_type, src_filename_size, src_filename_ptr);
198 FileSys::Path dest_file_path(dest_filename_type, dest_filename_size, dest_filename_ptr); 192 FileSys::Path dest_file_path(dest_filename_type, dest_filename_size, dest_filename_ptr);
199 193
200 DEBUG_LOG(KERNEL, "src_type=%d src_size=%d src_data=%s dest_type=%d dest_size=%d dest_data=%s", 194 LOG_DEBUG(Service_FS, "src_type=%d src_size=%d src_data=%s dest_type=%d dest_size=%d dest_data=%s",
201 src_filename_type, src_filename_size, src_file_path.DebugStr().c_str(), 195 src_filename_type, src_filename_size, src_file_path.DebugStr().c_str(),
202 dest_filename_type, dest_filename_size, dest_file_path.DebugStr().c_str()); 196 dest_filename_type, dest_filename_size, dest_file_path.DebugStr().c_str());
203 197
204 cmd_buff[1] = Kernel::RenameFileBetweenArchives(src_archive_handle, src_file_path, dest_archive_handle, dest_file_path).raw; 198 cmd_buff[1] = Kernel::RenameFileBetweenArchives(src_archive_handle, src_file_path, dest_archive_handle, dest_file_path).raw;
205
206 DEBUG_LOG(KERNEL, "called");
207} 199}
208 200
209/* 201/*
@@ -229,12 +221,10 @@ void DeleteDirectory(Service::Interface* self) {
229 221
230 FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr); 222 FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr);
231 223
232 DEBUG_LOG(KERNEL, "type=%d size=%d data=%s", 224 LOG_DEBUG(Service_FS, "type=%d size=%d data=%s",
233 dirname_type, dirname_size, dir_path.DebugStr().c_str()); 225 dirname_type, dirname_size, dir_path.DebugStr().c_str());
234 226
235 cmd_buff[1] = Kernel::DeleteDirectoryFromArchive(archive_handle, dir_path).raw; 227 cmd_buff[1] = Kernel::DeleteDirectoryFromArchive(archive_handle, dir_path).raw;
236
237 DEBUG_LOG(KERNEL, "called");
238} 228}
239 229
240/* 230/*
@@ -260,11 +250,9 @@ static void CreateDirectory(Service::Interface* self) {
260 250
261 FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr); 251 FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr);
262 252
263 DEBUG_LOG(KERNEL, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str()); 253 LOG_DEBUG(Service_FS, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str());
264 254
265 cmd_buff[1] = Kernel::CreateDirectoryFromArchive(archive_handle, dir_path).raw; 255 cmd_buff[1] = Kernel::CreateDirectoryFromArchive(archive_handle, dir_path).raw;
266
267 DEBUG_LOG(KERNEL, "called");
268} 256}
269 257
270/* 258/*
@@ -300,13 +288,11 @@ void RenameDirectory(Service::Interface* self) {
300 FileSys::Path src_dir_path(src_dirname_type, src_dirname_size, src_dirname_ptr); 288 FileSys::Path src_dir_path(src_dirname_type, src_dirname_size, src_dirname_ptr);
301 FileSys::Path dest_dir_path(dest_dirname_type, dest_dirname_size, dest_dirname_ptr); 289 FileSys::Path dest_dir_path(dest_dirname_type, dest_dirname_size, dest_dirname_ptr);
302 290
303 DEBUG_LOG(KERNEL, "src_type=%d src_size=%d src_data=%s dest_type=%d dest_size=%d dest_data=%s", 291 LOG_DEBUG(Service_FS, "src_type=%d src_size=%d src_data=%s dest_type=%d dest_size=%d dest_data=%s",
304 src_dirname_type, src_dirname_size, src_dir_path.DebugStr().c_str(), 292 src_dirname_type, src_dirname_size, src_dir_path.DebugStr().c_str(),
305 dest_dirname_type, dest_dirname_size, dest_dir_path.DebugStr().c_str()); 293 dest_dirname_type, dest_dirname_size, dest_dir_path.DebugStr().c_str());
306 294
307 cmd_buff[1] = Kernel::RenameDirectoryBetweenArchives(src_archive_handle, src_dir_path, dest_archive_handle, dest_dir_path).raw; 295 cmd_buff[1] = Kernel::RenameDirectoryBetweenArchives(src_archive_handle, src_dir_path, dest_archive_handle, dest_dir_path).raw;
308
309 DEBUG_LOG(KERNEL, "called");
310} 296}
311 297
312static void OpenDirectory(Service::Interface* self) { 298static void OpenDirectory(Service::Interface* self) {
@@ -321,17 +307,15 @@ static void OpenDirectory(Service::Interface* self) {
321 307
322 FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr); 308 FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr);
323 309
324 DEBUG_LOG(KERNEL, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str()); 310 LOG_DEBUG(Service_FS, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str());
325 311
326 ResultVal<Handle> handle = Kernel::OpenDirectoryFromArchive(archive_handle, dir_path); 312 ResultVal<Handle> handle = Kernel::OpenDirectoryFromArchive(archive_handle, dir_path);
327 cmd_buff[1] = handle.Code().raw; 313 cmd_buff[1] = handle.Code().raw;
328 if (handle.Succeeded()) { 314 if (handle.Succeeded()) {
329 cmd_buff[3] = *handle; 315 cmd_buff[3] = *handle;
330 } else { 316 } else {
331 ERROR_LOG(KERNEL, "failed to get a handle for directory"); 317 LOG_ERROR(Service_FS, "failed to get a handle for directory");
332 } 318 }
333
334 DEBUG_LOG(KERNEL, "called");
335} 319}
336 320
337/** 321/**
@@ -356,10 +340,10 @@ static void OpenArchive(Service::Interface* self) {
356 u32 archivename_ptr = cmd_buff[5]; 340 u32 archivename_ptr = cmd_buff[5];
357 FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr); 341 FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr);
358 342
359 DEBUG_LOG(KERNEL, "archive_path=%s", archive_path.DebugStr().c_str()); 343 LOG_DEBUG(Service_FS, "archive_path=%s", archive_path.DebugStr().c_str());
360 344
361 if (archive_path.GetType() != FileSys::Empty) { 345 if (archive_path.GetType() != FileSys::Empty) {
362 ERROR_LOG(KERNEL, "archive LowPath type other than empty is currently unsupported"); 346 LOG_ERROR(Service_FS, "archive LowPath type other than empty is currently unsupported");
363 cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw; 347 cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw;
364 return; 348 return;
365 } 349 }
@@ -370,10 +354,8 @@ static void OpenArchive(Service::Interface* self) {
370 // cmd_buff[2] isn't used according to 3dmoo's implementation. 354 // cmd_buff[2] isn't used according to 3dmoo's implementation.
371 cmd_buff[3] = *handle; 355 cmd_buff[3] = *handle;
372 } else { 356 } else {
373 ERROR_LOG(KERNEL, "failed to get a handle for archive"); 357 LOG_ERROR(Service_FS, "failed to get a handle for archive");
374 } 358 }
375
376 DEBUG_LOG(KERNEL, "called");
377} 359}
378 360
379/* 361/*
@@ -388,7 +370,7 @@ static void IsSdmcDetected(Service::Interface* self) {
388 cmd_buff[1] = 0; 370 cmd_buff[1] = 0;
389 cmd_buff[2] = Settings::values.use_virtual_sd ? 1 : 0; 371 cmd_buff[2] = Settings::values.use_virtual_sd ? 1 : 0;
390 372
391 DEBUG_LOG(KERNEL, "called"); 373 LOG_DEBUG(Service_FS, "called");
392} 374}
393 375
394const Interface::FunctionInfo FunctionTable[] = { 376const Interface::FunctionInfo FunctionTable[] = {
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp
index 34eabac45..223800560 100644
--- a/src/core/hle/service/gsp_gpu.cpp
+++ b/src/core/hle/service/gsp_gpu.cpp
@@ -33,7 +33,7 @@ static inline u8* GetCommandBuffer(u32 thread_id) {
33} 33}
34 34
35static inline FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index) { 35static inline FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index) {
36 _dbg_assert_msg_(GSP, screen_index < 2, "Invalid screen index"); 36 _dbg_assert_msg_(Service_GSP, screen_index < 2, "Invalid screen index");
37 37
38 // For each thread there are two FrameBufferUpdate fields 38 // For each thread there are two FrameBufferUpdate fields
39 u32 offset = 0x200 + (2 * thread_id + screen_index) * sizeof(FrameBufferUpdate); 39 u32 offset = 0x200 + (2 * thread_id + screen_index) * sizeof(FrameBufferUpdate);
@@ -50,14 +50,14 @@ static inline InterruptRelayQueue* GetInterruptRelayQueue(u32 thread_id) {
50static void WriteHWRegs(u32 base_address, u32 size_in_bytes, const u32* data) { 50static void WriteHWRegs(u32 base_address, u32 size_in_bytes, const u32* data) {
51 // TODO: Return proper error codes 51 // TODO: Return proper error codes
52 if (base_address + size_in_bytes >= 0x420000) { 52 if (base_address + size_in_bytes >= 0x420000) {
53 ERROR_LOG(GPU, "Write address out of range! (address=0x%08x, size=0x%08x)", 53 LOG_ERROR(Service_GSP, "Write address out of range! (address=0x%08x, size=0x%08x)",
54 base_address, size_in_bytes); 54 base_address, size_in_bytes);
55 return; 55 return;
56 } 56 }
57 57
58 // size should be word-aligned 58 // size should be word-aligned
59 if ((size_in_bytes % 4) != 0) { 59 if ((size_in_bytes % 4) != 0) {
60 ERROR_LOG(GPU, "Invalid size 0x%08x", size_in_bytes); 60 LOG_ERROR(Service_GSP, "Invalid size 0x%08x", size_in_bytes);
61 return; 61 return;
62 } 62 }
63 63
@@ -89,13 +89,13 @@ static void ReadHWRegs(Service::Interface* self) {
89 89
90 // TODO: Return proper error codes 90 // TODO: Return proper error codes
91 if (reg_addr + size >= 0x420000) { 91 if (reg_addr + size >= 0x420000) {
92 ERROR_LOG(GPU, "Read address out of range! (address=0x%08x, size=0x%08x)", reg_addr, size); 92 LOG_ERROR(Service_GSP, "Read address out of range! (address=0x%08x, size=0x%08x)", reg_addr, size);
93 return; 93 return;
94 } 94 }
95 95
96 // size should be word-aligned 96 // size should be word-aligned
97 if ((size % 4) != 0) { 97 if ((size % 4) != 0) {
98 ERROR_LOG(GPU, "Invalid size 0x%08x", size); 98 LOG_ERROR(Service_GSP, "Invalid size 0x%08x", size);
99 return; 99 return;
100 } 100 }
101 101
@@ -177,11 +177,11 @@ static void RegisterInterruptRelayQueue(Service::Interface* self) {
177 */ 177 */
178void SignalInterrupt(InterruptId interrupt_id) { 178void SignalInterrupt(InterruptId interrupt_id) {
179 if (0 == g_interrupt_event) { 179 if (0 == g_interrupt_event) {
180 WARN_LOG(GSP, "cannot synchronize until GSP event has been created!"); 180 LOG_WARNING(Service_GSP, "cannot synchronize until GSP event has been created!");
181 return; 181 return;
182 } 182 }
183 if (0 == g_shared_memory) { 183 if (0 == g_shared_memory) {
184 WARN_LOG(GSP, "cannot synchronize until GSP shared memory has been created!"); 184 LOG_WARNING(Service_GSP, "cannot synchronize until GSP shared memory has been created!");
185 return; 185 return;
186 } 186 }
187 for (int thread_id = 0; thread_id < 0x4; ++thread_id) { 187 for (int thread_id = 0; thread_id < 0x4; ++thread_id) {
@@ -298,14 +298,14 @@ static void ExecuteCommand(const Command& command, u32 thread_id) {
298 } 298 }
299 299
300 default: 300 default:
301 ERROR_LOG(GSP, "unknown command 0x%08X", (int)command.id.Value()); 301 LOG_ERROR(Service_GSP, "unknown command 0x%08X", (int)command.id.Value());
302 } 302 }
303} 303}
304 304
305/// This triggers handling of the GX command written to the command buffer in shared memory. 305/// This triggers handling of the GX command written to the command buffer in shared memory.
306static void TriggerCmdReqQueue(Service::Interface* self) { 306static void TriggerCmdReqQueue(Service::Interface* self) {
307 307
308 DEBUG_LOG(GSP, "called"); 308 LOG_TRACE(Service_GSP, "called");
309 309
310 // Iterate through each thread's command queue... 310 // Iterate through each thread's command queue...
311 for (unsigned thread_id = 0; thread_id < 0x4; ++thread_id) { 311 for (unsigned thread_id = 0; thread_id < 0x4; ++thread_id) {
diff --git a/src/core/hle/service/hid_user.cpp b/src/core/hle/service/hid_user.cpp
index 2abaf0f2f..5772199d4 100644
--- a/src/core/hle/service/hid_user.cpp
+++ b/src/core/hle/service/hid_user.cpp
@@ -163,7 +163,7 @@ static void GetIPCHandles(Service::Interface* self) {
163 cmd_buff[7] = event_gyroscope; 163 cmd_buff[7] = event_gyroscope;
164 cmd_buff[8] = event_debug_pad; 164 cmd_buff[8] = event_debug_pad;
165 165
166 DEBUG_LOG(KERNEL, "called"); 166 LOG_TRACE(Service_HID, "called");
167} 167}
168 168
169const Interface::FunctionInfo FunctionTable[] = { 169const Interface::FunctionInfo FunctionTable[] = {
diff --git a/src/core/hle/service/ptm_u.cpp b/src/core/hle/service/ptm_u.cpp
index 941df467b..559f148dd 100644
--- a/src/core/hle/service/ptm_u.cpp
+++ b/src/core/hle/service/ptm_u.cpp
@@ -42,7 +42,7 @@ static void GetAdapterState(Service::Interface* self) {
42 cmd_buff[1] = 0; // No error 42 cmd_buff[1] = 0; // No error
43 cmd_buff[2] = battery_is_charging ? 1 : 0; 43 cmd_buff[2] = battery_is_charging ? 1 : 0;
44 44
45 WARN_LOG(KERNEL, "(STUBBED) called"); 45 LOG_WARNING(Service_PTM, "(STUBBED) called");
46} 46}
47 47
48/* 48/*
@@ -57,7 +57,7 @@ static void GetShellState(Service::Interface* self) {
57 cmd_buff[1] = 0; 57 cmd_buff[1] = 0;
58 cmd_buff[2] = shell_open ? 1 : 0; 58 cmd_buff[2] = shell_open ? 1 : 0;
59 59
60 DEBUG_LOG(KERNEL, "PTM_U::GetShellState called"); 60 LOG_TRACE(Service_PTM, "PTM_U::GetShellState called");
61} 61}
62 62
63/** 63/**
@@ -76,7 +76,7 @@ static void GetBatteryLevel(Service::Interface* self) {
76 cmd_buff[1] = 0; // No error 76 cmd_buff[1] = 0; // No error
77 cmd_buff[2] = static_cast<u32>(ChargeLevels::CompletelyFull); // Set to a completely full battery 77 cmd_buff[2] = static_cast<u32>(ChargeLevels::CompletelyFull); // Set to a completely full battery
78 78
79 WARN_LOG(KERNEL, "(STUBBED) called"); 79 LOG_WARNING(Service_PTM, "(STUBBED) called");
80} 80}
81 81
82/** 82/**
@@ -94,7 +94,7 @@ static void GetBatteryChargeState(Service::Interface* self) {
94 cmd_buff[1] = 0; // No error 94 cmd_buff[1] = 0; // No error
95 cmd_buff[2] = battery_is_charging ? 1 : 0; 95 cmd_buff[2] = battery_is_charging ? 1 : 0;
96 96
97 WARN_LOG(KERNEL, "(STUBBED) called"); 97 LOG_WARNING(Service_PTM, "(STUBBED) called");
98} 98}
99 99
100const Interface::FunctionInfo FunctionTable[] = { 100const Interface::FunctionInfo FunctionTable[] = {
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index fed2268a0..e6973572b 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -106,13 +106,13 @@ void Init() {
106 g_manager->AddService(new SOC_U::Interface); 106 g_manager->AddService(new SOC_U::Interface);
107 g_manager->AddService(new SSL_C::Interface); 107 g_manager->AddService(new SSL_C::Interface);
108 108
109 NOTICE_LOG(HLE, "initialized OK"); 109 LOG_DEBUG(Service, "initialized OK");
110} 110}
111 111
112/// Shutdown ServiceManager 112/// Shutdown ServiceManager
113void Shutdown() { 113void Shutdown() {
114 delete g_manager; 114 delete g_manager;
115 NOTICE_LOG(HLE, "shutdown OK"); 115 LOG_DEBUG(Service, "shutdown OK");
116} 116}
117 117
118 118
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index 3a7d6c469..baae910a1 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -91,7 +91,7 @@ public:
91 91
92 std::string name = (itr == m_functions.end()) ? Common::StringFromFormat("0x%08X", cmd_buff[0]) : itr->second.name; 92 std::string name = (itr == m_functions.end()) ? Common::StringFromFormat("0x%08X", cmd_buff[0]) : itr->second.name;
93 93
94 ERROR_LOG(OSHLE, error.c_str(), name.c_str(), GetPortName().c_str()); 94 LOG_ERROR(Service, error.c_str(), name.c_str(), GetPortName().c_str());
95 95
96 // TODO(bunnei): Hack - ignore error 96 // TODO(bunnei): Hack - ignore error
97 cmd_buff[1] = 0; 97 cmd_buff[1] = 0;
@@ -103,12 +103,6 @@ public:
103 return MakeResult<bool>(false); // TODO: Implement return from actual function 103 return MakeResult<bool>(false); // TODO: Implement return from actual function
104 } 104 }
105 105
106 ResultVal<bool> WaitSynchronization() override {
107 // TODO(bunnei): ImplementMe
108 ERROR_LOG(OSHLE, "unimplemented function");
109 return UnimplementedFunction(ErrorModule::OS);
110 }
111
112protected: 106protected:
113 107
114 /** 108 /**
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp
index 0e7fa9e3b..24a846533 100644
--- a/src/core/hle/service/srv.cpp
+++ b/src/core/hle/service/srv.cpp
@@ -14,7 +14,7 @@ namespace SRV {
14static Handle g_event_handle = 0; 14static Handle g_event_handle = 0;
15 15
16static void Initialize(Service::Interface* self) { 16static void Initialize(Service::Interface* self) {
17 DEBUG_LOG(OSHLE, "called"); 17 LOG_DEBUG(Service_SRV, "called");
18 18
19 u32* cmd_buff = Service::GetCommandBuffer(); 19 u32* cmd_buff = Service::GetCommandBuffer();
20 20
@@ -22,7 +22,7 @@ static void Initialize(Service::Interface* self) {
22} 22}
23 23
24static void GetProcSemaphore(Service::Interface* self) { 24static void GetProcSemaphore(Service::Interface* self) {
25 DEBUG_LOG(OSHLE, "called"); 25 LOG_TRACE(Service_SRV, "called");
26 26
27 u32* cmd_buff = Service::GetCommandBuffer(); 27 u32* cmd_buff = Service::GetCommandBuffer();
28 28
@@ -43,9 +43,9 @@ static void GetServiceHandle(Service::Interface* self) {
43 43
44 if (nullptr != service) { 44 if (nullptr != service) {
45 cmd_buff[3] = service->GetHandle(); 45 cmd_buff[3] = service->GetHandle();
46 DEBUG_LOG(OSHLE, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]); 46 LOG_TRACE(Service_SRV, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]);
47 } else { 47 } else {
48 ERROR_LOG(OSHLE, "(UNIMPLEMENTED) called port=%s", port_name.c_str()); 48 LOG_ERROR(Service_SRV, "(UNIMPLEMENTED) called port=%s", port_name.c_str());
49 res = UnimplementedFunction(ErrorModule::SRV); 49 res = UnimplementedFunction(ErrorModule::SRV);
50 } 50 }
51 cmd_buff[1] = res.raw; 51 cmd_buff[1] = res.raw;