MemoryPermission.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. namespace Ryujinx.Memory
  3. {
  4. /// <summary>
  5. /// Memory access permission control.
  6. /// </summary>
  7. [Flags]
  8. public enum MemoryPermission
  9. {
  10. /// <summary>
  11. /// No access is allowed on the memory region.
  12. /// </summary>
  13. None = 0,
  14. /// <summary>
  15. /// Allow reads on the memory region.
  16. /// </summary>
  17. Read = 1 << 0,
  18. /// <summary>
  19. /// Allow writes on the memory region.
  20. /// </summary>
  21. Write = 1 << 1,
  22. /// <summary>
  23. /// Allow code execution on the memory region.
  24. /// </summary>
  25. Execute = 1 << 2,
  26. /// <summary>
  27. /// Allow reads and writes on the memory region.
  28. /// </summary>
  29. ReadAndWrite = Read | Write,
  30. /// <summary>
  31. /// Allow reads and code execution on the memory region.
  32. /// </summary>
  33. ReadAndExecute = Read | Execute,
  34. /// <summary>
  35. /// Allow reads, writes, and code execution on the memory region.
  36. /// </summary>
  37. ReadWriteExecute = Read | Write | Execute,
  38. /// <summary>
  39. /// Indicates an invalid protection.
  40. /// </summary>
  41. Invalid = 255
  42. }
  43. }