Thread Local Region: Difference between revisions
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
| [[IPC_Marshalling|IPC]] command buffer. | | [[IPC_Marshalling|IPC]] command buffer. | ||
|- | |- | ||
| | | 0x100 | ||
| 0x2 | | 0x2 | ||
| DisableCounter | | [8.0.0+] DisableCounter | ||
| If userland sets this to non-zero, kernel will pin the thread and disallow calls to almost all SVCs. | | If userland sets this to non-zero, kernel will pin the thread and disallow calls to almost all SVCs. | ||
|- | |- | ||
| | | 0x102 | ||
| 0x2 | | 0x2 | ||
| InterruptFlag | | [8.0.0+] InterruptFlag | ||
| If a context switch would have occurred when user disable count was non-zero, kernel will set this to 1. This signifies that the user must call [[SVC#SynchronizePreemptionState|SynchronizePreemptionState]] to unpin itself and regain access other SVCs. | | If a context switch would have occurred when user disable count was non-zero, kernel will set this to 1. This signifies that the user must call [[SVC#SynchronizePreemptionState|SynchronizePreemptionState]] to unpin itself and regain access other SVCs. | ||
|- | |- | ||
| 0x104 | | 0x104 | ||
| | | 0x1 | ||
| | | [14.0.0+] CacheMaintenanceFlag | ||
| | | | ||
|- | |- | ||
| | | 0x105 | ||
| | | 0x7B | ||
| Reserved | | Reserved | ||
| | | | ||
Line 69: | Line 69: | ||
| 0x8 | | 0x8 | ||
| ThreadType | | ThreadType | ||
| Pointer to [[ | | Pointer to [[#ThreadType|thread type]]. | ||
|} | |} | ||
= Userland context = | = Userland context = | ||
== | == OsResourceManager == | ||
This is "nn::os::detail:: | This is "nn::os::detail::OsResourceManager". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 83: | Line 83: | ||
! Description | ! Description | ||
|- | |- | ||
| | | 0x0 | ||
| | | 0x14 | ||
| | | [[#RngManager|RngManager]] | ||
| | | | ||
|- | |||
| 0x14 | |||
| 0x4 | |||
| Reserved | |||
| | |||
|- | |||
| 0x18 | |||
| 0x28 | |||
| [[#AslrSpaceManager|AslrSpaceManager]] | |||
| | |||
|- | |||
| 0x40 | |||
| 0x28 | |||
| [[#StackGuardManager|StackGuardManager]] | |||
| | |||
|- | |||
| 0x68 | |||
| 0x1F0 | |||
| [[#ThreadManager|ThreadManager]] | |||
| | |||
|- | |||
| 0x258 | |||
| 0x110 | |||
| [[#TlsManager|TlsManager]] | |||
| | |||
|- | |||
| 0x368 | |||
| 0x1 | |||
| [[#TickManager|TickManager]] | |||
| | |||
|- | |- | ||
| | | 0x369 | ||
| | | 0x7 | ||
| | | Reserved | ||
| | | | ||
|- | |- | ||
| | | 0x370 | ||
| 0x30 | | 0x30 | ||
| | | [[#MemoryHeapManager|MemoryHeapManager]] | ||
| | | | ||
|- | |||
| 0x3A0 | |||
| 0x48 | |||
| [[#VammManager|VammManager]] | |||
| | |||
|} | |} | ||
== | === RngManager === | ||
This is "nn::os::detail:: | This is "nn::os::detail::RngManager". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 109: | Line 144: | ||
! Description | ! Description | ||
|- | |- | ||
| | | 0x0 | ||
| | | 0x4 | ||
| | | CriticalSection | ||
| | | | ||
|- | |- | ||
| | | 0x4 | ||
| 0x10 | | 0x10 | ||
| | | Random | ||
| | | | ||
|} | |||
=== AslrSpaceManager === | |||
This is "nn::os::detail::AslrSpaceManager". | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Offset | |||
! Size | |||
! Name | |||
! Description | |||
|- | |- | ||
| | | 0x0 | ||
| | | 0x20 | ||
| | | [[#AddressSpaceAllocator|Allocator]] | ||
| | | | ||
|- | |- | ||
| 0x20 | | 0x20 | ||
| | | 0x1 | ||
| | | Impl | ||
| | | | ||
|- | |||
| 0x21 | |||
| 0x7 | |||
| Reserved | |||
| | |||
|} | |||
=== StackGuardManager === | |||
This is "nn::os::detail::StackGuardManager". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Name | |||
! Description | |||
|- | |- | ||
| | | 0x0 | ||
| | | 0x20 | ||
| | | [[#AddressSpaceAllocator|Allocator]] | ||
| | |||
|- | |- | ||
| | | 0x20 | ||
| | | 0x1 | ||
| | | Impl | ||
| | | | ||
|- | |- | ||
| | | 0x21 | ||
| | | 0x7 | ||
| | | Reserved | ||
| | | | ||
|} | |||
=== ThreadManager === | |||
This is "nn::os::detail::ThreadManager". | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Offset | |||
! Size | |||
! Name | |||
! Description | |||
|- | |- | ||
| | | 0x0 | ||
| | | 0x1 | ||
| | | Impl | ||
| | | | ||
|- | |- | ||
| | | 0x1 | ||
| | | 0x7 | ||
| | | Reserved | ||
| | | | ||
|- | |- | ||
| | | 0x8 | ||
| | | 0x1C0 | ||
| | | [[#ThreadType|MainThread]] | ||
| | | | ||
|- | |- | ||
| | | 0x1C8 | ||
| | | 0x4 | ||
| | | CriticalSection | ||
| | | | ||
|- | |- | ||
| | | 0x1CC | ||
| | | 0x4 | ||
| | | Reserved | ||
| | | | ||
|- | |- | ||
| 0x1D0 | | 0x1D0 | ||
| | | 0x10 | ||
| | | AllThreadsList | ||
| | |||
|- | |||
| 0x1E0 | |||
| 0x8 | |||
| TotalThreadStackSize | |||
| | |||
|- | |||
| 0x1E8 | |||
| 0x4 | |||
| NumCreatedThreads | |||
| | |||
|- | |||
| 0x1EC | |||
| 0x4 | |||
| Reserved | |||
| | |||
|} | |||
=== TlsManager === | |||
This is "nn::os::detail::TlsManager". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Name | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| NumUsedTlsSlots | |||
| | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| Reserved | |||
| | |||
|- | |||
| 0x8 | |||
| 0x100 | |||
| TlsDestructorArray | |||
| | |||
|- | |||
| 0x108 | |||
| 0x4 | |||
| TlsCriticalSection | |||
| | |||
|- | |||
| 0x10C | |||
| 0x4 | |||
| Reserved | |||
| | |||
|} | |||
=== TickManager === | |||
This is "nn::os::detail::TickManager". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Name | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x1 | |||
| Impl | |||
| | |||
|} | |||
=== MemoryHeapManager === | |||
This is "nn::os::detail::MemoryHeapManager". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Name | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x8 | |||
| HeapAddress | |||
| | |||
|- | |||
| 0x8 | |||
| 0x8 | |||
| HeapSize | |||
| | |||
|- | |||
| 0x10 | |||
| 0x8 | |||
| UsedHeapSize | |||
| | |||
|- | |||
| 0x18 | |||
| 0x10 | |||
| FreeMemoryList | |||
| | |||
|- | |||
| 0x28 | |||
| 0x4 | |||
| CriticalSection | |||
| | |||
|- | |||
| 0x2C | |||
| 0x4 | |||
| Impl | |||
| | |||
|} | |||
=== VammManager === | |||
This is "nn::os::detail::VammManager". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Name | |||
! Description | |||
|- | |||
| 0x0 | |||
| 0x8 | |||
| ReservedRegionAddress | |||
| | |||
|- | |||
| 0x8 | |||
| 0x8 | |||
| ReservedRegionSize | |||
| | |||
|- | |- | ||
| | | 0x10 | ||
| | | 0x30 | ||
| | | ReaderWriterLock | ||
| | | | ||
|- | |- | ||
| | | 0x40 | ||
| | | 0x8 | ||
| | | RegionManager | ||
| | | | ||
|} | |||
=== AddressSpaceAllocator === | |||
This is "nn::os::detail::AddressSpaceAllocator". | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Offset | |||
! Size | |||
! Name | |||
! Description | |||
|- | |- | ||
| | | 0x0 | ||
| | | 0x4 | ||
| | | CriticalSection | ||
| | | | ||
|- | |- | ||
| | | 0x4 | ||
| | | 0x4 | ||
| | | Reserved | ||
| | | | ||
|- | |- | ||
| | | 0x8 | ||
| | | 0x8 | ||
| | | BeginPage | ||
| | | | ||
|- | |- | ||
| | | 0x10 | ||
| | | 0x8 | ||
| | | EndPage | ||
| | | | ||
|- | |- | ||
| | | 0x18 | ||
| | | 0x8 | ||
| | | GuardPageCount | ||
| | | | ||
|} | |} | ||