Kernel: Difference between revisions
No edit summary |
|||
Line 20: | Line 20: | ||
! Offset || Type || Description | ! Offset || Type || Description | ||
|- | |- | ||
| 0 || [[#KAutoObject]] || | | 0 || [[#KAutoObject]] || Inheritance | ||
|- | |- | ||
| 0x10 || u64 || ThreadSyncNum | | 0x10 || u64 || ThreadSyncNum | ||
|- | |- | ||
| 0x18 || [[#KLinkedListNode]] || ThreadSyncList | | 0x18 || [[#KLinkedListNode]] || ThreadSyncList | ||
|} | |||
= KRecursiveLock = | |||
Size: 0x8 | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Type || Description | |||
|- | |||
| 0 || u64 || OwnerTag | |||
|} | |||
= KSpinLock = | |||
Size: 0x1 | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Type || Description | |||
|- | |||
| 0 || u8 || IsBusy | |||
|} | |||
= KLockedList = | |||
Size: 0x28 | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Type || Description | |||
|- | |||
| 0 || u64 || Count | |||
|- | |||
| 8 || [[#KLinkedListNode]] || List | |||
|- | |||
| 0x18 || [[#KRecursiveLock]] || Mutex | |||
|- | |||
| 0x20 || u64 || MaxCount | |||
|} | |} | ||
Line 50: | Line 86: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KSynchronizationObject]] || Inheritance | ||
| [[#KSynchronizationObject]] | |||
| | |||
|- | |- | ||
| 0x28 | | 0x28 || || | ||
| | |||
| | |||
|- | |- | ||
| 0x38 | | 0x38 || [[#KMemoryManager]] || MemoryManager | ||
| [[# | |||
| MemoryManager | |||
|- | |- | ||
| 0xF0 | | 0xF0 || u64 || TotalMemUsage | ||
| u64 | |||
| TotalMemUsage | |||
|- | |- | ||
| 0xF8 | | 0xF8 || u64 || TlsPagesListCount | ||
| u64 | |||
| TlsPagesListCount | |||
|- | |- | ||
| 0x100 | | 0x100 || [[#KLinkedListNode]] || TlsPagesList | ||
| [[#KLinkedListNode]] | |||
| TlsPagesList | |||
|- | |- | ||
| 0x110 | | 0x110 || s32 || DefaultCpuCore | ||
| s32 | |||
| DefaultCpuCore | |||
|- | |- | ||
| 0x118 | | 0x118 || KDebug* || Debug | ||
| KDebug* | |||
| Debug | |||
|- | |- | ||
| 0x120 | | 0x120 || [[#KResourceLimit]]* || ResourceLimit | ||
| [[#KResourceLimit]]* | |||
| ResourceLimit | |||
|- | |- | ||
| 0x128 | | 0x128 || u32 || State | ||
| u32 | |||
| State | |||
|- | |- | ||
| 0x130 | | 0x130 || [[#KRecursiveLock]] || ProcessMutex | ||
| KRecursiveLock | |||
| ProcessMutex | |||
|- | |- | ||
| 0x138 | | 0x138 || [[#KRecursiveLock]] || ThreadingMutex | ||
| KRecursiveLock | |||
| ThreadingMutex | |||
|- | |- | ||
| 0x140 | | 0x140 || [[#KLinkedListNode]]<[[#KThread]]> || ThreadArbiterList | ||
| KLinkedListNode<KThread> | |||
| ThreadArbiterList | |||
|- | |- | ||
| 0x150 | | 0x150 || KLinkedListNode || | ||
| KLinkedListNode | |||
| | |||
|- | |- | ||
| 0x160 | | 0x160 || u64[4] || RandomEntropy | ||
| u64[4] | |||
| RandomEntropy | |||
|- | |- | ||
| 0x180 | | 0x180 || u8 || HasStateChanged | ||
| u8 | |||
| HasStateChanged | |||
|- | |- | ||
| 0x181 | | 0x181 || u8 || HasInitialized | ||
| u8 | |||
| HasInitialized | |||
|- | |- | ||
| 0x182 | | 0x182 || u8 || IsSystem | ||
| u8 | |||
| | |||
|- | |- | ||
| 0x183 | | 0x183 || u8[12] || From_CreateProcessInfo_0 | ||
| u8[12] | |||
| From_CreateProcessInfo_0 | |||
|- | |- | ||
| 0x18F | | 0x18F || u8 || InitiallyZero | ||
| u8 | |||
| InitiallyZero | |||
|- | |- | ||
| 0x190 | | 0x190 || u16 || NumberOfCreatedThreads | ||
| u16 | |||
| NumberOfCreatedThreads | |||
|- | |- | ||
| 0x192 | | 0x192 || u16 || ThreadingRelatedInitiallyZero | ||
| u16 | |||
| ThreadingRelatedInitiallyZero | |||
|- | |- | ||
| 0x194 | | 0x194 || u32 || ProcessFlags | ||
| u32 | |||
| ProcessFlags | |||
|- | |- | ||
| 0x198 | | 0x198 || [[#KProcessCapabilities]] || Capabilities | ||
| [[#KProcessCapabilities]] | |||
| Capabilities | |||
|- | |- | ||
| 0x248 | | 0x248 || u64 || TitleId | ||
| u64 | |||
| TitleId | |||
|- | |- | ||
| 0x250 | | 0x250 || u64 || ProcessId | ||
| u64 | |||
| ProcessId | |||
|- | |- | ||
| 0x258 | | 0x258 || u64 || CreatedTickstamp | ||
| u64 | |||
| CreatedTickstamp | |||
|- | |- | ||
| 0x260 | | 0x260 || u64 || Entrypoint | ||
| u64 | |||
| | |||
|- | |- | ||
| 0x268 | | 0x268 || u64 || CodeMemUsage | ||
| u64 | |||
| CodeMemUsage | |||
|- | |- | ||
| 0x270 | | 0x270 || u64 || DynamicMemUsage | ||
| u64 | |||
| DynamicMemUsage | |||
|- | |- | ||
| 0x278 | | 0x278 || u64 || MaxTotalMemUsage | ||
| u64 | |||
| MaxTotalMemUsage | |||
|- | |- | ||
| 0x280 | | 0x280 || u64 || From_CreateProcessInfo_0xC | ||
| u64 | |||
| From_CreateProcessInfo_0xC | |||
|- | |- | ||
| 0x288 | | 0x288 || [[#KProcessHandleTable]] || HandleTable | ||
| [[#KProcessHandleTable]] | |||
| HandleTable | |||
|- | |- | ||
| 0x528 | | 0x528 || void* || UsermodeExceptionTlsArea | ||
| void* | |||
| UsermodeExceptionTlsArea | |||
|- | |- | ||
| 0x530 | | 0x530 || [[#KLinkedListNode]]<[[#KThread]]> || ExceptionThreadList | ||
| KLinkedListNode<KThread> | |||
| ExceptionThreadList | |||
|- | |- | ||
| 0x540 | | 0x540 || [[#KThread]]* || ExceptionThread | ||
| KThread* | |||
| ExceptionThread | |||
|- | |- | ||
| 0x548 | | 0x548 || [[#KLinkedListNode]]<[[#KThread]]> || ThreadList | ||
| KLinkedListNode<KThread> | |||
| ThreadList | |||
|- | |- | ||
| 0x558 | | 0x558 || u32 || | ||
| u32 | |||
| | |||
|- | |- | ||
| 0x55C | | 0x55C || u32 || HasStarted | ||
| u32 | |||
| HasStarted | |||
|- | |- | ||
| 0x560 | | 0x560 || u64[8] || | ||
| u64[8] | |||
| | |||
|- | |- | ||
| 0x5A0 | | 0x5A0 || u64 || | ||
| u64 | |||
| | |||
|- | |- | ||
| 0x5A8 | | 0x5A8 || u64 || | ||
| u64 | |||
| | |||
|} | |} | ||
== | == KProcessCapabilities == | ||
Size: 0xB0 | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 226: | Line 180: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || u8[16] || SvcAccessMask | ||
| | |||
| | |||
|- | |- | ||
| | | 0x10 || u8[128] || IrqAccessMask | ||
| | |||
| | |||
|- | |- | ||
| | | 0x90 || u64 || AllowedCpuIdBitmask | ||
| u64 | |||
| | |||
|- | |- | ||
| | | 0x98 || u64 || AllowedThreadPrioBitmask | ||
| u64 | |||
| | |||
|- | |- | ||
| | | 0xA0 || u32 || DebuggingFlags (bit0: can be debugged, bit1: can debug others) | ||
| | |||
| | |||
|- | |- | ||
| | | 0xA4 || u32 || HandleTableSize | ||
| | |||
| | |||
|- | |- | ||
| | | 0xA8 || u32 || | ||
| | |||
| | |||
|- | |- | ||
| | | 0xAC || u32 || | ||
| | |} | ||
| | |||
== KProcessHandleTable == | |||
Size: 0x2A0 | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0 || [[#KHandleEntry]]* || TablePtr | |||
|- | |- | ||
| | | 8 || [[#KHandleEntry]]* || NextFreeEntry | ||
| | |||
| | |||
|- | |- | ||
| | | 0x10 || [[#KHandleEntry]][40] || InternalTable | ||
| | |||
| | |||
|- | |- | ||
| | | 0x290 || u16 || Size | ||
| | |||
| | |||
|- | |- | ||
| | | 0x292 || u16 || | ||
| | |||
| | |||
|- | |- | ||
| | | 0x294 || u16 || IdCounter | ||
| | |- | ||
| | | 0x296 || u16 || NumActiveSlots | ||
|- | |||
| 0x298 || [[#KSpinLock]] || Lock | |||
|} | |} | ||
== | === KHandleEntry === | ||
Size: | {| class="wikitable" border="1" | ||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0 || u16 || HandleId | |||
|- | |||
| 2 || u8 || ObjectType | |||
|- | |||
| 8 || [[#KAutoObject]]* || Object | |||
|} | |||
= KMemoryManager = | |||
Size: 0xB8 | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 288: | Line 246: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || * || Vtable | ||
| | |||
| | |||
|- | |- | ||
| | | 8 || u64 || AddrSpaceMinAddr | ||
| | |||
| | |||
|- | |- | ||
| | | 0x10 || u64 || AddrSpaceMaxAddr | ||
| u64 | |||
| | |||
|- | |- | ||
| | | 0x18 || u64 || HeapRegionBaseAddr | ||
| u64 | |||
| | |||
|- | |- | ||
| | | 0x20 || u64 || HeapRegionEndAddr | ||
| | |||
| | |||
|- | |- | ||
| | | 0x28 || u64 || HeapCurAddr | ||
| | |||
| | |||
|- | |- | ||
| | | 0x30 || u64 || MapRegionBaseAddr | ||
| | |||
| | |||
|- | |- | ||
| | | 0x38 || u64 || MapRegionEnd | ||
| u32 | |- | ||
| | | 0x40 || u64 || HeapMaxAllocation | ||
|- | |||
| 0x48 || [[#KRecursiveLock]] || Mutex | |||
|- | |||
| 0x50 || [[#KPageTable]] || PageTable | |||
|- | |||
| 0x60 || [[#KMemoryBlockManager]] || MemoryBlockManager | |||
|- | |||
| 0x78 || bool || IsKernel | |||
|- | |||
| 0x79 || bool || IsSystem | |||
|- | |||
| 0x7A || bool || IsAddrSpace36Bit | |||
|- | |||
| 0x7B || bool || HasAslr | |||
|- | |||
| 0x7C || u32 || Is_0x59_If_Cfg12_Bit0_ElseZero | |||
|- | |||
| 0x80 || u32 || Is_0x5A_If_Cfg12_Bit0_ElseZero | |||
|- | |||
| 0x84 || u32 || Is_0x58_If_Cfg12_Bit0_ElseZero | |||
|- | |||
| 0x88 || || | |||
|- | |||
| 0x90 || || | |||
|- | |||
| 0x98 || || | |||
|- | |||
| 0xA0 || u64 || TranslationTableBaseRegister0 | |||
|- | |||
| 0xA8 || u64 || TranslationControlRegister | |||
|- | |||
| 0xB0 || u8 || AsidTagValue | |||
|} | |} | ||
== | == KPageTable == | ||
Size: | Size: 0x10 | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 330: | Line 306: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || void* || RawPageTablePtr | ||
| | |||
| | |||
| | |||
| | |||
|- | |- | ||
| | | 8 || bool || | ||
| | |||
| | |||
|- | |- | ||
| | | 0xC || u32 || AddrSpaceSizeInGb | ||
| | |||
| | |||
|} | |} | ||
== | == KMemoryBlockManager == | ||
Size: 0x18 | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 370: | Line 322: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KMemoryBlock]]* || MemoryBlockList | ||
| | |||
| | |||
|- | |- | ||
| | | 8 || u64 || MaxAddr | ||
| | |||
| | |||
|- | |- | ||
| | | 0x10 || u64 || MinAddr | ||
| | |||
| | |||
|} | |} | ||
Line 392: | Line 338: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KLinkedListNode]]<[[#KMemoryBlock]]> || NodeFor__MemoryBlockList | ||
| [[#KMemoryBlock]] | |||
| | |||
|- | |- | ||
| | | 0x10 || || | ||
| | |||
| | |||
|- | |- | ||
| | | 0x18 || || | ||
| | |||
| | |||
|- | |- | ||
| | | 0x20 || u64 || BaseAddress | ||
| | |||
| | |||
|- | |- | ||
| | | 0x28 || u64 || NumOfPages | ||
| u64 | |||
| | |||
|- | |- | ||
| | | 0x30 || u32 || State | ||
| | |||
| | |||
|- | |- | ||
| | | 0x34 || u16 || IpcRefCount [?] | ||
| | |||
| | |||
|- | |- | ||
| | | 0x36 || u16 || DeviceMapRefCount | ||
| u16 | |||
| | |||
|- | |- | ||
| | | 0x38 || u8 || Permission | ||
| | |||
| | |||
|- | |- | ||
| | | 0x39 || u8 || UnkAttribute | ||
| u8 | |||
| | |||
|- | |- | ||
| | | 0x3A || u8 || Attribute | ||
| u8 | |||
| | |||
| Attribute | |||
|} | |} | ||
Line 450: | Line 370: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || u64 || BaseAddress | ||
| u64 | |||
| BaseAddress | |||
|- | |- | ||
| | | 8 || u64 || Size | ||
| | |||
| | |||
|- | |- | ||
| | | 0x10 || u32 || State | ||
| | |||
| | |||
|- | |- | ||
| | | 0x14 || u8 || Permission | ||
| u8 | |||
| | |||
|- | |- | ||
| | | 0x15 || u8 || Attribute | ||
| u8 | |||
| | |||
|- | |- | ||
| | | 0x16 || u8 || UnkAttribute | ||
| | |||
| | |||
|- | |- | ||
| 0x18 | | 0x18 || u16 || IpcRefCount [?] | ||
| u16 | |||
| IpcRefCount [?] | |||
|- | |- | ||
| 0x1A | | 0x1A || u16 || DeviceMapRefCount | ||
| u16 | |||
| DeviceMapRefCount | |||
|} | |} | ||
Line 498: | Line 398: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || KMemoryBlockList || Blocks | ||
| KMemoryBlockList | |||
| Blocks | |||
|- | |- | ||
| 0x28 | | 0x28 || [[#KProcess]]* || OwnerProcess | ||
| [[#KProcess]]* | |||
| OwnerProcess | |||
|- | |- | ||
| 0x30 | | 0x30 || u64 || BaseAddress | ||
| u64 | |||
| BaseAddress | |||
|- | |- | ||
| 0x38 | | 0x38 || KRecursiveLock || Mutex | ||
| KRecursiveLock | |||
| Mutex | |||
|- | |- | ||
| 0x40 | | 0x40 || int || Permission | ||
| int | |||
| Permission | |||
|- | |- | ||
| 0x44 | | 0x44 || bool || HasInited | ||
| bool | |||
| HasInited | |||
|- | |- | ||
| 0x45 | | 0x45 || bool || IsMapped | ||
| bool | |||
| IsMapped | |||
|} | |} | ||
Line 542: | Line 426: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || KMemoryBlockList || Blocks | ||
| KMemoryBlockList | |||
| Blocks | |||
|- | |- | ||
| 0x28 | | 0x28 || [[#KProcess]]* || OwnerProcess | ||
| [[#KProcess]]* | |||
| OwnerProcess | |||
|- | |- | ||
| 0x30 | | 0x30 || int || LocalPermission | ||
| int | |||
| | |||
|- | |- | ||
| 0x34 | | 0x34 || int || RemotePermission | ||
| int | |||
| | |||
|- | |- | ||
| 0x38 | | 0x38 || bool || HasInited | ||
| bool | |||
| HasInited | |||
|} | |} | ||
Line 578: | Line 450: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || [[#KServerPort]] || ServerSide | ||
| [[#KServerPort]] | |||
| ServerSide | |||
|- | |- | ||
| 0x60 | | 0x60 || [[#KClientPort]] || ClientSide | ||
| [[#KClientPort]] | |||
| ClientSide | |||
|- | |- | ||
| 0x98 | | 0x98 || u64 || | ||
| u64 | |||
| | |||
|- | |- | ||
| 0xA0 | | 0xA0 || bool || HasInited | ||
| bool | |||
| HasInited | |||
|- | |- | ||
| 0xA1 | | 0xA1 || bool || IsLight | ||
| bool | |||
| IsLight | |||
|} | |} | ||
Line 614: | Line 474: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KSynchronizationObject]] || Inheritance | ||
| [[#KSynchronizationObject]] | |||
| | |||
|- | |- | ||
| 0x28 | | 0x28 || [[#KLinkedListNode]] || IncomingConnections | ||
| [[#KLinkedListNode]] | |||
| IncomingConnections | |||
|- | |- | ||
| 0x38 | | 0x38 || [[#KLinkedListNode]] || IncomingLightConnections | ||
| [[#KLinkedListNode]] | |||
| IncomingLightConnections | |||
|- | |- | ||
| 0x48 | | 0x48 || [[#KPort]]* || Parent | ||
| [[#KPort]]* | |||
| Parent | |||
|} | |} | ||
Line 642: | Line 494: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KSynchronizationObject]] || Inheritance | ||
| [[#KSynchronizationObject]] | |||
| | |||
|- | |- | ||
| 0x28 | | 0x28 || u32 || NumSessions | ||
| u32 | |||
| NumSessions | |||
|- | |- | ||
| 0x2C | | 0x2C || u32 || MaxSessions | ||
| u32 | |||
| MaxSessions | |||
|- | |- | ||
| 0x30 | | 0x30 || [[#KPort]]* || Parent | ||
| [[#KPort]]* | |||
| Parent | |||
|} | |} | ||
Line 670: | Line 514: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || [[#KServerSession]] || ServerSide | ||
| [[#KServerSession]] | |||
| ServerSide | |||
|- | |- | ||
| 0x70 | | 0x70 || [[#KClientSession]] || ClientSide | ||
| [[#KClientSession]] | |||
| ClientSide | |||
|- | |- | ||
| 0xA8 | | 0xA8 || bool || HasInited | ||
| bool | |||
| HasInited | |||
|} | |} | ||
Line 698: | Line 534: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KSynchronizationObject]] || Inheritance | ||
| [[#KSynchronizationObject]] | |||
| | |||
|- | |- | ||
| 0x28 | | 0x28 || KLinkedListNode || NodeFor__IncomingConnections | ||
| KLinkedListNode | |||
| NodeFor__IncomingConnections | |||
|- | |- | ||
| 0x38 | | 0x38 || || | ||
| | |||
| | |||
|- | |- | ||
| 0x40 | | 0x40 || KLinkedListNode || | ||
| KLinkedListNode | |||
| | |||
|- | |- | ||
| 0x50 | | 0x50 || || | ||
| | |||
| | |||
|- | |- | ||
| 0x58 | | 0x58 || || | ||
| | |||
| | |||
|} | |} | ||
Line 734: | Line 558: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || [[#KSession]]* || Parent | ||
| [[#KSession]]* | |||
| Parent | |||
|- | |- | ||
| 0x18 | | 0x18 || bool || HasInited | ||
| bool | |||
| HasInited | |||
|- | |- | ||
| 0x20 | | 0x20 || [[#KClientPort]]* || ParentPort | ||
| [[#KClientPort]]* | |||
| ParentPort | |||
|- | |- | ||
| 0x28 | | 0x28 || || | ||
| | |||
| | |||
|- | |- | ||
| 0x30 | | 0x30 || [[#KProcess]]* || CreatorProcess | ||
| [[#KProcess]]* | |||
| CreatorProcess | |||
|} | |} | ||
Line 770: | Line 582: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || [[#KLightSessionServer]] || ServerSide | ||
| [[#KLightSessionServer]] | |||
| ServerSide | |||
|- | |- | ||
| 0x68 | | 0x68 || [[#KLightSessionClient]] || ClientSide | ||
| [[#KLightSessionClient]] | |||
| ClientSide | |||
|- | |- | ||
| 0xA0 | | 0xA0 || bool || HasInited | ||
| bool | |||
| HasInited | |||
|} | |} | ||
Line 798: | Line 602: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || KLinkedListNode || NodeFor__IncomingLightConnections | ||
| KLinkedListNode | |||
| NodeFor__IncomingLightConnections | |||
|- | |- | ||
| 0x20 | | 0x20 || [[#KLightSession]] || Parent | ||
| [[#KLightSession]] | |||
| Parent | |||
|- | |- | ||
| 0x28 | | 0x28 || u64[6] || | ||
| u64[6] | |||
| | |||
|} | |} | ||
Line 826: | Line 622: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || [[#KLightSession]]* || Parent | ||
| [[#KLightSession]]* | |||
| Parent | |||
|- | |- | ||
| 0x18 | | 0x18 || bool || HasInited | ||
| bool | |||
| HasInited | |||
|- | |- | ||
| 0x20 | | 0x20 || [[#KClientPort]]* || Port | ||
| [[#KClientPort]]* | |||
| Port | |||
|- | |- | ||
| 0x28 | | 0x28 || || | ||
| | |||
| | |||
|- | |- | ||
| 0x30 | | 0x30 || [[#KProcess]]* || CreatorProcess | ||
| [[#KProcess]]* | |||
| CreatorProcess | |||
|} | |} | ||
Line 862: | Line 646: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || [[#KReadableEvent]] || ReadableEvent | ||
| [[#KReadableEvent]] | |||
| ReadableEvent | |||
|- | |- | ||
| 0x48 | | 0x48 || [[#KWritableEvent]] || WritableEvent | ||
| [[#KWritableEvent]] | |||
| WritableEvent | |||
|- | |- | ||
| 0x60 | | 0x60 || [[#KProcess]]* || Creator | ||
| [[#KProcess]]* | |||
| Creator | |||
|- | |- | ||
| 0x68 | | 0x68 || bool || HasInited | ||
| bool | |||
| HasInited | |||
|} | |} | ||
Line 894: | Line 668: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KSynchronizationObject]] || Inheritance | ||
| [[#KSynchronizationObject]] | |||
| | |||
|- | |- | ||
| 0x28 | | 0x28 || bool || | ||
| bool | |||
| | |||
|- | |- | ||
| 0x30 | | 0x30 || [[#KEvent]]* || Parent | ||
| [[#KEvent]]* | |||
| Parent | |||
|} | |} | ||
Line 918: | Line 686: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || [[#KEvent]]* || Parent | ||
| [[#KEvent]]* | |||
| Parent | |||
|} | |} | ||
Line 938: | Line 702: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KReadableEvent]] || Inheritance | ||
| [[#KReadableEvent]] | |||
| | |||
|- | |- | ||
| 0x38 | | 0x38 || || | ||
| | |||
| | |||
|- | |- | ||
| 0x48 | | 0x48 || u32 || IrqId (or -1) | ||
| u32 | |||
| IrqId (or -1) | |||
|} | |} | ||
Line 962: | Line 720: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || [[#KAutoObject]] || Inheritance | ||
| [[#KAutoObject]] | |||
| | |||
|- | |- | ||
| 0x10 | | 0x10 || [[#KRecursiveLock]] || Mutex | ||
| KRecursiveLock | |||
| Mutex | |||
|- | |- | ||
| 0x18 | | 0x18 || [[#KSmmuManager]] || Manager | ||
| [[#KSmmuManager]] | |||
| Manager | |||
|- | |- | ||
| 0x58 | | 0x58 || u64 || BaseAddress | ||
| u64 | |||
| BaseAddress | |||
|- | |- | ||
| 0x60 | | 0x60 || u64 || Size | ||
| u64 | |||
| Size | |||
|- | |- | ||
| 0x68 | | 0x68 || bool || HasInited | ||
| bool | |||
| HasInited | |||
|} | |} | ||
Line 996: | Line 742: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 | | 0 || u8[4] || PageTableAsids | ||
| u8[4] | |||
| PageTableAsids | |||
|- | |- | ||
| 8 | | 8 || void*[4] || PageDirectories | ||
| void*[4] | |||
| PageDirectories | |||
|- | |- | ||
| 0x28 | | 0x28 || u64 || AttachedDevicesMask | ||
| u64 | |||
| AttachedDevicesMask | |||
|- | |- | ||
| 0x30 | | 0x30 || u32 || RegVal32Bit | ||
| u32 | |||
| RegVal32Bit | |||
|- | |- | ||
| 0x34 | | 0x34 || u32 || RegVal32BitEmpty | ||
| u32 | |||
| RegVal32BitEmpty | |||
|- | |- | ||
| 0x38 | | 0x38 || u32 || RegVal36Bit | ||
| u32 | |||
| RegVal36Bit | |||
|- | |- | ||
| 0x3C | | 0x3C || u32 || RegVal36BitEmpty | ||
| u32 | |||
| RegVal36BitEmpty | |||
|} | |} |
Revision as of 04:56, 21 August 2017
KAutoObject
Size: 0x10
Offset | Type | Description |
---|---|---|
0 | * | Vtable |
8 | u64 | ReferenceCount |
KSynchronizationObject
Size: 0x28
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | u64 | ThreadSyncNum |
0x18 | #KLinkedListNode | ThreadSyncList |
KRecursiveLock
Size: 0x8
Offset | Type | Description |
---|---|---|
0 | u64 | OwnerTag |
KSpinLock
Size: 0x1
Offset | Type | Description |
---|---|---|
0 | u8 | IsBusy |
KLockedList
Size: 0x28
Offset | Type | Description |
---|---|---|
0 | u64 | Count |
8 | #KLinkedListNode | List |
0x18 | #KRecursiveLock | Mutex |
0x20 | u64 | MaxCount |
KLinkedListNode
Size: 0x10
Offset | Type | Description |
---|---|---|
0 | #KLinkedListNode* | Prev |
8 | #KLinkedListNode* | Next |
KProcess
Size: 0x5B0
Inherits from: #KSynchronizationObject
Offset | Type | Description |
---|---|---|
0 | #KSynchronizationObject | Inheritance |
0x28 | ||
0x38 | #KMemoryManager | MemoryManager |
0xF0 | u64 | TotalMemUsage |
0xF8 | u64 | TlsPagesListCount |
0x100 | #KLinkedListNode | TlsPagesList |
0x110 | s32 | DefaultCpuCore |
0x118 | KDebug* | Debug |
0x120 | #KResourceLimit* | ResourceLimit |
0x128 | u32 | State |
0x130 | #KRecursiveLock | ProcessMutex |
0x138 | #KRecursiveLock | ThreadingMutex |
0x140 | #KLinkedListNode<#KThread> | ThreadArbiterList |
0x150 | KLinkedListNode | |
0x160 | u64[4] | RandomEntropy |
0x180 | u8 | HasStateChanged |
0x181 | u8 | HasInitialized |
0x182 | u8 | IsSystem |
0x183 | u8[12] | From_CreateProcessInfo_0 |
0x18F | u8 | InitiallyZero |
0x190 | u16 | NumberOfCreatedThreads |
0x192 | u16 | ThreadingRelatedInitiallyZero |
0x194 | u32 | ProcessFlags |
0x198 | #KProcessCapabilities | Capabilities |
0x248 | u64 | TitleId |
0x250 | u64 | ProcessId |
0x258 | u64 | CreatedTickstamp |
0x260 | u64 | Entrypoint |
0x268 | u64 | CodeMemUsage |
0x270 | u64 | DynamicMemUsage |
0x278 | u64 | MaxTotalMemUsage |
0x280 | u64 | From_CreateProcessInfo_0xC |
0x288 | #KProcessHandleTable | HandleTable |
0x528 | void* | UsermodeExceptionTlsArea |
0x530 | #KLinkedListNode<#KThread> | ExceptionThreadList |
0x540 | #KThread* | ExceptionThread |
0x548 | #KLinkedListNode<#KThread> | ThreadList |
0x558 | u32 | |
0x55C | u32 | HasStarted |
0x560 | u64[8] | |
0x5A0 | u64 | |
0x5A8 | u64 |
KProcessCapabilities
Size: 0xB0
Offset | Type | Description |
---|---|---|
0 | u8[16] | SvcAccessMask |
0x10 | u8[128] | IrqAccessMask |
0x90 | u64 | AllowedCpuIdBitmask |
0x98 | u64 | AllowedThreadPrioBitmask |
0xA0 | u32 | DebuggingFlags (bit0: can be debugged, bit1: can debug others) |
0xA4 | u32 | HandleTableSize |
0xA8 | u32 | |
0xAC | u32 |
KProcessHandleTable
Size: 0x2A0
Offset | Type | Description |
---|---|---|
0 | #KHandleEntry* | TablePtr |
8 | #KHandleEntry* | NextFreeEntry |
0x10 | #KHandleEntry[40] | InternalTable |
0x290 | u16 | Size |
0x292 | u16 | |
0x294 | u16 | IdCounter |
0x296 | u16 | NumActiveSlots |
0x298 | #KSpinLock | Lock |
KHandleEntry
Offset | Type | Description |
---|---|---|
0 | u16 | HandleId |
2 | u8 | ObjectType |
8 | #KAutoObject* | Object |
KMemoryManager
Size: 0xB8
Offset | Type | Description |
---|---|---|
0 | * | Vtable |
8 | u64 | AddrSpaceMinAddr |
0x10 | u64 | AddrSpaceMaxAddr |
0x18 | u64 | HeapRegionBaseAddr |
0x20 | u64 | HeapRegionEndAddr |
0x28 | u64 | HeapCurAddr |
0x30 | u64 | MapRegionBaseAddr |
0x38 | u64 | MapRegionEnd |
0x40 | u64 | HeapMaxAllocation |
0x48 | #KRecursiveLock | Mutex |
0x50 | #KPageTable | PageTable |
0x60 | #KMemoryBlockManager | MemoryBlockManager |
0x78 | bool | IsKernel |
0x79 | bool | IsSystem |
0x7A | bool | IsAddrSpace36Bit |
0x7B | bool | HasAslr |
0x7C | u32 | Is_0x59_If_Cfg12_Bit0_ElseZero |
0x80 | u32 | Is_0x5A_If_Cfg12_Bit0_ElseZero |
0x84 | u32 | Is_0x58_If_Cfg12_Bit0_ElseZero |
0x88 | ||
0x90 | ||
0x98 | ||
0xA0 | u64 | TranslationTableBaseRegister0 |
0xA8 | u64 | TranslationControlRegister |
0xB0 | u8 | AsidTagValue |
KPageTable
Size: 0x10
Offset | Type | Description |
---|---|---|
0 | void* | RawPageTablePtr |
8 | bool | |
0xC | u32 | AddrSpaceSizeInGb |
KMemoryBlockManager
Size: 0x18
Offset | Type | Description |
---|---|---|
0 | #KMemoryBlock* | MemoryBlockList |
8 | u64 | MaxAddr |
0x10 | u64 | MinAddr |
KMemoryBlock
Size: 0x40
Offset | Type | Description |
---|---|---|
0 | #KLinkedListNode<#KMemoryBlock> | NodeFor__MemoryBlockList |
0x10 | ||
0x18 | ||
0x20 | u64 | BaseAddress |
0x28 | u64 | NumOfPages |
0x30 | u32 | State |
0x34 | u16 | IpcRefCount [?] |
0x36 | u16 | DeviceMapRefCount |
0x38 | u8 | Permission |
0x39 | u8 | UnkAttribute |
0x3A | u8 | Attribute |
KMemoryBlockInfo
Size: 0x20
Offset | Type | Description |
---|---|---|
0 | u64 | BaseAddress |
8 | u64 | Size |
0x10 | u32 | State |
0x14 | u8 | Permission |
0x15 | u8 | Attribute |
0x16 | u8 | UnkAttribute |
0x18 | u16 | IpcRefCount [?] |
0x1A | u16 | DeviceMapRefCount |
KTransferMemory
Size: 0x48
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | KMemoryBlockList | Blocks |
0x28 | #KProcess* | OwnerProcess |
0x30 | u64 | BaseAddress |
0x38 | KRecursiveLock | Mutex |
0x40 | int | Permission |
0x44 | bool | HasInited |
0x45 | bool | IsMapped |
Size: 0x40
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | KMemoryBlockList | Blocks |
0x28 | #KProcess* | OwnerProcess |
0x30 | int | LocalPermission |
0x34 | int | RemotePermission |
0x38 | bool | HasInited |
KPort
Size: 0xA8
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | #KServerPort | ServerSide |
0x60 | #KClientPort | ClientSide |
0x98 | u64 | |
0xA0 | bool | HasInited |
0xA1 | bool | IsLight |
KServerPort
Size: 0x50
Inherits from: #KSynchronizationObject
Offset | Type | Description |
---|---|---|
0 | #KSynchronizationObject | Inheritance |
0x28 | #KLinkedListNode | IncomingConnections |
0x38 | #KLinkedListNode | IncomingLightConnections |
0x48 | #KPort* | Parent |
KClientPort
Size: 0x38
Inherits from: #KSynchronizationObject
Offset | Type | Description |
---|---|---|
0 | #KSynchronizationObject | Inheritance |
0x28 | u32 | NumSessions |
0x2C | u32 | MaxSessions |
0x30 | #KPort* | Parent |
KSession
Size: 0xB0
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | #KServerSession | ServerSide |
0x70 | #KClientSession | ClientSide |
0xA8 | bool | HasInited |
KServerSession
Size: 0x60
Inherits from: #KSynchronizationObject
Offset | Type | Description |
---|---|---|
0 | #KSynchronizationObject | Inheritance |
0x28 | KLinkedListNode | NodeFor__IncomingConnections |
0x38 | ||
0x40 | KLinkedListNode | |
0x50 | ||
0x58 |
KClientSession
Size: 0x38
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | #KSession* | Parent |
0x18 | bool | HasInited |
0x20 | #KClientPort* | ParentPort |
0x28 | ||
0x30 | #KProcess* | CreatorProcess |
KLightSession
Size: 0xA8
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | #KLightSessionServer | ServerSide |
0x68 | #KLightSessionClient | ClientSide |
0xA0 | bool | HasInited |
KLightServerSession
Size: 0x58
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | KLinkedListNode | NodeFor__IncomingLightConnections |
0x20 | #KLightSession | Parent |
0x28 | u64[6] |
KLightClientSession
Size: 0x38
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | #KLightSession* | Parent |
0x18 | bool | HasInited |
0x20 | #KClientPort* | Port |
0x28 | ||
0x30 | #KProcess* | CreatorProcess |
KEvent
Size: 0x70
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | #KReadableEvent | ReadableEvent |
0x48 | #KWritableEvent | WritableEvent |
0x60 | #KProcess* | Creator |
0x68 | bool | HasInited |
KReadableEvent
Size: 0x38
Inherits from: #KSynchronizationEvent
Offset | Type | Description |
---|---|---|
0 | #KSynchronizationObject | Inheritance |
0x28 | bool | |
0x30 | #KEvent* | Parent |
KWritableEvent
Size: 0x18
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | #KEvent* | Parent |
KInterruptEvent
Size: 0x50
Inherits from: #KReadableEvent
Offset | Type | Description |
---|---|---|
0 | #KReadableEvent | Inheritance |
0x38 | ||
0x48 | u32 | IrqId (or -1) |
KAddressSpace
Size: 0x70
Inherits from: #KAutoObject
Offset | Type | Description |
---|---|---|
0 | #KAutoObject | Inheritance |
0x10 | #KRecursiveLock | Mutex |
0x18 | #KSmmuManager | Manager |
0x58 | u64 | BaseAddress |
0x60 | u64 | Size |
0x68 | bool | HasInited |
KSmmuManager
Size: 0x40
Offset | Type | Description |
---|---|---|
0 | u8[4] | PageTableAsids |
8 | void*[4] | PageDirectories |
0x28 | u64 | AttachedDevicesMask |
0x30 | u32 | RegVal32Bit |
0x34 | u32 | RegVal32BitEmpty |
0x38 | u32 | RegVal36Bit |
0x3C | u32 | RegVal36BitEmpty |