Difference between revisions of "Kernel"
(→INIT) |
m (Mention that some keys are depending on running XBE (details need to be documented)) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 43: | Line 43: | ||
This section is always the last one. It contains the entrypoint of the kernel. | This section is always the last one. It contains the entrypoint of the kernel. | ||
− | This does all the cold-boot | + | This does all the cold-boot kernel initialization as described [[Boot_Process#Initialization|here]]. |
Later kernels{{FIXME|reason=Which revision? right now it appears that *ALL* kernels will discard this}} will discard this section after initialization. | Later kernels{{FIXME|reason=Which revision? right now it appears that *ALL* kernels will discard this}} will discard this section after initialization. | ||
INIT also contains the [[Boot Animation]], so once the kernel has finished booting it can't do a full hardware re-initialization or play the boot animation anymore. | INIT also contains the [[Boot Animation]], so once the kernel has finished booting it can't do a full hardware re-initialization or play the boot animation anymore. | ||
Line 53: | Line 53: | ||
!Name | !Name | ||
!Ordinal | !Ordinal | ||
− | !Calling Convention | + | !x86 Calling Convention |
!Notes | !Notes | ||
|- | |- | ||
Line 133: | Line 133: | ||
|[[Kernel/ExEventObjectType]] | |[[Kernel/ExEventObjectType]] | ||
|16 | |16 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_TYPE |
|- | |- | ||
|[[Kernel/ExFreePool]] | |[[Kernel/ExFreePool]] | ||
Line 163: | Line 163: | ||
|[[Kernel/ExMutantObjectType]] | |[[Kernel/ExMutantObjectType]] | ||
|22 | |22 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_TYPE |
|- | |- | ||
|[[Kernel/ExQueryPoolBlockSize]] | |[[Kernel/ExQueryPoolBlockSize]] | ||
Line 203: | Line 203: | ||
|[[Kernel/ExSemaphoreObjectType]] | |[[Kernel/ExSemaphoreObjectType]] | ||
|30 | |30 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_TYPE |
|- | |- | ||
|[[Kernel/ExTimerObjectType]] | |[[Kernel/ExTimerObjectType]] | ||
|31 | |31 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_TYPE |
|- | |- | ||
|[[Kernel/ExfInterlockedInsertHeadList]] | |[[Kernel/ExfInterlockedInsertHeadList]] | ||
Line 253: | Line 253: | ||
|[[Kernel/HalDiskCachePartitionCount]] | |[[Kernel/HalDiskCachePartitionCount]] | ||
|40 | |40 | ||
− | | | + | | |
− | |Variable | + | |Variable: ULONG |
|- | |- | ||
|[[Kernel/HalDiskModelNumber]] | |[[Kernel/HalDiskModelNumber]] | ||
|41 | |41 | ||
− | | | + | | |
− | |Variable | + | |Variable: STRING |
|- | |- | ||
|[[Kernel/HalDiskSerialNumber]] | |[[Kernel/HalDiskSerialNumber]] | ||
|42 | |42 | ||
− | | | + | | |
− | |Variable | + | |Variable: STRING |
|- | |- | ||
|[[Kernel/HalEnableSystemInterrupt]] | |[[Kernel/HalEnableSystemInterrupt]] | ||
Line 373: | Line 373: | ||
|[[Kernel/IoCompletionObjectType]] | |[[Kernel/IoCompletionObjectType]] | ||
|64 | |64 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_TYPE |
|- | |- | ||
|[[Kernel/IoCreateDevice]] | |[[Kernel/IoCreateDevice]] | ||
Line 403: | Line 403: | ||
|[[Kernel/IoDeviceObjectType]] | |[[Kernel/IoDeviceObjectType]] | ||
|70 | |70 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_TYPE |
|- | |- | ||
|[[Kernel/IoFileObjectType]] | |[[Kernel/IoFileObjectType]] | ||
|71 | |71 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_TYPE |
|- | |- | ||
|[[Kernel/IoFreeIrp]] | |[[Kernel/IoFreeIrp]] | ||
Line 493: | Line 493: | ||
|[[Kernel/KdDebuggerEnabled]] | |[[Kernel/KdDebuggerEnabled]] | ||
|88 | |88 | ||
− | | | + | | |
− | |Variable | + | |Variable: BOOLEAN |
|- | |- | ||
|[[Kernel/KdDebuggerNotPresent]] | |[[Kernel/KdDebuggerNotPresent]] | ||
|89 | |89 | ||
− | | | + | | |
− | |Variable | + | |Variable: BOOLEAN |
|- | |- | ||
|[[Kernel/IoDismountVolume]] | |[[Kernel/IoDismountVolume]] | ||
Line 563: | Line 563: | ||
|[[Kernel/MmGlobalData]] | |[[Kernel/MmGlobalData]] | ||
|102 | |102 | ||
− | | | + | | |
− | |Variable | + | |Variable: MMGLOBALDATA |
|- | |- | ||
|[[Kernel/KeGetCurrentIrql]] | |[[Kernel/KeGetCurrentIrql]] | ||
Line 653: | Line 653: | ||
|[[Kernel/KeInterruptTime]] | |[[Kernel/KeInterruptTime]] | ||
|120 | |120 | ||
− | | | + | | |
− | |Variable | + | |Variable: KSYSTEM_TIME |
|- | |- | ||
|[[Kernel/KeIsExecutingDpc]] | |[[Kernel/KeIsExecutingDpc]] | ||
Line 823: | Line 823: | ||
|[[Kernel/KeSystemTime]] | |[[Kernel/KeSystemTime]] | ||
|154 | |154 | ||
− | | | + | | |
− | |Variable | + | |Variable: KSYSTEM_TIME |
|- | |- | ||
|[[Kernel/KeTestAlertThread]] | |[[Kernel/KeTestAlertThread]] | ||
Line 833: | Line 833: | ||
|[[Kernel/KeTickCount]] | |[[Kernel/KeTickCount]] | ||
|156 | |156 | ||
− | | | + | | |
− | |Variable | + | |Variable: ULONG |
|- | |- | ||
|[[Kernel/KeTimeIncrement]] | |[[Kernel/KeTimeIncrement]] | ||
|157 | |157 | ||
− | | | + | | |
− | |Variable | + | |Variable: ULONG |
|- | |- | ||
|[[Kernel/KeWaitForMultipleObjects]] | |[[Kernel/KeWaitForMultipleObjects]] | ||
Line 863: | Line 863: | ||
|[[Kernel/KiBugCheckData]] | |[[Kernel/KiBugCheckData]] | ||
|162 | |162 | ||
− | | | + | | |
− | |Variable | + | |Variable: ULONG_PTR[5] |
|- | |- | ||
|[[Kernel/KiUnlockDispatcherDatabase]] | |[[Kernel/KiUnlockDispatcherDatabase]] | ||
Line 873: | Line 873: | ||
|[[Kernel/LaunchDataPage]] | |[[Kernel/LaunchDataPage]] | ||
|164 | |164 | ||
− | | | + | | |
− | |Variable | + | |Variable: PLAUNCH_DATA_PAGE |
|- | |- | ||
|[[Kernel/MmAllocateContiguousMemory]] | |[[Kernel/MmAllocateContiguousMemory]] | ||
Line 1,253: | Line 1,253: | ||
|[[Kernel/ObDirectoryObjectType]] | |[[Kernel/ObDirectoryObjectType]] | ||
|240 | |240 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_TYPE |
|- | |- | ||
|[[Kernel/ObInsertObject]] | |[[Kernel/ObInsertObject]] | ||
Line 1,278: | Line 1,278: | ||
|[[Kernel/ObpObjectHandleTable]] | |[[Kernel/ObpObjectHandleTable]] | ||
|245 | |245 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_HANDLE_TABLE |
|- | |- | ||
|[[Kernel/ObReferenceObjectByHandle]] | |[[Kernel/ObReferenceObjectByHandle]] | ||
Line 1,298: | Line 1,298: | ||
|[[Kernel/ObSymbolicLinkObjectType]] | |[[Kernel/ObSymbolicLinkObjectType]] | ||
|249 | |249 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_TYPE |
|- | |- | ||
|[[Kernel/ObfDereferenceObject]] | |[[Kernel/ObfDereferenceObject]] | ||
Line 1,348: | Line 1,348: | ||
|[[Kernel/PsThreadObjectType]] | |[[Kernel/PsThreadObjectType]] | ||
|259 | |259 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_TYPE |
|- | |- | ||
|[[Kernel/RtlAnsiStringToUnicodeString]] | |[[Kernel/RtlAnsiStringToUnicodeString]] | ||
Line 1,658: | Line 1,658: | ||
|[[Kernel/XboxEEPROMKey]] | |[[Kernel/XboxEEPROMKey]] | ||
|321 | |321 | ||
− | | | + | | |
− | |Variable | + | |Variable: XBOX_KEY_DATA |
|- | |- | ||
|[[Kernel/XboxHardwareInfo]] | |[[Kernel/XboxHardwareInfo]] | ||
|322 | |322 | ||
− | | | + | | |
− | |Variable | + | |Variable: XBOX_HARDWARE_INFO |
|- | |- | ||
|[[Kernel/XboxHDKey]] | |[[Kernel/XboxHDKey]] | ||
|323 | |323 | ||
− | | | + | | |
− | |Variable | + | |Variable: XBOX_KEY_DATA |
|- | |- | ||
|[[Kernel/XboxKrnlVersion]] | |[[Kernel/XboxKrnlVersion]] | ||
|324 | |324 | ||
− | | | + | | |
− | |Variable | + | |Variable: XBOX_KRNL_VERSION |
|- | |- | ||
|[[Kernel/XboxSignatureKey]] | |[[Kernel/XboxSignatureKey]] | ||
|325 | |325 | ||
− | | | + | | |
− | |Variable | + | |Variable: XBOX_KEY_DATA; modified by active XBE Certificate |
|- | |- | ||
|[[Kernel/XeImageFileName]] | |[[Kernel/XeImageFileName]] | ||
|326 | |326 | ||
− | | | + | | |
− | |Variable | + | |Variable: OBJECT_STRING |
|- | |- | ||
|[[Kernel/XeLoadSection]] | |[[Kernel/XeLoadSection]] | ||
Line 1,818: | Line 1,818: | ||
|[[Kernel/XboxLANKey]] | |[[Kernel/XboxLANKey]] | ||
|353 | |353 | ||
− | |||
| | | | ||
+ | |Variable: XBOX_KEY_DATA; modified by active XBE Certificate | ||
|- | |- | ||
|[[Kernel/XboxAlternateSignatureKeys]] | |[[Kernel/XboxAlternateSignatureKeys]] | ||
|354 | |354 | ||
− | | | + | | |
− | |Variable | + | |Variable: XBOX_KEY_DATA[XBEIMAGE_ALTERNATE_TITLE_ID_COUNT]; modified by active XBE Certificate |
|- | |- | ||
|[[Kernel/XePublicKeyData]] | |[[Kernel/XePublicKeyData]] | ||
|355 | |355 | ||
− | | | + | | |
− | |Variable | + | |Variable: UCHAR[XC_PUBLIC_KEYDATA_SIZE] |
|- | |- | ||
|[[Kernel/HalBootSMCVideoMode]] | |[[Kernel/HalBootSMCVideoMode]] | ||
|356 | |356 | ||
− | | | + | | |
− | |Variable | + | |Variable: ULONG |
|- | |- | ||
|[[Kernel/IdexChannelObject]] | |[[Kernel/IdexChannelObject]] | ||
|357 | |357 | ||
− | | | + | | |
− | |Variable | + | |Variable: IDE_CHANNEL_OBJECT |
|- | |- | ||
|[[Kernel/HalIsResetOrShutdownPending]] | |[[Kernel/HalIsResetOrShutdownPending]] | ||
Line 1,901: | Line 1,901: | ||
|Unused? | |Unused? | ||
|- | |- | ||
− | | | + | |[[Kernel/XProfpControl]] |
|370 | |370 | ||
| | | | ||
− | | | + | |Profiling-enabled builds only! |
|- | |- | ||
− | | | + | |[[Kernel/XProfpGetData]] |
|371 | |371 | ||
| | | | ||
− | | | + | |Profiling-enabled builds only! |
|- | |- | ||
− | | | + | |[[Kernel/IrtClientInitFast]] |
|372 | |372 | ||
| | | | ||
− | | | + | |Profiling-enabled builds only! |
|- | |- | ||
− | | | + | |[[Kernel/IrtSweep]] |
|373 | |373 | ||
| | | | ||
− | | | + | |Profiling-enabled builds only! |
|- | |- | ||
|[[Kernel/MmDbgAllocateMemory]] | |[[Kernel/MmDbgAllocateMemory]] |
Latest revision as of 17:23, 21 October 2018
The Xbox kernel is called xboxkrnl.exe. It is closely related to the Windows NT ntoskrnl.exe. Its image base address is always 0x80010000.
Contents
Header modifications
xboxkrnl.exe is a mostly standard exe file. However, the MS-DOS header was patched to contain Xbox specific data in the reserved 20 byte block starting at offset 40:
Offset | Meaning |
---|---|
40 | Size of uninitialized portion of the .data section |
44 | Size of initialized portion of the .data section |
48 | Memory address of initialized portion of the .data section (usually in Flash). Used to re-initialize the data section pointed to by the next field. Note that the pointer might be invalid during normal execution as the Flash might not be mapped at all times. |
52 | Memory address where the .data section is stored (usually the same as in the section header + image base). |
Sections
All sections are identity mapped (meaning file offsets and offsets in RAM match). This is because the kernel is not loaded through a traditional PE / exe loader, but just unpacked into memory.
.text
The .text section contains the kernel exports.
.data
The .data section stores initialized and uninitialized data. A copy of the initialized portion of this section is usually stored in the BIOS.
STICKY
Stores variables which must be preserved across a quick-reboot.
IDEXPRDT
A Physical Region Descriptor Table (PRDT) for the IDE bus. This section serves as a memory allocation only, it does not have to be initialized when loading the kernel[citation needed].
INIT
This section is always the last one. It contains the entrypoint of the kernel. This does all the cold-boot kernel initialization as described here. Later kernels[FIXME] will discard this section after initialization. INIT also contains the Boot Animation, so once the kernel has finished booting it can't do a full hardware re-initialization or play the boot animation anymore.