1 .. SPDX-License-Identifier: GPL-2.0 2 3 DeviceTree Booting 4 ------------------ 5 6 During the development of the Linux/ppc64 kern 7 addition of new platform types outside of the 8 was decided to enforce some strict rules regar 9 bootloader <-> kernel interfaces, in order to 10 become the ppc32 kernel entry point and the wa 11 to the kernel. The legacy iSeries platform bre 12 this scheme, but no new board support will be 13 doesn't follow them properly. In addition, si 14 merged architecture for ppc32 and ppc64, new 3 15 platforms which move into arch/powerpc will be 16 well. 17 18 The main requirement that will be defined in m 19 of a device-tree whose format is defined after 20 However, in order to make life easier to embed 21 doesn't require the device-tree to represent e 22 requires some nodes and properties to be prese 23 not require you to create a node for every PCI 24 requirement to have a node for PCI host bridge 25 routing information and memory/IO ranges, amon 26 to define nodes for on chip devices and other 27 in an existing OF specification. This creates 28 kernel can then probe those and match drivers 29 code all sorts of tables. It also makes it mor 30 minor hardware upgrades without significantly 31 cluttering it with special cases. 32 33 34 Entry point 35 ~~~~~~~~~~~ 36 37 There is one single entry point to the kernel, 38 of the kernel image. That entry point supports 39 conventions: 40 41 a) Boot from Open Firmware. If your fi 42 with Open Firmware (IEEE 1275) or prov 43 client interface API (support for "int 44 forth words isn't required), you can e 45 46 r5 : OF callback pointer as defi 47 bindings to powerpc. Only the 32 48 is currently supported 49 50 r3, r4 : address & length of an 51 52 The MMU is either on or off; the 53 trampoline located in arch/power 54 extract the device-tree and othe 55 firmware and build a flattened d 56 in b). prom_init() will then re- 57 the second method. This trampoli 58 context of the firmware, which i 59 exceptions during that time. 60 61 b) Direct entry with a flattened devic 62 point is called by a) after the OF tra 63 called directly by a bootloader that d 64 Firmware client interface. It is also 65 implement "hot" booting of a new kerne 66 running one. This method is what I wil 67 details in this document, as method a) 68 Firmware, and thus should be implement 69 various standard documents defining it 70 PowerPC platform. The entry point defi 71 72 r3 : physical pointer to the d 73 (defined in chapter II) in RAM 74 75 r4 : physical pointer to the k 76 used by the assembly code to p 77 in case you are entering the k 78 and a non-1:1 mapping. 79 80 r5 : NULL (as to differentiate 81 82 Note about SMP entry: Either your firmware put 83 CPUs in some sleep loop or spin loop in ROM wh 84 them out via a soft reset or some other means, 85 you don't need to care, or you'll have to ente 86 with all CPUs. The way to do that with method 87 described in a later revision of this document 88 89 Board supports (platforms) are not exclusive c 90 arbitrary set of board supports can be built i 91 image. The kernel will "know" what set of func 92 given platform based on the content of the dev 93 should: 94 95 a) add your platform support as a _boo 96 arch/powerpc/Kconfig, following the ex 97 PPC_PMAC and PPC_MAPLE. The latter is 98 example of a board support to start fr 99 100 b) create your main platform file as 101 "arch/powerpc/platforms/myplatform/myb 102 to the Makefile under the condition of 103 option. This file will define a struct 104 containing the various callbacks that 105 use to get to your platform specific c 106 107 A kernel image may support multiple platforms, 108 platforms feature the same core architecture. 109 cannot support both configurations with Book E 110 with classic Powerpc architectures.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.