···6565The boot loader must ultimately be able to provide a MACH_TYPE_xxx6666value to the kernel. (see linux/arch/arm/tools/mach-types).67676868-4. Setup boot data6969-------------------6868+6969+4. Setup the kernel tagged list7070+-------------------------------70717172Existing boot loaders: OPTIONAL, HIGHLY RECOMMENDED7273New boot loaders: MANDATORY7373-7474-The boot loader must provide either a tagged list or a dtb image for7575-passing configuration data to the kernel. The physical address of the7676-boot data is passed to the kernel in register r2.7777-7878-4a. Setup the kernel tagged list7979---------------------------------80748175The boot loader must create and initialise the kernel tagged list.8276A valid tagged list starts with ATAG_CORE and ends with ATAG_NONE.···101107the kernel decompressor nor initrd 'bootp' program will overwrite102108it. The recommended placement is in the first 16KiB of RAM.103109104104-4b. Setup the device tree105105--------------------------106106-107107-The boot loader must load a device tree image (dtb) into system ram108108-at a 64bit aligned address and initialize it with the boot data. The109109-dtb format is documented in Documentation/devicetree/booting-without-of.txt.110110-The kernel will look for the dtb magic value of 0xd00dfeed at the dtb111111-physical address to determine if a dtb has been passed instead of a112112-tagged list.113113-114114-The boot loader must pass at a minimum the size and location of the115115-system memory, and the root filesystem location. The dtb must be116116-placed in a region of memory where the kernel decompressor will not117117-overwrite it. The recommended placement is in the first 16KiB of RAM118118-with the caveat that it may not be located at physical address 0 since119119-the kernel interprets a value of 0 in r2 to mean neither a tagged list120120-nor a dtb were passed.121121-1221105. Calling the kernel image123111---------------------------124112···125149- CPU register settings126150 r0 = 0,127151 r1 = machine type number discovered in (3) above.128128- r2 = physical address of tagged list in system RAM, or129129- physical address of device tree block (dtb) in system RAM152152+ r2 = physical address of tagged list in system RAM.130153131154- CPU mode132155 All forms of interrupts must be disabled (IRQs and FIQs)
-40
Documentation/devicetree/booting-without-of.txt
···13131414 I - Introduction1515 1) Entry point for arch/powerpc1616- 2) Entry point for arch/arm17161817 II - The DT block format1918 1) Header···224225 platforms feature the same core architecture. A single kernel build225226 cannot support both configurations with Book E and configurations226227 with classic Powerpc architectures.227227-228228-2) Entry point for arch/arm229229----------------------------230230-231231- There is one single entry point to the kernel, at the start232232- of the kernel image. That entry point supports two calling233233- conventions. A summary of the interface is described here. A full234234- description of the boot requirements is documented in235235- Documentation/arm/Booting236236-237237- a) ATAGS interface. Minimal information is passed from firmware238238- to the kernel with a tagged list of predefined parameters.239239-240240- r0 : 0241241-242242- r1 : Machine type number243243-244244- r2 : Physical address of tagged list in system RAM245245-246246- b) Entry with a flattened device-tree block. Firmware loads the247247- physical address of the flattened device tree block (dtb) into r2,248248- r1 is not used, but it is considered good practise to use a valid249249- machine number as described in Documentation/arm/Booting.250250-251251- r0 : 0252252-253253- r1 : Valid machine type number. When using a device tree,254254- a single machine type number will often be assigned to255255- represent a class or family of SoCs.256256-257257- r2 : physical pointer to the device-tree block258258- (defined in chapter II) in RAM. Device tree can be located259259- anywhere in system RAM, but it should be aligned on a 32 bit260260- boundary.261261-262262- The kernel will differentiate between ATAGS and device tree booting by263263- reading the memory pointed to by r1 and looking for either the flattened264264- device tree block magic value (0xd00dfeed) or the ATAG_CORE value at265265- offset 0x4 from r2 (0x54410001).266228267229268230II - The DT block format