IVirtualMemoryManagerTracked.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Ryujinx.Cpu.Tracking;
  2. using Ryujinx.Memory;
  3. using Ryujinx.Memory.Tracking;
  4. using System;
  5. using System.Collections.Generic;
  6. namespace Ryujinx.Cpu
  7. {
  8. public interface IVirtualMemoryManagerTracked : IVirtualMemoryManager
  9. {
  10. /// <summary>
  11. /// Writes data to CPU mapped memory, without write tracking.
  12. /// </summary>
  13. /// <param name="va">Virtual address to write the data into</param>
  14. /// <param name="data">Data to be written</param>
  15. void WriteUntracked(ulong va, ReadOnlySpan<byte> data);
  16. /// <summary>
  17. /// Obtains a memory tracking handle for the given virtual region. This should be disposed when finished with.
  18. /// </summary>
  19. /// <param name="address">CPU virtual address of the region</param>
  20. /// <param name="size">Size of the region</param>
  21. /// <returns>The memory tracking handle</returns>
  22. CpuRegionHandle BeginTracking(ulong address, ulong size);
  23. /// <summary>
  24. /// Obtains a memory tracking handle for the given virtual region, with a specified granularity. This should be disposed when finished with.
  25. /// </summary>
  26. /// <param name="address">CPU virtual address of the region</param>
  27. /// <param name="size">Size of the region</param>
  28. /// <param name="handles">Handles to inherit state from or reuse. When none are present, provide null</param>
  29. /// <param name="granularity">Desired granularity of write tracking</param>
  30. /// <returns>The memory tracking handle</returns>
  31. CpuMultiRegionHandle BeginGranularTracking(ulong address, ulong size, IEnumerable<IRegionHandle> handles, ulong granularity);
  32. /// <summary>
  33. /// Obtains a smart memory tracking handle for the given virtual region, with a specified granularity. This should be disposed when finished with.
  34. /// </summary>
  35. /// <param name="address">CPU virtual address of the region</param>
  36. /// <param name="size">Size of the region</param>
  37. /// <param name="granularity">Desired granularity of write tracking</param>
  38. /// <returns>The memory tracking handle</returns>
  39. CpuSmartMultiRegionHandle BeginSmartGranularTracking(ulong address, ulong size, ulong granularity);
  40. }
  41. }