summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp77
1 files changed, 39 insertions, 38 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index e2da68227..72b5c05f2 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -31,7 +31,7 @@ namespace Kernel {
31 31
32/// Set the process heap to a given Size. It can both extend and shrink the heap. 32/// Set the process heap to a given Size. It can both extend and shrink the heap.
33static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) { 33static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) {
34 NGLOG_TRACE(Kernel_SVC, "called, heap_size={:#X}", heap_size); 34 NGLOG_TRACE(Kernel_SVC, "called, heap_size=0x{:X}", heap_size);
35 auto& process = *Core::CurrentProcess(); 35 auto& process = *Core::CurrentProcess();
36 CASCADE_RESULT(*heap_addr, 36 CASCADE_RESULT(*heap_addr,
37 process.HeapAllocate(Memory::HEAP_VADDR, heap_size, VMAPermission::ReadWrite)); 37 process.HeapAllocate(Memory::HEAP_VADDR, heap_size, VMAPermission::ReadWrite));
@@ -39,20 +39,20 @@ static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) {
39} 39}
40 40
41static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) { 41static ResultCode SetMemoryAttribute(VAddr addr, u64 size, u32 state0, u32 state1) {
42 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, addr={:#X}", addr); 42 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, addr=0x{:X}", addr);
43 return RESULT_SUCCESS; 43 return RESULT_SUCCESS;
44} 44}
45 45
46/// Maps a memory range into a different range. 46/// Maps a memory range into a different range.
47static ResultCode MapMemory(VAddr dst_addr, VAddr src_addr, u64 size) { 47static ResultCode MapMemory(VAddr dst_addr, VAddr src_addr, u64 size) {
48 NGLOG_TRACE(Kernel_SVC, "called, dst_addr={:#X}, src_addr={:#X}, size={:#X}", dst_addr, 48 NGLOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr,
49 src_addr, size); 49 src_addr, size);
50 return Core::CurrentProcess()->MirrorMemory(dst_addr, src_addr, size); 50 return Core::CurrentProcess()->MirrorMemory(dst_addr, src_addr, size);
51} 51}
52 52
53/// Unmaps a region that was previously mapped with svcMapMemory 53/// Unmaps a region that was previously mapped with svcMapMemory
54static ResultCode UnmapMemory(VAddr dst_addr, VAddr src_addr, u64 size) { 54static ResultCode UnmapMemory(VAddr dst_addr, VAddr src_addr, u64 size) {
55 NGLOG_TRACE(Kernel_SVC, "called, dst_addr={:#X}, src_addr={:#X}, size={:#X}", dst_addr, 55 NGLOG_TRACE(Kernel_SVC, "called, dst_addr=0x{:X}, src_addr=0x{:X}, size=0x{:X}", dst_addr,
56 src_addr, size); 56 src_addr, size);
57 return Core::CurrentProcess()->UnmapMemory(dst_addr, src_addr, size); 57 return Core::CurrentProcess()->UnmapMemory(dst_addr, src_addr, size);
58} 58}
@@ -90,11 +90,11 @@ static ResultCode ConnectToNamedPort(Handle* out_handle, VAddr port_name_address
90static ResultCode SendSyncRequest(Handle handle) { 90static ResultCode SendSyncRequest(Handle handle) {
91 SharedPtr<ClientSession> session = g_handle_table.Get<ClientSession>(handle); 91 SharedPtr<ClientSession> session = g_handle_table.Get<ClientSession>(handle);
92 if (!session) { 92 if (!session) {
93 NGLOG_ERROR(Kernel_SVC, "called with invalid handle={:#010X}", handle); 93 NGLOG_ERROR(Kernel_SVC, "called with invalid handle=0x{:08X}", handle);
94 return ERR_INVALID_HANDLE; 94 return ERR_INVALID_HANDLE;
95 } 95 }
96 96
97 NGLOG_TRACE(Kernel_SVC, "called handle={:#010X}({})", handle, session->GetName()); 97 NGLOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({})", handle, session->GetName());
98 98
99 Core::System::GetInstance().PrepareReschedule(); 99 Core::System::GetInstance().PrepareReschedule();
100 100
@@ -105,7 +105,7 @@ static ResultCode SendSyncRequest(Handle handle) {
105 105
106/// Get the ID for the specified thread. 106/// Get the ID for the specified thread.
107static ResultCode GetThreadId(u32* thread_id, Handle thread_handle) { 107static ResultCode GetThreadId(u32* thread_id, Handle thread_handle) {
108 NGLOG_TRACE(Kernel_SVC, "called thread={:#010X}", thread_handle); 108 NGLOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", thread_handle);
109 109
110 const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); 110 const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle);
111 if (!thread) { 111 if (!thread) {
@@ -118,7 +118,7 @@ static ResultCode GetThreadId(u32* thread_id, Handle thread_handle) {
118 118
119/// Get the ID of the specified process 119/// Get the ID of the specified process
120static ResultCode GetProcessId(u32* process_id, Handle process_handle) { 120static ResultCode GetProcessId(u32* process_id, Handle process_handle) {
121 NGLOG_TRACE(Kernel_SVC, "called process={:#010X}", process_handle); 121 NGLOG_TRACE(Kernel_SVC, "called process=0x{:08X}", process_handle);
122 122
123 const SharedPtr<Process> process = g_handle_table.Get<Process>(process_handle); 123 const SharedPtr<Process> process = g_handle_table.Get<Process>(process_handle);
124 if (!process) { 124 if (!process) {
@@ -178,7 +178,7 @@ static ResultCode WaitSynchronization1(
178/// Wait for the given handles to synchronize, timeout after the specified nanoseconds 178/// Wait for the given handles to synchronize, timeout after the specified nanoseconds
179static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64 handle_count, 179static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64 handle_count,
180 s64 nano_seconds) { 180 s64 nano_seconds) {
181 NGLOG_TRACE(Kernel_SVC, "called handles_address={:#X}, handle_count={}, nano_seconds={}", 181 NGLOG_TRACE(Kernel_SVC, "called handles_address=0x{:X}, handle_count={}, nano_seconds={}",
182 handles_address, handle_count, nano_seconds); 182 handles_address, handle_count, nano_seconds);
183 183
184 if (!Memory::IsValidVirtualAddress(handles_address)) 184 if (!Memory::IsValidVirtualAddress(handles_address))
@@ -239,7 +239,7 @@ static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64
239 239
240/// Resumes a thread waiting on WaitSynchronization 240/// Resumes a thread waiting on WaitSynchronization
241static ResultCode CancelSynchronization(Handle thread_handle) { 241static ResultCode CancelSynchronization(Handle thread_handle) {
242 NGLOG_TRACE(Kernel_SVC, "called thread={:#X}", thread_handle); 242 NGLOG_TRACE(Kernel_SVC, "called thread=0x{:X}", thread_handle);
243 243
244 const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); 244 const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle);
245 if (!thread) { 245 if (!thread) {
@@ -257,8 +257,8 @@ static ResultCode CancelSynchronization(Handle thread_handle) {
257static ResultCode ArbitrateLock(Handle holding_thread_handle, VAddr mutex_addr, 257static ResultCode ArbitrateLock(Handle holding_thread_handle, VAddr mutex_addr,
258 Handle requesting_thread_handle) { 258 Handle requesting_thread_handle) {
259 NGLOG_TRACE(Kernel_SVC, 259 NGLOG_TRACE(Kernel_SVC,
260 "called holding_thread_handle={:#010X}, mutex_addr={:#X}, " 260 "called holding_thread_handle=0x{:08X}, mutex_addr=0x{:X}, "
261 "requesting_current_thread_handle={:#010X}", 261 "requesting_current_thread_handle=0x{:08X}",
262 holding_thread_handle, mutex_addr, requesting_thread_handle); 262 holding_thread_handle, mutex_addr, requesting_thread_handle);
263 263
264 return Mutex::TryAcquire(mutex_addr, holding_thread_handle, requesting_thread_handle); 264 return Mutex::TryAcquire(mutex_addr, holding_thread_handle, requesting_thread_handle);
@@ -266,7 +266,7 @@ static ResultCode ArbitrateLock(Handle holding_thread_handle, VAddr mutex_addr,
266 266
267/// Unlock a mutex 267/// Unlock a mutex
268static ResultCode ArbitrateUnlock(VAddr mutex_addr) { 268static ResultCode ArbitrateUnlock(VAddr mutex_addr) {
269 NGLOG_TRACE(Kernel_SVC, "called mutex_addr={:#X}", mutex_addr); 269 NGLOG_TRACE(Kernel_SVC, "called mutex_addr=0x{:X}", mutex_addr);
270 270
271 return Mutex::Release(mutex_addr); 271 return Mutex::Release(mutex_addr);
272} 272}
@@ -286,7 +286,7 @@ static void OutputDebugString(VAddr address, s32 len) {
286 286
287/// Gets system/memory information for the current process 287/// Gets system/memory information for the current process
288static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id) { 288static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id) {
289 NGLOG_TRACE(Kernel_SVC, "called info_id={:#X}, info_sub_id={:#X}, handle={:#010X}", info_id, 289 NGLOG_TRACE(Kernel_SVC, "called info_id=0x{:X}, info_sub_id=0x{:X}, handle=0x{:08X}", info_id,
290 info_sub_id, handle); 290 info_sub_id, handle);
291 291
292 auto& vm_manager = Core::CurrentProcess()->vm_manager; 292 auto& vm_manager = Core::CurrentProcess()->vm_manager;
@@ -355,14 +355,14 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
355 355
356/// Sets the thread activity 356/// Sets the thread activity
357static ResultCode SetThreadActivity(Handle handle, u32 unknown) { 357static ResultCode SetThreadActivity(Handle handle, u32 unknown) {
358 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle={:#010X}, unknown={:#010X}", handle, 358 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x{:08X}, unknown=0x{:08X}", handle,
359 unknown); 359 unknown);
360 return RESULT_SUCCESS; 360 return RESULT_SUCCESS;
361} 361}
362 362
363/// Gets the thread context 363/// Gets the thread context
364static ResultCode GetThreadContext(Handle handle, VAddr addr) { 364static ResultCode GetThreadContext(Handle handle, VAddr addr) {
365 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle={:#010X}, addr={:#X}", handle, addr); 365 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x{:08X}, addr=0x{:X}", handle, addr);
366 return RESULT_SUCCESS; 366 return RESULT_SUCCESS;
367} 367}
368 368
@@ -407,9 +407,10 @@ static u32 GetCurrentProcessorNumber() {
407 407
408static ResultCode MapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 size, 408static ResultCode MapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 size,
409 u32 permissions) { 409 u32 permissions) {
410 NGLOG_TRACE(Kernel_SVC, 410 NGLOG_TRACE(
411 "called, shared_memory_handle={:#X}, addr={:#X}, size={:#X}, permissions={:#010X}", 411 Kernel_SVC,
412 shared_memory_handle, addr, size, permissions); 412 "called, shared_memory_handle=0x{:X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}",
413 shared_memory_handle, addr, size, permissions);
413 414
414 SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(shared_memory_handle); 415 SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(shared_memory_handle);
415 if (!shared_memory) { 416 if (!shared_memory) {
@@ -429,14 +430,14 @@ static ResultCode MapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 s
429 return shared_memory->Map(Core::CurrentProcess().get(), addr, permissions_type, 430 return shared_memory->Map(Core::CurrentProcess().get(), addr, permissions_type,
430 MemoryPermission::DontCare); 431 MemoryPermission::DontCare);
431 default: 432 default:
432 NGLOG_ERROR(Kernel_SVC, "unknown permissions={:#010X}", permissions); 433 NGLOG_ERROR(Kernel_SVC, "unknown permissions=0x{:08X}", permissions);
433 } 434 }
434 435
435 return RESULT_SUCCESS; 436 return RESULT_SUCCESS;
436} 437}
437 438
438static ResultCode UnmapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 size) { 439static ResultCode UnmapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 size) {
439 NGLOG_WARNING(Kernel_SVC, "called, shared_memory_handle={:#010X}, addr={:#X}, size={:#X}", 440 NGLOG_WARNING(Kernel_SVC, "called, shared_memory_handle=0x{:08X}, addr=0x{:X}, size=0x{:X}",
440 shared_memory_handle, addr, size); 441 shared_memory_handle, addr, size);
441 442
442 SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(shared_memory_handle); 443 SharedPtr<SharedMemory> shared_memory = g_handle_table.Get<SharedMemory>(shared_memory_handle);
@@ -465,7 +466,7 @@ static ResultCode QueryProcessMemory(MemoryInfo* memory_info, PageInfo* /*page_i
465 memory_info->type = static_cast<u32>(vma->second.meminfo_state); 466 memory_info->type = static_cast<u32>(vma->second.meminfo_state);
466 } 467 }
467 468
468 NGLOG_TRACE(Kernel_SVC, "called process={:#010X} addr={:X}", process_handle, addr); 469 NGLOG_TRACE(Kernel_SVC, "called process=0x{:08X} addr={:X}", process_handle, addr);
469 return RESULT_SUCCESS; 470 return RESULT_SUCCESS;
470} 471}
471 472
@@ -552,8 +553,8 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V
552 Core::System::GetInstance().PrepareReschedule(); 553 Core::System::GetInstance().PrepareReschedule();
553 554
554 NGLOG_TRACE(Kernel_SVC, 555 NGLOG_TRACE(Kernel_SVC,
555 "called entrypoint={:#010X} ({}), arg={:#010X}, stacktop={:#010X}, " 556 "called entrypoint=0x{:08X} ({}), arg=0x{:08X}, stacktop=0x{:08X}, "
556 "threadpriority={:#010X}, processorid={:#010X} : created handle={:#010X}", 557 "threadpriority=0x{:08X}, processorid=0x{:08X} : created handle=0x{:08X}",
557 entry_point, name, arg, stack_top, priority, processor_id, *out_handle); 558 entry_point, name, arg, stack_top, priority, processor_id, *out_handle);
558 559
559 return RESULT_SUCCESS; 560 return RESULT_SUCCESS;
@@ -561,7 +562,7 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V
561 562
562/// Starts the thread for the provided handle 563/// Starts the thread for the provided handle
563static ResultCode StartThread(Handle thread_handle) { 564static ResultCode StartThread(Handle thread_handle) {
564 NGLOG_TRACE(Kernel_SVC, "called thread={:#010X}", thread_handle); 565 NGLOG_TRACE(Kernel_SVC, "called thread=0x{:08X}", thread_handle);
565 566
566 const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); 567 const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle);
567 if (!thread) { 568 if (!thread) {
@@ -575,7 +576,7 @@ static ResultCode StartThread(Handle thread_handle) {
575 576
576/// Called when a thread exits 577/// Called when a thread exits
577static void ExitThread() { 578static void ExitThread() {
578 NGLOG_TRACE(Kernel_SVC, "called, pc={:#010X}", Core::CPU().GetPC()); 579 NGLOG_TRACE(Kernel_SVC, "called, pc=0x{:08X}", Core::CPU().GetPC());
579 580
580 ExitCurrentThread(); 581 ExitCurrentThread();
581 Core::System::GetInstance().PrepareReschedule(); 582 Core::System::GetInstance().PrepareReschedule();
@@ -604,7 +605,7 @@ static ResultCode WaitProcessWideKeyAtomic(VAddr mutex_addr, VAddr condition_var
604 Handle thread_handle, s64 nano_seconds) { 605 Handle thread_handle, s64 nano_seconds) {
605 NGLOG_TRACE( 606 NGLOG_TRACE(
606 Kernel_SVC, 607 Kernel_SVC,
607 "called mutex_addr={:X}, condition_variable_addr={:X}, thread_handle={:#010X}, timeout={}", 608 "called mutex_addr={:X}, condition_variable_addr={:X}, thread_handle=0x{:08X}, timeout={}",
608 mutex_addr, condition_variable_addr, thread_handle, nano_seconds); 609 mutex_addr, condition_variable_addr, thread_handle, nano_seconds);
609 610
610 SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); 611 SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle);
@@ -629,7 +630,7 @@ static ResultCode WaitProcessWideKeyAtomic(VAddr mutex_addr, VAddr condition_var
629 630
630/// Signal process wide key 631/// Signal process wide key
631static ResultCode SignalProcessWideKey(VAddr condition_variable_addr, s32 target) { 632static ResultCode SignalProcessWideKey(VAddr condition_variable_addr, s32 target) {
632 NGLOG_TRACE(Kernel_SVC, "called, condition_variable_addr={:#X}, target={:#010X}", 633 NGLOG_TRACE(Kernel_SVC, "called, condition_variable_addr=0x{:X}, target=0x{:08X}",
633 condition_variable_addr, target); 634 condition_variable_addr, target);
634 635
635 u32 processed = 0; 636 u32 processed = 0;
@@ -696,13 +697,13 @@ static u64 GetSystemTick() {
696 697
697/// Close a handle 698/// Close a handle
698static ResultCode CloseHandle(Handle handle) { 699static ResultCode CloseHandle(Handle handle) {
699 NGLOG_TRACE(Kernel_SVC, "Closing handle {:#010X}", handle); 700 NGLOG_TRACE(Kernel_SVC, "Closing handle 0x{:08X}", handle);
700 return g_handle_table.Close(handle); 701 return g_handle_table.Close(handle);
701} 702}
702 703
703/// Reset an event 704/// Reset an event
704static ResultCode ResetSignal(Handle handle) { 705static ResultCode ResetSignal(Handle handle) {
705 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called handle {:#010X}", handle); 706 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called handle 0x{:08X}", handle);
706 auto event = g_handle_table.Get<Event>(handle); 707 auto event = g_handle_table.Get<Event>(handle);
707 ASSERT(event != nullptr); 708 ASSERT(event != nullptr);
708 event->Clear(); 709 event->Clear();
@@ -711,28 +712,28 @@ static ResultCode ResetSignal(Handle handle) {
711 712
712/// Creates a TransferMemory object 713/// Creates a TransferMemory object
713static ResultCode CreateTransferMemory(Handle* handle, VAddr addr, u64 size, u32 permissions) { 714static ResultCode CreateTransferMemory(Handle* handle, VAddr addr, u64 size, u32 permissions) {
714 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called addr={:#X}, size={:#X}, perms={:010X}", addr, size, 715 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called addr=0x{:X}, size=0x{:X}, perms=0x{:08X}", addr,
715 permissions); 716 size, permissions);
716 *handle = 0; 717 *handle = 0;
717 return RESULT_SUCCESS; 718 return RESULT_SUCCESS;
718} 719}
719 720
720static ResultCode GetThreadCoreMask(Handle handle, u32* mask, u64* unknown) { 721static ResultCode GetThreadCoreMask(Handle handle, u32* mask, u64* unknown) {
721 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle={:010X}", handle); 722 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x{:08X}", handle);
722 *mask = 0x0; 723 *mask = 0x0;
723 *unknown = 0xf; 724 *unknown = 0xf;
724 return RESULT_SUCCESS; 725 return RESULT_SUCCESS;
725} 726}
726 727
727static ResultCode SetThreadCoreMask(Handle handle, u32 mask, u64 unknown) { 728static ResultCode SetThreadCoreMask(Handle handle, u32 mask, u64 unknown) {
728 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle={:#010X}, mask={:#010X}, unknown={:#X}", 729 NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x{:08X}, mask=0x{:08X}, unknown=0x{:X}",
729 handle, mask, unknown); 730 handle, mask, unknown);
730 return RESULT_SUCCESS; 731 return RESULT_SUCCESS;
731} 732}
732 733
733static ResultCode CreateSharedMemory(Handle* handle, u64 size, u32 local_permissions, 734static ResultCode CreateSharedMemory(Handle* handle, u64 size, u32 local_permissions,
734 u32 remote_permissions) { 735 u32 remote_permissions) {
735 NGLOG_TRACE(Kernel_SVC, "called, size={:#X}, localPerms={:#010X}, remotePerms={:#010X}", size, 736 NGLOG_TRACE(Kernel_SVC, "called, size=0x{:X}, localPerms=0x{:08X}, remotePerms=0x{:08X}", size,
736 local_permissions, remote_permissions); 737 local_permissions, remote_permissions);
737 auto sharedMemHandle = 738 auto sharedMemHandle =
738 SharedMemory::Create(g_handle_table.Get<Process>(KernelHandle::CurrentProcess), size, 739 SharedMemory::Create(g_handle_table.Get<Process>(KernelHandle::CurrentProcess), size,
@@ -744,7 +745,7 @@ static ResultCode CreateSharedMemory(Handle* handle, u64 size, u32 local_permiss
744} 745}
745 746
746static ResultCode ClearEvent(Handle handle) { 747static ResultCode ClearEvent(Handle handle) {
747 NGLOG_TRACE(Kernel_SVC, "called, event={:010X}", handle); 748 NGLOG_TRACE(Kernel_SVC, "called, event=0x{:08X}", handle);
748 749
749 SharedPtr<Event> evt = g_handle_table.Get<Event>(handle); 750 SharedPtr<Event> evt = g_handle_table.Get<Event>(handle);
750 if (evt == nullptr) 751 if (evt == nullptr)
@@ -896,7 +897,7 @@ static const FunctionDef SVC_Table[] = {
896 897
897static const FunctionDef* GetSVCInfo(u32 func_num) { 898static const FunctionDef* GetSVCInfo(u32 func_num) {
898 if (func_num >= std::size(SVC_Table)) { 899 if (func_num >= std::size(SVC_Table)) {
899 NGLOG_ERROR(Kernel_SVC, "Unknown svc={:#04X}", func_num); 900 NGLOG_ERROR(Kernel_SVC, "Unknown svc=0x{:02X}", func_num);
900 return nullptr; 901 return nullptr;
901 } 902 }
902 return &SVC_Table[func_num]; 903 return &SVC_Table[func_num];
@@ -918,7 +919,7 @@ void CallSVC(u32 immediate) {
918 NGLOG_CRITICAL(Kernel_SVC, "Unimplemented SVC function {}(..)", info->name); 919 NGLOG_CRITICAL(Kernel_SVC, "Unimplemented SVC function {}(..)", info->name);
919 } 920 }
920 } else { 921 } else {
921 NGLOG_CRITICAL(Kernel_SVC, "Unknown SVC function {:#X}", immediate); 922 NGLOG_CRITICAL(Kernel_SVC, "Unknown SVC function 0x{:X}", immediate);
922 } 923 }
923} 924}
924 925