Difference between revisions of "KProcess"

From 3dbrew
Jump to navigation Jump to search
Line 53: Line 53:
 
|-
 
|-
 
| 0xCC
 
| 0xCC
 +
| void*
 +
| Pointer to the process's handle table.
 +
|}
 +
 +
Structure for [[8.0.0-18]] NATIVE_FIRM:
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset
 +
! Type
 +
!  Description
 +
|-
 +
| 0x0
 +
| u32
 +
| Pointer to vtable
 +
|-
 +
| 0x4
 +
| u32
 +
| Reference count
 +
|-
 +
| 0x50
 +
| u32*
 +
| [[Memory_layout|LINEAR]] memory virtual address(userland) base for this process.
 +
|-
 +
| 0x5C
 +
| u32
 +
| Virtual address of the MMU table for this process
 +
|-
 +
| 0x84
 +
| u32
 +
| Number of threads which belong to this process.
 +
|-
 +
| 0x88
 +
| 0x10-bytes
 +
| SVC access control mask from the exheader kernel descriptors.
 +
|-
 +
| 0xA8
 +
| u32
 +
| Kernel flags from the exheader kernel descriptors.
 +
|-
 +
| 0xAC
 +
| u16
 +
| Handle table size from the exheader kernel descriptors. When this is 0, handle table is stored in WRAM.
 +
|-
 +
| 0xAE
 +
| u16
 +
| Kernel release version field, from the exheader kernel descriptors.
 +
|-
 +
| 0xB0
 +
| u32
 +
| Pointer to [[KCodeSet]] instance
 +
|-
 +
| 0xB4
 +
| u32
 +
| Process id, this always begins at 0x0 for the first process.
 +
|-
 +
| 0xC0
 +
| KThread*
 +
| Pointer to the process's main (?) thread.
 +
|-
 +
| 0xD4
 
| void*
 
| void*
 
| Pointer to the process's handle table.
 
| Pointer to the process's handle table.
 
|}
 
|}

Revision as of 04:41, 19 July 2014

class KProcess extends KSynchronizationObject;

Offset Type Description
0x0 u32 Pointer to vtable
0x4 u32 Reference count
0x54 u32 Virtual address of the MMU table for this process
0x7C u32 Number of threads which belong to this process.
0x80 0x10-bytes SVC access control mask from the exheader kernel descriptors.
0xA0 u32 Kernel flags from the exheader kernel descriptors.
0xA4 u16 Handle table size from the exheader kernel descriptors. When this is 0, handle table is stored in WRAM.
0xA6 u16 Kernel release version field, from the exheader kernel descriptors.
0xA8 u32 Pointer to KCodeSet instance
0xAC u32 Process id, this always begins at 0x0 for the first process.
0xB8 KThread* Pointer to the process's main (?) thread.
0xCC void* Pointer to the process's handle table.

Structure for 8.0.0-18 NATIVE_FIRM:

Offset Type Description
0x0 u32 Pointer to vtable
0x4 u32 Reference count
0x50 u32* LINEAR memory virtual address(userland) base for this process.
0x5C u32 Virtual address of the MMU table for this process
0x84 u32 Number of threads which belong to this process.
0x88 0x10-bytes SVC access control mask from the exheader kernel descriptors.
0xA8 u32 Kernel flags from the exheader kernel descriptors.
0xAC u16 Handle table size from the exheader kernel descriptors. When this is 0, handle table is stored in WRAM.
0xAE u16 Kernel release version field, from the exheader kernel descriptors.
0xB0 u32 Pointer to KCodeSet instance
0xB4 u32 Process id, this always begins at 0x0 for the first process.
0xC0 KThread* Pointer to the process's main (?) thread.
0xD4 void* Pointer to the process's handle table.