diff options
| author | 2014-05-29 23:26:58 -0400 | |
|---|---|---|
| committer | 2014-05-29 23:26:58 -0400 | |
| commit | c404d22036e16d20d91fca0cf29d56785656c0f5 (patch) | |
| tree | 8dd5aa70a08441dc3139a22bf94e8fccd5414649 /src/core/hle/svc.cpp | |
| parent | svc: updated OutputDebugString to use OS_LOG (diff) | |
| download | yuzu-c404d22036e16d20d91fca0cf29d56785656c0f5.tar.gz yuzu-c404d22036e16d20d91fca0cf29d56785656c0f5.tar.xz yuzu-c404d22036e16d20d91fca0cf29d56785656c0f5.zip | |
hle: cleaned up log messages
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 27f2b2315..01fb647e7 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -37,7 +37,7 @@ enum MapMemoryPermission { | |||
| 37 | Result ControlMemory(void* _outaddr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) { | 37 | Result ControlMemory(void* _outaddr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) { |
| 38 | u32 virtual_address = 0x00000000; | 38 | u32 virtual_address = 0x00000000; |
| 39 | 39 | ||
| 40 | DEBUG_LOG(SVC, "ControlMemory called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X", | 40 | DEBUG_LOG(SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X", |
| 41 | operation, addr0, addr1, size, permissions); | 41 | operation, addr0, addr1, size, permissions); |
| 42 | 42 | ||
| 43 | switch (operation) { | 43 | switch (operation) { |
| @@ -54,7 +54,7 @@ Result ControlMemory(void* _outaddr, u32 operation, u32 addr0, u32 addr1, u32 si | |||
| 54 | 54 | ||
| 55 | // Unknown ControlMemory operation | 55 | // Unknown ControlMemory operation |
| 56 | default: | 56 | default: |
| 57 | ERROR_LOG(SVC, "ControlMemory unknown operation=0x%08X", operation); | 57 | ERROR_LOG(SVC, "unknown operation=0x%08X", operation); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | Core::g_app_core->SetReg(1, virtual_address); | 60 | Core::g_app_core->SetReg(1, virtual_address); |
| @@ -64,7 +64,7 @@ Result ControlMemory(void* _outaddr, u32 operation, u32 addr0, u32 addr1, u32 si | |||
| 64 | 64 | ||
| 65 | /// Maps a memory block to specified address | 65 | /// Maps a memory block to specified address |
| 66 | Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherpermission) { | 66 | Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherpermission) { |
| 67 | DEBUG_LOG(SVC, "MapMemoryBlock called memblock=0x08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d", | 67 | DEBUG_LOG(SVC, "called memblock=0x08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d", |
| 68 | memblock, addr, mypermissions, otherpermission); | 68 | memblock, addr, mypermissions, otherpermission); |
| 69 | switch (mypermissions) { | 69 | switch (mypermissions) { |
| 70 | case MEMORY_PERMISSION_NORMAL: | 70 | case MEMORY_PERMISSION_NORMAL: |
| @@ -73,7 +73,7 @@ Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherper | |||
| 73 | Memory::MapBlock_Shared(memblock, addr, mypermissions); | 73 | Memory::MapBlock_Shared(memblock, addr, mypermissions); |
| 74 | break; | 74 | break; |
| 75 | default: | 75 | default: |
| 76 | ERROR_LOG(OSHLE, "MapMemoryBlock unknown permissions=0x%08X", mypermissions); | 76 | ERROR_LOG(OSHLE, "unknown permissions=0x%08X", mypermissions); |
| 77 | } | 77 | } |
| 78 | return 0; | 78 | return 0; |
| 79 | } | 79 | } |
| @@ -81,8 +81,8 @@ Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherper | |||
| 81 | /// Connect to an OS service given the port name, returns the handle to the port to out | 81 | /// Connect to an OS service given the port name, returns the handle to the port to out |
| 82 | Result ConnectToPort(void* _out, const char* port_name) { | 82 | Result ConnectToPort(void* _out, const char* port_name) { |
| 83 | Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); | 83 | Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); |
| 84 | DEBUG_LOG(SVC, "ConnectToPort called port_name=%s", port_name); | 84 | DEBUG_LOG(SVC, "called port_name=%s", port_name); |
| 85 | _assert_msg_(KERNEL, service, "ConnectToPort called, but service is not implemented!"); | 85 | _assert_msg_(KERNEL, service, "called, but service is not implemented!"); |
| 86 | Core::g_app_core->SetReg(1, service->GetHandle()); | 86 | Core::g_app_core->SetReg(1, service->GetHandle()); |
| 87 | return 0; | 87 | return 0; |
| 88 | } | 88 | } |
| @@ -92,8 +92,8 @@ Result SendSyncRequest(Handle handle) { | |||
| 92 | bool wait = false; | 92 | bool wait = false; |
| 93 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); | 93 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); |
| 94 | 94 | ||
| 95 | DEBUG_LOG(SVC, "SendSyncRequest called handle=0x%08X", handle); | 95 | DEBUG_LOG(SVC, "called handle=0x%08X", handle); |
| 96 | _assert_msg_(KERNEL, object, "SendSyncRequest called, but kernel object is NULL!"); | 96 | _assert_msg_(KERNEL, object, "called, but kernel object is NULL!"); |
| 97 | 97 | ||
| 98 | Result res = object->SyncRequest(&wait); | 98 | Result res = object->SyncRequest(&wait); |
| 99 | if (wait) { | 99 | if (wait) { |
| @@ -106,7 +106,7 @@ Result SendSyncRequest(Handle handle) { | |||
| 106 | /// Close a handle | 106 | /// Close a handle |
| 107 | Result CloseHandle(Handle handle) { | 107 | Result CloseHandle(Handle handle) { |
| 108 | // ImplementMe | 108 | // ImplementMe |
| 109 | ERROR_LOG(SVC, "(UNIMPLEMENTED) CloseHandle called handle=0x%08X", handle); | 109 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called handle=0x%08X", handle); |
| 110 | return 0; | 110 | return 0; |
| 111 | } | 111 | } |
| 112 | 112 | ||
| @@ -117,9 +117,9 @@ Result WaitSynchronization1(Handle handle, s64 nano_seconds) { | |||
| 117 | 117 | ||
| 118 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); | 118 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); |
| 119 | 119 | ||
| 120 | DEBUG_LOG(SVC, "WaitSynchronization1 called handle=0x%08X, nanoseconds=%d", handle, | 120 | DEBUG_LOG(SVC, "called handle=0x%08X, nanoseconds=%d", handle, |
| 121 | nano_seconds); | 121 | nano_seconds); |
| 122 | _assert_msg_(KERNEL, object, "WaitSynchronization1 called, but kernel object is NULL!"); | 122 | _assert_msg_(KERNEL, object, "called, but kernel object is NULL!"); |
| 123 | 123 | ||
| 124 | Result res = object->WaitSynchronization(&wait); | 124 | Result res = object->WaitSynchronization(&wait); |
| 125 | 125 | ||
| @@ -139,7 +139,7 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa | |||
| 139 | Handle* handles = (Handle*)_handles; | 139 | Handle* handles = (Handle*)_handles; |
| 140 | bool unlock_all = true; | 140 | bool unlock_all = true; |
| 141 | 141 | ||
| 142 | DEBUG_LOG(SVC, "WaitSynchronizationN called handle_count=%d, wait_all=%s, nanoseconds=%d", | 142 | DEBUG_LOG(SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%d", |
| 143 | handle_count, (wait_all ? "true" : "false"), nano_seconds); | 143 | handle_count, (wait_all ? "true" : "false"), nano_seconds); |
| 144 | 144 | ||
| 145 | // Iterate through each handle, synchronize kernel object | 145 | // Iterate through each handle, synchronize kernel object |
| @@ -147,7 +147,7 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa | |||
| 147 | bool wait = false; | 147 | bool wait = false; |
| 148 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]); // 0 handle | 148 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]); // 0 handle |
| 149 | 149 | ||
| 150 | _assert_msg_(KERNEL, object, "WaitSynchronizationN called handle=0x%08X, but kernel object " | 150 | _assert_msg_(KERNEL, object, "called handle=0x%08X, but kernel object " |
| 151 | "is NULL!", handles[i]); | 151 | "is NULL!", handles[i]); |
| 152 | 152 | ||
| 153 | DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X", i, handles[i]); | 153 | DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X", i, handles[i]); |
| @@ -176,14 +176,14 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa | |||
| 176 | 176 | ||
| 177 | /// Create an address arbiter (to allocate access to shared resources) | 177 | /// Create an address arbiter (to allocate access to shared resources) |
| 178 | Result CreateAddressArbiter(void* arbiter) { | 178 | Result CreateAddressArbiter(void* arbiter) { |
| 179 | ERROR_LOG(SVC, "(UNIMPLEMENTED) CreateAddressArbiter called"); | 179 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called"); |
| 180 | Core::g_app_core->SetReg(1, 0xFABBDADD); | 180 | Core::g_app_core->SetReg(1, 0xFABBDADD); |
| 181 | return 0; | 181 | return 0; |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | /// Arbitrate address | 184 | /// Arbitrate address |
| 185 | Result ArbitrateAddress(Handle arbiter, u32 addr, u32 _type, u32 value, s64 nanoseconds) { | 185 | Result ArbitrateAddress(Handle arbiter, u32 addr, u32 _type, u32 value, s64 nanoseconds) { |
| 186 | ERROR_LOG(SVC, "(UNIMPLEMENTED) ArbitrateAddress called"); | 186 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called"); |
| 187 | ArbitrationType type = (ArbitrationType)_type; | 187 | ArbitrationType type = (ArbitrationType)_type; |
| 188 | Memory::Write32(addr, type); | 188 | Memory::Write32(addr, type); |
| 189 | return 0; | 189 | return 0; |
| @@ -199,14 +199,15 @@ Result GetResourceLimit(void* resource_limit, Handle process) { | |||
| 199 | // With regards to proceess values: | 199 | // With regards to proceess values: |
| 200 | // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for | 200 | // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for |
| 201 | // the current KThread. | 201 | // the current KThread. |
| 202 | ERROR_LOG(SVC, "(UNIMPLEMENTED) GetResourceLimit called process=0x%08X", process); | 202 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called process=0x%08X", process); |
| 203 | Core::g_app_core->SetReg(1, 0xDEADBEEF); | 203 | Core::g_app_core->SetReg(1, 0xDEADBEEF); |
| 204 | return 0; | 204 | return 0; |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | /// Get resource limit current values | 207 | /// Get resource limit current values |
| 208 | Result GetResourceLimitCurrentValues(void* _values, Handle resource_limit, void* names, s32 name_count) { | 208 | Result GetResourceLimitCurrentValues(void* _values, Handle resource_limit, void* names, |
| 209 | ERROR_LOG(SVC, "(UNIMPLEMENTED) GetResourceLimitCurrentValues called resource_limit=%08X, names=%s, name_count=%d", | 209 | s32 name_count) { |
| 210 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called resource_limit=%08X, names=%s, name_count=%d", | ||
| 210 | resource_limit, names, name_count); | 211 | resource_limit, names, name_count); |
| 211 | Memory::Write32(Core::g_app_core->GetReg(0), 0); // Normmatt: Set used memory to 0 for now | 212 | Memory::Write32(Core::g_app_core->GetReg(0), 0); // Normmatt: Set used memory to 0 for now |
| 212 | return 0; | 213 | return 0; |
| @@ -229,7 +230,7 @@ Result CreateThread(u32 priority, u32 entry_point, u32 arg, u32 stack_top, u32 p | |||
| 229 | 230 | ||
| 230 | Core::g_app_core->SetReg(1, thread); | 231 | Core::g_app_core->SetReg(1, thread); |
| 231 | 232 | ||
| 232 | DEBUG_LOG(SVC, "CreateThread called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, " | 233 | DEBUG_LOG(SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, " |
| 233 | "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point, | 234 | "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point, |
| 234 | name.c_str(), arg, stack_top, priority, processor_id, thread); | 235 | name.c_str(), arg, stack_top, priority, processor_id, thread); |
| 235 | 236 | ||
| @@ -240,28 +241,28 @@ Result CreateThread(u32 priority, u32 entry_point, u32 arg, u32 stack_top, u32 p | |||
| 240 | Result CreateMutex(void* _mutex, u32 initial_locked) { | 241 | Result CreateMutex(void* _mutex, u32 initial_locked) { |
| 241 | Handle mutex = Kernel::CreateMutex((initial_locked != 0)); | 242 | Handle mutex = Kernel::CreateMutex((initial_locked != 0)); |
| 242 | Core::g_app_core->SetReg(1, mutex); | 243 | Core::g_app_core->SetReg(1, mutex); |
| 243 | DEBUG_LOG(SVC, "CreateMutex called initial_locked=%s : created handle=0x%08X", | 244 | DEBUG_LOG(SVC, "called initial_locked=%s : created handle=0x%08X", |
| 244 | initial_locked ? "true" : "false", mutex); | 245 | initial_locked ? "true" : "false", mutex); |
| 245 | return 0; | 246 | return 0; |
| 246 | } | 247 | } |
| 247 | 248 | ||
| 248 | /// Release a mutex | 249 | /// Release a mutex |
| 249 | Result ReleaseMutex(Handle handle) { | 250 | Result ReleaseMutex(Handle handle) { |
| 250 | DEBUG_LOG(SVC, "ReleaseMutex called handle=0x%08X", handle); | 251 | DEBUG_LOG(SVC, "called handle=0x%08X", handle); |
| 251 | _assert_msg_(KERNEL, handle, "ReleaseMutex called, but handle is NULL!"); | 252 | _assert_msg_(KERNEL, handle, "called, but handle is NULL!"); |
| 252 | Kernel::ReleaseMutex(handle); | 253 | Kernel::ReleaseMutex(handle); |
| 253 | return 0; | 254 | return 0; |
| 254 | } | 255 | } |
| 255 | 256 | ||
| 256 | /// Get current thread ID | 257 | /// Get current thread ID |
| 257 | Result GetThreadId(void* thread_id, u32 thread) { | 258 | Result GetThreadId(void* thread_id, u32 thread) { |
| 258 | ERROR_LOG(SVC, "(UNIMPLEMENTED) GetThreadId called thread=0x%08X", thread); | 259 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called thread=0x%08X", thread); |
| 259 | return 0; | 260 | return 0; |
| 260 | } | 261 | } |
| 261 | 262 | ||
| 262 | /// Query memory | 263 | /// Query memory |
| 263 | Result QueryMemory(void *_info, void *_out, u32 addr) { | 264 | Result QueryMemory(void *_info, void *_out, u32 addr) { |
| 264 | ERROR_LOG(SVC, "(UNIMPLEMENTED) QueryMemory called addr=0x%08X", addr); | 265 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called addr=0x%08X", addr); |
| 265 | return 0; | 266 | return 0; |
| 266 | } | 267 | } |
| 267 | 268 | ||
| @@ -269,7 +270,7 @@ Result QueryMemory(void *_info, void *_out, u32 addr) { | |||
| 269 | Result CreateEvent(void* _event, u32 reset_type) { | 270 | Result CreateEvent(void* _event, u32 reset_type) { |
| 270 | Handle evt = Kernel::CreateEvent((ResetType)reset_type); | 271 | Handle evt = Kernel::CreateEvent((ResetType)reset_type); |
| 271 | Core::g_app_core->SetReg(1, evt); | 272 | Core::g_app_core->SetReg(1, evt); |
| 272 | DEBUG_LOG(SVC, "CreateEvent called reset_type=0x%08X : created handle=0x%08X", | 273 | DEBUG_LOG(SVC, "called reset_type=0x%08X : created handle=0x%08X", |
| 273 | reset_type, evt); | 274 | reset_type, evt); |
| 274 | return 0; | 275 | return 0; |
| 275 | } | 276 | } |
| @@ -277,14 +278,14 @@ Result CreateEvent(void* _event, u32 reset_type) { | |||
| 277 | /// Duplicates a kernel handle | 278 | /// Duplicates a kernel handle |
| 278 | Result DuplicateHandle(void* _out, Handle handle) { | 279 | Result DuplicateHandle(void* _out, Handle handle) { |
| 279 | Handle* out = (Handle*)_out; | 280 | Handle* out = (Handle*)_out; |
| 280 | ERROR_LOG(SVC, "(UNIMPLEMENTED) DuplicateHandle called handle=0x%08X", handle); | 281 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called handle=0x%08X", handle); |
| 281 | return 0; | 282 | return 0; |
| 282 | } | 283 | } |
| 283 | 284 | ||
| 284 | /// Clears an event | 285 | /// Clears an event |
| 285 | Result ClearEvent(Handle evt) { | 286 | Result ClearEvent(Handle evt) { |
| 286 | Result res = Kernel::ClearEvent(evt); | 287 | Result res = Kernel::ClearEvent(evt); |
| 287 | DEBUG_LOG(SVC, "ClearEvent called event=0x%08X", evt); | 288 | DEBUG_LOG(SVC, "called event=0x%08X", evt); |
| 288 | return res; | 289 | return res; |
| 289 | } | 290 | } |
| 290 | 291 | ||