svc.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright 2018 yuzu emulator team
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "common/common_types.h"
  6. namespace Kernel {
  7. struct MemoryInfo {
  8. u64 base_address;
  9. u64 size;
  10. u32 type;
  11. u32 attributes;
  12. u32 permission;
  13. };
  14. struct PageInfo {
  15. u64 flags;
  16. };
  17. /// Values accepted by svcGetInfo
  18. enum class GetInfoType : u64 {
  19. // 1.0.0+
  20. AllowedCpuIdBitmask = 0,
  21. AllowedThreadPrioBitmask = 1,
  22. MapRegionBaseAddr = 2,
  23. MapRegionSize = 3,
  24. HeapRegionBaseAddr = 4,
  25. HeapRegionSize = 5,
  26. TotalMemoryUsage = 6,
  27. TotalHeapUsage = 7,
  28. IsCurrentProcessBeingDebugged = 8,
  29. ResourceHandleLimit = 9,
  30. IdleTickCount = 10,
  31. RandomEntropy = 11,
  32. PerformanceCounter = 0xF0000002,
  33. // 2.0.0+
  34. AddressSpaceBaseAddr = 12,
  35. AddressSpaceSize = 13,
  36. NewMapRegionBaseAddr = 14,
  37. NewMapRegionSize = 15,
  38. // 3.0.0+
  39. IsVirtualAddressMemoryEnabled = 16,
  40. TitleId = 18,
  41. // 4.0.0+
  42. PrivilegedProcessId = 19,
  43. };
  44. void CallSVC(u32 immediate);
  45. } // namespace Kernel