Difference between revisions of "KCodeSet"

From 3dbrew
Jump to navigation Jump to search
m
 
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
class KCodeSet extends KAutoObject;
+
[[Category:Kernel auto objects]]
 +
class [[KCodeSet]] extends [[KAutoObject]];
 +
 
 +
Size : 0x64 bytes
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 14: Line 17:
 
| u32
 
| u32
 
| Reference count
 
| Reference count
 +
|-
 +
| 0x8
 +
| KCodeSetMemDescriptor
 +
| Memory section info for .text
 +
|-
 +
| 0x1C
 +
| KCodeSetMemDescriptor
 +
| Memory section info for .rodata
 +
|-
 +
| 0x30
 +
| KCodeSetMemDescriptor
 +
| Memory section info for .data
 +
|-
 +
| 0x44
 +
| u32
 +
| Total .text pages
 +
|-
 +
| 0x48
 +
| u32
 +
| Total .rodata pages
 +
|-
 +
| 0x4C
 +
| u32
 +
| Total RW pages (.bss + .data)
 
|-
 
|-
 
| 0x50
 
| 0x50
 
| u64
 
| u64
 
| Process name as 8-byte string
 
| Process name as 8-byte string
 +
|-
 +
| 0x58
 +
| u16
 +
| ?
 +
|-
 +
| 0x5A
 +
| u16
 +
| ?
 
|-
 
|-
 
| 0x5C
 
| 0x5C
 
| u64
 
| u64
| Program ID
+
| TitleID
 +
|}
 +
 
 +
 
 +
=KCodeSetMemDescriptor=
 +
 
 +
Sections too large to fit into any available memory blocks will be split across multiple memory blocks with a [[KBlockInfo]] instance for each. This is described by the memory section info struct:
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset
 +
!  Type
 +
!  Description
 +
|-
 +
| 0x0
 +
| u32
 +
| Start address (virtual)
 +
|-
 +
| 0x4
 +
| u32
 +
| Total pages
 +
|-
 +
| 0x8
 +
| u32
 +
| [[KBlockInfo]] count
 +
|-
 +
| 0xC
 +
| [[KLinkedListNode]]*
 +
| Pointer to first KLinkedListNode in the list of objects
 +
|-
 +
| 0x10
 +
| [[KLinkedListNode]]*
 +
| Pointer to last KLinkedListNode in the list of objects
 
|}
 
|}

Latest revision as of 01:58, 5 December 2016

class KCodeSet extends KAutoObject;

Size : 0x64 bytes

Offset Type Description
0x0 u32 Pointer to vtable
0x4 u32 Reference count
0x8 KCodeSetMemDescriptor Memory section info for .text
0x1C KCodeSetMemDescriptor Memory section info for .rodata
0x30 KCodeSetMemDescriptor Memory section info for .data
0x44 u32 Total .text pages
0x48 u32 Total .rodata pages
0x4C u32 Total RW pages (.bss + .data)
0x50 u64 Process name as 8-byte string
0x58 u16 ?
0x5A u16 ?
0x5C u64 TitleID


KCodeSetMemDescriptor[edit]

Sections too large to fit into any available memory blocks will be split across multiple memory blocks with a KBlockInfo instance for each. This is described by the memory section info struct:

Offset Type Description
0x0 u32 Start address (virtual)
0x4 u32 Total pages
0x8 u32 KBlockInfo count
0xC KLinkedListNode* Pointer to first KLinkedListNode in the list of objects
0x10 KLinkedListNode* Pointer to last KLinkedListNode in the list of objects