<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Patois</id>
	<title>3dbrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Patois"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/Patois"/>
	<updated>2026-04-18T14:23:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CONFIG9_Registers&amp;diff=12423</id>
		<title>CONFIG9 Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CONFIG9_Registers&amp;diff=12423"/>
		<updated>2015-04-17T11:57:58Z</updated>

		<summary type="html">&lt;p&gt;Patois: /* Registers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG_SYSPROT9|CFG_SYSPROT9]]&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| 1&lt;br /&gt;
| Boot9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG_SYSPROT11|CFG_SYSPROT11]]&lt;br /&gt;
| 0x10000001&lt;br /&gt;
| 1&lt;br /&gt;
| Boot9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| CFG_DEBUGUNIT&lt;br /&gt;
| 0x10000004&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG_CARDCONF|CFG_CARDCONF]]&lt;br /&gt;
| 0x1000000C&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| CFG_DEBUGGER&lt;br /&gt;
| 0x10000010&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10000011&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10000012&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10000014&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10000020&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10000100&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG_EXTMEMCNT9|CFG_EXTMEMCNT9]]&lt;br /&gt;
| 0x10000200&lt;br /&gt;
| 1&lt;br /&gt;
| NewKernel9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG_MPCORECFG|CFG_MPCORECFG]]&lt;br /&gt;
| 0x10000FFC&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG_BOOTENV|CFG_BOOTENV]]&lt;br /&gt;
| 0x10010000&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG_UNITINFO|CFG_UNITINFO]]&lt;br /&gt;
| 0x10010010&lt;br /&gt;
| 1&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10010014&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CFG_SYSPROT9 == &lt;br /&gt;
Writing values to SYSPROT sets the specified bitmask. The ARM9 [[Memory_layout|bootrom]](+0x8000) is disabled by writing bit0. bit1 is used by NATIVE_FIRM to make sure console-unique TWL AES-keys are only set at hard-boot. It is not possible to set any other bits.&lt;br /&gt;
&lt;br /&gt;
From disassembly of the New3DS process9, it appears that setting bit1 disables the 0x10012000+ region.&lt;br /&gt;
&lt;br /&gt;
== CFG_SYSPROT11 == &lt;br /&gt;
ARM11 bootrom (+0x8000) is disabled by writing bit0. It is not possible to set any other bits.&lt;br /&gt;
&lt;br /&gt;
== CFG_CARDCONF ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 1-0&lt;br /&gt;
| Gamecard active controller select (0=NTRCARD, 1=?, 2=CTRCARD1, 3=CTRCARD2)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| ?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Depending on the gamecard controller that has been selected, one of the following gamecard registers will become active:&lt;br /&gt;
* Selecting NTRCARD will activate the register space at [[NTRCARD|0x10164000]].&lt;br /&gt;
* Selecting CTRCARD1 will activate the register space at [[CTRCARD|0x10004000]].&lt;br /&gt;
* Selecting CTRCARD2 will activate the register space at [[CTRCARD|0x10005000]].&lt;br /&gt;
&lt;br /&gt;
== CFG_EXTMEMCNT9 ==&lt;br /&gt;
This register is presumably New3DS-only. Only bit0 is writable: 0 = disable New3DS ARM9 memory at 0x08100000 size 0x80000, 1 = enable.&lt;br /&gt;
&lt;br /&gt;
This bit is set by New3DS ARM9-kernel crt0.&lt;br /&gt;
&lt;br /&gt;
The data in this extended memory doesn&#039;t change when disabling the memory, then re-enabling the memory. Reading this extended memory while disabled results in zeros.&lt;br /&gt;
&lt;br /&gt;
== CFG_MPCORECFG ==&lt;br /&gt;
Identical to [[PDN#PDN_MPCORE_CFG|PDN_MPCORE_CFG]].&lt;br /&gt;
&lt;br /&gt;
== CFG_BOOTENV ==&lt;br /&gt;
Initially this is value zero. NATIVE_FIRM writes value 1 here when a FIRM launch begins. The [[Legacy_FIRM_PXI|LGY]] FIRM writes value 3 here when handling PXI command 0x00020080(first TWL PXI command), it also writes value 7 here when handling PXI command 0x00030080(first AGB PXI command). This register can be read to determine what &amp;quot;mode&amp;quot; the system is running under: hard-boot, FIRM launch, or TWL/AGB FIRM.&lt;br /&gt;
&lt;br /&gt;
0=Cold boot, 1=CTR, 3=TWL, 5=NTR, 7=AGB&lt;br /&gt;
&lt;br /&gt;
It is unknown if this register controls anything.&lt;br /&gt;
&lt;br /&gt;
== CFG_UNITINFO ==&lt;br /&gt;
This 8-bit register is value zero for retail, non-zero for dev/debug units.&lt;br /&gt;
&lt;br /&gt;
== 0x10010014 ==&lt;br /&gt;
In the console-unique TWL key-init/etc function the ARM9 copies the u8 value from REG_UNITINFO to this register.&lt;br /&gt;
&lt;br /&gt;
This is also used by TWL_FIRM Process9.&lt;/div&gt;</summary>
		<author><name>Patois</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=KProcess&amp;diff=11909</id>
		<title>KProcess</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=KProcess&amp;diff=11909"/>
		<updated>2015-03-13T07:56:35Z</updated>

		<summary type="html">&lt;p&gt;Patois: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Kernel objects]]&lt;br /&gt;
class [[KProcess]] extends [[KSynchronizationObject]];&lt;br /&gt;
&lt;br /&gt;
Size : 0x260 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
! Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to vtable&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Reference count&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| u32&lt;br /&gt;
| Count of KThreads that sync with this object - number of nodes in the linked list below&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in node list of KThreads that sync with this object&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in node list of KThreads that sync with this object&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| volatile KThread*&lt;br /&gt;
| 0 or pointer to the thread the currently does something with the process object.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| s16&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in list of KMemoryBlocks used by the process&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in list of KMemoryBlocks used by the process &lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| u32&lt;br /&gt;
| Translation table base&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| u8&lt;br /&gt;
| Context ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| u32&lt;br /&gt;
| Size of the MMU table &lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| u32&lt;br /&gt;
| Virtual address of the MMU table for this process&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| u32&lt;br /&gt;
| Total size of all thread context pages (0xFF4xxxxx) owned by threads that belong to this process&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| u32&lt;br /&gt;
| Number of KThreadLocalPages used by this KProcess&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in the list of KThreadLocalPages&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in the list of KThreadLocalPages&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| s32&lt;br /&gt;
| Ideal processor&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to resource limits for process. &lt;br /&gt;
|-&lt;br /&gt;
| 0x79&lt;br /&gt;
| u8&lt;br /&gt;
| Proc affinity mask&lt;br /&gt;
|-&lt;br /&gt;
| 0x7C&lt;br /&gt;
| u32&lt;br /&gt;
| Number of threads which belong to this process.&lt;br /&gt;
|-&lt;br /&gt;
| 0x80&lt;br /&gt;
| 0x10-bytes&lt;br /&gt;
| SVC access control mask from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x90&lt;br /&gt;
| 0x10-bytes&lt;br /&gt;
| Interrupt flags- 32 interrupts per word, 4 words, 0x80 interrupts total divided evenly across 4 words&lt;br /&gt;
|-&lt;br /&gt;
| 0xA0&lt;br /&gt;
| u32&lt;br /&gt;
| Kernel flags from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA4&lt;br /&gt;
| u16&lt;br /&gt;
| Handle table size from the exheader kernel descriptors. When this is 0, handle table is stored in WRAM.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA6&lt;br /&gt;
| u16&lt;br /&gt;
| Kernel release version field, from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA8&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to [[KCodeSet]] instance&lt;br /&gt;
|-&lt;br /&gt;
| 0xAC&lt;br /&gt;
| u32&lt;br /&gt;
| Process id, this always begins at 0x0 for the first process.&lt;br /&gt;
|-&lt;br /&gt;
| 0xB0&lt;br /&gt;
| u32&lt;br /&gt;
| Kernel flags from the exheader kernel descriptors. &lt;br /&gt;
|-&lt;br /&gt;
| 0xB8&lt;br /&gt;
| KThread*&lt;br /&gt;
| Pointer to the process&#039;s main (?) thread.&lt;br /&gt;
|-&lt;br /&gt;
| 0xCC&lt;br /&gt;
| KProcessHandleTable &lt;br /&gt;
| Pointer to the process&#039;s handle table. until 0x1C4 or longer&lt;br /&gt;
|-&lt;br /&gt;
| 0x224&lt;br /&gt;
| u32&lt;br /&gt;
| ?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Structure starting with [[8.0.0-18]] NATIVE_FIRM:&lt;br /&gt;
&lt;br /&gt;
Size : 0x268 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
! Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to vtable&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Reference count&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| u32&lt;br /&gt;
| Count of KThreads that sync with this object - number of nodes in the linked list below&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in node list of KThreads that sync with this object&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in node list of KThreads that sync with this object&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| u32&lt;br /&gt;
| Count of KMemoryBlocks owned by the process&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in list of KMemoryBlocks used by the process&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in list of KMemoryBlocks used by the process&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| u32&lt;br /&gt;
| Translation table base&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| u8&lt;br /&gt;
| Context ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
| u32&lt;br /&gt;
| End of userland virtual memory for the process &lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| u32*&lt;br /&gt;
| [[Memory_layout|LINEAR]] memory virtual address(userland) base for this process.&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| u32&lt;br /&gt;
| Size of the MMU table&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| u32&lt;br /&gt;
| Virtual address of the MMU table for this process&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| u32&lt;br /&gt;
| Total size of all thread context pages (0xFF4xxxxx) owned by threads that belong to this process&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| u32&lt;br /&gt;
| Number of KThreadLocalPages used by this KProcess&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in the list of KThreadLocalPages&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in the list of KThreadLocalPages&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| s32&lt;br /&gt;
| Ideal processor for this process&lt;br /&gt;
|-&lt;br /&gt;
| 0x7C&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to resource limits for process.&lt;br /&gt;
|-&lt;br /&gt;
| 0x84&lt;br /&gt;
| u32&lt;br /&gt;
| Number of threads which belong to this process.&lt;br /&gt;
|-&lt;br /&gt;
| 0x88&lt;br /&gt;
| 0x10-bytes&lt;br /&gt;
| SVC access control mask from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x98&lt;br /&gt;
| u32[4]&lt;br /&gt;
| Interrupt flags- 32 interrupts per word, 4 words, 0x80 interrupts total divided evenly across 4 words&lt;br /&gt;
|-&lt;br /&gt;
| 0xA8&lt;br /&gt;
| u32&lt;br /&gt;
| Kernel flags from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAC&lt;br /&gt;
| u16&lt;br /&gt;
| Handle table size from the exheader kernel descriptors. When this is 0, handle table is stored in WRAM.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAE&lt;br /&gt;
| u16&lt;br /&gt;
| Kernel release version field, from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0xB0&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to [[KCodeSet]] instance&lt;br /&gt;
|-&lt;br /&gt;
| 0xB4&lt;br /&gt;
| u32&lt;br /&gt;
| Process id, this always begins at 0x0 for the first process.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0&lt;br /&gt;
| KThread*&lt;br /&gt;
| Pointer to the process&#039;s main thread.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD4&lt;br /&gt;
| KProcessHandleTable&lt;br /&gt;
| This is the data for tracking and using all of the KProcess&#039;s handles.&lt;br /&gt;
|-&lt;br /&gt;
| 0xEC&lt;br /&gt;
| HandleData[0x28]&lt;br /&gt;
| These internal HandleData entries are only used if the exheader&#039;s handle table size is 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x22C&lt;br /&gt;
| ?&lt;br /&gt;
| Unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Structure starting with [[8.1.0-0 New3DS]] NATIVE_FIRM:&lt;br /&gt;
&lt;br /&gt;
Size : 0x270 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
! Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to vtable&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Reference count&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| u32&lt;br /&gt;
| Count of KThreads that sync with this object - number of nodes in the linked list below&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in node list of KThreads that sync with this object&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in node list of KThreads that sync with this object&lt;br /&gt;
|-&lt;br /&gt;
| 0xB0&lt;br /&gt;
| u32&lt;br /&gt;
| Kernel flags from the exheader kernel descriptors. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
KProcessHandleTable info struct:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| HandleData*&lt;br /&gt;
| Pointer to the process&#039;s handle table.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u16&lt;br /&gt;
| The max number of handles that can be open at once - usually 0x200.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| u16&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| HandleData*&lt;br /&gt;
| Pointer to the next open HandleData entry in the handle table. &lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| u16&lt;br /&gt;
| Total handles used by this KProcess.&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| u16&lt;br /&gt;
| The current number of handles in use.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| u32&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| u32&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x16&lt;br /&gt;
| u32&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| HandleData[28]&lt;br /&gt;
| This small handle data table internal to the KProcess is only used in certain processes that don&#039;t have an external handle data table in FCRAM.  It is all zeros in most processes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
HandleData struct:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| u32&lt;br /&gt;
| Handle info&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to the kernel object that the handle references.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The handle info u32 works as such:&lt;br /&gt;
&lt;br /&gt;
The high byte is a remainder from the pointer to the next entry that originally occupied the handle table entry.  It is unused. Byte 2 is either the class type token starting with firmware version 9.0 or the lowest byte of the char* that points to the class type name in firmware versions below 9.0.  The lower halfword is the handle number of the current handle taken from the total handle count for the KProcess that owns the table.&lt;br /&gt;
&lt;br /&gt;
On table creation, each entry in the handle data table is populated with a pointer to the next entry in the table.  When a new handle is created, that pointer is moved into offset 0x8 of the KProcessHandleTable info struct to use for generation of the next handle.&lt;br /&gt;
&lt;br /&gt;
The final handle that gets returned when a handle is created is (handle_index | (handle_total &amp;lt;&amp;lt; 15)), basically they take the index into the handle data table and OR that with the total handle count &amp;lt;&amp;lt; 15.  This returned value is the one that gets passed back to the running application and is used to look up the HandleData entry in the table.&lt;/div&gt;</summary>
		<author><name>Patois</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=KProcess&amp;diff=11820</id>
		<title>KProcess</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=KProcess&amp;diff=11820"/>
		<updated>2015-03-03T12:24:42Z</updated>

		<summary type="html">&lt;p&gt;Patois: add offset 0xB0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Kernel objects]]&lt;br /&gt;
class [[KProcess]] extends [[KSynchronizationObject]];&lt;br /&gt;
&lt;br /&gt;
Size : 0x260 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
! Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to vtable&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Reference count&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| volatile KThread*&lt;br /&gt;
| 0 or pointer to the thread the currently does something with the process object.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| s16&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in list of KMemoryBlocks used by the process&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in list of KMemoryBlocks used by the process &lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| u32&lt;br /&gt;
| Translation table base&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| u8&lt;br /&gt;
| Context ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| u32&lt;br /&gt;
| Size of the MMU table &lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| u32&lt;br /&gt;
| Virtual address of the MMU table for this process&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| u32&lt;br /&gt;
| Total size of all thread context pages (0xFF4xxxxx) owned by threads that belong to this process&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| u32&lt;br /&gt;
| Number of KThreadLocalPages used by this KProcess&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in the list of KThreadLocalPages&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in the list of KThreadLocalPages&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| s32&lt;br /&gt;
| Ideal processor&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to resource limits for process. &lt;br /&gt;
|-&lt;br /&gt;
| 0x79&lt;br /&gt;
| u8&lt;br /&gt;
| Proc affinity mask&lt;br /&gt;
|-&lt;br /&gt;
| 0x7C&lt;br /&gt;
| u32&lt;br /&gt;
| Number of threads which belong to this process.&lt;br /&gt;
|-&lt;br /&gt;
| 0x80&lt;br /&gt;
| 0x10-bytes&lt;br /&gt;
| SVC access control mask from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x90&lt;br /&gt;
| 0x10-bytes&lt;br /&gt;
| Interrupt flags- 32 interrupts per word, 4 words, 0x80 interrupts total divided evenly across 4 words&lt;br /&gt;
|-&lt;br /&gt;
| 0xA0&lt;br /&gt;
| u32&lt;br /&gt;
| Kernel flags from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA4&lt;br /&gt;
| u16&lt;br /&gt;
| Handle table size from the exheader kernel descriptors. When this is 0, handle table is stored in WRAM.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA6&lt;br /&gt;
| u16&lt;br /&gt;
| Kernel release version field, from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA8&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to [[KCodeSet]] instance&lt;br /&gt;
|-&lt;br /&gt;
| 0xAC&lt;br /&gt;
| u32&lt;br /&gt;
| Process id, this always begins at 0x0 for the first process.&lt;br /&gt;
|-&lt;br /&gt;
| 0xB0&lt;br /&gt;
| u32&lt;br /&gt;
| Kernel flags from the exheader kernel descriptors. &lt;br /&gt;
|-&lt;br /&gt;
| 0xB8&lt;br /&gt;
| KThread*&lt;br /&gt;
| Pointer to the process&#039;s main (?) thread.&lt;br /&gt;
|-&lt;br /&gt;
| 0xCC&lt;br /&gt;
| KProcessHandleTable &lt;br /&gt;
| Pointer to the process&#039;s handle table. until 0x1C4 or longer&lt;br /&gt;
|-&lt;br /&gt;
| 0x224&lt;br /&gt;
| u32&lt;br /&gt;
| ?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Structure for [[8.0.0-18]] NATIVE_FIRM:&lt;br /&gt;
&lt;br /&gt;
Size : 0x268 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
! Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to vtable&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Reference count&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| u32&lt;br /&gt;
| KLinkedListNode count for object &lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| KThread*&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| u32&lt;br /&gt;
| Count of KMemoryBlocks owned by the process&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in list of KMemoryBlocks used by the process&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in list of KMemoryBlocks used by the process&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| u32&lt;br /&gt;
| Translation table base&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| u8&lt;br /&gt;
| Context ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
| u32&lt;br /&gt;
| End of userland virtual memory for the process &lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| u32*&lt;br /&gt;
| [[Memory_layout|LINEAR]] memory virtual address(userland) base for this process.&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| u32&lt;br /&gt;
| Size of the MMU table&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| u32&lt;br /&gt;
| Virtual address of the MMU table for this process&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| u32&lt;br /&gt;
| Total size of all thread context pages (0xFF4xxxxx) owned by threads that belong to this process&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| u32&lt;br /&gt;
| Number of KThreadLocalPages used by this KProcess&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to first KLinkedListNode in the list of KThreadLocalPages&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| KLinkedListNode*&lt;br /&gt;
| Pointer to last KLinkedListNode in the list of KThreadLocalPages&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| s32&lt;br /&gt;
| Ideal processor for this process&lt;br /&gt;
|-&lt;br /&gt;
| 0x7C&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to resource limits for process.&lt;br /&gt;
|-&lt;br /&gt;
| 0x84&lt;br /&gt;
| u32&lt;br /&gt;
| Number of threads which belong to this process.&lt;br /&gt;
|-&lt;br /&gt;
| 0x88&lt;br /&gt;
| 0x10-bytes&lt;br /&gt;
| SVC access control mask from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x98&lt;br /&gt;
| u32[4]&lt;br /&gt;
| Interrupt flags- 32 interrupts per word, 4 words, 0x80 interrupts total divided evenly across 4 words&lt;br /&gt;
|-&lt;br /&gt;
| 0xA8&lt;br /&gt;
| u32&lt;br /&gt;
| Kernel flags from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAC&lt;br /&gt;
| u16&lt;br /&gt;
| Handle table size from the exheader kernel descriptors. When this is 0, handle table is stored in WRAM.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAE&lt;br /&gt;
| u16&lt;br /&gt;
| Kernel release version field, from the exheader kernel descriptors.&lt;br /&gt;
|-&lt;br /&gt;
| 0xB0&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to [[KCodeSet]] instance&lt;br /&gt;
|-&lt;br /&gt;
| 0xB4&lt;br /&gt;
| u32&lt;br /&gt;
| Process id, this always begins at 0x0 for the first process.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC0&lt;br /&gt;
| KThread*&lt;br /&gt;
| Pointer to the process&#039;s main thread.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD4&lt;br /&gt;
| KProcessHandleTable&lt;br /&gt;
| This is the data for tracking and using all of the KProcess&#039;s handles.&lt;br /&gt;
|-&lt;br /&gt;
| 0xEC&lt;br /&gt;
| HandleData[0x28]&lt;br /&gt;
| These internal HandleData entries are only used if the exheader&#039;s handle table size is 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x22C&lt;br /&gt;
| ?&lt;br /&gt;
| Unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
KProcessHandleTable info struct:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| HandleData*&lt;br /&gt;
| Pointer to the process&#039;s handle table.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u16&lt;br /&gt;
| The max number of handles that can be open at once - usually 0x200.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| u16&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| HandleData*&lt;br /&gt;
| Pointer to the next open HandleData entry in the handle table. &lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| u16&lt;br /&gt;
| Total handles used by this KProcess.&lt;br /&gt;
|-&lt;br /&gt;
| 0xE&lt;br /&gt;
| u16&lt;br /&gt;
| The current number of handles in use.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| u32&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| u32&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x16&lt;br /&gt;
| u32&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| HandleData[28]&lt;br /&gt;
| This small handle data table internal to the KProcess is only used in certain processes that don&#039;t have an external handle data table in FCRAM.  It is all zeros in most processes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
HandleData struct:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| u32&lt;br /&gt;
| Handle info&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32&lt;br /&gt;
| Pointer to the kernel object that the handle references.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The handle info u32 works as such:&lt;br /&gt;
&lt;br /&gt;
The high byte is a remainder from the pointer to the next entry that originally occupied the handle table entry.  It is unused. Byte 2 is either the class type token starting with firmware version 9.0 or the lowest byte of the char* that points to the class type name in firmware versions below 9.0.  The lower halfword is the handle number of the current handle taken from the total handle count for the KProcess that owns the table.&lt;br /&gt;
&lt;br /&gt;
On table creation, each entry in the handle data table is populated with a pointer to the next entry in the table.  When a new handle is created, that pointer is moved into offset 0x8 of the KProcessHandleTable info struct to use for generation of the next handle.&lt;br /&gt;
&lt;br /&gt;
The final handle that gets returned when a handle is created is (handle_index | (handle_total &amp;lt;&amp;lt; 15)), basically they take the index into the handle data table and OR that with the total handle count &amp;lt;&amp;lt; 15.  This returned value is the one that gets passed back to the running application and is used to look up the HandleData entry in the table.&lt;/div&gt;</summary>
		<author><name>Patois</name></author>
	</entry>
</feed>