Changes

Jump to navigation Jump to search
1,185 bytes added ,  08:54, 25 January 2015
no edit summary
Line 142: Line 142:  
|-
 
|-
 
| 0xD4
 
| 0xD4
| void*
+
| KProcessHandleTable
| Pointer to the process's handle table. (this is the first word in a 24-byte KProcess handle table data struct)
+
| This is the data for tracking and using all of the KProcess's handles.
 
|}
 
|}
 +
 +
 +
KProcessHandleTable info struct:
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset
 +
!  Type
 +
!  Description
 +
|-
 +
| 0x0
 +
| HandleData*
 +
| Pointer to the process's handle table.
 +
|-
 +
| 0x4
 +
| u16
 +
| The max number of handles that can be open at once.
 +
|-
 +
| 0x6
 +
| u16
 +
| Unknown
 +
|-
 +
| 0x8
 +
| HandleData*
 +
| Pointer to the next available HandleData entry in the handle table.
 +
|-
 +
| 0xC
 +
| u16
 +
| Total handles used by this KProcess.
 +
|-
 +
| 0xE
 +
| u16
 +
| The current number of handles in use.
 +
|-
 +
| 0x10
 +
| u32
 +
| Unknown
 +
|-
 +
| 0x14
 +
| u32
 +
| Unknown
 +
|-
 +
| 0x16
 +
| u32
 +
| Unknown
 +
|}
 +
 +
 +
HandleData struct:
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset
 +
!  Type
 +
!  Description
 +
|-
 +
| 0x0
 +
| u32
 +
| Handle info
 +
|-
 +
| 0x4
 +
| u32
 +
| Pointer to the kernel object that the handle references.
 +
|}
 +
 +
The handle info u32 works as such:
 +
 +
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.
374

edits

Navigation menu