summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc.h
blob: 42cc41da3e785d0d7d60edff7cb5ac2bef4d7a9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright 2018 yuzu emulator team
// 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;
};

struct PageInfo {
    u64 flags;
};

/// Values accepted by svcGetInfo
enum class GetInfoType : u64 {
    // 1.0.0+
    AllowedCpuIdBitmask = 0,
    AllowedThreadPrioBitmask = 1,
    MapRegionBaseAddr = 2,
    MapRegionSize = 3,
    HeapRegionBaseAddr = 4,
    HeapRegionSize = 5,
    TotalMemoryUsage = 6,
    TotalHeapUsage = 7,
    IsCurrentProcessBeingDebugged = 8,
    ResourceHandleLimit = 9,
    IdleTickCount = 10,
    RandomEntropy = 11,
    PerformanceCounter = 0xF0000002,
    // 2.0.0+
    AddressSpaceBaseAddr = 12,
    AddressSpaceSize = 13,
    NewMapRegionBaseAddr = 14,
    NewMapRegionSize = 15,
    // 3.0.0+
    IsVirtualAddressMemoryEnabled = 16,
    TitleId = 18,
    // 4.0.0+
    PrivilegedProcessId = 19,
};

void CallSVC(u32 immediate);

} // namespace Kernel