summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2014-12-05 23:53:49 -0200
committerGravatar Yuri Kunde Schlesner2014-12-13 02:08:02 -0200
commit0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9 (patch)
tree40fee084c551bfb497e68181447298f862ea68ca /src/core/hle
parentImplement text path trimming for shorter paths. (diff)
downloadyuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.gz
yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.xz
yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.zip
Convert old logging calls to new logging macros
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/config_mem.cpp2
-rw-r--r--src/core/hle/hle.cpp12
-rw-r--r--src/core/hle/kernel/address_arbiter.cpp8
-rw-r--r--src/core/hle/kernel/archive.cpp50
-rw-r--r--src/core/hle/kernel/kernel.cpp8
-rw-r--r--src/core/hle/kernel/kernel.h17
-rw-r--r--src/core/hle/kernel/shared_memory.cpp10
-rw-r--r--src/core/hle/kernel/thread.cpp24
-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
-rw-r--r--src/core/hle/svc.cpp54
20 files changed, 138 insertions, 191 deletions
diff --git a/src/core/hle/config_mem.cpp b/src/core/hle/config_mem.cpp
index 1c9b89227..d8ba9e6cf 100644
--- a/src/core/hle/config_mem.cpp
+++ b/src/core/hle/config_mem.cpp
@@ -55,7 +55,7 @@ inline void Read(T &var, const u32 addr) {
55 break; 55 break;
56 56
57 default: 57 default:
58 ERROR_LOG(HLE, "unknown addr=0x%08X", addr); 58 LOG_ERROR(Kernel, "unknown addr=0x%08X", addr);
59 } 59 }
60} 60}
61 61
diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp
index b8ac186f6..3f73b5538 100644
--- a/src/core/hle/hle.cpp
+++ b/src/core/hle/hle.cpp
@@ -20,7 +20,7 @@ bool g_reschedule = false; ///< If true, immediately reschedules the CPU to a n
20const FunctionDef* GetSVCInfo(u32 opcode) { 20const FunctionDef* GetSVCInfo(u32 opcode) {
21 u32 func_num = opcode & 0xFFFFFF; // 8 bits 21 u32 func_num = opcode & 0xFFFFFF; // 8 bits
22 if (func_num > 0xFF) { 22 if (func_num > 0xFF) {
23 ERROR_LOG(HLE,"unknown svc=0x%02X", func_num); 23 LOG_ERROR(Kernel_SVC,"unknown svc=0x%02X", func_num);
24 return nullptr; 24 return nullptr;
25 } 25 }
26 return &g_module_db[0].func_table[func_num]; 26 return &g_module_db[0].func_table[func_num];
@@ -35,14 +35,12 @@ void CallSVC(u32 opcode) {
35 if (info->func) { 35 if (info->func) {
36 info->func(); 36 info->func();
37 } else { 37 } else {
38 ERROR_LOG(HLE, "unimplemented SVC function %s(..)", info->name.c_str()); 38 LOG_ERROR(Kernel_SVC, "unimplemented SVC function %s(..)", info->name.c_str());
39 } 39 }
40} 40}
41 41
42void Reschedule(const char *reason) { 42void Reschedule(const char *reason) {
43#ifdef _DEBUG 43 _dbg_assert_msg_(Kernel, reason != 0 && strlen(reason) < 256, "Reschedule: Invalid or too long reason.");
44 _dbg_assert_msg_(HLE, reason != 0 && strlen(reason) < 256, "Reschedule: Invalid or too long reason.");
45#endif
46 Core::g_app_core->PrepareReschedule(); 44 Core::g_app_core->PrepareReschedule();
47 g_reschedule = true; 45 g_reschedule = true;
48} 46}
@@ -61,7 +59,7 @@ void Init() {
61 59
62 RegisterAllModules(); 60 RegisterAllModules();
63 61
64 NOTICE_LOG(HLE, "initialized OK"); 62 LOG_DEBUG(Kernel, "initialized OK");
65} 63}
66 64
67void Shutdown() { 65void Shutdown() {
@@ -69,7 +67,7 @@ void Shutdown() {
69 67
70 g_module_db.clear(); 68 g_module_db.clear();
71 69
72 NOTICE_LOG(HLE, "shutdown OK"); 70 LOG_DEBUG(Kernel, "shutdown OK");
73} 71}
74 72
75} // namespace 73} // namespace
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp
index ce4f3c854..9a921108d 100644
--- a/src/core/hle/kernel/address_arbiter.cpp
+++ b/src/core/hle/kernel/address_arbiter.cpp
@@ -24,12 +24,6 @@ public:
24 Kernel::HandleType GetHandleType() const override { return HandleType::AddressArbiter; } 24 Kernel::HandleType GetHandleType() const override { return HandleType::AddressArbiter; }
25 25
26 std::string name; ///< Name of address arbiter object (optional) 26 std::string name; ///< Name of address arbiter object (optional)
27
28 ResultVal<bool> WaitSynchronization() override {
29 // TODO(bunnei): ImplementMe
30 ERROR_LOG(OSHLE, "(UNIMPLEMENTED)");
31 return UnimplementedFunction(ErrorModule::OS);
32 }
33}; 27};
34 28
35//////////////////////////////////////////////////////////////////////////////////////////////////// 29////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -59,7 +53,7 @@ ResultCode ArbitrateAddress(Handle handle, ArbitrationType type, u32 address, s3
59 break; 53 break;
60 54
61 default: 55 default:
62 ERROR_LOG(KERNEL, "unknown type=%d", type); 56 LOG_ERROR(Kernel, "unknown type=%d", type);
63 return ResultCode(ErrorDescription::InvalidEnumValue, ErrorModule::Kernel, ErrorSummary::WrongArgument, ErrorLevel::Usage); 57 return ResultCode(ErrorDescription::InvalidEnumValue, ErrorModule::Kernel, ErrorSummary::WrongArgument, ErrorLevel::Usage);
64 } 58 }
65 return RESULT_SUCCESS; 59 return RESULT_SUCCESS;
diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp
index a875fa7ff..ddc09e13b 100644
--- a/src/core/hle/kernel/archive.cpp
+++ b/src/core/hle/kernel/archive.cpp
@@ -94,26 +94,20 @@ public:
94 } 94 }
95 case FileCommand::Close: 95 case FileCommand::Close:
96 { 96 {
97 DEBUG_LOG(KERNEL, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); 97 LOG_TRACE(Service_FS, "Close %s %s", GetTypeName().c_str(), GetName().c_str());
98 CloseArchive(backend->GetIdCode()); 98 CloseArchive(backend->GetIdCode());
99 break; 99 break;
100 } 100 }
101 // Unknown command... 101 // Unknown command...
102 default: 102 default:
103 { 103 {
104 ERROR_LOG(KERNEL, "Unknown command=0x%08X!", cmd); 104 LOG_ERROR(Service_FS, "Unknown command=0x%08X", cmd);
105 return UnimplementedFunction(ErrorModule::FS); 105 return UnimplementedFunction(ErrorModule::FS);
106 } 106 }
107 } 107 }
108 cmd_buff[1] = 0; // No error 108 cmd_buff[1] = 0; // No error
109 return MakeResult<bool>(false); 109 return MakeResult<bool>(false);
110 } 110 }
111
112 ResultVal<bool> WaitSynchronization() override {
113 // TODO(bunnei): ImplementMe
114 ERROR_LOG(OSHLE, "(UNIMPLEMENTED)");
115 return UnimplementedFunction(ErrorModule::FS);
116 }
117}; 111};
118 112
119class File : public Object { 113class File : public Object {
@@ -138,7 +132,7 @@ public:
138 u64 offset = cmd_buff[1] | ((u64) cmd_buff[2]) << 32; 132 u64 offset = cmd_buff[1] | ((u64) cmd_buff[2]) << 32;
139 u32 length = cmd_buff[3]; 133 u32 length = cmd_buff[3];
140 u32 address = cmd_buff[5]; 134 u32 address = cmd_buff[5];
141 DEBUG_LOG(KERNEL, "Read %s %s: offset=0x%llx length=%d address=0x%x", 135 LOG_TRACE(Service_FS, "Read %s %s: offset=0x%llx length=%d address=0x%x",
142 GetTypeName().c_str(), GetName().c_str(), offset, length, address); 136 GetTypeName().c_str(), GetName().c_str(), offset, length, address);
143 cmd_buff[2] = backend->Read(offset, length, Memory::GetPointer(address)); 137 cmd_buff[2] = backend->Read(offset, length, Memory::GetPointer(address));
144 break; 138 break;
@@ -151,7 +145,7 @@ public:
151 u32 length = cmd_buff[3]; 145 u32 length = cmd_buff[3];
152 u32 flush = cmd_buff[4]; 146 u32 flush = cmd_buff[4];
153 u32 address = cmd_buff[6]; 147 u32 address = cmd_buff[6];
154 DEBUG_LOG(KERNEL, "Write %s %s: offset=0x%llx length=%d address=0x%x, flush=0x%x", 148 LOG_TRACE(Service_FS, "Write %s %s: offset=0x%llx length=%d address=0x%x, flush=0x%x",
155 GetTypeName().c_str(), GetName().c_str(), offset, length, address, flush); 149 GetTypeName().c_str(), GetName().c_str(), offset, length, address, flush);
156 cmd_buff[2] = backend->Write(offset, length, flush, Memory::GetPointer(address)); 150 cmd_buff[2] = backend->Write(offset, length, flush, Memory::GetPointer(address));
157 break; 151 break;
@@ -159,7 +153,7 @@ public:
159 153
160 case FileCommand::GetSize: 154 case FileCommand::GetSize:
161 { 155 {
162 DEBUG_LOG(KERNEL, "GetSize %s %s", GetTypeName().c_str(), GetName().c_str()); 156 LOG_TRACE(Service_FS, "GetSize %s %s", GetTypeName().c_str(), GetName().c_str());
163 u64 size = backend->GetSize(); 157 u64 size = backend->GetSize();
164 cmd_buff[2] = (u32)size; 158 cmd_buff[2] = (u32)size;
165 cmd_buff[3] = size >> 32; 159 cmd_buff[3] = size >> 32;
@@ -169,7 +163,7 @@ public:
169 case FileCommand::SetSize: 163 case FileCommand::SetSize:
170 { 164 {
171 u64 size = cmd_buff[1] | ((u64)cmd_buff[2] << 32); 165 u64 size = cmd_buff[1] | ((u64)cmd_buff[2] << 32);
172 DEBUG_LOG(KERNEL, "SetSize %s %s size=%llu", 166 LOG_TRACE(Service_FS, "SetSize %s %s size=%llu",
173 GetTypeName().c_str(), GetName().c_str(), size); 167 GetTypeName().c_str(), GetName().c_str(), size);
174 backend->SetSize(size); 168 backend->SetSize(size);
175 break; 169 break;
@@ -177,14 +171,14 @@ public:
177 171
178 case FileCommand::Close: 172 case FileCommand::Close:
179 { 173 {
180 DEBUG_LOG(KERNEL, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); 174 LOG_TRACE(Service_FS, "Close %s %s", GetTypeName().c_str(), GetName().c_str());
181 Kernel::g_object_pool.Destroy<File>(GetHandle()); 175 Kernel::g_object_pool.Destroy<File>(GetHandle());
182 break; 176 break;
183 } 177 }
184 178
185 // Unknown command... 179 // Unknown command...
186 default: 180 default:
187 ERROR_LOG(KERNEL, "Unknown command=0x%08X!", cmd); 181 LOG_ERROR(Service_FS, "Unknown command=0x%08X!", cmd);
188 ResultCode error = UnimplementedFunction(ErrorModule::FS); 182 ResultCode error = UnimplementedFunction(ErrorModule::FS);
189 cmd_buff[1] = error.raw; // TODO(Link Mauve): use the correct error code for that. 183 cmd_buff[1] = error.raw; // TODO(Link Mauve): use the correct error code for that.
190 return error; 184 return error;
@@ -192,12 +186,6 @@ public:
192 cmd_buff[1] = 0; // No error 186 cmd_buff[1] = 0; // No error
193 return MakeResult<bool>(false); 187 return MakeResult<bool>(false);
194 } 188 }
195
196 ResultVal<bool> WaitSynchronization() override {
197 // TODO(bunnei): ImplementMe
198 ERROR_LOG(OSHLE, "(UNIMPLEMENTED)");
199 return UnimplementedFunction(ErrorModule::FS);
200 }
201}; 189};
202 190
203class Directory : public Object { 191class Directory : public Object {
@@ -222,7 +210,7 @@ public:
222 u32 count = cmd_buff[1]; 210 u32 count = cmd_buff[1];
223 u32 address = cmd_buff[3]; 211 u32 address = cmd_buff[3];
224 auto entries = reinterpret_cast<FileSys::Entry*>(Memory::GetPointer(address)); 212 auto entries = reinterpret_cast<FileSys::Entry*>(Memory::GetPointer(address));
225 DEBUG_LOG(KERNEL, "Read %s %s: count=%d", 213 LOG_TRACE(Service_FS, "Read %s %s: count=%d",
226 GetTypeName().c_str(), GetName().c_str(), count); 214 GetTypeName().c_str(), GetName().c_str(), count);
227 215
228 // Number of entries actually read 216 // Number of entries actually read
@@ -232,14 +220,14 @@ public:
232 220
233 case DirectoryCommand::Close: 221 case DirectoryCommand::Close:
234 { 222 {
235 DEBUG_LOG(KERNEL, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); 223 LOG_TRACE(Service_FS, "Close %s %s", GetTypeName().c_str(), GetName().c_str());
236 Kernel::g_object_pool.Destroy<Directory>(GetHandle()); 224 Kernel::g_object_pool.Destroy<Directory>(GetHandle());
237 break; 225 break;
238 } 226 }
239 227
240 // Unknown command... 228 // Unknown command...
241 default: 229 default:
242 ERROR_LOG(KERNEL, "Unknown command=0x%08X!", cmd); 230 LOG_ERROR(Service_FS, "Unknown command=0x%08X!", cmd);
243 ResultCode error = UnimplementedFunction(ErrorModule::FS); 231 ResultCode error = UnimplementedFunction(ErrorModule::FS);
244 cmd_buff[1] = error.raw; // TODO(Link Mauve): use the correct error code for that. 232 cmd_buff[1] = error.raw; // TODO(Link Mauve): use the correct error code for that.
245 return error; 233 return error;
@@ -247,12 +235,6 @@ public:
247 cmd_buff[1] = 0; // No error 235 cmd_buff[1] = 0; // No error
248 return MakeResult<bool>(false); 236 return MakeResult<bool>(false);
249 } 237 }
250
251 ResultVal<bool> WaitSynchronization() override {
252 // TODO(bunnei): ImplementMe
253 ERROR_LOG(OSHLE, "(UNIMPLEMENTED)");
254 return UnimplementedFunction(ErrorModule::FS);
255 }
256}; 238};
257 239
258//////////////////////////////////////////////////////////////////////////////////////////////////// 240////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -272,11 +254,11 @@ ResultVal<Handle> OpenArchive(FileSys::Archive::IdCode id_code) {
272ResultCode CloseArchive(FileSys::Archive::IdCode id_code) { 254ResultCode CloseArchive(FileSys::Archive::IdCode id_code) {
273 auto itr = g_archive_map.find(id_code); 255 auto itr = g_archive_map.find(id_code);
274 if (itr == g_archive_map.end()) { 256 if (itr == g_archive_map.end()) {
275 ERROR_LOG(KERNEL, "Cannot close archive %d, does not exist!", (int)id_code); 257 LOG_ERROR(Service_FS, "Cannot close archive %d, does not exist!", (int)id_code);
276 return InvalidHandle(ErrorModule::FS); 258 return InvalidHandle(ErrorModule::FS);
277 } 259 }
278 260
279 INFO_LOG(KERNEL, "Closed archive %d", (int) id_code); 261 LOG_TRACE(Service_FS, "Closed archive %d", (int) id_code);
280 return RESULT_SUCCESS; 262 return RESULT_SUCCESS;
281} 263}
282 264
@@ -288,11 +270,11 @@ ResultCode MountArchive(Archive* archive) {
288 FileSys::Archive::IdCode id_code = archive->backend->GetIdCode(); 270 FileSys::Archive::IdCode id_code = archive->backend->GetIdCode();
289 ResultVal<Handle> archive_handle = OpenArchive(id_code); 271 ResultVal<Handle> archive_handle = OpenArchive(id_code);
290 if (archive_handle.Succeeded()) { 272 if (archive_handle.Succeeded()) {
291 ERROR_LOG(KERNEL, "Cannot mount two archives with the same ID code! (%d)", (int) id_code); 273 LOG_ERROR(Service_FS, "Cannot mount two archives with the same ID code! (%d)", (int) id_code);
292 return archive_handle.Code(); 274 return archive_handle.Code();
293 } 275 }
294 g_archive_map[id_code] = archive->GetHandle(); 276 g_archive_map[id_code] = archive->GetHandle();
295 INFO_LOG(KERNEL, "Mounted archive %s", archive->GetName().c_str()); 277 LOG_TRACE(Service_FS, "Mounted archive %s", archive->GetName().c_str());
296 return RESULT_SUCCESS; 278 return RESULT_SUCCESS;
297} 279}
298 280
@@ -442,7 +424,7 @@ void ArchiveInit() {
442 if (archive->Initialize()) 424 if (archive->Initialize())
443 CreateArchive(archive, "SDMC"); 425 CreateArchive(archive, "SDMC");
444 else 426 else
445 ERROR_LOG(KERNEL, "Can't instantiate SDMC archive with path %s", sdmc_directory.c_str()); 427 LOG_ERROR(Service_FS, "Can't instantiate SDMC archive with path %s", sdmc_directory.c_str());
446} 428}
447 429
448/// Shutdown archives 430/// Shutdown archives
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 80a34c2d5..b38be0a49 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -35,7 +35,7 @@ Handle ObjectPool::Create(Object* obj, int range_bottom, int range_top) {
35 return i + HANDLE_OFFSET; 35 return i + HANDLE_OFFSET;
36 } 36 }
37 } 37 }
38 ERROR_LOG(HLE, "Unable to allocate kernel object, too many objects slots in use."); 38 LOG_ERROR(Kernel, "Unable to allocate kernel object, too many objects slots in use.");
39 return 0; 39 return 0;
40} 40}
41 41
@@ -62,7 +62,7 @@ void ObjectPool::Clear() {
62 62
63Object* &ObjectPool::operator [](Handle handle) 63Object* &ObjectPool::operator [](Handle handle)
64{ 64{
65 _dbg_assert_msg_(KERNEL, IsValid(handle), "GRABBING UNALLOCED KERNEL OBJ"); 65 _dbg_assert_msg_(Kernel, IsValid(handle), "GRABBING UNALLOCED KERNEL OBJ");
66 return pool[handle - HANDLE_OFFSET]; 66 return pool[handle - HANDLE_OFFSET];
67} 67}
68 68
@@ -70,7 +70,7 @@ void ObjectPool::List() {
70 for (int i = 0; i < MAX_COUNT; i++) { 70 for (int i = 0; i < MAX_COUNT; i++) {
71 if (occupied[i]) { 71 if (occupied[i]) {
72 if (pool[i]) { 72 if (pool[i]) {
73 INFO_LOG(KERNEL, "KO %i: %s \"%s\"", i + HANDLE_OFFSET, pool[i]->GetTypeName().c_str(), 73 LOG_DEBUG(Kernel, "KO %i: %s \"%s\"", i + HANDLE_OFFSET, pool[i]->GetTypeName().c_str(),
74 pool[i]->GetName().c_str()); 74 pool[i]->GetName().c_str());
75 } 75 }
76 } 76 }
@@ -82,7 +82,7 @@ int ObjectPool::GetCount() const {
82} 82}
83 83
84Object* ObjectPool::CreateByIDType(int type) { 84Object* ObjectPool::CreateByIDType(int type) {
85 ERROR_LOG(COMMON, "Unimplemented: %d.", type); 85 LOG_ERROR(Kernel, "Unimplemented: %d.", type);
86 return nullptr; 86 return nullptr;
87} 87}
88 88
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 00a2228bf..00f9b57fc 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -57,7 +57,7 @@ public:
57 * @return True if the current thread should wait as a result of the sync 57 * @return True if the current thread should wait as a result of the sync
58 */ 58 */
59 virtual ResultVal<bool> SyncRequest() { 59 virtual ResultVal<bool> SyncRequest() {
60 ERROR_LOG(KERNEL, "(UNIMPLEMENTED)"); 60 LOG_ERROR(Kernel, "(UNIMPLEMENTED)");
61 return UnimplementedFunction(ErrorModule::Kernel); 61 return UnimplementedFunction(ErrorModule::Kernel);
62 } 62 }
63 63
@@ -65,7 +65,10 @@ public:
65 * Wait for kernel object to synchronize. 65 * Wait for kernel object to synchronize.
66 * @return True if the current thread should wait as a result of the wait 66 * @return True if the current thread should wait as a result of the wait
67 */ 67 */
68 virtual ResultVal<bool> WaitSynchronization() = 0; 68 virtual ResultVal<bool> WaitSynchronization() {
69 LOG_ERROR(Kernel, "(UNIMPLEMENTED)");
70 return UnimplementedFunction(ErrorModule::Kernel);
71 }
69}; 72};
70 73
71class ObjectPool : NonCopyable { 74class ObjectPool : NonCopyable {
@@ -92,13 +95,13 @@ public:
92 T* Get(Handle handle) { 95 T* Get(Handle handle) {
93 if (handle < HANDLE_OFFSET || handle >= HANDLE_OFFSET + MAX_COUNT || !occupied[handle - HANDLE_OFFSET]) { 96 if (handle < HANDLE_OFFSET || handle >= HANDLE_OFFSET + MAX_COUNT || !occupied[handle - HANDLE_OFFSET]) {
94 if (handle != 0) { 97 if (handle != 0) {
95 WARN_LOG(KERNEL, "Kernel: Bad object handle %i (%08x)", handle, handle); 98 LOG_ERROR(Kernel, "Bad object handle %08x", handle, handle);
96 } 99 }
97 return nullptr; 100 return nullptr;
98 } else { 101 } else {
99 Object* t = pool[handle - HANDLE_OFFSET]; 102 Object* t = pool[handle - HANDLE_OFFSET];
100 if (t->GetHandleType() != T::GetStaticHandleType()) { 103 if (t->GetHandleType() != T::GetStaticHandleType()) {
101 WARN_LOG(KERNEL, "Kernel: Wrong object type for %i (%08x)", handle, handle); 104 LOG_ERROR(Kernel, "Wrong object type for %08x", handle, handle);
102 return nullptr; 105 return nullptr;
103 } 106 }
104 return static_cast<T*>(t); 107 return static_cast<T*>(t);
@@ -109,7 +112,7 @@ public:
109 template <class T> 112 template <class T>
110 T *GetFast(Handle handle) { 113 T *GetFast(Handle handle) {
111 const Handle realHandle = handle - HANDLE_OFFSET; 114 const Handle realHandle = handle - HANDLE_OFFSET;
112 _dbg_assert_(KERNEL, realHandle >= 0 && realHandle < MAX_COUNT && occupied[realHandle]); 115 _dbg_assert_(Kernel, realHandle >= 0 && realHandle < MAX_COUNT && occupied[realHandle]);
113 return static_cast<T*>(pool[realHandle]); 116 return static_cast<T*>(pool[realHandle]);
114 } 117 }
115 118
@@ -130,8 +133,8 @@ public:
130 133
131 bool GetIDType(Handle handle, HandleType* type) const { 134 bool GetIDType(Handle handle, HandleType* type) const {
132 if ((handle < HANDLE_OFFSET) || (handle >= HANDLE_OFFSET + MAX_COUNT) || 135 if ((handle < HANDLE_OFFSET) || (handle >= HANDLE_OFFSET + MAX_COUNT) ||
133 !occupied[handle - HANDLE_OFFSET]) { 136 !occupied[handle - HANDLE_OFFSET]) {
134 ERROR_LOG(KERNEL, "Kernel: Bad object handle %i (%08x)", handle, handle); 137 LOG_ERROR(Kernel, "Bad object handle %08X", handle, handle);
135 return false; 138 return false;
136 } 139 }
137 Object* t = pool[handle - HANDLE_OFFSET]; 140 Object* t = pool[handle - HANDLE_OFFSET];
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp
index cfcc0e0b7..3c8c502c6 100644
--- a/src/core/hle/kernel/shared_memory.cpp
+++ b/src/core/hle/kernel/shared_memory.cpp
@@ -16,12 +16,6 @@ public:
16 static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::SharedMemory; } 16 static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::SharedMemory; }
17 Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::SharedMemory; } 17 Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::SharedMemory; }
18 18
19 ResultVal<bool> WaitSynchronization() override {
20 // TODO(bunnei): ImplementMe
21 ERROR_LOG(OSHLE, "(UNIMPLEMENTED)");
22 return UnimplementedFunction(ErrorModule::OS);
23 }
24
25 u32 base_address; ///< Address of shared memory block in RAM 19 u32 base_address; ///< Address of shared memory block in RAM
26 MemoryPermission permissions; ///< Permissions of shared memory block (SVC field) 20 MemoryPermission permissions; ///< Permissions of shared memory block (SVC field)
27 MemoryPermission other_permissions; ///< Other permissions of shared memory block (SVC field) 21 MemoryPermission other_permissions; ///< Other permissions of shared memory block (SVC field)
@@ -61,7 +55,7 @@ ResultCode MapSharedMemory(u32 handle, u32 address, MemoryPermission permissions
61 MemoryPermission other_permissions) { 55 MemoryPermission other_permissions) {
62 56
63 if (address < Memory::SHARED_MEMORY_VADDR || address >= Memory::SHARED_MEMORY_VADDR_END) { 57 if (address < Memory::SHARED_MEMORY_VADDR || address >= Memory::SHARED_MEMORY_VADDR_END) {
64 ERROR_LOG(KERNEL, "cannot map handle=0x%08X, address=0x%08X outside of shared mem bounds!", 58 LOG_ERROR(Kernel_SVC, "cannot map handle=0x%08X, address=0x%08X outside of shared mem bounds!",
65 handle, address); 59 handle, address);
66 return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::Kernel, 60 return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::Kernel,
67 ErrorSummary::InvalidArgument, ErrorLevel::Permanent); 61 ErrorSummary::InvalidArgument, ErrorLevel::Permanent);
@@ -83,7 +77,7 @@ ResultVal<u8*> GetSharedMemoryPointer(Handle handle, u32 offset) {
83 if (0 != shared_memory->base_address) 77 if (0 != shared_memory->base_address)
84 return MakeResult<u8*>(Memory::GetPointer(shared_memory->base_address + offset)); 78 return MakeResult<u8*>(Memory::GetPointer(shared_memory->base_address + offset));
85 79
86 ERROR_LOG(KERNEL, "memory block handle=0x%08X not mapped!", handle); 80 LOG_ERROR(Kernel_SVC, "memory block handle=0x%08X not mapped!", handle);
87 // TODO(yuriks): Verify error code. 81 // TODO(yuriks): Verify error code.
88 return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::Kernel, 82 return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::Kernel,
89 ErrorSummary::InvalidState, ErrorLevel::Permanent); 83 ErrorSummary::InvalidState, ErrorLevel::Permanent);
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 492b917e1..1c04701de 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -150,13 +150,13 @@ void ChangeReadyState(Thread* t, bool ready) {
150 150
151/// Verify that a thread has not been released from waiting 151/// Verify that a thread has not been released from waiting
152static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle) { 152static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle) {
153 _dbg_assert_(KERNEL, thread != nullptr); 153 _dbg_assert_(Kernel, thread != nullptr);
154 return (type == thread->wait_type) && (wait_handle == thread->wait_handle) && (thread->IsWaiting()); 154 return (type == thread->wait_type) && (wait_handle == thread->wait_handle) && (thread->IsWaiting());
155} 155}
156 156
157/// Verify that a thread has not been released from waiting (with wait address) 157/// Verify that a thread has not been released from waiting (with wait address)
158static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle, VAddr wait_address) { 158static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle, VAddr wait_address) {
159 _dbg_assert_(KERNEL, thread != nullptr); 159 _dbg_assert_(Kernel, thread != nullptr);
160 return VerifyWait(thread, type, wait_handle) && (wait_address == thread->wait_address); 160 return VerifyWait(thread, type, wait_handle) && (wait_address == thread->wait_address);
161} 161}
162 162
@@ -196,7 +196,7 @@ void ChangeThreadState(Thread* t, ThreadStatus new_status) {
196 196
197 if (new_status == THREADSTATUS_WAIT) { 197 if (new_status == THREADSTATUS_WAIT) {
198 if (t->wait_type == WAITTYPE_NONE) { 198 if (t->wait_type == WAITTYPE_NONE) {
199 ERROR_LOG(KERNEL, "Waittype none not allowed"); 199 LOG_ERROR(Kernel, "Waittype none not allowed");
200 } 200 }
201 } 201 }
202} 202}
@@ -318,12 +318,12 @@ void DebugThreadQueue() {
318 if (!thread) { 318 if (!thread) {
319 return; 319 return;
320 } 320 }
321 INFO_LOG(KERNEL, "0x%02X 0x%08X (current)", thread->current_priority, GetCurrentThreadHandle()); 321 LOG_DEBUG(Kernel, "0x%02X 0x%08X (current)", thread->current_priority, GetCurrentThreadHandle());
322 for (u32 i = 0; i < thread_queue.size(); i++) { 322 for (u32 i = 0; i < thread_queue.size(); i++) {
323 Handle handle = thread_queue[i]; 323 Handle handle = thread_queue[i];
324 s32 priority = thread_ready_queue.contains(handle); 324 s32 priority = thread_ready_queue.contains(handle);
325 if (priority != -1) { 325 if (priority != -1) {
326 INFO_LOG(KERNEL, "0x%02X 0x%08X", priority, handle); 326 LOG_DEBUG(Kernel, "0x%02X 0x%08X", priority, handle);
327 } 327 }
328 } 328 }
329} 329}
@@ -333,7 +333,7 @@ Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 prio
333 s32 processor_id, u32 stack_top, int stack_size) { 333 s32 processor_id, u32 stack_top, int stack_size) {
334 334
335 _assert_msg_(KERNEL, (priority >= THREADPRIO_HIGHEST && priority <= THREADPRIO_LOWEST), 335 _assert_msg_(KERNEL, (priority >= THREADPRIO_HIGHEST && priority <= THREADPRIO_LOWEST),
336 "CreateThread priority=%d, outside of allowable range!", priority) 336 "priority=%d, outside of allowable range!", priority)
337 337
338 Thread* thread = new Thread; 338 Thread* thread = new Thread;
339 339
@@ -362,24 +362,24 @@ Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s3
362 u32 stack_top, int stack_size) { 362 u32 stack_top, int stack_size) {
363 363
364 if (name == nullptr) { 364 if (name == nullptr) {
365 ERROR_LOG(KERNEL, "CreateThread(): nullptr name"); 365 LOG_ERROR(Kernel_SVC, "nullptr name");
366 return -1; 366 return -1;
367 } 367 }
368 if ((u32)stack_size < 0x200) { 368 if ((u32)stack_size < 0x200) {
369 ERROR_LOG(KERNEL, "CreateThread(name=%s): invalid stack_size=0x%08X", name, 369 LOG_ERROR(Kernel_SVC, "(name=%s): invalid stack_size=0x%08X", name,
370 stack_size); 370 stack_size);
371 return -1; 371 return -1;
372 } 372 }
373 if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { 373 if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) {
374 s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); 374 s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST);
375 WARN_LOG(KERNEL, "CreateThread(name=%s): invalid priority=0x%08X, clamping to %08X", 375 LOG_WARNING(Kernel_SVC, "(name=%s): invalid priority=%d, clamping to %d",
376 name, priority, new_priority); 376 name, priority, new_priority);
377 // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm 377 // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm
378 // validity of this 378 // validity of this
379 priority = new_priority; 379 priority = new_priority;
380 } 380 }
381 if (!Memory::GetPointer(entry_point)) { 381 if (!Memory::GetPointer(entry_point)) {
382 ERROR_LOG(KERNEL, "CreateThread(name=%s): invalid entry %08x", name, entry_point); 382 LOG_ERROR(Kernel_SVC, "(name=%s): invalid entry %08x", name, entry_point);
383 return -1; 383 return -1;
384 } 384 }
385 Handle handle; 385 Handle handle;
@@ -416,7 +416,7 @@ ResultCode SetThreadPriority(Handle handle, s32 priority) {
416 // If priority is invalid, clamp to valid range 416 // If priority is invalid, clamp to valid range
417 if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { 417 if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) {
418 s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); 418 s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST);
419 WARN_LOG(KERNEL, "invalid priority=0x%08X, clamping to %08X", priority, new_priority); 419 LOG_WARNING(Kernel_SVC, "invalid priority=%d, clamping to %d", priority, new_priority);
420 // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm 420 // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm
421 // validity of this 421 // validity of this
422 priority = new_priority; 422 priority = new_priority;
@@ -470,7 +470,7 @@ void Reschedule() {
470 Thread* next = NextThread(); 470 Thread* next = NextThread();
471 HLE::g_reschedule = false; 471 HLE::g_reschedule = false;
472 if (next > 0) { 472 if (next > 0) {
473 INFO_LOG(KERNEL, "context switch 0x%08X -> 0x%08X", prev->GetHandle(), next->GetHandle()); 473 LOG_TRACE(Kernel, "context switch 0x%08X -> 0x%08X", prev->GetHandle(), next->GetHandle());
474 474
475 SwitchContext(next); 475 SwitchContext(next);
476 476
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;
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index b99c301d4..db0c42e74 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -31,7 +31,7 @@ enum ControlMemoryOperation {
31 31
32/// Map application or GSP heap memory 32/// Map application or GSP heap memory
33static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) { 33static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) {
34 DEBUG_LOG(SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X", 34 LOG_TRACE(Kernel_SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X",
35 operation, addr0, addr1, size, permissions); 35 operation, addr0, addr1, size, permissions);
36 36
37 switch (operation) { 37 switch (operation) {
@@ -48,14 +48,14 @@ static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1,
48 48
49 // Unknown ControlMemory operation 49 // Unknown ControlMemory operation
50 default: 50 default:
51 ERROR_LOG(SVC, "unknown operation=0x%08X", operation); 51 LOG_ERROR(Kernel_SVC, "unknown operation=0x%08X", operation);
52 } 52 }
53 return 0; 53 return 0;
54} 54}
55 55
56/// Maps a memory block to specified address 56/// Maps a memory block to specified address
57static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) { 57static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) {
58 DEBUG_LOG(SVC, "called memblock=0x%08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d", 58 LOG_TRACE(Kernel_SVC, "called memblock=0x%08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d",
59 handle, addr, permissions, other_permissions); 59 handle, addr, permissions, other_permissions);
60 60
61 Kernel::MemoryPermission permissions_type = static_cast<Kernel::MemoryPermission>(permissions); 61 Kernel::MemoryPermission permissions_type = static_cast<Kernel::MemoryPermission>(permissions);
@@ -68,7 +68,7 @@ static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other
68 static_cast<Kernel::MemoryPermission>(other_permissions)); 68 static_cast<Kernel::MemoryPermission>(other_permissions));
69 break; 69 break;
70 default: 70 default:
71 ERROR_LOG(OSHLE, "unknown permissions=0x%08X", permissions); 71 LOG_ERROR(Kernel_SVC, "unknown permissions=0x%08X", permissions);
72 } 72 }
73 return 0; 73 return 0;
74} 74}
@@ -77,7 +77,7 @@ static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other
77static Result ConnectToPort(Handle* out, const char* port_name) { 77static Result ConnectToPort(Handle* out, const char* port_name) {
78 Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); 78 Service::Interface* service = Service::g_manager->FetchFromPortName(port_name);
79 79
80 DEBUG_LOG(SVC, "called port_name=%s", port_name); 80 LOG_TRACE(Kernel_SVC, "called port_name=%s", port_name);
81 _assert_msg_(KERNEL, (service != nullptr), "called, but service is not implemented!"); 81 _assert_msg_(KERNEL, (service != nullptr), "called, but service is not implemented!");
82 82
83 *out = service->GetHandle(); 83 *out = service->GetHandle();
@@ -95,7 +95,7 @@ static Result SendSyncRequest(Handle handle) {
95 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); 95 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle);
96 96
97 _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!"); 97 _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!");
98 DEBUG_LOG(SVC, "called handle=0x%08X(%s)", handle, object->GetTypeName().c_str()); 98 LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s)", handle, object->GetTypeName().c_str());
99 99
100 ResultVal<bool> wait = object->SyncRequest(); 100 ResultVal<bool> wait = object->SyncRequest();
101 if (wait.Succeeded() && *wait) { 101 if (wait.Succeeded() && *wait) {
@@ -108,7 +108,7 @@ static Result SendSyncRequest(Handle handle) {
108/// Close a handle 108/// Close a handle
109static Result CloseHandle(Handle handle) { 109static Result CloseHandle(Handle handle) {
110 // ImplementMe 110 // ImplementMe
111 ERROR_LOG(SVC, "(UNIMPLEMENTED) called handle=0x%08X", handle); 111 LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called handle=0x%08X", handle);
112 return 0; 112 return 0;
113} 113}
114 114
@@ -121,9 +121,9 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
121 return InvalidHandle(ErrorModule::Kernel).raw; 121 return InvalidHandle(ErrorModule::Kernel).raw;
122 } 122 }
123 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); 123 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle);
124 _dbg_assert_(KERNEL, object != nullptr); 124 _dbg_assert_(Kernel, object != nullptr);
125 125
126 DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, object->GetTypeName().c_str(), 126 LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, object->GetTypeName().c_str(),
127 object->GetName().c_str(), nano_seconds); 127 object->GetName().c_str(), nano_seconds);
128 128
129 ResultVal<bool> wait = object->WaitSynchronization(); 129 ResultVal<bool> wait = object->WaitSynchronization();
@@ -143,7 +143,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count,
143 bool unlock_all = true; 143 bool unlock_all = true;
144 bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated 144 bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated
145 145
146 DEBUG_LOG(SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%lld", 146 LOG_TRACE(Kernel_SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%lld",
147 handle_count, (wait_all ? "true" : "false"), nano_seconds); 147 handle_count, (wait_all ? "true" : "false"), nano_seconds);
148 148
149 // Iterate through each handle, synchronize kernel object 149 // Iterate through each handle, synchronize kernel object
@@ -153,7 +153,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count,
153 } 153 }
154 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]); 154 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]);
155 155
156 DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName().c_str(), 156 LOG_TRACE(Kernel_SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName().c_str(),
157 object->GetName().c_str()); 157 object->GetName().c_str());
158 158
159 // TODO(yuriks): Verify how the real function behaves when an error happens here 159 // TODO(yuriks): Verify how the real function behaves when an error happens here
@@ -181,7 +181,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count,
181 181
182/// Create an address arbiter (to allocate access to shared resources) 182/// Create an address arbiter (to allocate access to shared resources)
183static Result CreateAddressArbiter(u32* arbiter) { 183static Result CreateAddressArbiter(u32* arbiter) {
184 DEBUG_LOG(SVC, "called"); 184 LOG_TRACE(Kernel_SVC, "called");
185 Handle handle = Kernel::CreateAddressArbiter(); 185 Handle handle = Kernel::CreateAddressArbiter();
186 *arbiter = handle; 186 *arbiter = handle;
187 return 0; 187 return 0;
@@ -189,7 +189,7 @@ static Result CreateAddressArbiter(u32* arbiter) {
189 189
190/// Arbitrate address 190/// Arbitrate address
191static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) { 191static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) {
192 DEBUG_LOG(SVC, "called handle=0x%08X, address=0x%08X, type=0x%08X, value=0x%08X", arbiter, 192 LOG_TRACE(Kernel_SVC, "called handle=0x%08X, address=0x%08X, type=0x%08X, value=0x%08X", arbiter,
193 address, type, value); 193 address, type, value);
194 return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type), 194 return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type),
195 address, value).raw; 195 address, value).raw;
@@ -197,7 +197,7 @@ static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value,
197 197
198/// Used to output a message on a debug hardware unit - does nothing on a retail unit 198/// Used to output a message on a debug hardware unit - does nothing on a retail unit
199static void OutputDebugString(const char* string) { 199static void OutputDebugString(const char* string) {
200 OS_LOG(SVC, "%s", string); 200 LOG_DEBUG(Debug_Emulated, "%s", string);
201} 201}
202 202
203/// Get resource limit 203/// Get resource limit
@@ -206,14 +206,14 @@ static Result GetResourceLimit(Handle* resource_limit, Handle process) {
206 // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for 206 // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for
207 // the current KThread. 207 // the current KThread.
208 *resource_limit = 0xDEADBEEF; 208 *resource_limit = 0xDEADBEEF;
209 ERROR_LOG(SVC, "(UNIMPLEMENTED) called process=0x%08X", process); 209 LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called process=0x%08X", process);
210 return 0; 210 return 0;
211} 211}
212 212
213/// Get resource limit current values 213/// Get resource limit current values
214static Result GetResourceLimitCurrentValues(s64* values, Handle resource_limit, void* names, 214static Result GetResourceLimitCurrentValues(s64* values, Handle resource_limit, void* names,
215 s32 name_count) { 215 s32 name_count) {
216 ERROR_LOG(SVC, "(UNIMPLEMENTED) called resource_limit=%08X, names=%s, name_count=%d", 216 LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called resource_limit=%08X, names=%s, name_count=%d",
217 resource_limit, names, name_count); 217 resource_limit, names, name_count);
218 Memory::Write32(Core::g_app_core->GetReg(0), 0); // Normmatt: Set used memory to 0 for now 218 Memory::Write32(Core::g_app_core->GetReg(0), 0); // Normmatt: Set used memory to 0 for now
219 return 0; 219 return 0;
@@ -234,7 +234,7 @@ static Result CreateThread(u32 priority, u32 entry_point, u32 arg, u32 stack_top
234 234
235 Core::g_app_core->SetReg(1, thread); 235 Core::g_app_core->SetReg(1, thread);
236 236
237 DEBUG_LOG(SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, " 237 LOG_TRACE(Kernel_SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
238 "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point, 238 "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point,
239 name.c_str(), arg, stack_top, priority, processor_id, thread); 239 name.c_str(), arg, stack_top, priority, processor_id, thread);
240 240
@@ -245,7 +245,7 @@ static Result CreateThread(u32 priority, u32 entry_point, u32 arg, u32 stack_top
245static u32 ExitThread() { 245static u32 ExitThread() {
246 Handle thread = Kernel::GetCurrentThreadHandle(); 246 Handle thread = Kernel::GetCurrentThreadHandle();
247 247
248 DEBUG_LOG(SVC, "called, pc=0x%08X", Core::g_app_core->GetPC()); // PC = 0x0010545C 248 LOG_TRACE(Kernel_SVC, "called, pc=0x%08X", Core::g_app_core->GetPC()); // PC = 0x0010545C
249 249
250 Kernel::StopThread(thread, __func__); 250 Kernel::StopThread(thread, __func__);
251 HLE::Reschedule(__func__); 251 HLE::Reschedule(__func__);
@@ -269,42 +269,42 @@ static Result SetThreadPriority(Handle handle, s32 priority) {
269/// Create a mutex 269/// Create a mutex
270static Result CreateMutex(Handle* mutex, u32 initial_locked) { 270static Result CreateMutex(Handle* mutex, u32 initial_locked) {
271 *mutex = Kernel::CreateMutex((initial_locked != 0)); 271 *mutex = Kernel::CreateMutex((initial_locked != 0));
272 DEBUG_LOG(SVC, "called initial_locked=%s : created handle=0x%08X", 272 LOG_TRACE(Kernel_SVC, "called initial_locked=%s : created handle=0x%08X",
273 initial_locked ? "true" : "false", *mutex); 273 initial_locked ? "true" : "false", *mutex);
274 return 0; 274 return 0;
275} 275}
276 276
277/// Release a mutex 277/// Release a mutex
278static Result ReleaseMutex(Handle handle) { 278static Result ReleaseMutex(Handle handle) {
279 DEBUG_LOG(SVC, "called handle=0x%08X", handle); 279 LOG_TRACE(Kernel_SVC, "called handle=0x%08X", handle);
280 ResultCode res = Kernel::ReleaseMutex(handle); 280 ResultCode res = Kernel::ReleaseMutex(handle);
281 return res.raw; 281 return res.raw;
282} 282}
283 283
284/// Get the ID for the specified thread. 284/// Get the ID for the specified thread.
285static Result GetThreadId(u32* thread_id, Handle handle) { 285static Result GetThreadId(u32* thread_id, Handle handle) {
286 DEBUG_LOG(SVC, "called thread=0x%08X", handle); 286 LOG_TRACE(Kernel_SVC, "called thread=0x%08X", handle);
287 ResultCode result = Kernel::GetThreadId(thread_id, handle); 287 ResultCode result = Kernel::GetThreadId(thread_id, handle);
288 return result.raw; 288 return result.raw;
289} 289}
290 290
291/// Query memory 291/// Query memory
292static Result QueryMemory(void* info, void* out, u32 addr) { 292static Result QueryMemory(void* info, void* out, u32 addr) {
293 ERROR_LOG(SVC, "(UNIMPLEMENTED) called addr=0x%08X", addr); 293 LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called addr=0x%08X", addr);
294 return 0; 294 return 0;
295} 295}
296 296
297/// Create an event 297/// Create an event
298static Result CreateEvent(Handle* evt, u32 reset_type) { 298static Result CreateEvent(Handle* evt, u32 reset_type) {
299 *evt = Kernel::CreateEvent((ResetType)reset_type); 299 *evt = Kernel::CreateEvent((ResetType)reset_type);
300 DEBUG_LOG(SVC, "called reset_type=0x%08X : created handle=0x%08X", 300 LOG_TRACE(Kernel_SVC, "called reset_type=0x%08X : created handle=0x%08X",
301 reset_type, *evt); 301 reset_type, *evt);
302 return 0; 302 return 0;
303} 303}
304 304
305/// Duplicates a kernel handle 305/// Duplicates a kernel handle
306static Result DuplicateHandle(Handle* out, Handle handle) { 306static Result DuplicateHandle(Handle* out, Handle handle) {
307 DEBUG_LOG(SVC, "called handle=0x%08X", handle); 307 LOG_WARNING(Kernel_SVC, "(STUBBED) called handle=0x%08X", handle);
308 308
309 // Translate kernel handles -> real handles 309 // Translate kernel handles -> real handles
310 if (handle == Kernel::CurrentThread) { 310 if (handle == Kernel::CurrentThread) {
@@ -321,19 +321,19 @@ static Result DuplicateHandle(Handle* out, Handle handle) {
321 321
322/// Signals an event 322/// Signals an event
323static Result SignalEvent(Handle evt) { 323static Result SignalEvent(Handle evt) {
324 DEBUG_LOG(SVC, "called event=0x%08X", evt); 324 LOG_TRACE(Kernel_SVC, "called event=0x%08X", evt);
325 return Kernel::SignalEvent(evt).raw; 325 return Kernel::SignalEvent(evt).raw;
326} 326}
327 327
328/// Clears an event 328/// Clears an event
329static Result ClearEvent(Handle evt) { 329static Result ClearEvent(Handle evt) {
330 DEBUG_LOG(SVC, "called event=0x%08X", evt); 330 LOG_TRACE(Kernel_SVC, "called event=0x%08X", evt);
331 return Kernel::ClearEvent(evt).raw; 331 return Kernel::ClearEvent(evt).raw;
332} 332}
333 333
334/// Sleep the current thread 334/// Sleep the current thread
335static void SleepThread(s64 nanoseconds) { 335static void SleepThread(s64 nanoseconds) {
336 DEBUG_LOG(SVC, "called nanoseconds=%lld", nanoseconds); 336 LOG_TRACE(Kernel_SVC, "called nanoseconds=%lld", nanoseconds);
337 337
338 // Check for next thread to schedule 338 // Check for next thread to schedule
339 HLE::Reschedule(__func__); 339 HLE::Reschedule(__func__);