summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-01-20Merge tag 'efi-2021-04-rc1-2' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-04-rc1-2 * Provide a test tool for initial RAM disk provided via load file2 protocol. * Make more items configurable to reduce code size: * Boot manager * EFI_DT_FIXUP_PROTOCOL * EFI_DEVICE_PATH_UTILITIES_PROTOCOL * Bug fixes * avoid EFI runtime symbols in global symbol table
2021-01-20efi_loader: Avoid emitting efi_var_buf to .GOTIlias Apalodimas
Atish reports that on RISC-V, accessing the EFI variables causes a kernel panic. An objdump of the file verifies that, since the global pointer for efi_var_buf ends up in .GOT section which is not mapped in virtual address space for Linux. <snip of efi_var_mem_find> 0000000000000084 <efi_var_mem_find>: 84: 715d addi sp,sp,-80 * objdump -dr 0000000000000086 <.LCFI2>: 86: e0a2 sd s0,64(sp) 88: fc26 sd s1,56(sp) 8a: e486 sd ra,72(sp) 8c: f84a sd s2,48(sp) 8e: f44e sd s3,40(sp) 90: f052 sd s4,32(sp) 92: ec56 sd s5,24(sp) 94: 00000497 auipc s1,0x0 94: R_RISCV_GOT_HI20 efi_var_buf 98: 0004b483 ld s1,0(s1) # 94 <.LCFI2+0xe> 98: R_RISCV_PCREL_LO12_I .L0 98: R_RISCV_RELAX *ABS* * objdump -t 0000000000000084 g F .text.efi_runtime 00000000000000b8 efi_var_mem_find With the patch applied: * objdump -dr 0000000000000086 <.LCFI2>: 86: e0a2 sd s0,64(sp) 88: fc26 sd s1,56(sp) 8a: e486 sd ra,72(sp) 8c: f84a sd s2,48(sp) 8e: f44e sd s3,40(sp) 90: f052 sd s4,32(sp) 92: ec56 sd s5,24(sp) 94: 00000497 auipc s1,0x0 94: R_RISCV_PCREL_HI20 .LANCHOR0 94: R_RISCV_RELAX *ABS* 98: 00048493 mv s1,s1 98: R_RISCV_PCREL_LO12_I .L0 98: R_RISCV_RELAX *ABS* * objdump -t 0000000000000008 l O .data.efi_runtime 0000000000000008 efi_var_buf On arm64 this works, because there's no .GOT entries for this and everything is converted to relative references. * objdump -dr (identical pre-post patch, only the new function shows up) 00000000000000b4 <efi_var_mem_find>: b4: aa0003ee mov x14, x0 b8: 9000000a adrp x10, 0 <efi_var_mem_compare> b8: R_AARCH64_ADR_PREL_PG_HI21 .data.efi_runtime bc: 91000140 add x0, x10, #0x0 bc: R_AARCH64_ADD_ABS_LO12_NC .data.efi_runtime c0: aa0103ed mov x13, x1 c4: 79400021 ldrh w1, [x1] c8: aa0203eb mov x11, x2 cc: f9400400 ldr x0, [x0, #8] d0: b940100c ldr w12, [x0, #16] d4: 8b0c000c add x12, x0, x12 So let's switch efi_var_buf to static and create a helper function for anyone that needs to update it. Fixes: e01aed47d6a0 ("efi_loader: Enable run-time variable support for tee based variables") Reported-by: Atish Patra <atishp@atishpatra.org> Tested-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-20efi_loader: efi_size_in_pages() missing parenthesesHeinrich Schuchardt
Add parentheses around size to avoid possible operator precedence problems. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-20efi_loader: remove EFI_UNICODE_COLLATION_PROTOCOLHeinrich Schuchardt
In EFI 1.10 a version of the Unicode collation protocol using ISO 639-2 language codes existed. This protocol is not part of the UEFI specification any longer. It was however required to run the UEFI Self Certification Test (SCT) II, version 2.6, 2017. So we implemented it for the sole purpose of running the SCT. As the SCT does not need the protocol anymore it is time for removal. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-20efi_loader: make the UEFI boot manager configurableHeinrich Schuchardt
Some boards are very tight on the binary size. Booting via UEFI is possible without using the boot manager. Provide a configuration option to make the boot manager available. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-19net: dwc_eth_qos: Pad descriptors to cacheline sizeMarek Vasut
The DWMAC4 IP has the possibility to skip up to 7 AXI bus width size words after the descriptor. Use this to pad the descriptors to cacheline size and remove the need for noncached memory altogether. Moreover, this lets Tegra use the generic cache flush / invalidate operations. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Ramon Fried <rfried.dev@gmail.com> Cc: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-01-18power: pmic: add driver for Monolithic Power mp5416Tim Harvey
This adds basic register access and child regulator binding for the Monolithic MP5416 Power Management IC which integrates four DC/DC switching converters and five LDO regulators. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-01-18aspeed: Add AST2600 platform supportChia-Wei, Wang
Add low level platform initialization for the AST2600 SoC. The 2-stage booting with U-Boot SPL are leveraged to support different booting mode. However, currently the patch supports only the booting from memory-mapped SPI flash. Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com> Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
2021-01-18reset: aspeed: Add AST2600 reset supportChia-Wei, Wang
Add controller reset support through the System Control Unit (SCU) of AST2600 SoC. Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com> Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
2021-01-18clk: aspeed: Add AST2600 clock supportRyan Chen
This patch adds the clock control driver for the AST2600 SoC. Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com> Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
2021-01-18board: presidio: Add Parallel NAND supportKate Liu
Set environment for Nand flash (U-boot 2020.04): - add nand flash in the device tree - add new default configuration file for G3 using parallel Nand - set nand parameters in presidio_asic.h Signed-off-by: Kate Liu <kate.liu@cortina-access.com> Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> CC: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-01-18clk: mediatek: Add MT8183 clock driverFabien Parent
Add the topckgen, apmixedsys and infracfg clock driver for the MT8183 SoC. Signed-off-by: Fabien Parent <fparent@baylibre.com>
2021-01-18Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscvTom Rini
- Update qemu-riscv.rst build instructions. - Add support for SPI on Kendryte K210. - Add Microchip PolarFire SoC Icicle Kit support. - Add support for an early timer. - Select TIMER_EARLY to avoid infinite recursion for Trace.
2021-01-18riscv: Add Microchip MPFS Icicle Kit supportPadmarao Begari
This patch adds Microchip MPFS Icicle Kit support. For now, only NS16550 Serial, Microchip clock, Cadence eMMC and MACB drivers are enabled. The Microchip MPFS Icicle defconfig by default builds U-Boot for S-Mode because U-Boot on Microchip PolarFire SoC will run in S-Mode as payload of HSS + OpenSBI. Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com> Reviewed-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bin.meng@windriver.com> Tested-by: Bin Meng <bin.meng@windriver.com>
2021-01-18clk: Add Microchip PolarFire SoC clock driverPadmarao Begari
Add clock driver code for the Microchip PolarFire SoC. This driver handles reset and clock control of the Microchip PolarFire SoC device. Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com> Reviewed-by: Anup Patel <anup.patel@wdc.com> Tested-by: Bin Meng <bin.meng@windriver.com>
2021-01-18riscv: timer: Add support for an early timerPragnesh Patel
Added support for timer_early_get_count() and timer_early_get_rate() This is mostly useful in tracing. Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com> Reviewed-by: Rick Chen <rick@andestech.com>
2021-01-18riscv: Add support for SPI on Kendryte K210Sean Anderson
This enables configs necessary for using SPI. The environment is saved to the very end of SPI flash. This is unlikely to be overwritten unless the entire flash is reprogrammed. This also supplies a default bootcommand. It loads an image and device tree from the first partition of the MMC. This is a minimal/least effort bootcmd, so suggestions (especially in the form of patches) are welcome. I didn't set up distro boot because I think it is unlikely that any general-purpose linux distros will ever be ported to this board. Signed-off-by: Sean Anderson <seanga2@gmail.com> Tested-by: Chrstopher Obbard <obbardc@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
2021-01-16log: provide missing macrosHeinrich Schuchardt
With commit d094a0734cee ("log: allow for message continuation") we have defined a special log level and category for message continuation. Let's have a macro for using these. If logging is enabled log_cont() will create a continuation log output with the same logging level and category as the previous message. If logging is not enabled, log_cont() will print like printf(). Provide macros for logging levels LOG_EMERG, LOG_ALERT, LOG_CRIT. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-16log: make debug_cond() function likeHeinrich Schuchardt
Change debug_cond() such that it can be used instead of a function like debug(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-16dm: core: add function uclass_probe_all() to probe all devicesVabhav Sharma
Support a common method to probe all devices associated with uclass. This includes data structures and code for finding the first device and looping for remaining devices associated with uclasses (groups of devices with the same purpose, e.g. all SERIAL ports will be in the same uclass). An example is SBSA compliant PL011 UART IP, where firmware does the serial port initialization and prepare uart device to let the kernel use it for sending and reveiving the characters.SERIAL uclass will use this function to initialize PL011 UART ports. The feature is enabled with CONFIG_DM. Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2021-01-16doc/README.gpt: define partition type GUID for U-Boot environmentRasmus Villemoes
When setting aside a GPT partition for holding the U-Boot environment, having a partition type GUID [1] indicating "Linux filesystem" (as most tools default to) is somewhat misleading - and there's no other well-known type GUID that is better suited. So to have a canonical value to put into the type field, define 3de21764-95bd-54bd-a5c3-4abe786f38a8 to mean a partition holding a U-Boot environment. This is a v5 namespace-name GUID [2], generated [3] from a namespace of "25cbcde0-8642-47c6-a298-1a3a57cd256b" and name "U-Boot environment". Should future type GUIDs be defined in the context of U-Boot, it's sensible to use that same namespace GUID. [1] https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs [2] https://en.wikipedia.org/wiki/Universally_unique_identifier#Versions_3_and_5_(namespace_name-based) [3] https://www.uuidtools.com/v5 Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2021-01-16lib/uuid.c: change prototype of uuid_guid_get_str()Rasmus Villemoes
There's no reason to require an appropriately sized output parameter for the string, that's error-prone should the table ever grow an element with a longer string. We can just return the const char* pointer directly. Update the only caller accordingly, and get rid of pointless ifdeffery in the header so that the compiler always sees a declaration and can thus do type-checking, whether or not PARTITION_TYPE_GUID is enabled or not. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2021-01-16test: Avoid assuming sandbox board for bloblist testSimon Glass
This tests assumes it is running on sandbox. Add a few functions to handle silencing the console on any board and use those instead. Reported-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-16cmd: gpt: add eMMC and GPT supportCorneliu Doban
Add eMMC and GPT support. - GPT partition list and command to create the GPT added to u-boot environment - eMMC boot commands added to u-boot environment - new gpt commands (enumarate and setenv) that are used by broadcom update scripts and boot commands - eMMC specific u-boot configurations with environment saved in eMMC and GPT support Signed-off-by: Corneliu Doban <cdoban@broadcom.com> Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> [trini: Make gpt_setenv initialize ret to -1, given relevant return error values] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-15disk: dos: add code for creating MBR partition layoutMarek Szyprowski
Add a code for creating and writing MBR partition layout. The code generates similar layout of EBRs (Exteneded Block Records) and logical volumes as Linux's fdisk utility. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2021-01-15disk: dos: rename write_mbr_partition to write_mbr_sectorMarek Szyprowski
write_mbr_partition() function name is a bit misleading, so rename it to write_mbr_sector(). This is a preparation for adding code for writing a complete MBR partition layout. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2021-01-15console: Provide a documentation for console_search_dev()Andy Shevchenko
Provide a documentation for console_search_dev(). Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2021-01-15console: rename search_device() to console_search_dev()Andy Shevchenko
Rename search_device() to console_search_dev() since it's in console.h. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15console: move search_device() from iomux.h to console.hAndy Shevchenko
search_device() is defined in console.c. Move its declaration to an appropriate header file. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15console: Introduce console_start() and console_stop()Andy Shevchenko
In the future we would like to stop unused consoles and also add a reference counting to avoid imbalanced calls to ->start() and ->stop() in some cases. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15global_data: Enable spl_handoff only if CONFIG_HANDOFF is setOvidiu Panait
spl_handoff should only be enabled when CONFIG_HANDOFF is set. Drop the nested ifdefs and check for CONFIG_HANDOFF instead. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15common: board_r: Drop arch-specific ifdefs around initr_trapOvidiu Panait
In order to remove the arch-specific ifdefs around initr_trap, introduce arch_initr_trap weak initcall. Implementations for ppc/m68k/mips have been moved to arch/<arch>/lib/traps.c Default implementation is a nop stub. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2021-01-15common: board_r: Drop initr_bbmii wrapperOvidiu Panait
Add a return value to bb_miiphy_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15common: board_r: Drop initr_api wrapperOvidiu Panait
Add a return value to api_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15common: board_r: Drop initr_jumptable wrapperOvidiu Panait
Add a return value to jumptable_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15common: board_r: Drop initr_xen wrapperOvidiu Panait
Add a return value to xen_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15common: board_r: Drop initr_pci wrapperOvidiu Panait
Add a return value to pci_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15common: board_r: Drop initr_pci_ep wrapperOvidiu Panait
Add a return value to pci_ep_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15common: board_r: Drop initr_post_backlog wrapperOvidiu Panait
Add a return value to post_output_backlog and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15common: board_r: Drop initr_secondary_cpu wrapperOvidiu Panait
Add a return value to cpu_secondary_init_r and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-15Merge branch '2021.04-rc' of https://github.com/lftan/u-bootTom Rini
- Add ATF flow for SoC64 devices - Update socfpgaimage to support print header and update padding flow
2021-01-15configs: socfpga: Add CONFIG_SPL_PAD_TOLey Foon Tan
Add CONFIG_SPL_PAD_TO for Gen5 and Arria 10. CONFIG_SPL_PAD_TO is set to size of OCRAM. This is preparation for image padding change in socfpgaimage. Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2021-01-15arm: socfpga: soc64: SSBL shall not setup stack on OCRAMChee Hong Ang
Since SSBL is running in DRAM, it shall setup the stack in DRAM instead of OCRAM which is occupied by SPL and handoff data. Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
2021-01-15mmc: dwmmc: Change designware MMC 'clksel' callback function to return statusSiew Chin Lim
Change 'clksel' callback function to allow the code to return a status. This patch is a preparation for enabling Arm-Trusted-Firmware (ATF) in Intel SoC FPGA. This patch does not change functionality. When using Arm-Trusted-Firmware (ATF) in Intel SoC FPGA, the MMC clock related register is secure register which is required to be written via SMC/PCSI call. It is possible that U-Boot fail to write the register if there is unexpected error between U-Boot and ATF. As a result, there maybe signal integrity on MMC connection due to clock. So, the code should reports error to user when 'clksel' fail. Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
2021-01-15arm: socfpga: soc64: Define SMC function identifiers for PSCI SiP servicesChee Hong Ang
This header file defines the Secure Monitor Call (SMC) message protocol for ATF (BL31) PSCI runtime services. It includes all the PSCI SiP function identifiers for the secure runtime services provided by ATF. The secure runtime services include System Manager's registers access, 2nd phase bitstream FPGA reconfiguration, Remote System Update (RSU) and etc. Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com> Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
2021-01-15arm: socfpga: soc64: Load FIT image with ATF supportChee Hong Ang
Instead of loading u-boot proper image (u-boot.img), SPL now loads FIT image (u-boot.itb) which includes u-boot proper, ATF and u-boot proper's DTB. For OS, u-boot now loads FIT images (kernel.itb) which includes Linux Image and Linux's DTB. Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com> Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
2021-01-14Merge tag 'efi-2021-04-rc1' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-04-rc1 In the UEFI sub-system: * implement non-blocking file services * print boot device and file path in helloworld.efi * improve detection of boot device * correct argument handling in efivar.py * implement EFI_DT_FIXUP_PROTOCOL Bug fixes: * adjust conitrace command for low baud rates * check that FIT images are valid FDTs
2021-01-13Merge tag 'u-boot-amlogic-20210112' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic - sync amlogic GX & AXG DT to Linux 5.10 - Add new MESON_EE driver support for GXBB & AXG - Add support for Libretech-CC v2, Wetek Core2, Beelink GT-King/Pro boards - add driver for TDO tl070wsh30 panel driver - meson: isolate loading of socinfo - Add soc_rev to environment - Enable G12A support for saradc - Add correct mmcdev on VIM3(L) & Odroid-N2(C4) - Read MAC from fuses for VIM3 & VIM3L boards
2021-01-13efi_loader: implement EFI_DT_FIXUP_PROTOCOLHeinrich Schuchardt
A boot manager like GRUB can use the protocol to * apply U-Boot's fix-ups to the a device-tree * let U-Boot make memory reservations according to the device-tree * install the device-tree as a configuration table Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-13efi_loader: typedef efi_string_t text output protocolHeinrich Schuchardt
We do not want to use typedefs in U-Boot. Do not use efi_string_t in the EFI_TEXT_OUTPUT_PROTOCOL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>