XNU on ARM needs a custom bootloader. Optimally this bootloader will map the kernel into the beginning of DRAM so that the virtual sections specified in the Mach-O file match what's in memory, as in:
0x80001000 (__TEXT) -> 0x40001000 (__TEXT in physical RAM)
This bootloader will follow the "boot_args_t" structure defined in pexpert/pexpert/arm/boot.h. The deviceTreeP member needs to contain the flattened device tree's virtual address.
The device tree's memory-map member should also contain the ranges of the RAMDisk for rooting if necessary.
VirtBase should be 0x80000000 and physBase should be the beginning of eDRAM on the target board. This is because the entire kernel is section mapped linearly.
Kernel entry should be done with MMU off for the most part.
The device-tree compatible member for the root node should also include "AppleARM" so that the IOKit platform expert driver can match configuration. Look at "iokit/KernelConfigTables.cpp" for more information.
TopOfKernelData should be page aligned. It is the end of all kernel data entered by the bootloader; this includes kernel, devicetree and ramdisk.
XNU on ARM needs a custom bootloader. Optimally this bootloader will map the kernel into the beginning of DRAM so that the virtual sections specified in the Mach-O file match what's in memory, as in:
This bootloader will follow the "boot_args_t" structure defined in pexpert/pexpert/arm/boot.h. The deviceTreeP member needs to contain the flattened device tree's virtual address.
The device tree's memory-map member should also contain the ranges of the RAMDisk for rooting if necessary.
VirtBase should be 0x80000000 and physBase should be the beginning of eDRAM on the target board. This is because the entire kernel is section mapped linearly.
Kernel entry should be done with MMU off for the most part.
The device-tree compatible member for the root node should also include "AppleARM" so that the IOKit platform expert driver can match configuration. Look at "iokit/KernelConfigTables.cpp" for more information.
TopOfKernelData should be page aligned. It is the end of all kernel data entered by the bootloader; this includes kernel, devicetree and ramdisk.