Rename Supports4KBPage to UsesPrivateAllocations
This commit is contained in:
parent
4d3f6cae52
commit
830619002f
9 changed files with 15 additions and 15 deletions
|
@ -28,7 +28,7 @@ namespace Ryujinx.Cpu.AppleHv
|
|||
|
||||
private readonly ManagedPageFlags _pages;
|
||||
|
||||
public bool Supports4KBPages => true;
|
||||
public bool UsesPrivateAllocations => false;
|
||||
|
||||
public int AddressSpaceBits { get; }
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace Ryujinx.Cpu.Jit
|
|||
private readonly InvalidAccessHandler _invalidAccessHandler;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool Supports4KBPages => true;
|
||||
public bool UsesPrivateAllocations => true;
|
||||
|
||||
/// <summary>
|
||||
/// Address space width in bits.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using ARMeilleure.Memory;
|
||||
using ARMeilleure.Memory;
|
||||
using Ryujinx.Memory;
|
||||
using Ryujinx.Memory.Range;
|
||||
using Ryujinx.Memory.Tracking;
|
||||
|
@ -26,7 +26,7 @@ namespace Ryujinx.Cpu.Jit
|
|||
private readonly ManagedPageFlags _pages;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool Supports4KBPages => MemoryBlock.GetPageSize() == PageSize;
|
||||
public bool UsesPrivateAllocations => false;
|
||||
|
||||
public int AddressSpaceBits { get; }
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace Ryujinx.Cpu.Jit
|
|||
protected override ulong AddressSpaceSize { get; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool Supports4KBPages => false;
|
||||
public bool UsesPrivateAllocations => true;
|
||||
|
||||
public IntPtr PageTablePointer => _nativePageTable.PageTablePointer;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
{
|
||||
private readonly IVirtualMemoryManager _cpuMemory;
|
||||
|
||||
protected override bool Supports4KBPages => _cpuMemory.Supports4KBPages;
|
||||
protected override bool UsesPrivateAllocations => _cpuMemory.UsesPrivateAllocations;
|
||||
|
||||
public KPageTable(KernelContext context, IVirtualMemoryManager cpuMemory, ulong reservedAddressSpaceSize) : base(context, reservedAddressSpaceSize)
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
private const int MaxBlocksNeededForInsertion = 2;
|
||||
|
||||
protected readonly KernelContext Context;
|
||||
protected virtual bool Supports4KBPages => true;
|
||||
protected virtual bool UsesPrivateAllocations => false;
|
||||
|
||||
public ulong AddrSpaceStart { get; private set; }
|
||||
public ulong AddrSpaceEnd { get; private set; }
|
||||
|
@ -1947,17 +1947,17 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
|
||||
Result result;
|
||||
|
||||
if (srcPageTable.Supports4KBPages)
|
||||
if (srcPageTable.UsesPrivateAllocations)
|
||||
{
|
||||
result = MapForeign(srcPageTable.GetHostRegions(addressRounded, alignedSize), currentVa, alignedSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
KPageList pageList = new();
|
||||
srcPageTable.GetPhysicalRegions(addressRounded, alignedSize, pageList);
|
||||
|
||||
result = MapPages(currentVa, pageList, permission, MemoryMapFlags.None);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = MapForeign(srcPageTable.GetHostRegions(addressRounded, alignedSize), currentVa, alignedSize);
|
||||
}
|
||||
|
||||
if (result != Result.Success)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Ryujinx.Memory
|
|||
public sealed class AddressSpaceManager : VirtualMemoryManagerBase<ulong, nuint>, IVirtualMemoryManager, IWritableBlock
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public bool Supports4KBPages => true;
|
||||
public bool UsesPrivateAllocations => false;
|
||||
|
||||
/// <summary>
|
||||
/// Address space width in bits.
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Ryujinx.Memory
|
|||
/// Indicates whenever the memory manager supports aliasing pages at 4KB granularity.
|
||||
/// </summary>
|
||||
/// <returns>True if 4KB pages are supported by the memory manager, false otherwise</returns>
|
||||
bool Supports4KBPages { get; }
|
||||
bool UsesPrivateAllocations { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Maps a virtual memory range into a physical memory range.
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Ryujinx.Tests.Memory
|
|||
{
|
||||
public class MockVirtualMemoryManager : IVirtualMemoryManager
|
||||
{
|
||||
public bool Supports4KBPages => true;
|
||||
public bool UsesPrivateAllocations => false;
|
||||
|
||||
public bool NoMappings = false;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue