^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) BMIPS DeviceTree Booting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) ------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) Some bootloaders only support a single entry point, at the start of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) kernel image. Other bootloaders will jump to the ELF start address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) Both schemes are supported; CONFIG_BOOT_RAW=y and CONFIG_NO_EXCEPT_FILL=y,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) so the first instruction immediately jumps to kernel_entry().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) Similar to the arch/arm case (b), a DT-aware bootloader is expected to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) set up the following registers:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) a0 : 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) a1 : 0xffffffff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) a2 : Physical pointer to the device tree block (defined in chapter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) II) in RAM. The device tree can be located anywhere in the first
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 512MB of the physical address space (0x00000000 - 0x1fffffff),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) aligned on a 64 bit boundary.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) Legacy bootloaders do not use this convention, and they do not pass in a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) DT block. In this case, Linux will look for a builtin DTB, selected via
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) CONFIG_DT_*.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) This convention is defined for 32-bit systems only, as there are not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) currently any 64-bit BMIPS implementations.