Kernel: Implement svcGetSystemInfo
This makes smealum/ctrulib@b96dd51d33 work with Citra.
This commit is contained in:
parent
32f92b4a69
commit
84a22cb594
7 changed files with 95 additions and 1 deletions
|
@ -41,6 +41,35 @@ enum ArbitrationType {
|
|||
|
||||
namespace SVC {
|
||||
|
||||
/// 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,
|
||||
};
|
||||
|
||||
void CallSVC(u32 immediate);
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue