diff --git a/src/core/linker.cpp b/src/core/linker.cpp index d1d1bdef..b3891abf 100644 --- a/src/core/linker.cpp +++ b/src/core/linker.cpp @@ -73,10 +73,55 @@ void Linker::Execute() { const auto* proc_param = GetProcParam(); ASSERT(proc_param); + /* TEMP */ + LOG_INFO(Core_Linker, "---- proc_param ----"); + LOG_INFO(Core_Linker, "proc_param->size = 0x{:x}", proc_param->size); + LOG_INFO(Core_Linker, "proc_param->magic = 0x{:x}", proc_param->magic); + LOG_INFO(Core_Linker, "proc_param->sdk_version = 0x{:x}", proc_param->sdk_version); + LOG_INFO(Core_Linker, "proc_param->mem_param = {}", fmt::ptr(proc_param->mem_param)); + LOG_INFO(Core_Linker, "proc_param->unknown1 = 0x{:x}", proc_param->unknown1); + /* TEMP */ + Core::OrbisKernelMemParam mem_param{}; if (proc_param->size >= offsetof(OrbisProcParam, mem_param) + sizeof(OrbisKernelMemParam*)) { if (proc_param->mem_param) { mem_param = *proc_param->mem_param; + + /* TEMP */ + LOG_INFO(Core_Linker, "---- mem_param ----"); + LOG_INFO(Core_Linker, "mem_param->size = 0x{:x}", mem_param.size); + LOG_INFO(Core_Linker, "mem_param->extended_page_table = {}", + fmt::ptr(mem_param.extended_page_table)); + LOG_INFO(Core_Linker, "mem_param->flexible_memory_size = {}", + fmt::ptr(mem_param.flexible_memory_size)); + LOG_INFO(Core_Linker, "mem_param->extended_memory_1 = {}", + fmt::ptr(mem_param.extended_memory_1)); + LOG_INFO(Core_Linker, "mem_param->extended_gpu_page_table = {}", + fmt::ptr(mem_param.extended_gpu_page_table)); + LOG_INFO(Core_Linker, "mem_param->extended_memory_2 = {}", + fmt::ptr(mem_param.extended_memory_2)); + LOG_INFO(Core_Linker, "mem_param->extended_cpu_page_table = {}", + fmt::ptr(mem_param.extended_cpu_page_table)); + LOG_INFO(Core_Linker, "-------------------"); + if (mem_param.size >= + offsetof(OrbisKernelMemParam, flexible_memory_size) + sizeof(u64*) && + mem_param.flexible_memory_size) { + LOG_INFO(Core_Linker, "mem_param->flexible_memory_size = 0x{:x}", + *mem_param.flexible_memory_size); + } + if (mem_param.size >= offsetof(OrbisKernelMemParam, extended_memory_1) + sizeof(u64*) && + mem_param.extended_memory_1) { + LOG_INFO(Core_Linker, "mem_param->extended_memory_1 = 0x{:x}", + *mem_param.extended_memory_1); + } + if (mem_param.size >= offsetof(OrbisKernelMemParam, extended_memory_2) + sizeof(u64*) && + mem_param.extended_memory_2) { + LOG_INFO(Core_Linker, "mem_param->extended_memory_2 = 0x{:x}", + *mem_param.extended_memory_2); + } + LOG_INFO(Core_Linker, "-------------------"); + /* TEMP */ + if (mem_param.size >= offsetof(OrbisKernelMemParam, flexible_memory_size) + sizeof(u64*)) { if (const auto* flexible_size = mem_param.flexible_memory_size) { diff --git a/src/core/linker.h b/src/core/linker.h index 245bdf40..7ef13ae5 100644 --- a/src/core/linker.h +++ b/src/core/linker.h @@ -22,7 +22,7 @@ struct OrbisKernelMemParam { u8* extended_memory_1; u64* extended_gpu_page_table; u8* extended_memory_2; - u64* exnteded_cpu_page_table; + u64* extended_cpu_page_table; }; static_assert(sizeof(OrbisKernelMemParam) == 0x38);