From 4f45b05eeedef08588fc20e19f3bdefd76f55e9e Mon Sep 17 00:00:00 2001 From: Stephen Miller Date: Fri, 2 May 2025 16:18:53 -0500 Subject: [PATCH] Error logging Hopefully this helps in catching the UFC regression? --- src/core/memory.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/memory.cpp b/src/core/memory.cpp index f41fbf95c..4c29942d7 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -720,6 +720,7 @@ VAddr MemoryManager::SearchFree(VAddr virtual_addr, size_t size, u32 alignment) // If the requested address is beyond the maximum our code can handle, return an error. auto max_search_address = 0x10000000000; if (virtual_addr >= max_search_address) { + LOG_ERROR(Kernel_Vmm, "Address {:#x} is too high", virtual_addr); return -1; } @@ -748,6 +749,7 @@ VAddr MemoryManager::SearchFree(VAddr virtual_addr, size_t size, u32 alignment) // Make sure the address is within our defined bounds if (virtual_addr >= max_search_address) { + LOG_ERROR(Kernel_Vmm, "Address {:#x} is too high", virtual_addr); return -1; } @@ -760,6 +762,8 @@ VAddr MemoryManager::SearchFree(VAddr virtual_addr, size_t size, u32 alignment) } // Couldn't find a suitable VMA, return an error. + LOG_ERROR(Kernel_Vmm, "Couldn't find a free mapping for address {:#x}, size {:#x}", + virtual_addr, size); return -1; }