mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-15 05:15:14 +00:00
[fmt] use {#:x} instead of 0x{:#x} (#4170)
continuation of #309 but applying to even more files than before :) also makes them lowercase because `0xfafafa` is better as `0XFAFAFA` Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4170 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -147,7 +147,7 @@ Result OpusDecoder::DecodeInterleavedForMultiStream(u32* out_data_size, u64* out
|
||||
auto* header_p{reinterpret_cast<const OpusPacketHeader*>(input_data.data())};
|
||||
OpusPacketHeader header{ReverseHeader(*header_p)};
|
||||
|
||||
LOG_TRACE(Service_Audio, "header size {:#X} input data size 0x{:X} in_data size 0x{:X}",
|
||||
LOG_TRACE(Service_Audio, "header size {:#x} input data size {:#x} in_data size {:#x}",
|
||||
header.size, input_data.size_bytes(), in_data.size_bytes());
|
||||
|
||||
R_UNLESS(in_data.size_bytes() >= header.size &&
|
||||
|
||||
@@ -369,7 +369,7 @@ Result InfoUpdater::UpdateMixes(MixContext& mix_context, const u32 mix_buffer_co
|
||||
if (mix_count < 0 || mix_count > 0x100) {
|
||||
LOG_ERROR(
|
||||
Service_Audio,
|
||||
"Invalid mix count from dirty parameter: count={}, magic=0x{:X}, expected_size={}",
|
||||
"Invalid mix count from dirty parameter: count={}, magic={:#x}, expected_size={}",
|
||||
mix_count, in_dirty_params->magic, in_header->mix_size);
|
||||
return Service::Audio::ResultInvalidUpdateInfo;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: 2021 Skyline Team and Contributors
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
@@ -43,13 +46,13 @@ MAP_MEMBER(void)::MapLocked(VaType virt, PaType phys, VaType size, ExtraBlockInf
|
||||
|
||||
if (virt_end > va_limit) {
|
||||
ASSERT_MSG(false,
|
||||
"Trying to map a block past the VA limit: virt_end: 0x{:X}, va_limit: 0x{:X}",
|
||||
"Trying to map a block past the VA limit: virt_end: {:#x}, va_limit: {:#x}",
|
||||
virt_end, va_limit);
|
||||
}
|
||||
|
||||
auto block_end_successor{std::lower_bound(blocks.begin(), blocks.end(), virt_end)};
|
||||
if (block_end_successor == blocks.begin()) {
|
||||
ASSERT_MSG(false, "Trying to map a block before the VA start: virt_end: 0x{:X}", virt_end);
|
||||
ASSERT_MSG(false, "Trying to map a block before the VA start: virt_end: {:#x}", virt_end);
|
||||
}
|
||||
|
||||
auto block_end_predecessor{std::prev(block_end_successor)};
|
||||
@@ -124,7 +127,7 @@ MAP_MEMBER(void)::MapLocked(VaType virt, PaType phys, VaType size, ExtraBlockInf
|
||||
|
||||
// Check that the start successor is either the end block or something in between
|
||||
if (block_start_successor->virt > virt_end) {
|
||||
ASSERT_MSG(false, "Unsorted block in AS map: virt: 0x{:X}", block_start_successor->virt);
|
||||
ASSERT_MSG(false, "Unsorted block in AS map: virt: {:#x}", block_start_successor->virt);
|
||||
} else if (block_start_successor->virt == virt_end) {
|
||||
// We need to create a new block as there are none spare that we would overwrite
|
||||
blocks.insert(block_start_successor, Block(virt, phys, extra_info));
|
||||
@@ -150,13 +153,13 @@ MAP_MEMBER(void)::UnmapLocked(VaType virt, VaType size) {
|
||||
|
||||
if (virt_end > va_limit) {
|
||||
ASSERT_MSG(false,
|
||||
"Trying to map a block past the VA limit: virt_end: 0x{:X}, va_limit: 0x{:X}",
|
||||
"Trying to map a block past the VA limit: virt_end: {:#x}, va_limit: {:#x}",
|
||||
virt_end, va_limit);
|
||||
}
|
||||
|
||||
auto block_end_successor{std::lower_bound(blocks.begin(), blocks.end(), virt_end)};
|
||||
if (block_end_successor == blocks.begin()) {
|
||||
ASSERT_MSG(false, "Trying to unmap a block before the VA start: virt_end: 0x{:X}",
|
||||
ASSERT_MSG(false, "Trying to unmap a block before the VA start: virt_end: {:#x}",
|
||||
virt_end);
|
||||
}
|
||||
|
||||
@@ -257,7 +260,7 @@ MAP_MEMBER(void)::UnmapLocked(VaType virt, VaType size) {
|
||||
auto block_start_successor{std::next(block_start_predecessor)};
|
||||
|
||||
if (block_start_successor->virt > virt_end) {
|
||||
ASSERT_MSG(false, "Unsorted block in AS map: virt: 0x{:X}", block_start_successor->virt);
|
||||
ASSERT_MSG(false, "Unsorted block in AS map: virt: {:#x}", block_start_successor->virt);
|
||||
} else if (block_start_successor->virt == virt_end) {
|
||||
// There are no blocks between the start and the end that would let us skip inserting a new
|
||||
// one for head
|
||||
|
||||
@@ -431,7 +431,7 @@ void DeviceMemoryManager<Traits>::ReadBlock(DAddr address, void* dest_pointer, s
|
||||
[&](size_t copy_amount, DAddr current_vaddr) {
|
||||
LOG_ERROR(
|
||||
HW_Memory,
|
||||
"Unmapped Device ReadBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})",
|
||||
"Unmapped Device ReadBlock @ {:#016x} (start address = {:#016x}, size = {})",
|
||||
current_vaddr, address, size);
|
||||
std::memset(dest_pointer, 0, copy_amount);
|
||||
},
|
||||
@@ -450,7 +450,7 @@ void DeviceMemoryManager<Traits>::WriteBlock(DAddr address, const void* src_poin
|
||||
[&](size_t copy_amount, DAddr current_vaddr) {
|
||||
LOG_ERROR(
|
||||
HW_Memory,
|
||||
"Unmapped Device WriteBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})",
|
||||
"Unmapped Device WriteBlock @ {:#016x} (start address = {:#016x}, size = {})",
|
||||
current_vaddr, address, size);
|
||||
},
|
||||
[&](size_t copy_amount, u8* const dst_ptr) {
|
||||
@@ -489,7 +489,7 @@ void DeviceMemoryManager<Traits>::ReadBlockUnsafe(DAddr address, void* dest_poin
|
||||
[&](size_t copy_amount, DAddr current_vaddr) {
|
||||
LOG_ERROR(
|
||||
HW_Memory,
|
||||
"Unmapped Device ReadBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})",
|
||||
"Unmapped Device ReadBlock @ {:#016x} (start address = {:#016x}, size = {})",
|
||||
current_vaddr, address, size);
|
||||
std::memset(dest_pointer, 0, copy_amount);
|
||||
},
|
||||
@@ -509,7 +509,7 @@ void DeviceMemoryManager<Traits>::WriteBlockUnsafe(DAddr address, const void* sr
|
||||
[&](size_t copy_amount, DAddr current_vaddr) {
|
||||
LOG_ERROR(
|
||||
HW_Memory,
|
||||
"Unmapped Device WriteBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})",
|
||||
"Unmapped Device WriteBlock @ {:#016x} (start address = {:#016x}, size = {})",
|
||||
current_vaddr, address, size);
|
||||
},
|
||||
[&](size_t copy_amount, u8* const dst_ptr) {
|
||||
|
||||
@@ -304,7 +304,7 @@ void IPSwitchCompiler::Parse() {
|
||||
|
||||
if (print_values) {
|
||||
LOG_INFO(Loader,
|
||||
"[IPSwitchCompiler ('{}')] - Patching value at offset 0x{:08X} "
|
||||
"[IPSwitchCompiler ('{}')] - Patching value at offset {:#08x} "
|
||||
"with byte string '{}'",
|
||||
patch_text->GetName(), offset, Common::HexToString(replace));
|
||||
}
|
||||
|
||||
@@ -181,11 +181,11 @@ const ProgramMetadata::KernelCapabilityDescriptors& ProgramMetadata::GetKernelCa
|
||||
|
||||
void ProgramMetadata::Print() const {
|
||||
LOG_DEBUG(Service_FS, "Magic: {:.4}", npdm_header.magic.data());
|
||||
LOG_DEBUG(Service_FS, "Main thread priority: 0x{:02X}", npdm_header.main_thread_priority);
|
||||
LOG_DEBUG(Service_FS, "Main thread priority: {:#02x}", npdm_header.main_thread_priority);
|
||||
LOG_DEBUG(Service_FS, "Main thread core: {}", npdm_header.main_thread_cpu);
|
||||
LOG_DEBUG(Service_FS, "Main thread stack size: {:#X} bytes", npdm_header.main_stack_size);
|
||||
LOG_DEBUG(Service_FS, "Main thread stack size: {:#x} bytes", npdm_header.main_stack_size);
|
||||
LOG_DEBUG(Service_FS, "Process category: {}", npdm_header.process_category);
|
||||
LOG_DEBUG(Service_FS, "Flags: 0x{:02X}", npdm_header.flags);
|
||||
LOG_DEBUG(Service_FS, "Flags: {:#02x}", npdm_header.flags);
|
||||
LOG_DEBUG(Service_FS, " > 64-bit instructions: {}",
|
||||
npdm_header.has_64_bit_instructions ? "YES" : "NO");
|
||||
|
||||
@@ -209,15 +209,15 @@ void ProgramMetadata::Print() const {
|
||||
|
||||
// Begin ACID printing (potential perms, signed)
|
||||
LOG_DEBUG(Service_FS, "Magic: {:.4}", acid_header.magic.data());
|
||||
LOG_DEBUG(Service_FS, "Flags: 0x{:02X}", acid_header.flags);
|
||||
LOG_DEBUG(Service_FS, "Flags: {:#02x}", acid_header.flags);
|
||||
LOG_DEBUG(Service_FS, " > Is Retail: {}", acid_header.production_flag ? "YES" : "NO");
|
||||
LOG_DEBUG(Service_FS, "Title ID Min: 0x{:016X}", acid_header.title_id_min);
|
||||
LOG_DEBUG(Service_FS, "Title ID Max: 0x{:016X}", acid_header.title_id_max);
|
||||
LOG_DEBUG(Service_FS, "Filesystem Access: 0x{:016X}\n", acid_file_access.permissions);
|
||||
LOG_DEBUG(Service_FS, "Title ID Min: {:#016x}", acid_header.title_id_min);
|
||||
LOG_DEBUG(Service_FS, "Title ID Max: {:#016x}", acid_header.title_id_max);
|
||||
LOG_DEBUG(Service_FS, "Filesystem Access: {:#016x}\n", acid_file_access.permissions);
|
||||
|
||||
// Begin ACI0 printing (actual perms, unsigned)
|
||||
LOG_DEBUG(Service_FS, "Magic: {:.4}", aci_header.magic.data());
|
||||
LOG_DEBUG(Service_FS, "Title ID: 0x{:016X}", aci_header.title_id);
|
||||
LOG_DEBUG(Service_FS, "Filesystem Access: 0x{:016X}\n", aci_file_access.permissions);
|
||||
LOG_DEBUG(Service_FS, "Title ID: {:#016x}", aci_header.title_id);
|
||||
LOG_DEBUG(Service_FS, "Filesystem Access: {:#016x}\n", aci_file_access.permissions);
|
||||
}
|
||||
} // namespace FileSys
|
||||
|
||||
@@ -76,7 +76,7 @@ constexpr inline SystemArchiveDescriptor GetSystemArchive(u64 title_id) {
|
||||
|
||||
VirtualFile SynthesizeSystemArchive(const u64 title_id) {
|
||||
auto const desc = GetSystemArchive(title_id);
|
||||
LOG_INFO(Service_FS, "Synthesizing system archive '{}' (0x{:016X}).", desc.name, title_id);
|
||||
LOG_INFO(Service_FS, "Synthesizing system archive '{}' ({:#016x}).", desc.name, title_id);
|
||||
if (desc.supplier != nullptr) {
|
||||
if (auto const dir = desc.supplier(); dir != nullptr) {
|
||||
if (auto const romfs = CreateRomFS(dir); romfs != nullptr) {
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Kernel::Svc {
|
||||
/// Sets the thread activity
|
||||
Result SetThreadActivity(Core::System& system, Handle thread_handle,
|
||||
ThreadActivity thread_activity) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, handle=0x{:08X}, activity=0x{:08X}", thread_handle,
|
||||
LOG_DEBUG(Kernel_SVC, "called, handle={:#08x}, activity={:#08x}", thread_handle,
|
||||
thread_activity);
|
||||
|
||||
// Validate the activity.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -43,7 +43,7 @@ constexpr bool IsValidArbitrationType(Svc::ArbitrationType type) {
|
||||
// Wait for an address (via Address Arbiter)
|
||||
Result WaitForAddress(Core::System& system, u64 address, ArbitrationType arb_type, s32 value,
|
||||
s64 timeout_ns) {
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#X}, arb_type=0x{:X}, value=0x{:X}, timeout_ns={}",
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#x}, arb_type={:#x}, value={:#x}, timeout_ns={}",
|
||||
address, arb_type, value, timeout_ns);
|
||||
|
||||
// Validate input.
|
||||
@@ -74,7 +74,7 @@ Result WaitForAddress(Core::System& system, u64 address, ArbitrationType arb_typ
|
||||
// Signals to an address (via Address Arbiter)
|
||||
Result SignalToAddress(Core::System& system, u64 address, SignalType signal_type, s32 value,
|
||||
s32 count) {
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#X}, signal_type=0x{:X}, value=0x{:X}, count=0x{:X}",
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#x}, signal_type={:#x}, value={:#x}, count={:#x}",
|
||||
address, signal_type, value, count);
|
||||
|
||||
// Validate input.
|
||||
|
||||
@@ -33,7 +33,7 @@ constexpr bool IsValidUnmapFromOwnerCodeMemoryPermission(MemoryPermission perm)
|
||||
} // namespace
|
||||
|
||||
Result CreateCodeMemory(Core::System& system, Handle* out, u64 address, uint64_t size) {
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#X}, size=0x{:X}", address, size);
|
||||
LOG_TRACE(Kernel_SVC, "called, address={:#x}, size={:#x}", address, size);
|
||||
|
||||
// Validate address / size.
|
||||
R_UNLESS(Common::IsAligned(address, PageSize), ResultInvalidAddress);
|
||||
@@ -69,8 +69,8 @@ Result ControlCodeMemory(Core::System& system, Handle code_memory_handle,
|
||||
MemoryPermission perm) {
|
||||
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, code_memory_handle={:#X}, operation=0x{:X}, address=0x{:X}, size=0x{:X}, "
|
||||
"permission={:#X}",
|
||||
"called, code_memory_handle={:#x}, operation={:#x}, address={:#x}, size={:#x}, "
|
||||
"permission={:#x}",
|
||||
code_memory_handle, operation, address, size, perm);
|
||||
|
||||
// Validate the address / size.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -17,7 +17,7 @@ namespace Kernel::Svc {
|
||||
/// Wait process wide key atomic
|
||||
Result WaitProcessWideKeyAtomic(Core::System& system, u64 address, u64 cv_key, u32 tag,
|
||||
s64 timeout_ns) {
|
||||
LOG_TRACE(Kernel_SVC, "called address={:X}, cv_key={:X}, tag=0x{:08X}, timeout_ns={}", address,
|
||||
LOG_TRACE(Kernel_SVC, "called address={:X}, cv_key={:X}, tag={:#08x}, timeout_ns={}", address,
|
||||
cv_key, tag, timeout_ns);
|
||||
|
||||
// Validate input.
|
||||
@@ -48,7 +48,7 @@ Result WaitProcessWideKeyAtomic(Core::System& system, u64 address, u64 cv_key, u
|
||||
|
||||
/// Signal process wide key
|
||||
void SignalProcessWideKey(Core::System& system, u64 cv_key, s32 count) {
|
||||
LOG_TRACE(Kernel_SVC, "called, cv_key={:#X}, count=0x{:08X}", cv_key, count);
|
||||
LOG_TRACE(Kernel_SVC, "called, cv_key={:#x}, count={:#08x}", cv_key, count);
|
||||
|
||||
// Signal the condition variable.
|
||||
return GetCurrentProcess(system.Kernel())
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
namespace Kernel::Svc {
|
||||
|
||||
Result SignalEvent(Core::System& system, Handle event_handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, event_handle=0x{:08X}", event_handle);
|
||||
LOG_DEBUG(Kernel_SVC, "called, event_handle={:#08x}", event_handle);
|
||||
|
||||
// Get the current handle table.
|
||||
const KHandleTable& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
@@ -26,7 +26,7 @@ Result SignalEvent(Core::System& system, Handle event_handle) {
|
||||
if (event.IsNotNull()) {
|
||||
event->Signal(system.Kernel());
|
||||
} else {
|
||||
LOG_WARNING(Kernel_SVC, "SignalEvent best-effort unknown handle=0x{:08X} (ignored)",
|
||||
LOG_WARNING(Kernel_SVC, "SignalEvent best-effort unknown handle={:#08x} (ignored)",
|
||||
event_handle);
|
||||
}
|
||||
R_SUCCEED();
|
||||
@@ -41,7 +41,7 @@ Result SignalEvent(Core::System& system, Handle event_handle) {
|
||||
}
|
||||
|
||||
Result ClearEvent(Core::System& system, Handle event_handle) {
|
||||
LOG_TRACE(Kernel_SVC, "called, event_handle=0x{:08X}", event_handle);
|
||||
LOG_TRACE(Kernel_SVC, "called, event_handle={:#08x}", event_handle);
|
||||
|
||||
// Get the current handle table.
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <cctype>
|
||||
#include "core/core.h"
|
||||
#include "core/debugger/debugger.h"
|
||||
#include "core/hle/kernel/k_process.h"
|
||||
@@ -41,7 +42,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
|
||||
std::string hexdump;
|
||||
for (std::size_t i = 0; i < debug_buffer.size(); i++) {
|
||||
hexdump += fmt::format("{:02X} ", debug_buffer[i]);
|
||||
if (i != 0 && i % 16 == 0) {
|
||||
if ((i + 1) % 32 == 0) {
|
||||
hexdump += '\n';
|
||||
}
|
||||
}
|
||||
@@ -51,35 +52,35 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
|
||||
};
|
||||
switch (break_reason) {
|
||||
case BreakReason::Panic:
|
||||
LOG_CRITICAL(Debug_Emulated, "Userspace PANIC! info1=0x{:016X}, info2=0x{:016X}", info1,
|
||||
LOG_CRITICAL(Debug_Emulated, "Userspace PANIC! info1={:#016x}, info2={:#016x}", info1,
|
||||
info2);
|
||||
handle_debug_buffer(info1, info2);
|
||||
break;
|
||||
case BreakReason::Assert:
|
||||
LOG_CRITICAL(Debug_Emulated, "Userspace Assertion failed! info1=0x{:016X}, info2=0x{:016X}",
|
||||
LOG_CRITICAL(Debug_Emulated, "Userspace Assertion failed! info1={:#016x}, info2={:#016x}",
|
||||
info1, info2);
|
||||
handle_debug_buffer(info1, info2);
|
||||
break;
|
||||
case BreakReason::User:
|
||||
LOG_WARNING(Debug_Emulated, "Userspace Break! 0x{:016X} with size 0x{:016X}", info1, info2);
|
||||
LOG_WARNING(Debug_Emulated, "Userspace Break! {:#016x} with size {:#016x}", info1, info2);
|
||||
handle_debug_buffer(info1, info2);
|
||||
break;
|
||||
case BreakReason::PreLoadDll:
|
||||
LOG_INFO(Debug_Emulated,
|
||||
"Userspace Attempting to load an NRO at 0x{:016X} with size 0x{:016X}", info1,
|
||||
"Userspace Attempting to load an NRO at {:#016x} with size {:#016x}", info1,
|
||||
info2);
|
||||
break;
|
||||
case BreakReason::PostLoadDll:
|
||||
LOG_INFO(Debug_Emulated, "Userspace Loaded an NRO at 0x{:016X} with size 0x{:016X}", info1,
|
||||
LOG_INFO(Debug_Emulated, "Userspace Loaded an NRO at {:#016x} with size {:#016x}", info1,
|
||||
info2);
|
||||
break;
|
||||
case BreakReason::PreUnloadDll:
|
||||
LOG_INFO(Debug_Emulated,
|
||||
"Userspace Attempting to unload an NRO at 0x{:016X} with size 0x{:016X}", info1,
|
||||
"Userspace Attempting to unload an NRO at {:#016x} with size {:#016x}", info1,
|
||||
info2);
|
||||
break;
|
||||
case BreakReason::PostUnloadDll:
|
||||
LOG_INFO(Debug_Emulated, "Userspace Unloaded an NRO at 0x{:016X} with size 0x{:016X}",
|
||||
LOG_INFO(Debug_Emulated, "Userspace Unloaded an NRO at {:#016x} with size {:#016x}",
|
||||
info1, info2);
|
||||
break;
|
||||
case BreakReason::CppException:
|
||||
@@ -88,7 +89,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
|
||||
default:
|
||||
LOG_WARNING(
|
||||
Debug_Emulated,
|
||||
"Signalling debugger, Unknown break reason {:#X}, info1=0x{:016X}, info2=0x{:016X}",
|
||||
"Signalling debugger, Unknown break reason {:#x}, info1={:#016x}, info2={:#016x}",
|
||||
reason, info1, info2);
|
||||
handle_debug_buffer(info1, info2);
|
||||
break;
|
||||
@@ -101,7 +102,7 @@ void Break(Core::System& system, BreakReason reason, u64 info1, u64 info2) {
|
||||
if (!notification_only) {
|
||||
LOG_CRITICAL(
|
||||
Debug_Emulated,
|
||||
"Emulated program broke execution! reason=0x{:016X}, info1=0x{:016X}, info2=0x{:016X}",
|
||||
"Emulated program broke execution! reason={:#016x}, info1={:#016x}, info2={:#016x}",
|
||||
reason, info1, info2);
|
||||
|
||||
handle_debug_buffer(info1, info2);
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Kernel::Svc {
|
||||
/// Gets system/memory information for the current process
|
||||
Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle handle,
|
||||
u64 info_sub_id) {
|
||||
LOG_TRACE(Kernel_SVC, "called info_id={:#X}, info_sub_id=0x{:X}, handle=0x{:08X}",
|
||||
LOG_TRACE(Kernel_SVC, "called info_id={:#x}, info_sub_id={:#x}, handle={:#08x}",
|
||||
info_id_type, info_sub_id, handle);
|
||||
|
||||
u32 info_id = static_cast<u32>(info_id_type);
|
||||
@@ -153,7 +153,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
|
||||
break;
|
||||
}
|
||||
|
||||
LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id=0x{:016X}", info_id);
|
||||
LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id={:#016x}", info_id);
|
||||
R_THROW(ResultInvalidEnumValue);
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
|
||||
.GetHandleTable()
|
||||
.GetObject<KThread>(system.Kernel(), Handle(handle));
|
||||
if (thread.IsNull()) {
|
||||
LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle=0x{:08X}",
|
||||
LOG_ERROR(Kernel_SVC, "Thread handle does not exist, handle={:#08x}",
|
||||
static_cast<Handle>(handle));
|
||||
R_THROW(ResultInvalidHandle);
|
||||
}
|
||||
@@ -265,7 +265,7 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle
|
||||
R_SUCCEED();
|
||||
}
|
||||
default:
|
||||
LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id=0x{:016X}", info_id);
|
||||
LOG_ERROR(Kernel_SVC, "Unimplemented svcGetInfo id={:#016x}", info_id);
|
||||
R_THROW(ResultInvalidEnumValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -13,7 +13,7 @@ namespace Kernel::Svc {
|
||||
|
||||
/// Attempts to locks a mutex
|
||||
Result ArbitrateLock(Core::System& system, Handle thread_handle, u64 address, u32 tag) {
|
||||
LOG_TRACE(Kernel_SVC, "called thread_handle=0x{:08X}, address={:#X}, tag=0x{:08X}",
|
||||
LOG_TRACE(Kernel_SVC, "called thread_handle={:#08x}, address={:#x}, tag={:#08x}",
|
||||
thread_handle, address, tag);
|
||||
|
||||
// Validate the input address.
|
||||
@@ -25,7 +25,7 @@ Result ArbitrateLock(Core::System& system, Handle thread_handle, u64 address, u3
|
||||
|
||||
/// Unlock a mutex
|
||||
Result ArbitrateUnlock(Core::System& system, u64 address) {
|
||||
LOG_TRACE(Kernel_SVC, "called address={:#X}", address);
|
||||
LOG_TRACE(Kernel_SVC, "called address={:#x}", address);
|
||||
|
||||
// Validate the input address.
|
||||
R_UNLESS(!IsKernelAddress(address), ResultInvalidCurrentMemory);
|
||||
|
||||
@@ -34,12 +34,12 @@ constexpr bool IsValidAddressRange(u64 address, u64 size) {
|
||||
// in the same order.
|
||||
Result MapUnmapMemorySanityChecks(const KProcessPageTable& manager, u64 dst_addr, u64 src_addr, u64 size) {
|
||||
if (!Common::IsAligned(dst_addr, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Destination address is not aligned to 4KB, 0x{:016X}", dst_addr);
|
||||
LOG_ERROR(Kernel_SVC, "Destination address is not aligned to 4KB, {:#016X}", dst_addr);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
if (!Common::IsAligned(src_addr, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Source address is not aligned to 4KB, 0x{:016X}", src_addr);
|
||||
LOG_ERROR(Kernel_SVC, "Source address is not aligned to 4KB, {:#016X}", src_addr);
|
||||
R_THROW(ResultInvalidSize);
|
||||
}
|
||||
|
||||
@@ -49,26 +49,26 @@ Result MapUnmapMemorySanityChecks(const KProcessPageTable& manager, u64 dst_addr
|
||||
}
|
||||
|
||||
if (!Common::IsAligned(size, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Size is not aligned to 4KB, 0x{:016X}", size);
|
||||
LOG_ERROR(Kernel_SVC, "Size is not aligned to 4KB, {:#016X}", size);
|
||||
R_THROW(ResultInvalidSize);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(dst_addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Destination is not a valid address range, addr=0x{:016X}, size=0x{:016X}",
|
||||
"Destination is not a valid address range, addr={:#016x}, size={:#016x}",
|
||||
dst_addr, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(src_addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC, "Source is not a valid address range, addr=0x{:016X}, size=0x{:016X}",
|
||||
LOG_ERROR(Kernel_SVC, "Source is not a valid address range, addr={:#016x}, size={:#016x}",
|
||||
src_addr, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
if (!manager.Contains(src_addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Source is not within the address space, addr=0x{:016X}, size=0x{:016X}",
|
||||
"Source is not within the address space, addr={:#016x}, size={:#016x}",
|
||||
src_addr, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ Result MapUnmapMemorySanityChecks(const KProcessPageTable& manager, u64 dst_addr
|
||||
} // namespace
|
||||
|
||||
Result SetMemoryPermission(Core::System& system, u64 address, u64 size, MemoryPermission perm) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, address=0x{:016X}, size={:#X}, perm=0x{:08X}", address, size,
|
||||
LOG_DEBUG(Kernel_SVC, "called, address={:#016x}, size={:#x}, perm={:#08x}", address, size,
|
||||
perm);
|
||||
|
||||
// Validate address / size.
|
||||
@@ -101,7 +101,7 @@ Result SetMemoryPermission(Core::System& system, u64 address, u64 size, MemoryPe
|
||||
|
||||
Result SetMemoryAttribute(Core::System& system, u64 address, u64 size, u32 mask, u32 attr) {
|
||||
LOG_DEBUG(Kernel_SVC,
|
||||
"called, address=0x{:016X}, size={:#X}, mask=0x{:08X}, attribute=0x{:08X}", address,
|
||||
"called, address={:#016x}, size={:#x}, mask={:#08x}, attribute={:#08x}", address,
|
||||
size, mask, attr);
|
||||
|
||||
// Validate address / size.
|
||||
@@ -132,7 +132,7 @@ Result SetMemoryAttribute(Core::System& system, u64 address, u64 size, u32 mask,
|
||||
|
||||
/// Maps a memory range into a different range.
|
||||
Result MapMemory(Core::System& system, u64 dst_addr, u64 src_addr, u64 size) {
|
||||
LOG_TRACE(Kernel_SVC, "called, dst_addr={:#X}, src_addr=0x{:X}, size=0x{:X}", dst_addr,
|
||||
LOG_TRACE(Kernel_SVC, "called, dst_addr={:#x}, src_addr={:#x}, size={:#x}", dst_addr,
|
||||
src_addr, size);
|
||||
|
||||
auto& page_table{GetCurrentProcess(system.Kernel()).GetPageTable()};
|
||||
@@ -147,7 +147,7 @@ Result MapMemory(Core::System& system, u64 dst_addr, u64 src_addr, u64 size) {
|
||||
|
||||
/// Unmaps a region that was previously mapped with svcMapMemory
|
||||
Result UnmapMemory(Core::System& system, u64 dst_addr, u64 src_addr, u64 size) {
|
||||
LOG_TRACE(Kernel_SVC, "called, dst_addr={:#X}, src_addr=0x{:X}, size=0x{:X}", dst_addr,
|
||||
LOG_TRACE(Kernel_SVC, "called, dst_addr={:#x}, src_addr={:#x}, size={:#x}", dst_addr,
|
||||
src_addr, size);
|
||||
|
||||
auto& page_table{GetCurrentProcess(system.Kernel()).GetPageTable()};
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Kernel::Svc {
|
||||
|
||||
/// Set the process heap to a given Size. It can both extend and shrink the heap.
|
||||
Result SetHeapSize(Core::System& system, u64* out_address, u64 size) {
|
||||
LOG_TRACE(Kernel_SVC, "called, heap_size={:#X}", size);
|
||||
LOG_TRACE(Kernel_SVC, "called, heap_size={:#x}", size);
|
||||
|
||||
// Validate size.
|
||||
R_UNLESS(Common::IsAligned(size, HeapSizeAlignment), ResultInvalidSize);
|
||||
@@ -31,10 +31,10 @@ Result SetHeapSize(Core::System& system, u64* out_address, u64 size) {
|
||||
|
||||
/// Maps memory at a desired address
|
||||
Result MapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, addr=0x{:016X}, size={:#X}", addr, size);
|
||||
LOG_DEBUG(Kernel_SVC, "called, addr={:#016x}, size={:#x}", addr, size);
|
||||
|
||||
if (!Common::IsAligned(addr, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Address is not aligned to 4KB, 0x{:016X}", addr);
|
||||
LOG_ERROR(Kernel_SVC, "Address is not aligned to 4KB, {:#016X}", addr);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
@@ -63,14 +63,14 @@ Result MapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
|
||||
|
||||
if (!page_table.Contains(addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Address is not within the address space, addr=0x{:016X}, size=0x{:016X}", addr,
|
||||
"Address is not within the address space, addr={:#016x}, size={:#016x}", addr,
|
||||
size);
|
||||
R_THROW(ResultInvalidMemoryRegion);
|
||||
}
|
||||
|
||||
if (!page_table.IsInAliasRegion(addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Address is not within the alias region, addr=0x{:016X}, size=0x{:016X}", addr,
|
||||
"Address is not within the alias region, addr={:#016x}, size={:#016x}", addr,
|
||||
size);
|
||||
R_THROW(ResultInvalidMemoryRegion);
|
||||
}
|
||||
@@ -80,10 +80,10 @@ Result MapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
|
||||
|
||||
/// Unmaps memory previously mapped via MapPhysicalMemory
|
||||
Result UnmapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, addr=0x{:016X}, size={:#X}", addr, size);
|
||||
LOG_DEBUG(Kernel_SVC, "called, addr={:#016x}, size={:#x}", addr, size);
|
||||
|
||||
if (!Common::IsAligned(addr, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Address is not aligned to 4KB, 0x{:016X}", addr);
|
||||
LOG_ERROR(Kernel_SVC, "Address is not aligned to 4KB, {:#016X}", addr);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
@@ -112,14 +112,14 @@ Result UnmapPhysicalMemory(Core::System& system, u64 addr, u64 size) {
|
||||
|
||||
if (!page_table.Contains(addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Address is not within the address space, addr=0x{:016X}, size=0x{:016X}", addr,
|
||||
"Address is not within the address space, addr={:#016x}, size={:#016x}", addr,
|
||||
size);
|
||||
R_THROW(ResultInvalidMemoryRegion);
|
||||
}
|
||||
|
||||
if (!page_table.IsInAliasRegion(addr, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Address is not within the alias region, addr=0x{:016X}, size=0x{:016X}", addr,
|
||||
"Address is not within the alias region, addr={:#016x}, size={:#016x}", addr,
|
||||
size);
|
||||
R_THROW(ResultInvalidMemoryRegion);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ void ExitProcess(Core::System& system) {
|
||||
|
||||
/// Gets the ID of the specified process or a specified thread's owning process.
|
||||
Result GetProcessId(Core::System& system, u64* out_process_id, Handle handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called handle=0x{:08X}", handle);
|
||||
LOG_DEBUG(Kernel_SVC, "called handle={:#08x}", handle);
|
||||
|
||||
// Get the object from the handle table.
|
||||
KScopedAutoObject obj = GetCurrentProcess(system.Kernel())
|
||||
@@ -55,7 +55,7 @@ Result GetProcessId(Core::System& system, u64* out_process_id, Handle handle) {
|
||||
|
||||
Result GetProcessList(Core::System& system, s32* out_num_processes, u64 out_process_ids,
|
||||
int32_t out_process_ids_size) {
|
||||
LOG_DEBUG(Kernel_SVC, "called. out_process_ids=0x{:016X}, out_process_ids_size={}",
|
||||
LOG_DEBUG(Kernel_SVC, "called. out_process_ids={:#016x}, out_process_ids_size={}",
|
||||
out_process_ids, out_process_ids_size);
|
||||
|
||||
// If the supplied size is negative or greater than INT32_MAX / sizeof(u64), bail.
|
||||
@@ -71,7 +71,7 @@ Result GetProcessList(Core::System& system, s32* out_num_processes, u64 out_proc
|
||||
|
||||
if (out_process_ids_size > 0 &&
|
||||
!GetCurrentProcess(kernel).GetPageTable().Contains(out_process_ids, total_copy_size)) {
|
||||
LOG_ERROR(Kernel_SVC, "Address range outside address space. begin=0x{:016X}, end=0x{:016X}",
|
||||
LOG_ERROR(Kernel_SVC, "Address range outside address space. begin={:#016x}, end={:#016x}",
|
||||
out_process_ids, out_process_ids + total_copy_size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -95,12 +95,12 @@ Result GetProcessList(Core::System& system, s32* out_num_processes, u64 out_proc
|
||||
|
||||
Result GetProcessInfo(Core::System& system, s64* out, Handle process_handle,
|
||||
ProcessInfoType info_type) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, handle=0x{:08X}, type={:#X}", process_handle, info_type);
|
||||
LOG_DEBUG(Kernel_SVC, "called, handle={:#08x}, type={:#x}", process_handle, info_type);
|
||||
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
KScopedAutoObject process = handle_table.GetObject<KProcess>(system.Kernel(), process_handle);
|
||||
if (process.IsNull()) {
|
||||
LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle=0x{:08X}",
|
||||
LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle={:#08x}",
|
||||
process_handle);
|
||||
R_THROW(ResultInvalidHandle);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ constexpr bool IsValidProcessMemoryPermission(Svc::MemoryPermission perm) {
|
||||
Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, u64 address,
|
||||
u64 size, Svc::MemoryPermission perm) {
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, process_handle={:#X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}",
|
||||
"called, process_handle={:#x}, addr={:#x}, size={:#x}, permissions={:#08x}",
|
||||
process_handle, address, size, perm);
|
||||
|
||||
// Validate the address/size.
|
||||
@@ -62,7 +62,7 @@ Result SetProcessMemoryPermission(Core::System& system, Handle process_handle, u
|
||||
Result MapProcessMemory(Core::System& system, u64 dst_address, Handle process_handle,
|
||||
u64 src_address, u64 size) {
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, dst_address={:#X}, process_handle=0x{:X}, src_address=0x{:X}, size=0x{:X}",
|
||||
"called, dst_address={:#x}, process_handle={:#x}, src_address={:#x}, size={:#x}",
|
||||
dst_address, process_handle, src_address, size);
|
||||
|
||||
// Validate the address/size.
|
||||
@@ -103,7 +103,7 @@ Result MapProcessMemory(Core::System& system, u64 dst_address, Handle process_ha
|
||||
Result UnmapProcessMemory(Core::System& system, u64 dst_address, Handle process_handle,
|
||||
u64 src_address, u64 size) {
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, dst_address={:#X}, process_handle=0x{:X}, src_address=0x{:X}, size=0x{:X}",
|
||||
"called, dst_address={:#x}, process_handle={:#x}, src_address={:#x}, size={:#x}",
|
||||
dst_address, process_handle, src_address, size);
|
||||
|
||||
// Validate the address/size.
|
||||
@@ -136,39 +136,39 @@ Result UnmapProcessMemory(Core::System& system, u64 dst_address, Handle process_
|
||||
Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst_address,
|
||||
u64 src_address, u64 size) {
|
||||
LOG_DEBUG(Kernel_SVC,
|
||||
"called. process_handle=0x{:08X}, dst_address=0x{:016X}, "
|
||||
"src_address=0x{:016X}, size=0x{:016X}",
|
||||
"called. process_handle={:#08x}, dst_address={:#016x}, "
|
||||
"src_address={:#016x}, size={:#016x}",
|
||||
process_handle, dst_address, src_address, size);
|
||||
|
||||
if (!Common::IsAligned(src_address, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "src_address is not page-aligned (src_address=0x{:016X}).",
|
||||
LOG_ERROR(Kernel_SVC, "src_address is not page-aligned (src_address={:#016X}).",
|
||||
src_address);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
if (!Common::IsAligned(dst_address, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "dst_address is not page-aligned (dst_address=0x{:016X}).",
|
||||
LOG_ERROR(Kernel_SVC, "dst_address is not page-aligned (dst_address={:#016X}).",
|
||||
dst_address);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
if (size == 0 || !Common::IsAligned(size, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Size is zero or not page-aligned (size=0x{:016X})", size);
|
||||
LOG_ERROR(Kernel_SVC, "Size is zero or not page-aligned (size={:#016X})", size);
|
||||
R_THROW(ResultInvalidSize);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(dst_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Destination address range overflows the address space (dst_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Destination address range overflows the address space (dst_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
dst_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(src_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Source address range overflows the address space (src_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Source address range overflows the address space (src_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
src_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -176,7 +176,7 @@ Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
KScopedAutoObject process = handle_table.GetObject<KProcess>(system.Kernel(), process_handle);
|
||||
if (process.IsNull()) {
|
||||
LOG_ERROR(Kernel_SVC, "Invalid process handle specified (handle=0x{:08X}).",
|
||||
LOG_ERROR(Kernel_SVC, "Invalid process handle specified (handle={:#08x}).",
|
||||
process_handle);
|
||||
R_THROW(ResultInvalidHandle);
|
||||
}
|
||||
@@ -184,8 +184,8 @@ Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst
|
||||
auto& page_table = process->GetPageTable();
|
||||
if (!page_table.Contains(src_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Source address range is not within the address space (src_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Source address range is not within the address space (src_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
src_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -197,39 +197,39 @@ Result MapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst
|
||||
Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 dst_address,
|
||||
u64 src_address, u64 size) {
|
||||
LOG_DEBUG(Kernel_SVC,
|
||||
"called. process_handle=0x{:08X}, dst_address=0x{:016X}, src_address=0x{:016X}, "
|
||||
"size=0x{:016X}",
|
||||
"called. process_handle={:#08x}, dst_address={:#016x}, src_address={:#016x}, "
|
||||
"size={:#016x}",
|
||||
process_handle, dst_address, src_address, size);
|
||||
|
||||
if (!Common::IsAligned(dst_address, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "dst_address is not page-aligned (dst_address=0x{:016X}).",
|
||||
LOG_ERROR(Kernel_SVC, "dst_address is not page-aligned (dst_address={:#016X}).",
|
||||
dst_address);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
if (!Common::IsAligned(src_address, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "src_address is not page-aligned (src_address=0x{:016X}).",
|
||||
LOG_ERROR(Kernel_SVC, "src_address is not page-aligned (src_address={:#016X}).",
|
||||
src_address);
|
||||
R_THROW(ResultInvalidAddress);
|
||||
}
|
||||
|
||||
if (size == 0 || !Common::IsAligned(size, Core::Memory::YUZU_PAGESIZE)) {
|
||||
LOG_ERROR(Kernel_SVC, "Size is zero or not page-aligned (size=0x{:016X}).", size);
|
||||
LOG_ERROR(Kernel_SVC, "Size is zero or not page-aligned (size={:#016X}).", size);
|
||||
R_THROW(ResultInvalidSize);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(dst_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Destination address range overflows the address space (dst_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Destination address range overflows the address space (dst_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
dst_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
if (!IsValidAddressRange(src_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Source address range overflows the address space (src_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Source address range overflows the address space (src_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
src_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -237,7 +237,7 @@ Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 d
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
KScopedAutoObject process = handle_table.GetObject<KProcess>(system.Kernel(), process_handle);
|
||||
if (process.IsNull()) {
|
||||
LOG_ERROR(Kernel_SVC, "Invalid process handle specified (handle=0x{:08X}).",
|
||||
LOG_ERROR(Kernel_SVC, "Invalid process handle specified (handle={:#08x}).",
|
||||
process_handle);
|
||||
R_THROW(ResultInvalidHandle);
|
||||
}
|
||||
@@ -245,8 +245,8 @@ Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 d
|
||||
auto& page_table = process->GetPageTable();
|
||||
if (!page_table.Contains(src_address, size)) {
|
||||
LOG_ERROR(Kernel_SVC,
|
||||
"Source address range is not within the address space (src_address=0x{:016X}, "
|
||||
"size=0x{:016X}).",
|
||||
"Source address range is not within the address space (src_address={:#016x}, "
|
||||
"size={:#016x}).",
|
||||
src_address, size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Kernel::Svc {
|
||||
Result QueryMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out_page_info,
|
||||
u64 query_address) {
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, out_memory_info=0x{:016X}, "
|
||||
"query_address=0x{:016X}",
|
||||
"called, out_memory_info={:#016x}, "
|
||||
"query_address={:#016x}",
|
||||
out_memory_info, query_address);
|
||||
|
||||
// Query memory is just QueryProcessMemory on the current process.
|
||||
@@ -24,11 +24,11 @@ Result QueryMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out
|
||||
|
||||
Result QueryProcessMemory(Core::System& system, uint64_t out_memory_info, PageInfo* out_page_info,
|
||||
Handle process_handle, uint64_t address) {
|
||||
LOG_TRACE(Kernel_SVC, "called process=0x{:08X} address={:X}", process_handle, address);
|
||||
LOG_TRACE(Kernel_SVC, "called process={:#08x} address={:X}", process_handle, address);
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
KScopedAutoObject process = handle_table.GetObject<KProcess>(system.Kernel(), process_handle);
|
||||
if (process.IsNull()) {
|
||||
LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle=0x{:08X}",
|
||||
LOG_ERROR(Kernel_SVC, "Process handle does not exist, process_handle={:#08x}",
|
||||
process_handle);
|
||||
R_THROW(ResultInvalidHandle);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ constexpr bool IsValidSharedMemoryPermission(MemoryPermission perm) {
|
||||
Result MapSharedMemory(Core::System& system, Handle shmem_handle, u64 address, u64 size,
|
||||
Svc::MemoryPermission map_perm) {
|
||||
LOG_TRACE(Kernel_SVC,
|
||||
"called, shared_memory_handle={:#X}, addr=0x{:X}, size=0x{:X}, permissions=0x{:08X}",
|
||||
"called, shared_memory_handle={:#x}, addr={:#x}, size={:#x}, permissions={:#08x}",
|
||||
shmem_handle, address, size, map_perm);
|
||||
|
||||
// Validate the address/size.
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Kernel::Svc {
|
||||
|
||||
/// Close a handle
|
||||
Result CloseHandle(Core::System& system, Handle handle) {
|
||||
LOG_TRACE(Kernel_SVC, "Closing handle 0x{:08X}", handle);
|
||||
LOG_TRACE(Kernel_SVC, "Closing handle {:#08x}", handle);
|
||||
|
||||
// Remove the handle.
|
||||
R_UNLESS(GetCurrentProcess(system.Kernel()).GetHandleTable().Remove(system.Kernel(), handle),
|
||||
@@ -28,7 +28,7 @@ Result CloseHandle(Core::System& system, Handle handle) {
|
||||
|
||||
/// Clears the signaled state of an event or process.
|
||||
Result ResetSignal(Core::System& system, Handle handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called handle 0x{:08X}", handle);
|
||||
LOG_DEBUG(Kernel_SVC, "called handle {:#08x}", handle);
|
||||
|
||||
// Get the current handle table.
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
@@ -103,7 +103,7 @@ Result WaitSynchronization(Core::System& system, int32_t* out_index, u64 user_ha
|
||||
|
||||
/// Resumes a thread waiting on WaitSynchronization
|
||||
Result CancelSynchronization(Core::System& system, Handle handle) {
|
||||
LOG_TRACE(Kernel_SVC, "called handle={:#X}", handle);
|
||||
LOG_TRACE(Kernel_SVC, "called handle={:#x}", handle);
|
||||
|
||||
// Get the thread from its handle.
|
||||
KScopedAutoObject thread = GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject<KThread>(system.Kernel(), handle);
|
||||
|
||||
@@ -26,8 +26,8 @@ constexpr bool IsValidVirtualCoreId(int32_t core_id) {
|
||||
Result CreateThread(Core::System& system, Handle* out_handle, u64 entry_point, u64 arg,
|
||||
u64 stack_bottom, s32 priority, s32 core_id) {
|
||||
LOG_DEBUG(Kernel_SVC,
|
||||
"called entry_point=0x{:08X}, arg=0x{:08X}, stack_bottom=0x{:08X}, "
|
||||
"priority=0x{:08X}, core_id=0x{:08X}",
|
||||
"called entry_point={:#08x}, arg={:#08x}, stack_bottom={:#08x}, "
|
||||
"priority={:#08x}, core_id={:#08x}",
|
||||
entry_point, arg, stack_bottom, priority, core_id);
|
||||
|
||||
// Adjust core id, if it's the default magic.
|
||||
@@ -85,7 +85,7 @@ Result CreateThread(Core::System& system, Handle* out_handle, u64 entry_point, u
|
||||
|
||||
/// Starts the thread for the provided handle
|
||||
Result StartThread(Core::System& system, Handle thread_handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called thread=0x{:08X}", thread_handle);
|
||||
LOG_DEBUG(Kernel_SVC, "called thread={:#08x}", thread_handle);
|
||||
|
||||
// Get the thread from its handle.
|
||||
KScopedAutoObject thread = GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject<KThread>(system.Kernel(), thread_handle);
|
||||
@@ -143,7 +143,7 @@ void SleepThread(Core::System& system, s64 ns) {
|
||||
|
||||
/// Gets the thread context
|
||||
Result GetThreadContext3(Core::System& system, u64 out_context, Handle thread_handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called, out_context=0x{:08X}, thread_handle={:#X}", out_context, thread_handle);
|
||||
LOG_DEBUG(Kernel_SVC, "called, out_context={:#08x}, thread_handle={:#x}", out_context, thread_handle);
|
||||
|
||||
// Get the thread from its handle.
|
||||
KScopedAutoObject thread = GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject<KThread>(system.Kernel(), thread_handle);
|
||||
@@ -202,7 +202,7 @@ Result GetThreadList(Core::System& system, s32* out_num_threads, u64 out_thread_
|
||||
// TODO: Handle this case when debug events are supported.
|
||||
UNIMPLEMENTED_IF(debug_handle != InvalidHandle);
|
||||
|
||||
LOG_DEBUG(Kernel_SVC, "called. out_thread_ids=0x{:016X}, out_thread_ids_size={}",
|
||||
LOG_DEBUG(Kernel_SVC, "called. out_thread_ids={:#016x}, out_thread_ids_size={}",
|
||||
out_thread_ids, out_thread_ids_size);
|
||||
|
||||
// If the size is negative or larger than INT32_MAX / sizeof(u64)
|
||||
@@ -217,7 +217,7 @@ Result GetThreadList(Core::System& system, s32* out_num_threads, u64 out_thread_
|
||||
|
||||
if (out_thread_ids_size > 0 &&
|
||||
!current_process->GetPageTable().Contains(out_thread_ids, total_copy_size)) {
|
||||
LOG_ERROR(Kernel_SVC, "Address range outside address space. begin=0x{:016X}, end=0x{:016X}",
|
||||
LOG_ERROR(Kernel_SVC, "Address range outside address space. begin={:#016x}, end={:#016x}",
|
||||
out_thread_ids, out_thread_ids + total_copy_size);
|
||||
R_THROW(ResultInvalidCurrentMemory);
|
||||
}
|
||||
@@ -239,7 +239,7 @@ Result GetThreadList(Core::System& system, s32* out_num_threads, u64 out_thread_
|
||||
|
||||
Result GetThreadCoreMask(Core::System& system, s32* out_core_id, u64* out_affinity_mask,
|
||||
Handle thread_handle) {
|
||||
LOG_TRACE(Kernel_SVC, "called, handle=0x{:08X}", thread_handle);
|
||||
LOG_TRACE(Kernel_SVC, "called, handle={:#08x}", thread_handle);
|
||||
|
||||
// Get the thread from its handle.
|
||||
KScopedAutoObject thread = GetCurrentProcess(system.Kernel()).GetHandleTable().GetObject<KThread>(system.Kernel(), thread_handle);
|
||||
|
||||
@@ -88,7 +88,7 @@ Result IAudioRenderer::RequestUpdateAuto(
|
||||
|
||||
const auto result = impl->RequestUpdate(input, out_performance_buffer, out_buffer);
|
||||
if (result.IsFailure()) {
|
||||
LOG_ERROR(Service_Audio, "RequestUpdate failed error 0x{:02X}!", result.GetDescription());
|
||||
LOG_ERROR(Service_Audio, "RequestUpdate failed error {:#02x}!", result.GetDescription());
|
||||
}
|
||||
|
||||
R_RETURN(result);
|
||||
|
||||
@@ -76,7 +76,7 @@ Result IAlbumAccessorService::GetAlbumFileList(
|
||||
}
|
||||
|
||||
Result IAlbumAccessorService::DeleteAlbumFile(AlbumFileId file_id) {
|
||||
LOG_INFO(Service_Capture, "called, application_id=0x{:0x}, storage={}, type={}",
|
||||
LOG_INFO(Service_Capture, "called, application_id={:#0x}, storage={}, type={}",
|
||||
file_id.application_id, file_id.storage, file_id.type);
|
||||
|
||||
const Result result = manager->DeleteAlbumFile(file_id);
|
||||
@@ -120,7 +120,7 @@ Result IAlbumAccessorService::LoadAlbumScreenShotImageEx1(
|
||||
OutLargeData<LoadAlbumScreenShotImageOutput, BufferAttr_HipcMapAlias> out_image_output,
|
||||
OutArray<u8, BufferAttr_HipcMapAlias | BufferAttr_HipcMapTransferAllowsNonSecure> out_image,
|
||||
OutArray<u8, BufferAttr_HipcMapAlias> out_buffer) {
|
||||
LOG_INFO(Service_Capture, "called, application_id=0x{:0x}, storage={}, type={}, flags={}",
|
||||
LOG_INFO(Service_Capture, "called, application_id={:#0x}, storage={}, type={}, flags={}",
|
||||
file_id.application_id, file_id.storage, file_id.type, decoder_options.flags);
|
||||
|
||||
const Result result =
|
||||
@@ -133,7 +133,7 @@ Result IAlbumAccessorService::LoadAlbumScreenShotThumbnailImageEx1(
|
||||
OutLargeData<LoadAlbumScreenShotImageOutput, BufferAttr_HipcMapAlias> out_image_output,
|
||||
OutArray<u8, BufferAttr_HipcMapAlias | BufferAttr_HipcMapTransferAllowsNonSecure> out_image,
|
||||
OutArray<u8, BufferAttr_HipcMapAlias> out_buffer) {
|
||||
LOG_INFO(Service_Capture, "called, application_id=0x{:0x}, storage={}, type={}, flags={}",
|
||||
LOG_INFO(Service_Capture, "called, application_id={:#0x}, storage={}, type={}, flags={}",
|
||||
file_id.application_id, file_id.storage, file_id.type, decoder_options.flags);
|
||||
|
||||
const Result result = manager->LoadAlbumScreenShotThumbnail(*out_image_output, out_image,
|
||||
|
||||
@@ -444,7 +444,7 @@ void CmifReplyWrapImpl(HLERequestContext& ctx, T& t, Result (T::*f)(A...)) {
|
||||
const bool is_domain = mgr ? mgr->IsDomain() : false;
|
||||
ASSERT_MSG(!is_domain,
|
||||
"Non-domain reply used on domain session\n"
|
||||
"Service={} (TIPC={} CmdType={} Cmd=0x{:08X}\n"
|
||||
"Service={} (TIPC={} CmdType={} Cmd={:#08x}\n"
|
||||
"HasDomainHeader={} DomainHandlers={}\nDesc={}",
|
||||
t.GetServiceName(), ctx.IsTipc(),
|
||||
u32(ctx.GetCommandType()), u32(ctx.GetCommand()),
|
||||
|
||||
@@ -71,9 +71,9 @@ static void GenerateErrorReport(Core::System& system, Result error_code, const F
|
||||
std::string crash_report = fmt::format(
|
||||
"Eden {}-{} crash report\n"
|
||||
"Title ID: {:016x}\n"
|
||||
"Result: {:#X} ({:04}-{:04d})\n"
|
||||
"Set flags: 0x{:16X}\n"
|
||||
"Program entry point: 0x{:16X}\n"
|
||||
"Result: {:#x} ({:04}-{:04d})\n"
|
||||
"Set flags: {:#16X}\n"
|
||||
"Program entry point: {:#16X}\n"
|
||||
"\n",
|
||||
Common::g_scm_branch, Common::g_scm_desc, title_id, error_code.raw,
|
||||
2000 + static_cast<u32>(error_code.GetModule()),
|
||||
@@ -98,7 +98,7 @@ static void GenerateErrorReport(Core::System& system, Result error_code, const F
|
||||
}
|
||||
|
||||
crash_report += fmt::format("Architecture: {}\n", info.ArchAsString());
|
||||
crash_report += fmt::format("Unknown 10: 0x{:016x}\n", info.unk10);
|
||||
crash_report += fmt::format("Unknown 10: {:#016x}\n", info.unk10);
|
||||
}
|
||||
|
||||
LOG_ERROR(Service_Fatal, "{}", crash_report);
|
||||
@@ -111,7 +111,7 @@ static void GenerateErrorReport(Core::System& system, Result error_code, const F
|
||||
|
||||
static void ThrowFatalError(Core::System& system, Result error_code, FatalType fatal_type,
|
||||
const FatalInfo& info) {
|
||||
LOG_ERROR(Service_Fatal, "Threw fatal error type {} with error code {:#X}", fatal_type,
|
||||
LOG_ERROR(Service_Fatal, "Threw fatal error type {} with error code {:#x}", fatal_type,
|
||||
error_code.raw);
|
||||
|
||||
switch (fatal_type) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -30,7 +30,7 @@ Result IFile::Read(
|
||||
FileSys::ReadOption option, Out<s64> out_size, s64 offset,
|
||||
const OutBuffer<BufferAttr_HipcMapAlias | BufferAttr_HipcMapTransferAllowsNonSecure> out_buffer,
|
||||
s64 size) {
|
||||
LOG_DEBUG(Service_FS, "called, option={}, offset={:#X}, length={}", option.value, offset,
|
||||
LOG_DEBUG(Service_FS, "called, option={}, offset={:#x}, length={}", option.value, offset,
|
||||
size);
|
||||
|
||||
// Read the data from the Storage backend
|
||||
@@ -41,7 +41,7 @@ Result IFile::Read(
|
||||
Result IFile::Write(
|
||||
const InBuffer<BufferAttr_HipcMapAlias | BufferAttr_HipcMapTransferAllowsNonSecure> buffer,
|
||||
FileSys::WriteOption option, s64 offset, s64 size) {
|
||||
LOG_DEBUG(Service_FS, "called, option={}, offset={:#X}, length={}", option.value, offset,
|
||||
LOG_DEBUG(Service_FS, "called, option={}, offset={:#x}, length={}", option.value, offset,
|
||||
size);
|
||||
|
||||
R_RETURN(backend->Write(offset, buffer.data(), size, option));
|
||||
|
||||
@@ -41,7 +41,7 @@ IFileSystem::IFileSystem(Core::System& system_, FileSys::VirtualDir dir_, SizeGe
|
||||
|
||||
Result IFileSystem::CreateFile(const InLargeData<FileSys::Sf::Path, BufferAttr_HipcPointer> path,
|
||||
s32 option, s64 size) {
|
||||
LOG_DEBUG(Service_FS, "called. file={}, option={:#X}, size=0x{:08X}", path->str, option, size);
|
||||
LOG_DEBUG(Service_FS, "called. file={}, option={:#x}, size={:#08x}", path->str, option, size);
|
||||
|
||||
R_RETURN(backend->CreateFile(FileSys::Path(path->str), size));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
@@ -26,7 +26,7 @@ IStorage::IStorage(Core::System& system_, FileSys::VirtualFile backend_)
|
||||
Result IStorage::Read(
|
||||
OutBuffer<BufferAttr_HipcMapAlias | BufferAttr_HipcMapTransferAllowsNonSecure> out_bytes,
|
||||
s64 offset, s64 length) {
|
||||
LOG_DEBUG(Service_FS, "called, offset={:#X}, length={}", offset, length);
|
||||
LOG_DEBUG(Service_FS, "called, offset={:#x}, length={}", offset, length);
|
||||
|
||||
R_UNLESS(length >= 0, FileSys::ResultInvalidSize);
|
||||
R_UNLESS(offset >= 0, FileSys::ResultInvalidOffset);
|
||||
|
||||
@@ -190,7 +190,7 @@ FSP_SRV::~FSP_SRV() = default;
|
||||
Result FSP_SRV::SetCurrentProcess(ClientProcessId pid) {
|
||||
current_process_id = *pid;
|
||||
|
||||
LOG_DEBUG(Service_FS, "called. current_process_id=0x{:016X}", current_process_id);
|
||||
LOG_DEBUG(Service_FS, "called. current_process_id={:#016x}", current_process_id);
|
||||
|
||||
R_RETURN(
|
||||
fsc.OpenProcess(&program_id, &save_data_controller, &romfs_controller, current_process_id));
|
||||
|
||||
@@ -30,7 +30,7 @@ Result IAppletResource::GetSharedMemoryHandle(
|
||||
OutCopyHandle<Kernel::KSharedMemory> out_shared_memory_handle) {
|
||||
const auto result = resource_manager->GetSharedMemoryHandle(out_shared_memory_handle, aruid);
|
||||
|
||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}, result={:#X}", aruid, result.raw);
|
||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}, result={:#x}", aruid, result.raw);
|
||||
R_RETURN(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ Result IHidServer::CreateAppletResource(OutInterface<IAppletResource> out_applet
|
||||
ClientAppletResourceUserId aruid) {
|
||||
const auto result = GetResourceManager()->CreateAppletResource(aruid.pid);
|
||||
|
||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}, result={:#X}", aruid.pid,
|
||||
LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}, result={:#x}", aruid.pid,
|
||||
result.raw);
|
||||
|
||||
*out_applet_resource = std::make_shared<IAppletResource>(system, resource_manager, aruid.pid);
|
||||
@@ -1150,7 +1150,7 @@ Result IHidServer::InitializeSevenSixAxisSensor(ClientAppletResourceUserId aruid
|
||||
InCopyHandle<Kernel::KTransferMemory> t_mem_1,
|
||||
InCopyHandle<Kernel::KTransferMemory> t_mem_2) {
|
||||
LOG_WARNING(Service_HID,
|
||||
"called, t_mem_1_size=0x{:08X}, t_mem_2_size=0x{:08X}, "
|
||||
"called, t_mem_1_size={:#08x}, t_mem_2_size={:#08x}, "
|
||||
"applet_resource_user_id={}",
|
||||
t_mem_1_size, t_mem_2_size, aruid.pid);
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ Result SessionRequestManager::HandleDomainSyncRequest(Kernel::KServerSession* se
|
||||
}
|
||||
|
||||
case IPC::DomainMessageHeader::CommandType::CloseVirtualHandle: {
|
||||
LOG_DEBUG(IPC, "CloseVirtualHandle, object_id=0x{:08X}", object_id);
|
||||
LOG_DEBUG(IPC, "CloseVirtualHandle, object_id={:#08x}", object_id);
|
||||
|
||||
this->CloseDomainHandler(object_id - 1);
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
if (boost::icl::contains(mapped_ranges, vaddr)) {
|
||||
memory.ReadBlock(vaddr, &ret, sizeof(T));
|
||||
} else if (vaddr + sizeof(T) > local_memory.size()) {
|
||||
LOG_CRITICAL(Service_JIT, "plugin: unmapped read @ 0x{:016x}", vaddr);
|
||||
LOG_CRITICAL(Service_JIT, "plugin: unmapped read @ {:#016x}", vaddr);
|
||||
} else {
|
||||
std::memcpy(&ret, local_memory.data() + vaddr, sizeof(T));
|
||||
}
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
if (boost::icl::contains(mapped_ranges, vaddr)) {
|
||||
memory.WriteBlock(vaddr, &value, sizeof(T));
|
||||
} else if (vaddr + sizeof(T) > local_memory.size()) {
|
||||
LOG_CRITICAL(Service_JIT, "plugin: unmapped write @ 0x{:016x}", vaddr);
|
||||
LOG_CRITICAL(Service_JIT, "plugin: unmapped write @ {:#016x}", vaddr);
|
||||
} else {
|
||||
std::memcpy(local_memory.data() + vaddr, &value, sizeof(T));
|
||||
}
|
||||
@@ -416,7 +416,7 @@ void DynarmicCallbacks64::CallSVC(u32 swi) {
|
||||
LOG_CRITICAL(Service_JIT, "plugin panicked!");
|
||||
parent.jit->HaltExecution();
|
||||
} else {
|
||||
LOG_CRITICAL(Service_JIT, "plugin issued syscall at unknown address 0x{:x}", pc);
|
||||
LOG_CRITICAL(Service_JIT, "plugin issued syscall at unknown address {:#x}", pc);
|
||||
parent.jit->HaltExecution();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ Result DatabaseManager::Initialize(DatabaseSessionMetadata& metadata, bool& is_d
|
||||
const auto result = database.CheckIntegrity();
|
||||
|
||||
if (result.IsError()) {
|
||||
LOG_ERROR(Service_Mii, "Mii database is corrupted 0x{:0x}", result.raw);
|
||||
LOG_ERROR(Service_Mii, "Mii database is corrupted {:#0x}", result.raw);
|
||||
database.CleanDatabase();
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ void nvhost_as_gpu::OnOpen(NvCore::SessionId session_id, DeviceFD fd) {}
|
||||
void nvhost_as_gpu::OnClose(DeviceFD fd) {}
|
||||
|
||||
NvResult nvhost_as_gpu::AllocAsEx(IoctlAllocAsEx& params) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, big_page_size={:#X}", params.big_page_size);
|
||||
LOG_DEBUG(Service_NVDRV, "called, big_page_size={:#x}", params.big_page_size);
|
||||
|
||||
std::scoped_lock lock(mutex);
|
||||
|
||||
@@ -105,12 +105,12 @@ NvResult nvhost_as_gpu::AllocAsEx(IoctlAllocAsEx& params) {
|
||||
|
||||
if (params.big_page_size) {
|
||||
if (!std::has_single_bit(params.big_page_size)) {
|
||||
LOG_ERROR(Service_NVDRV, "Non power-of-2 big page size: {:#X}!", params.big_page_size);
|
||||
LOG_ERROR(Service_NVDRV, "Non power-of-2 big page size: {:#x}!", params.big_page_size);
|
||||
return NvResult::BadValue;
|
||||
}
|
||||
|
||||
if ((params.big_page_size & VM::SUPPORTED_BIG_PAGE_SIZES) == 0) {
|
||||
LOG_ERROR(Service_NVDRV, "Unsupported big page size: {:#X}!", params.big_page_size);
|
||||
LOG_ERROR(Service_NVDRV, "Unsupported big page size: {:#x}!", params.big_page_size);
|
||||
return NvResult::BadValue;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ NvResult nvhost_as_gpu::FreeSpace(IoctlFreeSpace& params) {
|
||||
}
|
||||
|
||||
NvResult nvhost_as_gpu::Remap(std::span<IoctlRemapEntry> entries) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, num_entries={:#X}", entries.size());
|
||||
LOG_DEBUG(Service_NVDRV, "called, num_entries={:#x}", entries.size());
|
||||
|
||||
if (!vm.initialised) {
|
||||
return NvResult::BadValue;
|
||||
@@ -300,7 +300,7 @@ NvResult nvhost_as_gpu::Remap(std::span<IoctlRemapEntry> entries) {
|
||||
NvResult nvhost_as_gpu::MapBufferEx(IoctlMapBufferEx& params) {
|
||||
LOG_DEBUG(Service_NVDRV,
|
||||
"called, flags={:X}, nvmap_handle={:X}, buffer_offset={}, mapping_size={}"
|
||||
", offset={:#X}",
|
||||
", offset={:#x}",
|
||||
params.flags, params.handle, params.buffer_offset, params.mapping_size,
|
||||
params.offset);
|
||||
|
||||
@@ -315,7 +315,7 @@ NvResult nvhost_as_gpu::MapBufferEx(IoctlMapBufferEx& params) {
|
||||
if (auto const it = mapping_map.find(params.offset); it != mapping_map.end()) {
|
||||
auto const mapping = it->second;
|
||||
if (mapping.size < params.mapping_size) {
|
||||
LOG_WARNING(Service_NVDRV, "Cannot remap a partially mapped GPU address space region: {:#X}", params.offset);
|
||||
LOG_WARNING(Service_NVDRV, "Cannot remap a partially mapped GPU address space region: {:#x}", params.offset);
|
||||
return NvResult::BadValue;
|
||||
}
|
||||
u64 gpu_address = u64(params.offset + params.buffer_offset);
|
||||
@@ -323,7 +323,7 @@ NvResult nvhost_as_gpu::MapBufferEx(IoctlMapBufferEx& params) {
|
||||
gmmu->Map(gpu_address, device_address, params.mapping_size, Tegra::PTEKind(params.kind), mapping.big_page);
|
||||
return NvResult::Success;
|
||||
} else {
|
||||
LOG_WARNING(Service_NVDRV, "Cannot remap an unmapped GPU address space region: {:#X}", params.offset);
|
||||
LOG_WARNING(Service_NVDRV, "Cannot remap an unmapped GPU address space region: {:#x}", params.offset);
|
||||
return NvResult::BadValue;
|
||||
}
|
||||
}
|
||||
@@ -383,7 +383,7 @@ NvResult nvhost_as_gpu::MapBufferEx(IoctlMapBufferEx& params) {
|
||||
NvResult nvhost_as_gpu::UnmapBuffer(IoctlUnmapBuffer& params) {
|
||||
std::scoped_lock lock(mutex);
|
||||
if (auto const offset_it = map_buffer_offsets.find(params.offset); offset_it != map_buffer_offsets.end()) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, offset={:#X}", params.offset);
|
||||
LOG_DEBUG(Service_NVDRV, "called, offset={:#x}", params.offset);
|
||||
if (!vm.initialised) {
|
||||
return NvResult::BadValue;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ NvResult nvhost_ctrl_gpu::GetCharacteristics3(
|
||||
}
|
||||
|
||||
NvResult nvhost_ctrl_gpu::GetTPCMasks1(IoctlGpuGetTpcMasksArgs& params) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, mask_buffer_size={:#X}", params.mask_buffer_size);
|
||||
LOG_DEBUG(Service_NVDRV, "called, mask_buffer_size={:#x}", params.mask_buffer_size);
|
||||
if (params.mask_buffer_size != 0) {
|
||||
params.tcp_mask = 3;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ NvResult nvhost_ctrl_gpu::GetTPCMasks1(IoctlGpuGetTpcMasksArgs& params) {
|
||||
}
|
||||
|
||||
NvResult nvhost_ctrl_gpu::GetTPCMasks3(IoctlGpuGetTpcMasksArgs& params, std::span<u32> tpc_mask) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, mask_buffer_size={:#X}", params.mask_buffer_size);
|
||||
LOG_DEBUG(Service_NVDRV, "called, mask_buffer_size={:#x}", params.mask_buffer_size);
|
||||
if (params.mask_buffer_size != 0) {
|
||||
params.tcp_mask = 3;
|
||||
}
|
||||
@@ -265,7 +265,7 @@ NvResult nvhost_ctrl_gpu::ZCullGetInfo(IoctlNvgpuGpuZcullGetInfoArgs& params) {
|
||||
|
||||
NvResult nvhost_ctrl_gpu::ZBCSetTable(IoctlZbcSetTable& params) {
|
||||
if (params.type > supported_types) {
|
||||
LOG_ERROR(Service_NVDRV, "ZBCSetTable: invalid type {:#X}", params.type);
|
||||
LOG_ERROR(Service_NVDRV, "ZBCSetTable: invalid type {:#x}", params.type);
|
||||
return NvResult::BadParameter;
|
||||
}
|
||||
|
||||
@@ -288,11 +288,11 @@ NvResult nvhost_ctrl_gpu::ZBCSetTable(IoctlZbcSetTable& params) {
|
||||
|
||||
if (color_it != zbc_colors.end()) {
|
||||
++color_it->ref_cnt;
|
||||
LOG_DEBUG(Service_NVDRV, "ZBCSetTable: reused color entry fmt={:#X}, ref_cnt={:#X}",
|
||||
LOG_DEBUG(Service_NVDRV, "ZBCSetTable: reused color entry fmt={:#x}, ref_cnt={:#x}",
|
||||
params.format, color_it->ref_cnt);
|
||||
} else {
|
||||
zbc_colors.push_back(color_entry);
|
||||
LOG_DEBUG(Service_NVDRV, "ZBCSetTable: added color entry fmt={:#X}, index={:#X}",
|
||||
LOG_DEBUG(Service_NVDRV, "ZBCSetTable: added color entry fmt={:#x}, index={:#x}",
|
||||
params.format, zbc_colors.size() - 1);
|
||||
}
|
||||
break;
|
||||
@@ -308,11 +308,11 @@ NvResult nvhost_ctrl_gpu::ZBCSetTable(IoctlZbcSetTable& params) {
|
||||
|
||||
if (depth_it != zbc_depths.end()) {
|
||||
++depth_it->ref_cnt;
|
||||
LOG_DEBUG(Service_NVDRV, "ZBCSetTable: reused depth entry fmt={:#X}, ref_cnt={:#X}",
|
||||
LOG_DEBUG(Service_NVDRV, "ZBCSetTable: reused depth entry fmt={:#x}, ref_cnt={:#x}",
|
||||
depth_entry.format, depth_it->ref_cnt);
|
||||
} else {
|
||||
zbc_depths.push_back(depth_entry);
|
||||
LOG_DEBUG(Service_NVDRV, "ZBCSetTable: added depth entry fmt={:#X}, index={:#X}",
|
||||
LOG_DEBUG(Service_NVDRV, "ZBCSetTable: added depth entry fmt={:#x}, index={:#x}",
|
||||
depth_entry.format, zbc_depths.size() - 1);
|
||||
}
|
||||
}
|
||||
@@ -323,7 +323,7 @@ NvResult nvhost_ctrl_gpu::ZBCSetTable(IoctlZbcSetTable& params) {
|
||||
|
||||
NvResult nvhost_ctrl_gpu::ZBCQueryTable(IoctlZbcQueryTable& params) {
|
||||
if (params.type > supported_types) {
|
||||
LOG_ERROR(Service_NVDRV, "ZBCQueryTable: invalid type {:#X}", params.type);
|
||||
LOG_ERROR(Service_NVDRV, "ZBCQueryTable: invalid type {:#x}", params.type);
|
||||
return NvResult::BadParameter;
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ NvResult nvhost_ctrl_gpu::ZBCQueryTable(IoctlZbcQueryTable& params) {
|
||||
switch (static_cast<ZBCTypes>(params.type)) {
|
||||
case ZBCTypes::color: {
|
||||
if (params.index_size >= zbc_colors.size()) {
|
||||
LOG_ERROR(Service_NVDRV, "ZBCQueryTable: invalid color index {:#X}", params.index_size);
|
||||
LOG_ERROR(Service_NVDRV, "ZBCQueryTable: invalid color index {:#x}", params.index_size);
|
||||
return NvResult::BadParameter;
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ NvResult nvhost_ctrl_gpu::ZBCQueryTable(IoctlZbcQueryTable& params) {
|
||||
}
|
||||
case ZBCTypes::depth: {
|
||||
if (params.index_size >= zbc_depths.size()) {
|
||||
LOG_ERROR(Service_NVDRV, "ZBCQueryTable: invalid depth index {:#X}", params.index_size);
|
||||
LOG_ERROR(Service_NVDRV, "ZBCQueryTable: invalid depth index {:#x}", params.index_size);
|
||||
return NvResult::BadParameter;
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ NvResult nvhost_ctrl_gpu::ZBCQueryTable(IoctlZbcQueryTable& params) {
|
||||
}
|
||||
|
||||
NvResult nvhost_ctrl_gpu::FlushL2(IoctlFlushL2& params) {
|
||||
LOG_DEBUG(Service_NVDRV, "called {:#X}", params.flush);
|
||||
LOG_DEBUG(Service_NVDRV, "called {:#x}", params.flush);
|
||||
// if ((params.flush & 0x01) != 0) //l2 flush
|
||||
// /* we dont emulate l2 */;
|
||||
// if ((params.flush & 0x04) != 0) //fb flush
|
||||
|
||||
@@ -259,7 +259,7 @@ s32_le nvhost_gpu::GetObjectContextClassNumberIndex(CtxClasses class_number) {
|
||||
}
|
||||
|
||||
NvResult nvhost_gpu::AllocateObjectContext(IoctlAllocObjCtx& params) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, class_num={:#X}, flags={:#X}, obj_id={:#X}", params.class_num,
|
||||
LOG_DEBUG(Service_NVDRV, "called, class_num={:#x}, flags={:#x}, obj_id={:#x}", params.class_num,
|
||||
params.flags, params.obj_id);
|
||||
|
||||
// Do not require channel initialization here: some clients allocate contexts before binding.
|
||||
@@ -271,7 +271,7 @@ NvResult nvhost_gpu::AllocateObjectContext(IoctlAllocObjCtx& params) {
|
||||
std::scoped_lock lk(channel_mutex);
|
||||
|
||||
if (params.flags) {
|
||||
LOG_WARNING(Service_NVDRV, "non-zero flags={:#X} for class={:#X}", params.flags,
|
||||
LOG_WARNING(Service_NVDRV, "non-zero flags={:#x} for class={:#x}", params.flags,
|
||||
params.class_num);
|
||||
|
||||
constexpr u32 allowed_mask{};
|
||||
@@ -281,13 +281,13 @@ NvResult nvhost_gpu::AllocateObjectContext(IoctlAllocObjCtx& params) {
|
||||
s32_le ctx_class_number_index =
|
||||
GetObjectContextClassNumberIndex(static_cast<CtxClasses>(params.class_num));
|
||||
if (ctx_class_number_index < 0) {
|
||||
LOG_ERROR(Service_NVDRV, "Invalid class number for object context: {:#X}",
|
||||
LOG_ERROR(Service_NVDRV, "Invalid class number for object context: {:#x}",
|
||||
params.class_num);
|
||||
return NvResult::BadParameter;
|
||||
}
|
||||
|
||||
if (ctxObjs[ctx_class_number_index].has_value()) {
|
||||
LOG_WARNING(Service_NVDRV, "Object context for class {:#X} already allocated on this channel",
|
||||
LOG_WARNING(Service_NVDRV, "Object context for class {:#x} already allocated on this channel",
|
||||
params.class_num);
|
||||
return NvResult::AlreadyAllocated;
|
||||
}
|
||||
@@ -420,20 +420,20 @@ NvResult nvhost_gpu::SubmitGPFIFOBase2(IoctlSubmitGpfifo& params,
|
||||
}
|
||||
|
||||
NvResult nvhost_gpu::GetWaitbase(IoctlGetWaitbase& params) {
|
||||
LOG_INFO(Service_NVDRV, "called, unknown={:#X}", params.unknown);
|
||||
LOG_INFO(Service_NVDRV, "called, unknown={:#x}", params.unknown);
|
||||
|
||||
params.value = 0; // Seems to be hard coded at 0
|
||||
return NvResult::Success;
|
||||
}
|
||||
|
||||
NvResult nvhost_gpu::ChannelSetTimeout(IoctlChannelSetTimeout& params) {
|
||||
LOG_INFO(Service_NVDRV, "called, timeout={:#X}", params.timeout);
|
||||
LOG_INFO(Service_NVDRV, "called, timeout={:#x}", params.timeout);
|
||||
|
||||
return NvResult::Success;
|
||||
}
|
||||
|
||||
NvResult nvhost_gpu::ChannelSetTimeslice(IoctlSetTimeslice& params) {
|
||||
LOG_INFO(Service_NVDRV, "called, timeslice={:#X}", params.timeslice);
|
||||
LOG_INFO(Service_NVDRV, "called, timeslice={:#x}", params.timeslice);
|
||||
|
||||
if (params.timeslice < 1000 || params.timeslice > 5000) {
|
||||
return NvResult::BadParameter;
|
||||
|
||||
@@ -81,7 +81,7 @@ void nvmap::OnClose(DeviceFD fd) {
|
||||
}
|
||||
|
||||
NvResult nvmap::IocCreate(IocCreateParams& params) {
|
||||
LOG_DEBUG(Service_NVDRV, "called, size=0x{:08X}", params.size);
|
||||
LOG_DEBUG(Service_NVDRV, "called, size={:#08x}", params.size);
|
||||
|
||||
std::shared_ptr<NvCore::NvMap::Handle> handle_description{};
|
||||
auto result =
|
||||
@@ -92,7 +92,7 @@ NvResult nvmap::IocCreate(IocCreateParams& params) {
|
||||
}
|
||||
handle_description->orig_size = params.size; // Orig size is the unaligned size
|
||||
params.handle = handle_description->id;
|
||||
LOG_DEBUG(Service_NVDRV, "handle: {}, size: {:#X}", handle_description->id, params.size);
|
||||
LOG_DEBUG(Service_NVDRV, "handle: {}, size: {:#x}", handle_description->id, params.size);
|
||||
|
||||
return NvResult::Success;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ void NVDRV::Ioctl1(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto fd = rp.Pop<DeviceFD>();
|
||||
const auto command = rp.PopRaw<Ioctl>();
|
||||
LOG_DEBUG(Service_NVDRV, "called fd={}, ioctl=0x{:08X}", fd, command.raw);
|
||||
LOG_DEBUG(Service_NVDRV, "called fd={}, ioctl={:#08x}", fd, command.raw);
|
||||
|
||||
if (!is_initialized) {
|
||||
ServiceError(ctx, NvResult::NotInitialized);
|
||||
@@ -85,7 +85,7 @@ void NVDRV::Ioctl2(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto fd = rp.Pop<DeviceFD>();
|
||||
const auto command = rp.PopRaw<Ioctl>();
|
||||
LOG_DEBUG(Service_NVDRV, "called fd={}, ioctl=0x{:08X}", fd, command.raw);
|
||||
LOG_DEBUG(Service_NVDRV, "called fd={}, ioctl={:#08x}", fd, command.raw);
|
||||
|
||||
if (!is_initialized) {
|
||||
ServiceError(ctx, NvResult::NotInitialized);
|
||||
@@ -112,7 +112,7 @@ void NVDRV::Ioctl3(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto fd = rp.Pop<DeviceFD>();
|
||||
const auto command = rp.PopRaw<Ioctl>();
|
||||
LOG_DEBUG(Service_NVDRV, "called fd={}, ioctl=0x{:08X}", fd, command.raw);
|
||||
LOG_DEBUG(Service_NVDRV, "called fd={}, ioctl={:#08x}", fd, command.raw);
|
||||
|
||||
if (!is_initialized) {
|
||||
ServiceError(ctx, NvResult::NotInitialized);
|
||||
@@ -212,7 +212,7 @@ void NVDRV::QueryEvent(HLERequestContext& ctx) {
|
||||
void NVDRV::SetAruid(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
pid = rp.Pop<u64>();
|
||||
LOG_WARNING(Service_NVDRV, "(STUBBED) called, pid={:#X}", pid);
|
||||
LOG_WARNING(Service_NVDRV, "(STUBBED) called, pid={:#x}", pid);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
|
||||
@@ -91,7 +91,7 @@ Result SteadyClock::IsRtcResetDetected(Out<bool> out_is_detected) {
|
||||
|
||||
Result SteadyClock::GetSetupResultValue(Out<Result> out_result) {
|
||||
SCOPE_EXIT {
|
||||
LOG_DEBUG(Service_Time, "called. out_result={:#X}", out_result->raw);
|
||||
LOG_DEBUG(Service_Time, "called. out_result={:#x}", out_result->raw);
|
||||
};
|
||||
|
||||
R_UNLESS(m_can_write_uninitialized_clock || m_clock_core.IsInitialized(),
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Service {
|
||||
int num_params = (cmd_buf[0] & 0x3F) + ((cmd_buf[0] >> 6) & 0x3F);
|
||||
std::string function_string = fmt::format("fn '{}': port={}", name, port_name);
|
||||
for (int i = 1; i <= num_params; ++i)
|
||||
function_string += fmt::format(", cmd_buf[{}]={:#X}", i, cmd_buf[i]);
|
||||
function_string += fmt::format(", cmd_buf[{}]={:#x}", i, cmd_buf[i]);
|
||||
return function_string;
|
||||
}
|
||||
|
||||
@@ -62,9 +62,9 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx,
|
||||
std::string function_name = info == nullptr ? "<unknown>" : info->name;
|
||||
|
||||
fmt::memory_buffer buf;
|
||||
fmt::format_to(std::back_inserter(buf), "function '{}({})': port='{}' cmd_buf={{[0]={:#X}", ctx.GetCommand(), function_name, service_name, cmd_buf[0]);
|
||||
fmt::format_to(std::back_inserter(buf), "function '{}({})': port='{}' cmd_buf={{[0]={:#x}", ctx.GetCommand(), function_name, service_name, cmd_buf[0]);
|
||||
for (int i = 1; i <= 8; ++i)
|
||||
fmt::format_to(std::back_inserter(buf), ", [{}]={:#X}", i, cmd_buf[i]);
|
||||
fmt::format_to(std::back_inserter(buf), ", [{}]={:#x}", i, cmd_buf[i]);
|
||||
buf.push_back('}');
|
||||
|
||||
system.GetReporter().SaveUnimplementedFunctionReport(ctx, ctx.GetCommand(), function_name, service_name);
|
||||
|
||||
@@ -196,7 +196,7 @@ Result SM::GetServiceImpl(Kernel::KClientSession** out_client_session, HLEReques
|
||||
// Create a new session.
|
||||
Kernel::KClientSession* session{};
|
||||
if (const auto result = client_port->CreateSession(kernel, &session); result.IsError()) {
|
||||
LOG_ERROR(Service_SM, "called service={} -> error 0x{:08X}", name, result.raw);
|
||||
LOG_ERROR(Service_SM, "called service={} -> error {:#08x}", name, result.raw);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ void BSD::GetSockOpt(HLERequestContext& ctx) {
|
||||
|
||||
std::vector<u8> optval(ctx.GetWriteBufferSize());
|
||||
|
||||
LOG_DEBUG(Service, "called. fd={} level={} optname=0x{:x} len=0x{:x}", fd, level, optname,
|
||||
LOG_DEBUG(Service, "called. fd={} level={} optname={:#x} len={:#x}", fd, level, optname,
|
||||
optval.size());
|
||||
|
||||
const Errno err = GetSockOptImpl(fd, level, optname, optval);
|
||||
@@ -331,7 +331,7 @@ void BSD::SetSockOpt(HLERequestContext& ctx) {
|
||||
const OptName optname = static_cast<OptName>(rp.Pop<u32>());
|
||||
const auto optval = ctx.ReadBuffer();
|
||||
|
||||
LOG_DEBUG(Service, "called. fd={} level={} optname=0x{:x} optlen={}", fd, level,
|
||||
LOG_DEBUG(Service, "called. fd={} level={} optname={:#x} optlen={}", fd, level,
|
||||
static_cast<u32>(optname), optval.size());
|
||||
|
||||
BuildErrnoResponse(ctx, SetSockOptImpl(fd, level, optname, optval));
|
||||
@@ -354,7 +354,7 @@ void BSD::Recv(HLERequestContext& ctx) {
|
||||
const s32 fd = rp.Pop<s32>();
|
||||
const u32 flags = rp.Pop<u32>();
|
||||
|
||||
LOG_DEBUG(Service, "called. fd={} flags=0x{:x} len={}", fd, flags, ctx.GetWriteBufferSize());
|
||||
LOG_DEBUG(Service, "called. fd={} flags={:#x} len={}", fd, flags, ctx.GetWriteBufferSize());
|
||||
|
||||
ExecuteWork(ctx, RecvWork{
|
||||
.fd = fd,
|
||||
@@ -369,7 +369,7 @@ void BSD::RecvFrom(HLERequestContext& ctx) {
|
||||
const s32 fd = rp.Pop<s32>();
|
||||
const u32 flags = rp.Pop<u32>();
|
||||
|
||||
LOG_DEBUG(Service, "called. fd={} flags=0x{:x} len={} addrlen={}", fd, flags,
|
||||
LOG_DEBUG(Service, "called. fd={} flags={:#x} len={} addrlen={}", fd, flags,
|
||||
ctx.GetWriteBufferSize(0), ctx.GetWriteBufferSize(1));
|
||||
|
||||
ExecuteWork(ctx, RecvFromWork{
|
||||
@@ -386,7 +386,7 @@ void BSD::Send(HLERequestContext& ctx) {
|
||||
const s32 fd = rp.Pop<s32>();
|
||||
const u32 flags = rp.Pop<u32>();
|
||||
|
||||
LOG_DEBUG(Service, "called. fd={} flags=0x{:x} len={}", fd, flags, ctx.GetReadBufferSize());
|
||||
LOG_DEBUG(Service, "called. fd={} flags={:#x} len={}", fd, flags, ctx.GetReadBufferSize());
|
||||
|
||||
ExecuteWork(ctx, SendWork{
|
||||
.fd = fd,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
@@ -141,7 +141,7 @@ Result IApplicationDisplayService::GetDisplayResolution(Out<s64> out_width, Out<
|
||||
}
|
||||
|
||||
Result IApplicationDisplayService::SetLayerScalingMode(NintendoScaleMode scale_mode, u64 layer_id) {
|
||||
LOG_DEBUG(Service_VI, "called. scale_mode={}, unknown=0x{:016X}", scale_mode, layer_id);
|
||||
LOG_DEBUG(Service_VI, "called. scale_mode={}, unknown={:#016x}", scale_mode, layer_id);
|
||||
|
||||
if (scale_mode > NintendoScaleMode::PreserveAspectRatio) {
|
||||
LOG_ERROR(Service_VI, "Invalid scaling mode provided.");
|
||||
|
||||
@@ -652,13 +652,13 @@ short TranslatePollEvents(PollEvents events) {
|
||||
// Unlike poll on other OSes, WSAPoll will complain if any other flags are set on input.
|
||||
if (result & ~allowed_events) {
|
||||
LOG_DEBUG(Network,
|
||||
"Removing WSAPoll input events 0x{:x} because Windows doesn't support them",
|
||||
"Removing WSAPoll input events {:#x} because Windows doesn't support them",
|
||||
result & ~allowed_events);
|
||||
}
|
||||
result &= allowed_events;
|
||||
#endif
|
||||
|
||||
UNIMPLEMENTED_IF_MSG((u16)events != 0, "Unhandled guest events=0x{:x}", (u16)events);
|
||||
UNIMPLEMENTED_IF_MSG((u16)events != 0, "Unhandled guest events={:#x}", (u16)events);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -682,7 +682,7 @@ PollEvents TranslatePollRevents(short revents) {
|
||||
translate(POLLRDBAND, PollEvents::RdBand);
|
||||
translate(POLLWRBAND, PollEvents::WrBand);
|
||||
|
||||
UNIMPLEMENTED_IF_MSG(revents != 0, "Unhandled host revents=0x{:x}", revents);
|
||||
UNIMPLEMENTED_IF_MSG(revents != 0, "Unhandled host revents={:#x}", revents);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
|
||||
|
||||
next_load_addr = *tentative_next_load_addr;
|
||||
modules.insert_or_assign(load_addr, module);
|
||||
LOG_DEBUG(Loader, "loaded module {} @ {:#X}", module, load_addr);
|
||||
LOG_DEBUG(Loader, "loaded module {} @ {:#x}", module, load_addr);
|
||||
}
|
||||
|
||||
is_loaded = true;
|
||||
|
||||
@@ -99,7 +99,7 @@ AppLoader::LoadResult AppLoader_KIP::Load(Kernel::KProcess& process,
|
||||
const VAddr base_address = GetInteger(process.GetEntryPoint());
|
||||
process.LoadModule(system.Kernel(), std::move(codeset), base_address);
|
||||
|
||||
LOG_DEBUG(Loader, "loaded module {} @ {:#X}", kip->GetName(), base_address);
|
||||
LOG_DEBUG(Loader, "loaded module {} @ {:#x}", kip->GetName(), base_address);
|
||||
|
||||
is_loaded = true;
|
||||
return {ResultStatus::Success,
|
||||
|
||||
@@ -235,7 +235,7 @@ AppLoader_NSO::LoadResult AppLoader_NSO::Load(Kernel::KProcess& process, Core::S
|
||||
}
|
||||
|
||||
modules.insert_or_assign(base_address, file->GetName());
|
||||
LOG_DEBUG(Loader, "loaded module {} @ {:#X}", file->GetName(), base_address);
|
||||
LOG_DEBUG(Loader, "loaded module {} @ {:#x}", file->GetName(), base_address);
|
||||
|
||||
is_loaded = true;
|
||||
return {ResultStatus::Success, LoadParameters{Kernel::KThread::DefaultThreadPriority,
|
||||
|
||||
+10
-10
@@ -282,7 +282,7 @@ struct Memory::Impl {
|
||||
bool ReadBlockImpl(const Common::ProcessAddress addr, void* buffer, const std::size_t size, bool unsafe) {
|
||||
return WalkBlock(addr, size,
|
||||
[addr, size, &buffer](const std::size_t offset, const std::size_t copy_amount, const Common::ProcessAddress current_vaddr) {
|
||||
LOG_ERROR(HW_Memory, "Unmapped @ {:#016X} (start address = {:#016X}, size = {})", GetInteger(current_vaddr), GetInteger(addr), size);
|
||||
LOG_ERROR(HW_Memory, "Unmapped @ {:#016x} (start address = {:#016x}, size = {})", GetInteger(current_vaddr), GetInteger(addr), size);
|
||||
std::memset(reinterpret_cast<u8*>(buffer) + offset, 0, copy_amount);
|
||||
},
|
||||
[&](const std::size_t offset, const std::size_t copy_amount, const u8* const ptr) {
|
||||
@@ -306,7 +306,7 @@ struct Memory::Impl {
|
||||
bool WriteBlockImpl(const Common::ProcessAddress addr, const void* buffer, const std::size_t size, bool unsafe) {
|
||||
return WalkBlock(addr, size,
|
||||
[addr, size](const std::size_t offset, const std::size_t copy_amount, const Common::ProcessAddress current_vaddr) {
|
||||
LOG_ERROR(HW_Memory, "Unmapped @ 0x{:016X} (start address = 0x{:016X}, size = {})", GetInteger(current_vaddr), GetInteger(addr), size);
|
||||
LOG_ERROR(HW_Memory, "Unmapped @ {:#016x} (start address = {:#016x}, size = {})", GetInteger(current_vaddr), GetInteger(addr), size);
|
||||
},
|
||||
[&](const std::size_t offset, const std::size_t copy_amount, u8* const ptr) {
|
||||
std::memcpy(ptr, reinterpret_cast<u8 const*>(buffer) + offset, copy_amount);
|
||||
@@ -322,7 +322,7 @@ struct Memory::Impl {
|
||||
bool ZeroBlock(const Common::ProcessAddress addr, const std::size_t size) {
|
||||
return WalkBlock(addr, size,
|
||||
[addr, size](const std::size_t offset, const std::size_t copy_amount, const Common::ProcessAddress current_vaddr) {
|
||||
LOG_ERROR(HW_Memory, "Unmapped @ {:#016X} (start address = {:#016X}, size = {})", GetInteger(current_vaddr), GetInteger(addr), size);
|
||||
LOG_ERROR(HW_Memory, "Unmapped @ {:#016x} (start address = {:#016x}, size = {})", GetInteger(current_vaddr), GetInteger(addr), size);
|
||||
},
|
||||
[=](const std::size_t offset, const std::size_t copy_amount, u8* const ptr) {
|
||||
std::memset(ptr, 0, copy_amount);
|
||||
@@ -336,7 +336,7 @@ struct Memory::Impl {
|
||||
bool CopyBlock(Common::ProcessAddress dest_addr, Common::ProcessAddress src_addr, const std::size_t size) {
|
||||
return WalkBlock(dest_addr, size,
|
||||
[&](const std::size_t offset, const std::size_t copy_amount, const Common::ProcessAddress current_vaddr) {
|
||||
LOG_ERROR(HW_Memory, "Unmapped @ {:#016X} (start address = {:#016X}, size = {})", GetInteger(current_vaddr), GetInteger(src_addr), size);
|
||||
LOG_ERROR(HW_Memory, "Unmapped @ {:#016x} (start address = {:#016x}, size = {})", GetInteger(current_vaddr), GetInteger(src_addr), size);
|
||||
ZeroBlock(dest_addr + offset, copy_amount);
|
||||
},
|
||||
[&](const std::size_t offset, const std::size_t copy_amount, const u8* const ptr) {
|
||||
@@ -575,7 +575,7 @@ struct Memory::Impl {
|
||||
} else {
|
||||
switch (Common::PageTable::PageInfo::ExtractType(raw_pointer)) {
|
||||
case Common::PageType::Memory:
|
||||
ASSERT_MSG(false, "Mapped memory page without a pointer @ 0x{:016X}", vaddr);
|
||||
ASSERT_MSG(false, "Mapped memory page without a pointer @ {:#016x}", vaddr);
|
||||
return nullptr;
|
||||
case Common::PageType::DebugMemory:
|
||||
return GetPointerFromDebugMemory(vaddr);
|
||||
@@ -603,7 +603,7 @@ struct Memory::Impl {
|
||||
return GetPointerImpl(
|
||||
GetInteger(vaddr),
|
||||
[vaddr]() {
|
||||
LOG_ERROR(HW_Memory, "Unmapped GetPointer @ 0x{:016X}", GetInteger(vaddr));
|
||||
LOG_ERROR(HW_Memory, "Unmapped GetPointer @ {:#016x}", GetInteger(vaddr));
|
||||
},
|
||||
[]() {});
|
||||
}
|
||||
@@ -621,7 +621,7 @@ struct Memory::Impl {
|
||||
inline T Read(Common::ProcessAddress vaddr) noexcept requires(std::is_trivially_copyable_v<T>) {
|
||||
const u64 addr = GetInteger(vaddr);
|
||||
if (auto const ptr = GetPointerImpl(addr, [addr]() {
|
||||
LOG_ERROR(HW_Memory, "Unmapped Read{} @ 0x{:016X}", sizeof(T) * 8, addr);
|
||||
LOG_ERROR(HW_Memory, "Unmapped Read{} @ {:#016x}", sizeof(T) * 8, addr);
|
||||
}, [&]() {
|
||||
HandleRasterizerDownload(addr, sizeof(T));
|
||||
}); ptr) [[likely]] {
|
||||
@@ -642,7 +642,7 @@ struct Memory::Impl {
|
||||
inline void Write(Common::ProcessAddress vaddr, const T data) noexcept requires(std::is_trivially_copyable_v<T>) {
|
||||
const u64 addr = GetInteger(vaddr);
|
||||
if (auto const ptr = GetPointerImpl(addr, [addr, data]() {
|
||||
LOG_ERROR(HW_Memory, "Unmapped Write{} @ 0x{:016X} = 0x{:016X}", sizeof(T) * 8, addr, u64(data));
|
||||
LOG_ERROR(HW_Memory, "Unmapped Write{} @ {:#016x} = {:#016x}", sizeof(T) * 8, addr, u64(data));
|
||||
}, [&]() { HandleRasterizerWrite(addr, sizeof(T)); }); ptr) [[likely]]
|
||||
std::memcpy(ptr, &data, sizeof(T));
|
||||
}
|
||||
@@ -652,7 +652,7 @@ struct Memory::Impl {
|
||||
u8* const ptr = GetPointerImpl(
|
||||
GetInteger(vaddr),
|
||||
[vaddr, data]() {
|
||||
LOG_ERROR(HW_Memory, "Unmapped WriteExclusive{} @ 0x{:016X} = 0x{:016X}",
|
||||
LOG_ERROR(HW_Memory, "Unmapped WriteExclusive{} @ {:#016x} = {:#016x}",
|
||||
sizeof(T) * 8, GetInteger(vaddr), static_cast<u64>(data));
|
||||
},
|
||||
[&]() { HandleRasterizerWrite(GetInteger(vaddr), sizeof(T)); });
|
||||
@@ -666,7 +666,7 @@ struct Memory::Impl {
|
||||
u8* const ptr = GetPointerImpl(
|
||||
GetInteger(vaddr),
|
||||
[vaddr, data]() {
|
||||
LOG_ERROR(HW_Memory, "Unmapped WriteExclusive128 @ 0x{:016X} = 0x{:016X}{:016X}",
|
||||
LOG_ERROR(HW_Memory, "Unmapped WriteExclusive128 @ {:#016x} = {:#016x}{:016X}",
|
||||
GetInteger(vaddr), static_cast<u64>(data[1]), static_cast<u64>(data[0]));
|
||||
},
|
||||
[&]() { HandleRasterizerWrite(GetInteger(vaddr), sizeof(u128)); });
|
||||
|
||||
@@ -224,7 +224,7 @@ void ExecuteA32Instruction(u32 instruction) {
|
||||
fmt::print("value: ");
|
||||
if (const auto value = get_value()) {
|
||||
*(iter->second) = *value;
|
||||
fmt::print("> {} = 0x{:08x}\n", reg_name, *value);
|
||||
fmt::print("> {} = {:#08x}\n", reg_name, *value);
|
||||
}
|
||||
} else if (reg_name.starts_with("m")) {
|
||||
fmt::print("address: ");
|
||||
@@ -232,7 +232,7 @@ void ExecuteA32Instruction(u32 instruction) {
|
||||
fmt::print("value: ");
|
||||
if (const auto value = get_value()) {
|
||||
env.MemoryWrite32(*address, *value);
|
||||
fmt::print("> mem[0x{:08x}] = 0x{:08x}\n", *address, *value);
|
||||
fmt::print("> mem[{:#08x}] = {:#08x}\n", *address, *value);
|
||||
}
|
||||
}
|
||||
} else if (reg_name == "exit" || reg_name == "end" || reg_name.starts_with("q")) {
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
const std::array<QString, 4> row_data{{
|
||||
QString::fromStdString(filename),
|
||||
data(FileTypeRole).toString(),
|
||||
QString::fromStdString(fmt::format("0x{:016X}", data(ProgramIdRole).toULongLong())),
|
||||
QString::fromStdString(fmt::format("{:#016x}", data(ProgramIdRole).toULongLong())),
|
||||
data(TitleRole).toString(),
|
||||
}};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
@@ -46,7 +46,7 @@ Opcode Decode(u64 insn) {
|
||||
return Opcode::name;
|
||||
#include "maxwell.inc"
|
||||
#undef INST
|
||||
ASSERT_MSG(false, "Invalid insn 0x{:016x}", insn);
|
||||
ASSERT_MSG(false, "Invalid insn {:#016x}", insn);
|
||||
return Opcode::NOP;
|
||||
}
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ std::string DumpExpr(const Statement* stmt) {
|
||||
for (auto stmt = tree.begin(); stmt != tree.end(); ++stmt) {
|
||||
switch (stmt->type) {
|
||||
case StatementType::Code:
|
||||
ret += fmt::format("{} Block {:04x} -> {:04x} (0x{:016x});\n", indent,
|
||||
ret += fmt::format("{} Block {:04x} -> {:04x} ({:#016x});\n", indent,
|
||||
stmt->block->begin.Offset(), stmt->block->end.Offset(),
|
||||
reinterpret_cast<uintptr_t>(stmt->block));
|
||||
break;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
@@ -53,7 +53,7 @@ IR::U32 skewBytes(IR::IREmitter& ir, SZ sizeRead) {
|
||||
} // Anonymous namespace
|
||||
|
||||
void TranslatorVisitor::ISBERD(u64 insn) {
|
||||
LOG_DEBUG(Shader, "called with insn={:#X}", insn);
|
||||
LOG_DEBUG(Shader, "called with insn={:#x}", insn);
|
||||
|
||||
union {
|
||||
u64 raw;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
@@ -152,7 +155,7 @@ void TranslatorVisitor::STL(u64 insn) {
|
||||
if (offset.IsImmediate()) {
|
||||
// TODO: Support storing out of bounds at runtime
|
||||
if (offset.U32() >= env.LocalMemorySize()) {
|
||||
LOG_WARNING(Shader, "Storing local memory at 0x{:x} with a size of 0x{:x}, dropping",
|
||||
LOG_WARNING(Shader, "Storing local memory at {:#x} with a size of {:#x}, dropping",
|
||||
offset.U32(), env.LocalMemorySize());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ CDmaPusher::CDmaPusher(Host1x::Host1x& host1x_, s32 id)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG_ERROR(HW_GPU, "Bad command at index {} (bytes {:#X}), buffer size {}", i - 1, (i - 1) * sizeof(u32), command_list.size());
|
||||
LOG_ERROR(HW_GPU, "Bad command at index {} (bytes {:#x}), buffer size {}", i - 1, (i - 1) * sizeof(u32), command_list.size());
|
||||
UNIMPLEMENTED_MSG("ChSubmission mode {} is not implemented!", u32(mode));
|
||||
break;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ CDmaPusher::~CDmaPusher() = default;
|
||||
void CDmaPusher::ExecuteCommand(u32 method, u32 arg) {
|
||||
switch (current_class) {
|
||||
case ChClassId::Control:
|
||||
LOG_TRACE(Service_NVDRV, "Class {} method {:#X} arg 0x{:X}", u32(current_class), method, arg);
|
||||
LOG_TRACE(Service_NVDRV, "Class {} method {:#x} arg {:#x}", u32(current_class), method, arg);
|
||||
host_processor.ProcessMethod(host1x, Host1x::Control::Method(method), arg);
|
||||
break;
|
||||
default:
|
||||
@@ -113,7 +113,7 @@ void CDmaPusher::ExecuteCommand(u32 method, u32 arg) {
|
||||
break;
|
||||
}
|
||||
case ThiMethod::SetMethod1:
|
||||
LOG_TRACE(Service_NVDRV, "Class {} method {:#X} arg 0x{:X}", u32(current_class), u32(thi_regs.method_0), arg);
|
||||
LOG_TRACE(Service_NVDRV, "Class {} method {:#x} arg {:#x}", u32(current_class), u32(thi_regs.method_0), arg);
|
||||
ProcessMethod(thi_regs.method_0, arg);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -59,7 +59,7 @@ void Fermi2D::ConsumeSinkImpl(Core::System& system) {
|
||||
}
|
||||
|
||||
void Fermi2D::Blit() {
|
||||
LOG_DEBUG(HW_GPU, "called. source address=0x{:x}, destination address=0x{:x}", regs.src.Address(), regs.dst.Address());
|
||||
LOG_DEBUG(HW_GPU, "called. source address={:#x}, destination address={:#x}", regs.src.Address(), regs.dst.Address());
|
||||
|
||||
UNIMPLEMENTED_IF_MSG(regs.operation != Operation::SrcCopy, "Operation is not copy");
|
||||
UNIMPLEMENTED_IF_MSG(regs.src.layer != 0, "Source layer is not zero");
|
||||
|
||||
@@ -58,7 +58,7 @@ void MaxwellDMA::CallMultiMethod(Core::System& system, u32 method, const u32* ba
|
||||
}
|
||||
|
||||
void MaxwellDMA::Launch() {
|
||||
LOG_TRACE(Render_OpenGL, "DMA copy 0x{:x} -> 0x{:x}", static_cast<GPUVAddr>(regs.offset_in), GPUVAddr(regs.offset_out));
|
||||
LOG_TRACE(Render_OpenGL, "DMA copy {:#x} -> {:#x}", static_cast<GPUVAddr>(regs.offset_in), GPUVAddr(regs.offset_out));
|
||||
|
||||
// TODO(Subv): Perform more research and implement all features of this engine.
|
||||
const LaunchDMA& launch = regs.launch_dma;
|
||||
|
||||
@@ -242,7 +242,7 @@ void GPULogger::LogMemoryAllocation(uintptr_t memory, u64 size, u32 memory_flags
|
||||
}
|
||||
|
||||
const auto log_entry = fmt::format(
|
||||
"[{}] [Memory] Allocated {} at 0x{:x} (Device:{}, Host:{})\n", FormatTimestamp(timestamp),
|
||||
"[{}] [Memory] Allocated {} at {:#x} (Device:{}, Host:{})\n", FormatTimestamp(timestamp),
|
||||
FormatMemorySize(size), memory, is_device_local ? "Yes" : "No",
|
||||
is_host_visible ? "Yes" : "No");
|
||||
WriteToLog(log_entry);
|
||||
@@ -274,7 +274,7 @@ void GPULogger::LogMemoryDeallocation(uintptr_t memory) {
|
||||
|
||||
if (size > 0) {
|
||||
const auto log_entry =
|
||||
fmt::format("[{}] [Memory] Deallocated {} at 0x{:x}\n", FormatTimestamp(timestamp),
|
||||
fmt::format("[{}] [Memory] Deallocated {} at {:#x}\n", FormatTimestamp(timestamp),
|
||||
FormatMemorySize(size), memory);
|
||||
WriteToLog(log_entry);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ void Control::ProcessMethod(Host1x& host1x, Method method, u32 argument) {
|
||||
Execute(host1x, argument);
|
||||
break;
|
||||
default:
|
||||
UNIMPLEMENTED_MSG("Control method {:#X}", u32(method));
|
||||
UNIMPLEMENTED_MSG("Control method {:#x}", u32(method));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ Vic::~Vic() noexcept {
|
||||
}
|
||||
|
||||
void Vic::ProcessMethod(u32 method, u32 arg) noexcept {
|
||||
LOG_TRACE(HW_GPU, "Vic {} method {:#X}", id, u32(method));
|
||||
LOG_TRACE(HW_GPU, "Vic {} method {:#x}", id, u32(method));
|
||||
regs.reg_array[method] = arg;
|
||||
switch (Method(method * sizeof(u32))) {
|
||||
case Method::Execute:
|
||||
@@ -873,9 +873,9 @@ void Vic::WriteY8__V8U8_N420(const OutputSurfaceConfig& output_surface_config) n
|
||||
auto const out_chroma_swizzle_size = Texture::CalculateSize(true, BytesPerPixel * 2, out_chroma_width, out_chroma_height, 1, block_height, 0);
|
||||
|
||||
LOG_TRACE(HW_GPU, "Writing Y8__V8U8_N420 swizzled frame\n"
|
||||
"\tinput surface {}x{} stride {} size {:#X}\n"
|
||||
"\toutput luma {}x{} stride {} size {:#X} block height {} swizzled size 0x{:X}\n",
|
||||
"\toutput chroma {}x{} stride {} size {:#X} block height {} swizzled size 0x{:X}",
|
||||
"\tinput surface {}x{} stride {} size {:#x}\n"
|
||||
"\toutput luma {}x{} stride {} size {:#x} block height {} swizzled size {:#x}\n",
|
||||
"\toutput chroma {}x{} stride {} size {:#x} block height {} swizzled size {:#x}",
|
||||
surface_width, surface_height, surface_stride * BytesPerPixel,
|
||||
surface_stride * surface_height * BytesPerPixel, out_luma_width, out_luma_height,
|
||||
out_luma_stride, out_luma_size, block_height, out_luma_swizzle_size, out_chroma_width,
|
||||
@@ -898,9 +898,9 @@ void Vic::WriteY8__V8U8_N420(const OutputSurfaceConfig& output_surface_config) n
|
||||
} break;
|
||||
case BlkKind::Pitch: {
|
||||
LOG_TRACE(HW_GPU, "Writing Y8__V8U8_N420 swizzled frame\n"
|
||||
"\tinput surface {}x{} stride {} size {:#X}\n"
|
||||
"\toutput luma {}x{} stride {} size {:#X} block height {} swizzled size 0x{:X}\n",
|
||||
"\toutput chroma {}x{} stride {} size {:#X} block height {} swizzled size 0x{:X}",
|
||||
"\tinput surface {}x{} stride {} size {:#x}\n"
|
||||
"\toutput luma {}x{} stride {} size {:#x} block height {} swizzled size {:#x}\n",
|
||||
"\toutput chroma {}x{} stride {} size {:#x} block height {} swizzled size {:#x}",
|
||||
surface_width, surface_height, surface_stride * BytesPerPixel,
|
||||
surface_stride * surface_height * BytesPerPixel, out_luma_width, out_luma_height,
|
||||
out_luma_stride, out_luma_size, out_chroma_width, out_chroma_height, out_chroma_stride,
|
||||
@@ -1043,8 +1043,8 @@ void Vic::WriteABGR(const OutputSurfaceConfig& output_surface_config, VideoPixel
|
||||
const u32 block_height = u32(output_surface_config.out_block_height);
|
||||
auto const out_swizzle_size = Texture::CalculateSize(true, BytesPerPixel, out_luma_width, out_luma_height, 1, block_height, 0);
|
||||
LOG_TRACE(HW_GPU, "Writing ABGR swizzled frame\n"
|
||||
"\tinput surface {}x{} stride {} size {:#X}\n"
|
||||
"\toutput surface {}x{} stride {} size {:#X} block height {} swizzled size 0x{:X}",
|
||||
"\tinput surface {}x{} stride {} size {:#x}\n"
|
||||
"\toutput surface {}x{} stride {} size {:#x} block height {} swizzled size {:#x}",
|
||||
surface_width, surface_height, surface_stride * BytesPerPixel,
|
||||
surface_stride * surface_height * BytesPerPixel, out_luma_width, out_luma_height,
|
||||
out_luma_stride, out_luma_size, block_height, out_swizzle_size);
|
||||
@@ -1060,8 +1060,8 @@ void Vic::WriteABGR(const OutputSurfaceConfig& output_surface_config, VideoPixel
|
||||
} break;
|
||||
case BlkKind::Pitch: {
|
||||
LOG_TRACE(HW_GPU, "Writing ABGR pitch frame\n"
|
||||
"\tinput surface {}x{} stride {} size {:#X}"
|
||||
"\toutput surface {}x{} stride {} size {:#X}",
|
||||
"\tinput surface {}x{} stride {} size {:#x}"
|
||||
"\toutput surface {}x{} stride {} size {:#x}",
|
||||
surface_width, surface_height, surface_stride,
|
||||
surface_stride * surface_height * BytesPerPixel, out_luma_width, out_luma_height,
|
||||
out_luma_stride, out_luma_size);
|
||||
|
||||
@@ -1234,7 +1234,7 @@ bool MacroJITx64Impl::Compile_NextInstruction(Core::System& system) {
|
||||
}
|
||||
|
||||
static void MacroJIT_ErrorThunk(uintptr_t parameter, uintptr_t max_parameter) {
|
||||
LOG_CRITICAL(HW_GPU, "Macro JIT: invalid parameter access 0x{:x} (0x{:x} is the last parameter)", parameter, max_parameter - sizeof(u32));
|
||||
LOG_CRITICAL(HW_GPU, "Macro JIT: invalid parameter access {:#x} ({:#x} is the last parameter)", parameter, max_parameter - sizeof(u32));
|
||||
}
|
||||
|
||||
Xbyak::Reg32 MacroJITx64Impl::Compile_FetchParameter() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
@@ -56,7 +56,7 @@ Buffer::Buffer(BufferCacheRuntime& runtime, DAddr cpu_addr_, u64 size_bytes_)
|
||||
: VideoCommon::BufferBase(cpu_addr_, size_bytes_) {
|
||||
buffer.Create();
|
||||
if (runtime.device.HasDebuggingToolAttached()) {
|
||||
const std::string name = fmt::format("Buffer 0x{:x}", CpuAddr());
|
||||
const std::string name = fmt::format("Buffer {:#x}", CpuAddr());
|
||||
glObjectLabel(GL_BUFFER, buffer.handle, static_cast<GLsizei>(name.size()), name.data());
|
||||
}
|
||||
glNamedBufferData(buffer.handle, SizeBytes(), nullptr, GL_DYNAMIC_DRAW);
|
||||
|
||||
@@ -468,7 +468,7 @@ std::unique_ptr<GraphicsPipeline> ShaderCache::CreateGraphicsPipeline(
|
||||
std::span<Shader::Environment* const> envs, bool use_shader_workers,
|
||||
bool force_context_flush) try {
|
||||
auto hash = key.Hash();
|
||||
LOG_INFO(Render_OpenGL, "0x{:016x}", hash);
|
||||
LOG_INFO(Render_OpenGL, "{:#016x}", hash);
|
||||
size_t env_index{};
|
||||
u32 total_storage_buffers{};
|
||||
std::array<Shader::IR::Program, Maxwell::MaxShaderProgram> programs;
|
||||
@@ -589,7 +589,7 @@ std::unique_ptr<ComputePipeline> ShaderCache::CreateComputePipeline(
|
||||
ShaderContext::ShaderPools& pools, const ComputePipelineKey& key, Shader::Environment& env,
|
||||
bool force_context_flush) try {
|
||||
auto hash = key.Hash();
|
||||
LOG_INFO(Render_OpenGL, "0x{:016x}", hash);
|
||||
LOG_INFO(Render_OpenGL, "{:#016x}", hash);
|
||||
|
||||
Shader::Maxwell::Flow::CFG cfg{env, pools.flow_block, env.StartAddress()};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||
@@ -402,7 +402,7 @@ OGLTexture MakeImage(const VideoCommon::ImageInfo& info, GLenum gl_internal_form
|
||||
ASSERT(false);
|
||||
break;
|
||||
default:
|
||||
ASSERT_MSG(false, "Invalid target=0x{:x}", target);
|
||||
ASSERT_MSG(false, "Invalid target={:#x}", target);
|
||||
break;
|
||||
}
|
||||
return texture;
|
||||
|
||||
@@ -98,7 +98,7 @@ Buffer::Buffer(BufferCacheRuntime& runtime, DAddr cpu_addr_, u64 size_bytes_)
|
||||
scheduler{&runtime.scheduler},
|
||||
buffer{CreateBuffer(*device, runtime.memory_allocator, SizeBytes())}, tracker{SizeBytes()} {
|
||||
if (runtime.device.HasDebuggingToolAttached()) {
|
||||
buffer.SetObjectNameEXT(fmt::format("Buffer 0x{:x}", CpuAddr()).c_str());
|
||||
buffer.SetObjectNameEXT(fmt::format("Buffer {:#x}", CpuAddr()).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -560,7 +560,7 @@ void GraphicsPipeline::ConfigureDraw(const RescalingPushConstant& rescaling,
|
||||
// Log graphics pipeline binding
|
||||
if (bind_pipeline && GPU::Logging::IsActive() &&
|
||||
Settings::values.gpu_log_vulkan_calls.GetValue()) {
|
||||
const std::string pipeline_info = fmt::format("hash=0x{:016x}", key.Hash());
|
||||
const std::string pipeline_info = fmt::format("hash={:#016x}", key.Hash());
|
||||
GPU::Logging::GPULogger::GetInstance().LogPipelineBind(false, pipeline_info);
|
||||
}
|
||||
|
||||
|
||||
@@ -741,7 +741,7 @@ std::unique_ptr<GraphicsPipeline> PipelineCache::CreateGraphicsPipeline(
|
||||
std::span<Shader::Environment* const> envs, PipelineStatistics* statistics,
|
||||
bool build_in_parallel) try {
|
||||
auto hash = key.Hash();
|
||||
LOG_INFO(Render_Vulkan, "0x{:016x}", hash);
|
||||
LOG_INFO(Render_Vulkan, "{:#016x}", hash);
|
||||
size_t env_index{0};
|
||||
std::array<Shader::IR::Program, Maxwell::MaxShaderProgram> programs;
|
||||
const bool uses_vertex_a{key.unique_hashes[0] != 0};
|
||||
@@ -904,11 +904,11 @@ std::unique_ptr<ComputePipeline> PipelineCache::CreateComputePipeline(
|
||||
PipelineStatistics* statistics, bool build_in_parallel) try {
|
||||
auto hash = key.Hash();
|
||||
if (device.HasBrokenCompute()) {
|
||||
LOG_ERROR(Render_Vulkan, "Skipping 0x{:016x}", hash);
|
||||
LOG_ERROR(Render_Vulkan, "Skipping {:#016x}", hash);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LOG_INFO(Render_Vulkan, "0x{:016x}", hash);
|
||||
LOG_INFO(Render_Vulkan, "{:#016x}", hash);
|
||||
|
||||
Shader::Maxwell::Flow::CFG cfg{env, pools.flow_block, env.StartAddress()};
|
||||
|
||||
@@ -925,7 +925,7 @@ std::unique_ptr<ComputePipeline> PipelineCache::CreateComputePipeline(
|
||||
const u32 max_shared_memory = device.GetMaxComputeSharedMemorySize();
|
||||
if (needs_shared_mem_clamp && program.shared_memory_size > max_shared_memory) {
|
||||
LOG_WARNING(Render_Vulkan,
|
||||
"Compute shader 0x{:016x} requests {}KB shared memory but device max is {}KB - clamping",
|
||||
"Compute shader {:#016x} requests {}KB shared memory but device max is {}KB - clamping",
|
||||
key.unique_hash,
|
||||
program.shared_memory_size / 1024,
|
||||
max_shared_memory / 1024);
|
||||
|
||||
@@ -1219,7 +1219,7 @@ public:
|
||||
// Protect against stride == 0 (avoid divide-by-zero). Use fallback stride=1 and warn.
|
||||
u64 safe_stride = query->stride == 0 ? 1 : query->stride;
|
||||
if (query->stride == 0) {
|
||||
LOG_WARNING(Render_Vulkan, "TransformFeedback query has stride 0; using 1 to avoid div-by-zero (addr=0x{:x})", query->dependant_address);
|
||||
LOG_WARNING(Render_Vulkan, "TransformFeedback query has stride 0; using 1 to avoid div-by-zero (addr={:#x})", query->dependant_address);
|
||||
}
|
||||
if (query->dependant_manage) {
|
||||
auto* dependant_query = tfb_streamer.GetQuery(query->dependant_index);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
@@ -66,7 +66,7 @@ bool ShaderCache::RefreshStages(std::array<u64, 6>& unique_hashes) {
|
||||
const GPUVAddr shader_addr{base_addr + shader_config.offset};
|
||||
const std::optional<VAddr> cpu_shader_addr{gpu_memory->GpuToCpuAddress(shader_addr)};
|
||||
if (!cpu_shader_addr) {
|
||||
LOG_ERROR(HW_GPU, "Invalid GPU address for shader 0x{:016x}", shader_addr);
|
||||
LOG_ERROR(HW_GPU, "Invalid GPU address for shader {:#016x}", shader_addr);
|
||||
last_shaders_valid = false;
|
||||
return false;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ const ShaderInfo* ShaderCache::ComputeShader() {
|
||||
const GPUVAddr shader_addr{program_base + qmd.program_start};
|
||||
const std::optional<VAddr> cpu_shader_addr{gpu_memory->GpuToCpuAddress(shader_addr)};
|
||||
if (!cpu_shader_addr) {
|
||||
LOG_ERROR(HW_GPU, "Invalid GPU address for shader 0x{:016x}", shader_addr);
|
||||
LOG_ERROR(HW_GPU, "Invalid GPU address for shader {:#016x}", shader_addr);
|
||||
return nullptr;
|
||||
}
|
||||
if (const ShaderInfo* const shader = TryGet(*cpu_shader_addr)) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
@@ -40,15 +40,15 @@ std::string Name(const ImageBase& image) {
|
||||
}
|
||||
switch (image.info.type) {
|
||||
case ImageType::e1D:
|
||||
return fmt::format("Image 1D 0x{:x} {}{}", gpu_addr, width, resource);
|
||||
return fmt::format("Image 1D {:#x} {}{}", gpu_addr, width, resource);
|
||||
case ImageType::e2D:
|
||||
return fmt::format("Image 2D 0x{:x} {}x{}{}", gpu_addr, width, height, resource);
|
||||
return fmt::format("Image 2D {:#x} {}x{}{}", gpu_addr, width, height, resource);
|
||||
case ImageType::e3D:
|
||||
return fmt::format("Image 2D 0x{:x} {}x{}x{}{}", gpu_addr, width, height, depth, resource);
|
||||
return fmt::format("Image 2D {:#x} {}x{}x{}{}", gpu_addr, width, height, depth, resource);
|
||||
case ImageType::Linear:
|
||||
return fmt::format("Image Linear 0x{:x} {}x{}", gpu_addr, width, height);
|
||||
return fmt::format("Image Linear {:#x} {}x{}", gpu_addr, width, height);
|
||||
case ImageType::Buffer:
|
||||
return fmt::format("Buffer 0x{:x} {}", image.gpu_addr, image.info.size.width);
|
||||
return fmt::format("Buffer {:#x} {}", image.gpu_addr, image.info.size.width);
|
||||
}
|
||||
return "Invalid";
|
||||
}
|
||||
@@ -63,25 +63,25 @@ std::string Name(const ImageViewBase& image_view, GPUVAddr addr) {
|
||||
const std::string level = num_levels > 1 ? fmt::format(":{}", num_levels) : "";
|
||||
switch (image_view.type) {
|
||||
case ImageViewType::e1D:
|
||||
return fmt::format("ImageView 1D {:#X} {}{}", addr, width, level);
|
||||
return fmt::format("ImageView 1D {:#x} {}{}", addr, width, level);
|
||||
case ImageViewType::e2D:
|
||||
return fmt::format("ImageView 2D {:#X} {}x{}{}", addr, width, height, level);
|
||||
return fmt::format("ImageView 2D {:#x} {}x{}{}", addr, width, height, level);
|
||||
case ImageViewType::Cube:
|
||||
return fmt::format("ImageView Cube {:#X} {}x{}{}", addr, width, height, level);
|
||||
return fmt::format("ImageView Cube {:#x} {}x{}{}", addr, width, height, level);
|
||||
case ImageViewType::e3D:
|
||||
return fmt::format("ImageView 3D {:#X} {}x{}x{}{}", addr, width, height, depth, level);
|
||||
return fmt::format("ImageView 3D {:#x} {}x{}x{}{}", addr, width, height, depth, level);
|
||||
case ImageViewType::e1DArray:
|
||||
return fmt::format("ImageView 1DArray {:#X} {}{}|{}", addr, width, level, num_layers);
|
||||
return fmt::format("ImageView 1DArray {:#x} {}{}|{}", addr, width, level, num_layers);
|
||||
case ImageViewType::e2DArray:
|
||||
return fmt::format("ImageView 2DArray {:#X} {}x{}{}|{}", addr, width, height, level,
|
||||
return fmt::format("ImageView 2DArray {:#x} {}x{}{}|{}", addr, width, height, level,
|
||||
num_layers);
|
||||
case ImageViewType::CubeArray:
|
||||
return fmt::format("ImageView CubeArray {:#X} {}x{}{}|{}", addr, width, height, level,
|
||||
return fmt::format("ImageView CubeArray {:#x} {}x{}{}|{}", addr, width, height, level,
|
||||
num_layers);
|
||||
case ImageViewType::Rect:
|
||||
return fmt::format("ImageView Rect {:#X} {}x{}{}", addr, width, height, level);
|
||||
return fmt::format("ImageView Rect {:#x} {}x{}{}", addr, width, height, level);
|
||||
case ImageViewType::Buffer:
|
||||
return fmt::format("BufferView {:#X} {}", addr, width);
|
||||
return fmt::format("BufferView {:#x} {}", addr, width);
|
||||
}
|
||||
return "Invalid";
|
||||
}
|
||||
|
||||
@@ -1509,7 +1509,7 @@ ImageId TextureCache<P>::InsertImage(const ImageInfo& info, GPUVAddr gpu_addr,
|
||||
cpu_addr = std::optional<DAddr>(fake_addr);
|
||||
}
|
||||
}
|
||||
ASSERT_MSG(cpu_addr, "Tried to insert an image to an invalid gpu_addr=0x{:x}", gpu_addr);
|
||||
ASSERT_MSG(cpu_addr, "Tried to insert an image to an invalid gpu_addr={:#x}", gpu_addr);
|
||||
const ImageId image_id = JoinImages(info, gpu_addr, *cpu_addr);
|
||||
const Image& image = slot_images[image_id];
|
||||
// Using "image.gpu_addr" instead of "gpu_addr" is important because it might be different
|
||||
@@ -2231,13 +2231,13 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
|
||||
[image_id](u64 page, ankerl::unordered_dense::map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>& selected_page_table) {
|
||||
const auto page_it = selected_page_table.find(page);
|
||||
if (page_it == selected_page_table.end()) {
|
||||
ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << YUZU_PAGEBITS);
|
||||
ASSERT_MSG(false, "Unregistering unregistered page={:#x}", page << YUZU_PAGEBITS);
|
||||
return;
|
||||
}
|
||||
std::vector<ImageId>& image_ids = page_it->second;
|
||||
const auto vector_it = std::ranges::find(image_ids, image_id);
|
||||
if (vector_it == image_ids.end()) {
|
||||
ASSERT_MSG(false, "Unregistering unregistered image in page=0x{:x}",
|
||||
ASSERT_MSG(false, "Unregistering unregistered image in page={:#x}",
|
||||
page << YUZU_PAGEBITS);
|
||||
return;
|
||||
}
|
||||
@@ -2251,13 +2251,13 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
|
||||
ForEachCPUPage(image.cpu_addr, image.guest_size_bytes, [this, map_id](u64 page) {
|
||||
const auto page_it = page_table.find(page);
|
||||
if (page_it == page_table.end()) {
|
||||
ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << YUZU_PAGEBITS);
|
||||
ASSERT_MSG(false, "Unregistering unregistered page={:#x}", page << YUZU_PAGEBITS);
|
||||
return;
|
||||
}
|
||||
std::vector<ImageMapId>& image_map_ids = page_it->second;
|
||||
const auto vector_it = std::ranges::find(image_map_ids, map_id);
|
||||
if (vector_it == image_map_ids.end()) {
|
||||
ASSERT_MSG(false, "Unregistering unregistered image in page=0x{:x}",
|
||||
ASSERT_MSG(false, "Unregistering unregistered image in page={:#x}",
|
||||
page << YUZU_PAGEBITS);
|
||||
return;
|
||||
}
|
||||
@@ -2279,7 +2279,7 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
|
||||
ForEachCPUPage(cpu_addr, size, [this, image_id](u64 page) {
|
||||
const auto page_it = page_table.find(page);
|
||||
if (page_it == page_table.end()) {
|
||||
ASSERT_MSG(false, "Unregistering unregistered page=0x{:x}", page << YUZU_PAGEBITS);
|
||||
ASSERT_MSG(false, "Unregistering unregistered page={:#x}", page << YUZU_PAGEBITS);
|
||||
return;
|
||||
}
|
||||
std::vector<ImageMapId>& image_map_ids = page_it->second;
|
||||
@@ -2367,7 +2367,7 @@ void TextureCache<P>::DeleteImage(ImageId image_id, bool immediate_delete) {
|
||||
const GPUVAddr gpu_addr = image.gpu_addr;
|
||||
const auto alloc_it = image_allocs_table.find(gpu_addr);
|
||||
if (alloc_it == image_allocs_table.end()) {
|
||||
ASSERT_MSG(false, "Trying to delete an image alloc that does not exist in address 0x{:x}",
|
||||
ASSERT_MSG(false, "Trying to delete an image alloc that does not exist in address {:#x}",
|
||||
gpu_addr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1597,8 +1597,8 @@ void Device::InitializeGPULogging() {
|
||||
driver_info += fmt::format("Driver ID: {}\n", static_cast<u32>(driver_id));
|
||||
|
||||
// Vendor and device IDs
|
||||
driver_info += fmt::format("Vendor ID: 0x{:04X}\n", props.vendorID);
|
||||
driver_info += fmt::format("Device ID: 0x{:04X}\n", props.deviceID);
|
||||
driver_info += fmt::format("Vendor ID: {:#04x}\n", props.vendorID);
|
||||
driver_info += fmt::format("Device ID: {:#04x}\n", props.deviceID);
|
||||
|
||||
// Extensions - separate QCOM extensions from others
|
||||
driver_info += "\n=== Loaded Vulkan Extensions ===\n";
|
||||
|
||||
@@ -40,7 +40,7 @@ Opcode Decode(u64 insn) {
|
||||
return Opcode::name;
|
||||
#include "shader_recompiler/frontend/maxwell/maxwell.inc"
|
||||
#undef INST
|
||||
ASSERT_MSG(false, "Invalid insn 0x{:016x}", insn);
|
||||
ASSERT_MSG(false, "Invalid insn {:#016x}", insn);
|
||||
return Opcode::NOP;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user