Browse Source

change log levels, fix WoA build

pull/4181/head
Exverge 5 days ago
parent
commit
e586e07c79
No known key found for this signature in database GPG Key ID: DAD399BCC5FB77E4
  1. 3
      src/common/host_memory.cpp
  2. 2
      src/common/host_memory.h
  3. 4
      src/core/memory.cpp

3
src/common/host_memory.cpp

@ -864,7 +864,8 @@ void HostMemory::Protect(size_t virtual_offset, size_t length, MemoryPermission
} }
// todo: make this actually inherit most permissive // todo: make this actually inherit most permissive
LOG_WARNING(HW_Memory, "Memory is unaligned to page size, surrounding pages will inherit most permissive permissions");
LOG_DEBUG(HW_Memory, "Memory addresses {:#x}-{:#x} is unaligned to page size, surrounding pages will inherit most permissive permissions",
virtual_offset, virtual_offset + length);
auto aligned = AlignDown(virtual_offset, HostPageSize); auto aligned = AlignDown(virtual_offset, HostPageSize);
auto diff = virtual_offset - aligned; auto diff = virtual_offset - aligned;
virtual_offset = aligned; virtual_offset = aligned;

2
src/common/host_memory.h

@ -18,7 +18,7 @@
namespace Common { namespace Common {
#ifndef ARCHITECTURE_x86_64
#if !defined(ARCHITECTURE_x86_64) && !defined(__WIN32)
const u64 HostPageSize = sysconf(_SC_PAGESIZE); const u64 HostPageSize = sysconf(_SC_PAGESIZE);
const u64 HostPageBits = std::countr_zero(HostPageSize); const u64 HostPageBits = std::countr_zero(HostPageSize);
const u64 HostPageMask = ~(HostPageSize - 1); const u64 HostPageMask = ~(HostPageSize - 1);

4
src/core/memory.cpp

@ -79,7 +79,7 @@ struct Memory::Impl {
if (current_page_table->fastmem_arena) { if (current_page_table->fastmem_arena) {
bool is_fastmem = GetInteger(base) % Common::HostPageSize == GetInteger(target) % Common::HostPageSize; bool is_fastmem = GetInteger(base) % Common::HostPageSize == GetInteger(target) % Common::HostPageSize;
if (!is_fastmem) { if (!is_fastmem) {
LOG_WARNING(HW_Memory, "base {:#x} and target {:#x} aren't aligned in relation to host page size {}",
LOG_DEBUG(HW_Memory, "base {:#x} and target {:#x} aren't aligned in relation to host page size {}",
GetInteger(base), GetInteger(target), Common::HostPageSize); GetInteger(base), GetInteger(target), Common::HostPageSize);
} }
@ -614,7 +614,7 @@ struct Memory::Impl {
while (base != end) { while (base != end) {
auto target_paddr = target; auto target_paddr = target;
if (auto iter = extra_mappings.find(base); iter != extra_mappings.end()) { if (auto iter = extra_mappings.find(base); iter != extra_mappings.end()) {
LOG_WARNING(HW_Memory, "Mapping irregular address; {:#x} points to {:#x} instead of {:#x}",
LOG_DEBUG(HW_Memory, "Mapping irregular address; {:#x} points to {:#x} instead of {:#x}",
base << YUZU_PAGEBITS, iter->second << YUZU_PAGEBITS, GetInteger(target)); base << YUZU_PAGEBITS, iter->second << YUZU_PAGEBITS, GetInteger(target));
target_paddr = iter->second << YUZU_PAGEBITS; target_paddr = iter->second << YUZU_PAGEBITS;
extra_mappings.erase(iter); extra_mappings.erase(iter);

Loading…
Cancel
Save