Difference between revisions of "Kernel"
(Calling conventions are x86 specific.) |
m (Mention that some keys are depending on running XBE (details need to be documented)) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1,679: | Line 1,679: | ||
|325 | |325 | ||
| | | | ||
− | |Variable: XBOX_KEY_DATA | + | |Variable: XBOX_KEY_DATA; modified by active XBE Certificate |
|- | |- | ||
|[[Kernel/XeImageFileName]] | |[[Kernel/XeImageFileName]] | ||
Line 1,819: | Line 1,819: | ||
|353 | |353 | ||
| | | | ||
− | |Variable: XBOX_KEY_DATA | + | |Variable: XBOX_KEY_DATA; modified by active XBE Certificate |
|- | |- | ||
|[[Kernel/XboxAlternateSignatureKeys]] | |[[Kernel/XboxAlternateSignatureKeys]] | ||
|354 | |354 | ||
| | | | ||
− | |Variable: XBOX_KEY_DATA[XBEIMAGE_ALTERNATE_TITLE_ID_COUNT] | + | |Variable: XBOX_KEY_DATA[XBEIMAGE_ALTERNATE_TITLE_ID_COUNT]; modified by active XBE Certificate |
|- | |- | ||
|[[Kernel/XePublicKeyData]] | |[[Kernel/XePublicKeyData]] | ||
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.