summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-10-21efi_loader: Fix link of EFI apps with ld.lldAlistair Delva1-1/+1
When compiling U-Boot with ld.lld as the linker, the helloworld EFI app example fails to link: LD lib/efi_loader/helloworld_efi.so ld.lld: error: section: .dynamic is not contiguous with other relro sections LLD will always create RELRO program header regardless of target emulation, whereas BFD may automatically disable it for unsupported targets. Add -znorelro to disable it explicitly in all cases. Signed-off-by: Alistair Delva <adelva@google.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_loader: efi_dp_from_lo() should skip VenMedia nodeHeinrich Schuchardt2-15/+6
The 'efidebug boot dump' command should not display the VenMedia() device path node preceding the device path of the initial ram disk. By letting efi_dp_from_lo() skip the VenMedia() device path node we can simplify the coding. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-10-21efi_loader: avoid multiple local copies of lf2_initrd_guidHeinrich Schuchardt4-4/+8
Create the GUID as a global variable. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-10-21efi_loader: efi_dp_from_lo() unused parameter sizeHeinrich Schuchardt4-6/+2
Parameter size is never used in function efi_dp_from_lo(). Remove it. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-10-21efi_loader: simplify show_efi_boot_opt_data()Heinrich Schuchardt1-7/+2
Use printf code %pD for printing device paths. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_loader: efi_dp_from_lo() don't copy GUIDHeinrich Schuchardt4-5/+7
Instead of copying a GUID and then using a pointer to the copy for calling guidcmp(), just pass the pointer to the orginal GUID. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_loader: Fix loaded image alignmentIlias Apalodimas3-6/+60
We are ignoring the alignment communicated via the PE/COFF header. Starting 5.10 the Linux kernel will loudly complain about it. For more details look at [1] (in linux kernel). So add a function that can allocate aligned EFI memory and use it for our relocated loaded image. [1] c32ac11da3f83 ("efi/libstub: arm64: Double check image alignment at entry") Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Vincent Stehlé <vincent.stehle@arm.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_loader: don't load Shim's MOK database from fileHeinrich Schuchardt1-0/+8
When using a file to store UEFI variables we must make sure that secure boot related variables are not loaded from this file. With commit 9ef82e29478c ("efi_loader: don't load signature database from file") this has already been implemented for variables defined in the UEFI specification. As most Linux distributions use Shim we should do the same for Shim's MOK database. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-10-21x86: Show some EFI info with the bdinfo commandSimon Glass4-2/+41
It is useful to see some basic EFI info with the command as it forms part of the information about a board. Add a hook for this and show the table address as a start. While here, fix an invalid cast in setup_efi_info(). Note that this function is using a data structure defined by Linux so we cannot change it. Also note that ulong is used since this is the standard in U-Boot (>6k uses), despite there being quite a bit of the more verbose uintptr_t (930 uses). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21x86: Create a new header for EFISimon Glass3-3/+33
The setup routines are called from zimage but don't really belong in the zimage header. Add a new EFI header to house these. Add comments so it is clear what the functions do. Note that these functions are x86-specific. The zimage business is not used on other architectures. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21x86: Keep symbol information in u-boot ELF fileSimon Glass1-2/+2
At present this information is stripped when linking. It is useful to keep it around. Strip it from the .efi files instead. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi: Add a separate maintainer entry for the appSimon Glass1-0/+7
Separate this out slightly from the payload, with a new entry. We might consider renaming EFI PAYLOAD to EFI LOADER, but that would require quite a lot of file changes. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_loader: Drop code that doesn't work with driver modelSimon Glass4-124/+23
This code should never have been added as it builds a new feature on top of legacy code. This has already been improved with the dependency on BLK. Add a dependency on DM_ETH also, to avoid needing to deal with this old code. Boards which want EFI_LOADER should migrate to driver model first. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_selftest: Receive the packets until the receive buffer is emptyMasami Hiramatsu1-30/+37
Repeatedly receive the packets until the receive buffer is empty. If the buffer is empty, EFI_SIMPLE_NETWORK_PROTOCOL::Receive() returns EFI_NOT_READY. We don't need to use the wait_for_event() every time. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_selftest: Do not check EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPTMasami Hiramatsu1-11/+0
Do not check EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT in packet receiving loop. This depends on the implementation and not related to whether the packet can be received or not. Whether the received packets are available or not is ensured by wait_for_packet, and that is already done in the loop. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21efi_selftest: Use EFI_SIMPLE_NETWORK_PROTOCOL::GetStatus() for media checkMasami Hiramatsu1-0/+12
According to the UEF specification v2.9, the main purpose of the EFI_SIMPLE_NETWORK_PROTOCOL::GetStatus() is for checking the link status via EFI_SIMPLE_NETWORK_MODE::MediaPresent. So this uses net->get_status() for checking the link status before running network test. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-21configs: add mkeficapsule to tools-only_defconfigHeinrich Schuchardt1-1/+6
mkeficapsule is used to create capsules for UEFI firmware update. To ease inclusion into U-Boot tools packages of Linux distributions we should add it to the tools-only_defconfig. Provide dummy values for CONFIG_AVB_BUF_ADDR, CONFIG_AVB_BUF_SIZE to satisfy Kconfig. Suggested-by: Vagrant Cascadian <vagrant@debian.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-10-21doc: Remove obsolete README.440-DDR-performance fileThomas Huth1-90/+0
The PPC 440 support has been removed in commit 98f705c9cefd ("powerpc: remove 4xx support") already, so this file is certainly not required anymore. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-10-21doc: add python3-pkg-resources to build dependenciesHeinrich Schuchardt1-3/+3
tools/binman/control.py imports Python package pkg_resources. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-21doc: add system reset to API documentationHeinrich Schuchardt3-19/+42
Complete the Sphinx documentation in include/sysreset.h Add the include to the generated HTML documentation of the U-Boot API. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-10-21doc: require Sphinx 3.4.3Heinrich Schuchardt1-1/+1
For enums documented according to the requirements in chapter "Structure, union, and enumeration documentation" of https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html errors occur with Sphinx 2.4.4 which disappear with Sphinx 3.4.3, e.g. /builds/u-boot/custodians/u-boot-efi/doc/api/sysreset:6: ./include/sysreset.h:60:Unknown interpreted text role "enum". Sphinx 3.4.3 is the version used by Debian in the current release. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-20Merge branch '2021-10-19-assorted-changes'Tom Rini16-11/+245
- Assorted minor fixes and a new GPIO driver
2021-10-19clk: fixed_rate: add dummy disable() functionSamuel Holland1-0/+1
commit 6bf6d81c1112 ("clk: fixed_rate: add dummy enable() function") implemented .enable, so fixed rate clocks can be used where drivers might call clk_enable(). Implement the .disable op for the same reason; some drivers, e.g. USB PHYs, may attempt to disable clocks at runtime. Signed-off-by: Samuel Holland <samuel@sholland.org>
2021-10-19arm: total_compute: increase DRAM to 8GBUsama Arif2-0/+6
The extra 6GB start at 0x8080000000. Signed-off-by: Usama Arif <usama.arif@arm.com>
2021-10-19tools: Stop re-defining -std= when building toolsTom Rini2-4/+1
While we intentionally set -std=gnu11 for building host tools, and have for quite some time, we never dropped -std=gnu99 from tools/Makefile. This resulted in passing -std=gnu11 ... -std=gnu99 when building, and gnu99 would win. This in turn would result now in warnings such as: tools/mkeficapsule.c:25:15: warning: redefinition of typedef 'u32' is a C11 feature [-Wtypedef-redefinition] typedef __u32 u32; ^ Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-19configs: am335x_evm: enable CONFIG_CLK_TI_CTRLAmjad Ouled-Ameur1-0/+1
This enables the clock controller driver support on TI's SoCs. This will fix this GPIO issue at boot time: request_and_set_gpio: Unable to request GPIO_PR1_MII_CTRL request_and_set_gpio: Unable to request GPIO_MUX_MII_CTRL request_and_set_gpio: Unable to request GPIO_FET_SWITCH_CTRL request_and_set_gpio: Unable to request GPIO_PHY_RESET This issue comes from the fact that the clock controller is not probed. Enable the TI's clock controller driver support to solve this. Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2021-10-19drivers/gpio: add support for MAX7320 i2c i/o expanderHannes Schmelzer4-0/+158
This commit adds support for the MAX7320 (and clones) gpio expander. Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
2021-10-19Makefile: Only build dtc if neededSimon Glass5-8/+55
At present U-Boot always builds dtc if CONFIG_OF_CONTROL is defined, even when DTC is provided. The built dtc is not actually used, so this is a waste of time. Update the Makefile logic to build dtc only if one is not provided to the build with the DTC variable. Add documentation to explain this. This saves about 3.5 seconds of elapsed time on a clean build of sandbox_spl for me. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-19Revert "kbuild: remove unused dtc-version.sh script"Simon Glass3-0/+24
We need this to make building dtc optional. It makes no sense to build our own dtc if the system one works correctly. This reverts commit ddb87a0b40262ff99d675e946f57427642303938. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-19Merge branch '2021-10-18-OF_xxx-cleanup'Tom Rini23-51/+44
- Clean things up and rework such that we can drop OF_PRIOR_STAGE
2021-10-18treewide: Remove OF_PRIOR_STAGEIlias Apalodimas4-25/+8
The previous patches removed OF_PRIOR_STAGE from the last consumers of the Kconfig option. Cleanup any references to it in documentation, code and configuration options. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-18board: arm: Remove OF_PRIOR_STAGE from the remaining Arm boardsIlias Apalodimas4-3/+8
At some point back in 2018 prior_stage_fdt_address and OF_PRIOR_STAGE got introduced, in order to support a DTB handed over by an earlier stage boo loader. However we have another option in the Kconfig (OF_BOARD) which has identical semantics. So let's remove the option in an effort to simplify U-Boot's config and DTB management, and use OF_BOARD instead. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-10-18riscv: Remove OF_PRIOR_STAGE from RISC-V boardsIlias Apalodimas16-23/+28
At some point back in 2018 prior_stage_fdt_address and OF_PRIOR_STAGE got introduced, in order to support a DTB handed over by an earlier stage boo loader. However we have another option in the Kconfig (OF_BOARD) which has identical semantics. On RISC-V some of the boards pick up the DTB from a1 and copy it in their private gd_t. Apart from that they copy it to prior_stage_fdt_address, if the Kconfig option is selected, which is unnecessary. So let's switch the config option for those boards to OF_BOARD and define the required board_fdt_blob_setup() for them. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-10-18Merge tag 'u-boot-rockchip-20211015' of ↵Tom Rini14-100/+117
https://source.denx.de/u-boot/custodians/u-boot-rockchip - Fix for Rockchip mmc HS400 mode; - Fix for px30 board Odroid Go; - rockchip_sfc update; - rk3568 clk update; - doc fix;
2021-10-16Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-tegraTom Rini13-308/+321
On merge, fixup order of fdtdec_add_reserved_memory parameters in arch/arm/cpu/armv8/fsl-layerscape/soc.c Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-15Merge branch '2021-10-15-Kconfig-migrations'Tom Rini240-321/+38
- Assorted Kconfig migration patches
2021-10-15configs: Resync with savedefconfigTom Rini206-220/+17
Resync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-15Convert CONFIG_USB_EHCI_IS_TDI to KconfigMarek Behún26-61/+8
On mvebu this is defined if and only if !ARM64. Otherwise it is defined for boards with ARCH_MX23, ARCH_TEGRA and ARCH_ZYNQ, and also for SOC_AR934X (tplink_wdr4300). Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-15Drop CONFIG_USB_EHCI_KIRKWOODMarek Behún2-2/+0
This config option doesn't do anything. nas220 uses USB_EHCI_MARVELL. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-15Convert CONFIG_USB_EHCI_MXS to KconfigMarek Behún3-2/+7
This option is only used for mx23evk_defconfig mx23_olinuxino_defconfig which are the only i.MX23 boards. Add depend on ARCH_MX23 and default to y. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-15Rename CONFIG_EHCI_IS_TDI to CONFIG_USB_EHCI_IS_TDIMarek Behún25-25/+25
In preparation for moving this option to Kconfig, rename it to be consistent with other USB EHCI Kconfig options. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-10-15mmc: rockchip_sdhci: enable strobe line for HS400Yifeng Zhao1-0/+3
The default configuration of rk3399 EMMC PHY does not enable the strobe line, and EMMC controller will got data transmission error at HS400 mode. Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15clk: rockchip: rk3568: update clksElaine Zhang2-3/+10
fix up ppll init freq. support tclk_emmc. add freq (26M) for mmc device. fix up the sfc clk rate unit error. Change in V2: remove change id. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15spi: rockchip_sfc: Using read_pollJon Lin1-32/+35
Using read_poll logic. Tested-by: Chris Morgan <macromorgan@hotmail.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15spi: rockchip_sfc: Implement set_speed logicJon Lin1-43/+39
Set clock related processing into set_speed logic. And Optimize printing format. Tested-by: Chris Morgan <macromorgan@hotmail.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15rockchip: px30: sync serial flash controller bindings with mainlineChris Morgan3-7/+7
The devicetree submitted and approved for the mainline linux kernel is slightly different than the one present here. This syncs both devicetrees (for the Rockchip SFC node at least) present on the PX30 and the Odroid Go Advance. Changes include renaming the flash node, reordering the values in the SFC node for the rk3326-odroid-go2, changing the name of the cs pinctrl node to cs0, and updating the u-boot specific tree to utilize the new flash node value. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15doc: rockchip: write all brand names with a capitalJohan Jonker1-8/+8
Brand names are supposed to be written with a capital, so change them all. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15doc: rockchip: sort rockchip support list for rk3188Johan Jonker1-2/+2
In the list of mainline U-boot supported Rockchip boards rk3188 is placed below under the name rv3188. Give back it's original name and sort the list in alphabetical order. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15rockchip: rk33xx: Drop ROCKCHIP_USB2_PHY on boards without itPeter Robinson5-5/+0
The 64 bit rk33xx chips don't have the ROCKCHIP_USB2_PHY IP so drop the configs as they were likely copied over from other boards during enablement. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2021-10-15rockchip: board: remove SCLK_GPU from U-Boot DTChris Morgan1-0/+10
Starting with commit 92f1e9a4b31c ("clk: Detect failure to set defaults") the clk driver for the PX30 would fail to probe for the Odroid Go Advance. This patch is to remove the clock for the GPU from the U-Boot specific devicetree, as that clock is not supported by the U-Boot clk_px30 driver. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>