1a187559eSBin MengU-Boot for arm64 20ae76531SDavid Feng 30ae76531SDavid FengSummary 40ae76531SDavid Feng======= 5*8add6791SAndre PrzywaraThe initial arm64 U-Boot port was developed before hardware was available, 6*8add6791SAndre Przywaraso the first supported platforms were the Foundation and Fast Model for ARMv8. 7*8add6791SAndre PrzywaraThese days U-Boot runs on a variety of 64-bit capable ARM hardware, from 8*8add6791SAndre Przywaraembedded development boards to servers. 90ae76531SDavid Feng 100ae76531SDavid FengNotes 110ae76531SDavid Feng===== 120ae76531SDavid Feng 13*8add6791SAndre Przywara1. U-Boot can run at any exception level it is entered in, it is 14*8add6791SAndre Przywara recommened to enter it in EL3 if U-Boot takes some responsibilities of a 15*8add6791SAndre Przywara classical firmware (like initial hardware setup, CPU errata workarounds 16*8add6791SAndre Przywara or SMP bringup). U-Boot can be entered in EL2 when its main purpose is 17*8add6791SAndre Przywara that of a boot loader. It can drop to lower exception levels before 18*8add6791SAndre Przywara entering the OS. 190ae76531SDavid Feng 20a187559eSBin Meng2. U-Boot for arm64 is compiled with AArch64-gcc. AArch64-gcc 210ae76531SDavid Feng use rela relocation format, a tool(tools/relocate-rela) by Scott Wood 220ae76531SDavid Feng is used to encode the initial addend of rela to u-boot.bin. After running, 23a187559eSBin Meng the U-Boot will be relocated to destination again. 240ae76531SDavid Feng 25*8add6791SAndre Przywara3. Earlier Linux kernel versions required the FDT to be placed at a 26*8add6791SAndre Przywara 2 MB boundary and within the same 512 MB section as the kernel image, 27*8add6791SAndre Przywara resulting in fdt_high to be defined specially. 28*8add6791SAndre Przywara Since kernel version 4.2 Linux is more relaxed about the DT location, so it 29*8add6791SAndre Przywara can be placed anywhere in memory. 300ae76531SDavid Feng Please reference linux/Documentation/arm64/booting.txt for detail. 310ae76531SDavid Feng 320ae76531SDavid Feng4. Spin-table is used to wake up secondary processors. One location 330ae76531SDavid Feng (or per processor location) is defined to hold the kernel entry point 340ae76531SDavid Feng for secondary processors. It must be ensured that the location is 350ae76531SDavid Feng accessible and zero immediately after secondary processor 360ae76531SDavid Feng enter slave_cpu branch execution in start.S. The location address 370ae76531SDavid Feng is encoded in cpu node of DTS. Linux kernel store the entry point 380ae76531SDavid Feng of secondary processors to it and send event to wakeup secondary 390ae76531SDavid Feng processors. 400ae76531SDavid Feng Please reference linux/Documentation/arm64/booting.txt for detail. 410ae76531SDavid Feng 420ae76531SDavid Feng5. Generic board is supported. 430ae76531SDavid Feng 440ae76531SDavid Feng6. CONFIG_ARM64 instead of CONFIG_ARMV8 is used to distinguish aarch64 and 450ae76531SDavid Feng aarch32 specific codes. 460ae76531SDavid Feng 4794f7ff36SSergey Temerkhanov 48*8add6791SAndre PrzywaraContributors 49*8add6791SAndre Przywara============ 500ae76531SDavid Feng Tom Rini <trini@ti.com> 510ae76531SDavid Feng Scott Wood <scottwood@freescale.com> 520ae76531SDavid Feng York Sun <yorksun@freescale.com> 530ae76531SDavid Feng Simon Glass <sjg@chromium.org> 540ae76531SDavid Feng Sharma Bhupesh <bhupesh.sharma@freescale.com> 550ae76531SDavid Feng Rob Herring <robherring2@gmail.com> 5694f7ff36SSergey Temerkhanov Sergey Temerkhanov <s.temerkhanov@gmail.com> 57