3
0
Fork 0
forked from suyu/suyu
suyu/src/core/hle/kernel/svc.h

58 lines
1.2 KiB
C
Raw Normal View History

// Copyright 2018 yuzu emulator team
2014-12-17 06:38:14 +01:00
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include "common/common_types.h"
namespace Kernel {
struct MemoryInfo {
u64 base_address;
u64 size;
u32 type;
u32 attributes;
u32 permission;
u32 device_refcount;
u32 ipc_refcount;
INSERT_PADDING_WORDS(1);
};
static_assert(sizeof(MemoryInfo) == 0x28, "MemoryInfo has incorrect size.");
struct PageInfo {
u64 flags;
};
2018-01-01 22:01:06 +01:00
/// Values accepted by svcGetInfo
enum class GetInfoType : u64 {
// 1.0.0+
AllowedCpuIdBitmask = 0,
2018-01-16 23:06:45 +01:00
AllowedThreadPrioBitmask = 1,
MapRegionBaseAddr = 2,
MapRegionSize = 3,
HeapRegionBaseAddr = 4,
HeapRegionSize = 5,
2018-01-01 22:01:06 +01:00
TotalMemoryUsage = 6,
TotalHeapUsage = 7,
2018-01-16 23:06:45 +01:00
IsCurrentProcessBeingDebugged = 8,
ResourceHandleLimit = 9,
IdleTickCount = 10,
2018-01-01 22:01:06 +01:00
RandomEntropy = 11,
2018-01-16 23:06:45 +01:00
PerformanceCounter = 0xF0000002,
2018-01-01 22:01:06 +01:00
// 2.0.0+
AddressSpaceBaseAddr = 12,
AddressSpaceSize = 13,
NewMapRegionBaseAddr = 14,
NewMapRegionSize = 15,
2018-01-16 23:06:45 +01:00
// 3.0.0+
IsVirtualAddressMemoryEnabled = 16,
TitleId = 18,
// 4.0.0+
2018-01-16 23:06:45 +01:00
PrivilegedProcessId = 19,
};
void CallSVC(u32 immediate);
} // namespace Kernel