2014-04-11 15:44:21 -07:00
|
|
|
// Copyright 2014 Citra Emulator Project
|
2014-12-16 21:38:14 -08:00
|
|
|
// Licensed under GPLv2 or any later version
|
2014-11-19 00:49:13 -08:00
|
|
|
// Refer to the license.txt file included.
|
2014-04-11 15:44:21 -07:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
2014-05-15 15:25:56 -07:00
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
2014-05-18 15:12:29 -07:00
|
|
|
// SVC types
|
2014-05-15 15:25:56 -07:00
|
|
|
|
2014-05-15 17:17:30 -07:00
|
|
|
struct MemoryInfo {
|
2017-10-14 14:31:25 -07:00
|
|
|
u64 base_address;
|
|
|
|
u64 size;
|
|
|
|
u64 permission;
|
|
|
|
u64 state;
|
2014-05-15 17:17:30 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct PageInfo {
|
2017-10-14 14:31:25 -07:00
|
|
|
u64 flags;
|
2014-05-15 17:17:30 -07:00
|
|
|
};
|
|
|
|
|
2014-04-11 15:44:21 -07:00
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
2014-05-20 15:28:38 -07:00
|
|
|
// Namespace SVC
|
2014-04-11 15:44:21 -07:00
|
|
|
|
2014-05-20 15:28:38 -07:00
|
|
|
namespace SVC {
|
2014-04-11 15:44:21 -07:00
|
|
|
|
2015-11-26 19:00:16 -08:00
|
|
|
/// Values accepted by svcGetSystemInfo's type parameter.
|
|
|
|
enum class SystemInfoType {
|
|
|
|
/**
|
|
|
|
* Reports total used memory for all regions or a specific one, according to the extra
|
|
|
|
* parameter. See `SystemInfoMemUsageRegion`.
|
|
|
|
*/
|
|
|
|
REGION_MEMORY_USAGE = 0,
|
|
|
|
/**
|
|
|
|
* Returns the memory usage for certain allocations done internally by the kernel.
|
|
|
|
*/
|
|
|
|
KERNEL_ALLOCATED_PAGES = 2,
|
|
|
|
/**
|
|
|
|
* "This returns the total number of processes which were launched directly by the kernel.
|
|
|
|
* For the ARM11 NATIVE_FIRM kernel, this is 5, for processes sm, fs, pm, loader, and pxi."
|
|
|
|
*/
|
|
|
|
KERNEL_SPAWNED_PIDS = 26,
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Accepted by svcGetSystemInfo param with REGION_MEMORY_USAGE type. Selects a region to query
|
|
|
|
* memory usage of.
|
|
|
|
*/
|
|
|
|
enum class SystemInfoMemUsageRegion {
|
|
|
|
ALL = 0,
|
|
|
|
APPLICATION = 1,
|
|
|
|
SYSTEM = 2,
|
|
|
|
BASE = 3,
|
|
|
|
};
|
|
|
|
|
2015-07-21 00:51:36 -07:00
|
|
|
void CallSVC(u32 immediate);
|
2014-04-11 15:44:21 -07:00
|
|
|
|
|
|
|
} // namespace
|