mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
svc: Add new InfoTypes
This commit is contained in:
parent
b69d2fa95e
commit
c8c4406467
@ -209,6 +209,8 @@ typedef enum {
|
||||
InfoType_FreeThreadCount = 24, ///< [11.0.0+] The number of free threads available to the process's resource limit.
|
||||
InfoType_ThreadTickCount = 25, ///< [13.0.0+] Number of ticks spent on thread.
|
||||
InfoType_IsSvcPermitted = 26, ///< [14.0.0+] Does process have access to SVC (only usable with \ref svcSynchronizePreemptionState at present).
|
||||
InfoType_IoRegionHint = 27, ///< [16.0.0+] Low bits of the physical address for a KIoRegion.
|
||||
InfoType_AliasRegionExtraSize = 28, ///< [18.0.0+] Extra size added to the reserved region.
|
||||
|
||||
InfoType_ThreadTickCountDeprecated = 0xF0000002, ///< [1.0.0-12.1.0] Number of ticks spent on thread.
|
||||
} InfoType;
|
||||
|
@ -160,6 +160,13 @@ void virtmemSetup(void) {
|
||||
diagAbortWithResult(MAKERESULT(Module_Libnx, LibnxError_WeirdKernel));
|
||||
}
|
||||
|
||||
// Account for the alias region extra size.
|
||||
u64 alias_extra_size;
|
||||
rc = svcGetInfo(&alias_extra_size, InfoType_AliasRegionExtraSize, CUR_PROCESS_HANDLE, 0);
|
||||
if (R_SUCCEEDED(rc)) {
|
||||
g_AliasRegion.end -= alias_extra_size;
|
||||
}
|
||||
|
||||
// Retrieve memory region information for the reserved heap region.
|
||||
rc = _memregionInitWithInfo(&g_HeapRegion, InfoType_HeapRegionAddress, InfoType_HeapRegionSize);
|
||||
if (R_FAILED(rc)) {
|
||||
|
Loading…
Reference in New Issue
Block a user