Updated temporary workaround to use 4k pages

This commit is contained in:
Lander Gallastegi 2025-05-18 13:52:27 +02:00
parent b684dbd7a7
commit 5740edfc47

View File

@ -137,11 +137,12 @@ void BufferCache::InvalidateMemory(VAddr device_addr, u64 size, bool unmap) {
}
{
// This is a temporary workaround...
std::scoped_lock lock(dma_sync_ranges_mutex);
const VAddr aligned_addr = Common::AlignDown(device_addr, CACHING_PAGESIZE);
const VAddr aligned_addr = Common::AlignDown(device_addr, 4_KB);
const u64 aligned_size =
Common::AlignUp(device_addr + size, CACHING_PAGESIZE) - aligned_addr;
dma_sync_ranges.Add(device_addr, size);
Common::AlignUp(device_addr + size, 4_KB) - aligned_addr;
dma_sync_ranges.Add(aligned_addr, aligned_size);
}
}
}