[PATCH 1/1] efi_loader: simplify efi_watchdog_timer_notify()

2021-09-08 Thread Heinrich Schuchardt
We can call do_reset() directly without invoking the UEFI API. This decreases the code size. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_watchdog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_watchdog.c b/lib/efi_loader/efi_watchdog.c

[PATCH] efi_loader: eliminate EFI_CALL() in nvedit_efi.c

2021-09-08 Thread Heinrich Schuchardt
Reduce the code size by avoiding using the external UEFI API and using our internal functions instead. Signed-off-by: Heinrich Schuchardt --- cmd/nvedit_efi.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c index

Re: [PATCH] efi_loader: Remove incorrect calls of EFI_CALL in TCG2

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 11:30 PM, Ilias Apalodimas wrote: There is two unneeded EFI_CALL references in tcg2_measure_pe_image(). The first one in efi_search_protocol() and the second on in the device path calculation. The second isn't even a function we should be calling, but a pointer assignment, which

[PATCH 1/1] configs: add mkeficapsule to tools-only_defconfig

2021-09-08 Thread Heinrich Schuchardt
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

Re: [PATCH v2 6/6] image: Drop IMAGE_ENABLE_{MD5, CRC32} #defines

2021-09-08 Thread Tom Rini
On Thu, Sep 02, 2021 at 07:54:22PM -0500, Alexandru Gagniuc wrote: > These are no longer used, so drop them. > > Signed-off-by: Alexandru Gagniuc Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v2 5/6] image: Drop if/elseif hash selection in calculate_hash()

2021-09-08 Thread Tom Rini
On Thu, Sep 02, 2021 at 07:54:21PM -0500, Alexandru Gagniuc wrote: > calculate_hash() would try to select the appropriate hashing function > by a if/elseif contruct. But that is exactly why hash_lookup_algo() > exists, so use it instead. > > This does mean that we now have to 'select HASH' to

Re: [PATCH v2 4/6] common: Move MD5 hash to hash_algo[] array.

2021-09-08 Thread Tom Rini
On Thu, Sep 02, 2021 at 07:54:20PM -0500, Alexandru Gagniuc wrote: > MD5 is being called directly in some places, but it is not available > via hash_lookup_algo("md5"). This is inconsistent with other hasing > routines. To resolve this, add an "md5" entry to hash_algos[]. > > The #ifdef clause

Re: [PATCH v2 3/6] common/spl: Drop [ST]PL_HASH_SUPPORT in favor of [ST]PL_HASH

2021-09-08 Thread Tom Rini
On Thu, Sep 02, 2021 at 07:54:19PM -0500, Alexandru Gagniuc wrote: > All of these configs exist. Stick to using CONFIG_[ST]PL_HASH, and drop all > references to CONFIG_[ST]PL_HASH_SUPPORT. This means we need for > CHAIN_OF_TRUST to select SPL_HASH now. > > Signed-off-by: Alexandru Gagniuc >

Re: [PATCH v2 2/6] lib: Drop SHA512_ALGO in lieu of SHA512

2021-09-08 Thread Tom Rini
On Thu, Sep 02, 2021 at 07:54:18PM -0500, Alexandru Gagniuc wrote: > SHA512_ALGO was used as a "either SHA512 or SHA384", although the > implementations of these two algorithms share a majority of code. > > From a Kconfig interface perspective, it makes sense to present two > distinct options.

Re: [PATCH v2 1/6] common: Remove unused CONFIG_FIT_SHAxxx selectors

2021-09-08 Thread Tom Rini
On Thu, Sep 02, 2021 at 07:54:17PM -0500, Alexandru Gagniuc wrote: > Originally CONFIG_FIT_SHAxxx enabled specific SHA algos for and only > for hash_calculate() in common/image-fit.c. However, since commit > 14f061dcb1 ("image: Drop IMAGE_ENABLE_SHAxxx"), > the correct selector was changed to

Re: [PATCH 14/35] efi: Locate all block devices in the app

2021-09-08 Thread AKASHI Takahiro
Hi Simon, On Wed, Sep 08, 2021 at 08:14:30PM +0200, Heinrich Schuchardt wrote: > On 9/8/21 3:33 PM, Simon Glass wrote: > > When starting the app, locate all block devices and make them available > > to U-Boot. This allows listing partitions and accessing files in > > filesystems. > > > > EFI

Re: [PATCH v2 2/2] pinephone_defconfig: add support for early-boot status LED

2021-09-08 Thread Samuel Holland
On 9/8/21 2:14 PM, Arnaud Ferraris wrote: > This commit enables the green status LED (PD18/GPIO 114) on boot in the > SPL, in order to provide visual feedback that the PinePhone is booting. > > Signed-off-by: Arnaud Ferraris > Reviewed-by: Andre Przywara Reviewed-by: Samuel Holland Tested-by:

Re: [PATCH v2 1/2] board: sunxi: enable status LED early

2021-09-08 Thread Samuel Holland
On 9/8/21 2:14 PM, Arnaud Ferraris wrote: > For some systems, such as the PinePhone, there is no way for the end > user to make sure the system is indeed booting before the boot script is > executed, which takes several seconds. Therefore, it can be useful to > provide early visual feedback as

[PATCH] efi_loader: Remove incorrect calls of EFI_CALL in TCG2

2021-09-08 Thread Ilias Apalodimas
There is two unneeded EFI_CALL references in tcg2_measure_pe_image(). The first one in efi_search_protocol() and the second on in the device path calculation. The second isn't even a function we should be calling, but a pointer assignment, which happens to work with the existing macro. While at

Re: [u-boot PATCH] arm: mach-k3: am6_init: Prioritize MSMC traffic over DDR in NAVSS Northbridge

2021-09-08 Thread Nishanth Menon
On 12:24-20210908, Jan Kiszka wrote: [...] > Thanks a lot! > > Who will augment its description and push this again? I have a rebased > version [1] at least, slightly polished, but my commit log is possibly > not optimal yet. Done. https://patchwork.ozlabs.org/proj

[PATCH V2] arm: mach-k3: am6_init: Prioritize MSMC traffic over DDR in NAVSS Northbridge

2021-09-08 Thread Nishanth Menon
From: Roger Quadros NB0 is bridge to SRAM and NB1 is bridge to DDR. To ensure that SRAM transfers are not stalled due to delays during DDR refreshes, SRAM traffic should be higher priority (threadmap=2) than DDR traffic (threadmap=0). This fixup is critical to provide deterministic access

[PATCH v2 2/2] pinephone_defconfig: add support for early-boot status LED

2021-09-08 Thread Arnaud Ferraris
This commit enables the green status LED (PD18/GPIO 114) on boot in the SPL, in order to provide visual feedback that the PinePhone is booting. Signed-off-by: Arnaud Ferraris Reviewed-by: Andre Przywara --- Changes in v2: - add a Reviewed-by record configs/pinephone_defconfig | 6 ++ 1

[PATCH v2 1/2] board: sunxi: enable status LED early

2021-09-08 Thread Arnaud Ferraris
For some systems, such as the PinePhone, there is no way for the end user to make sure the system is indeed booting before the boot script is executed, which takes several seconds. Therefore, it can be useful to provide early visual feedback as soon as possible. In order achieve this goal, this

[PATCH v2 0/2] PinePhone: enable LED on boot for improved

2021-09-08 Thread Arnaud Ferraris
Hi, As the PinePhone doesn't provide any visual feedback when booting, these patches take advantage of the built-in RGB LED to indicate the device is indeed powered on. I've been carrying those downstream in Mobian for some time now, allowing users to see their phone is booting (otherwise it can

[PATCH v3 2/2] mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP

2021-09-08 Thread Oleksandr Suvorov
Import HS400 support for iMX7ULP B0 from the Linux kernel: 2eaf5a533afd ("mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP") According to IC suggest, need to clear the STROBE_DLL_CTRL_RESET before any setting of STROBE_DLL_CTRL register. USDHC has register bits(bit[27~20] of register

[PATCH v3 1/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp

2021-09-08 Thread Oleksandr Suvorov
From: Jorge Ramirez-Ortiz Import data for eSDHC driver for SoC iMX7ULP from the Linux kernel. Set supported by u-boot flags only. Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Ricardo Salveti Co-developed-by: Oleksandr Suvorov Signed-off-by: Oleksandr Suvorov Reviewed-by: Fabio Estevam

[PATCH v3 0/2] mmc: fsl_esdhc_imx: initialize data for imx7ulp

2021-09-08 Thread Oleksandr Suvorov
Import individual settings for soc imx7ulp and add support of HS400. Changes in v3: - added a cover letter. Changes in v2: - fixed Series-notes record. Jorge Ramirez-Ortiz (1): mmc: fsl_esdhc_imx: initialize data for imx7ulp Oleksandr Suvorov (1): mmc: sdhci-esdhc-imx: Add HS400 support

Re: [PATCH v2 2/2] mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP

2021-09-08 Thread Oleksandr Suvorov
Hi Igor, On Wed, Sep 8, 2021 at 5:42 PM Igor Opaniuk wrote: > > Hi Oleksandr, > > On Tue, Aug 31, 2021 at 8:49 PM Oleksandr Suvorov > wrote: > > > > Import HS400 support for iMX7ULP B0 from the Linux kernel: > > > > 2eaf5a533afd ("mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP") > > > >

Re: [PATCH 34/35] efi: Show when allocated pages are used

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:34 PM, Simon Glass wrote: Add a message here so that both paths of memory allocation are reported. Signed-off-by: Simon Glass --- lib/efi/efi_app.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index e0666d1fae2..c8f4784eb7d 100644

Re: [PATCH 24/35] x86: Allow booting a kernel from the EFI app

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: At present this is disabled, but it should work so long as the kernel does not need EFI services. Enable it and add a note about remaining work. Signed-off-by: Simon Glass --- arch/x86/lib/bootm.c | 11 +++ 1 file changed, 7 insertions(+), 4

Re: [PATCH 22/35] bloblist: Move to rST format

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: Move this documentation to the new format. Signed-off-by: Simon Glass Acked-by: Heinrich Schuchardt --- doc/{README.bloblist => develop/bloblist.rst} | 4 ++-- doc/develop/index.rst | 1 + 2 files changed, 3 insertions(+),

Re: [PATCH 14/35] efi: Locate all block devices in the app

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: When starting the app, locate all block devices and make them available to U-Boot. This allows listing partitions and accessing files in filesystems. EFI also has the concept of 'disks', meaning boot media. For now, this is not obviously useful in U-Boot,

Re: [PATCH 13/35] efi: Add a media/block driver for EFI block devices

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: Add a block driver which handles read/write for EFI block devices. This driver actually already exists ('efi_block') but is not really suitable for use as a real U-Boot driver: - The operations do not provide a udevice efi_bl_bind() creates a udevice

Re: [PATCH 12/35] efi: Add EFI uclass for media

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: At present UCLASS_EFI is used to represent an EFI filesystem The description of this uclass is "EFI managed devices" which is pretty vague. The only driver that uses this uclass is in fact not a real U-Boot driver, since its operations do not include a

Re: [PATCH 11/35] RFC: efi: Drop code that doesn't work with driver model

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: This code should never have been added as it builds a new feature on top of legacy code. Drop it and add a dependency on BLK for this feature. Boards which want EFI_LOADER should migrate to driver model first. Signed-off-by: Simon Glass This patch is

Re: U-boot patches

2021-09-08 Thread Tom Rini
On Wed, Sep 08, 2021 at 07:35:50AM +, Sjöberg Andreas wrote: > Hi, > We have two patch files for u-boot: > > Bootelf_async_abort_fix.patch: > Booting a .elf files sometimes triggers an asynchronous abort error disabling > the icache and dcahe before boot turned out to prevent this and this

Re: [PATCH 10/35] efi: Add video support to the app

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: The current EFI video driver only works when running in the stub. In that case the stub calls boot services (before jumping to U-Boot proper) and copies the graphics info over to the efi table. This is necessary because the stub exits boot services before

Re: [PATCH 07/35] efi: Create a 64-bit app

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: Most modern platforms use 64-bit EFI so it is useful to have a U-Boot app that runs under that. Add a (non-functional) build for this. Note that --whole-archive causes the gcc 9.2 linker to crash, so disable this for now. Once this is resolved, things

Re: [PATCH 06/35] x86: Create a 32/64-bit selection for the app

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: Most EFI implementations use 64-bit. In order to spupose a 64-bit app, %s/spupose/support update the Kconfig to add an option for 32/64 bit. Update the prompt for This commit message is unclear. We already can compile U-Boot as an 64bit EFI

Re: [PATCH 04/35] x86: Tidy up global_data pointer for 64-bit

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: Add an extern declaration so that it is possible to use this macro in files other than the one that defines it. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt --- arch/x86/cpu/x86_64/cpu.c | 3 +++

Re: [PATCH 03/35] x86: Show some EFI info with the bdinfo command

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: 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(). Signed-off-by: Simon Glass ---

Re: [PATCH 02/35] x86: Create a new header for EFI

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:33 PM, Simon Glass wrote: 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. Signed-off-by: Simon Glass --- arch/x86/include/asm/efi.h| 32

[PATCH] board: sl28: enable EFI_SET_TIME support

2021-09-08 Thread Michael Walle
Allow EFI to set the time before ExitBootServices(). Signed-off-by: Michael Walle --- configs/kontron_sl28_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/kontron_sl28_defconfig b/configs/kontron_sl28_defconfig index e15928bead..8bd7d5be4b 100644 ---

Re: [PATCH v2 1/9] ARM: meson: Sync Amlogic DT from Linux 5.14

2021-09-08 Thread Tom Rini
On Wed, Sep 08, 2021 at 04:17:20PM +0200, Neil Armstrong wrote: > Import Amlogic DT changes from Linux commit 7d2a07b76933 ("Linux 5.14"), > dt-bindings clock changes and new meson-g12b-gsking-x.dts, > meson-sm1-bananapi-m5 & odroid-hc4 boards. > > Signed-off-by: Neil Armstrong Given some

Re: imx: imx8mq: mxc_get_clock for MXC_I2C_CLK is missing

2021-09-08 Thread Heiko Thiery
Hi, Am Mi., 8. Sept. 2021 um 16:07 Uhr schrieb Heiko Thiery : > > Hi, > > Am Mi., 8. Sept. 2021 um 15:08 Uhr schrieb Heiko Thiery > : > > > > Hi Peng, > > > > I faced an issue with the I2C bus speed in SPL for the imx8mq. I > > figured out that the bus frequency is set to about 1MHz. While

cdns_wdt: who enables the clock

2021-09-08 Thread Jorge Ramirez-Ortiz, Foundries
Hi Michal The *linux* cadence_wdt driver for the watchdog enables the clock that controls its behaviour. However this is not done in the U-boot driver; I dont think it is safe to assume that the clock will be active. do you know why is the driver making that assumption? and how to enable the

Re: [PATCH v2 2/2] mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP

2021-09-08 Thread Igor Opaniuk
Hi Oleksandr, On Tue, Aug 31, 2021 at 8:49 PM Oleksandr Suvorov wrote: > > Import HS400 support for iMX7ULP B0 from the Linux kernel: > > 2eaf5a533afd ("mmc: sdhci-esdhc-imx: Add HS400 support for iMX7ULP") > > According to IC suggest, need to clear the STROBE_DLL_CTRL_RESET > before any setting

Re: [PATCH] doc: board: toradex: fix file names

2021-09-08 Thread Igor Opaniuk
Hi, On Wed, Sep 8, 2021 at 4:52 PM Oleksandr Suvorov wrote: > > Fix the documentation file names: s/apalix/apalis/. > > Signed-off-by: Oleksandr Suvorov > --- > > board/toradex/apalis-imx8/MAINTAINERS| 2 +- > doc/board/toradex/{apalix-imx8.rst => apalis-imx8.rst} | 0 >

Re: [PATCH] doc: board: toradex: fix file names

2021-09-08 Thread Heinrich Schuchardt
On 9/8/21 3:52 PM, Oleksandr Suvorov wrote: Fix the documentation file names: s/apalix/apalis/. Signed-off-by: Oleksandr Suvorov Reviewed-by: Heinrich Schuchardt --- board/toradex/apalis-imx8/MAINTAINERS| 2 +- doc/board/toradex/{apalix-imx8.rst => apalis-imx8.rst}

Re: U-Boot Digest, Vol 158, Issue 63

2021-09-08 Thread Tom Rini
On Thu, Aug 05, 2021 at 04:31:19PM -0400, Tom Rini wrote: > On Tue, Aug 03, 2021 at 09:21:57AM -0400, Oleksandr G Zhadan wrote: > > > Hi Tom, > > > > Thanks for the quick notes. > > > > As I already mentioned, unfortunately, I did not notice any "warnings" in > > time - we haven’t been building

[PATCH v2 9/9] ARM: amlogic: add Banana Pi M5

2021-09-08 Thread Neil Armstrong
Banana Pi BPI-M5 is a credit card format SBC with the following features: - Amlogic S905X3 quad core Cortex-A55 - Mali-G31 GPU - 4GB LPDDR4 - 16GB eMMC flash - 4 USB 3.0 - 1 GbE ethernet - HDMI output - 2x LEDS - SDCard - 2.5mm Jack with Stereo Audio + CVBS - Infrared Received - ADC Button - GPIO

[PATCH v2 8/9] ARM: meson: add Beelink GS-King X board

2021-09-08 Thread Neil Armstrong
The Beelink GS-King X is a variant of the GS King boards but with an internal USB to SATA bridge and advanced audio features. Signed-off-by: Neil Armstrong --- arch/arm/dts/meson-g12b-gsking-x-u-boot.dtsi | 7 ++ configs/beelink-gsking-x_defconfig | 70

[PATCH v2 1/9] ARM: meson: Sync Amlogic DT from Linux 5.14

2021-09-08 Thread Neil Armstrong
Import Amlogic DT changes from Linux commit 7d2a07b76933 ("Linux 5.14"), dt-bindings clock changes and new meson-g12b-gsking-x.dts, meson-sm1-bananapi-m5 & odroid-hc4 boards. Signed-off-by: Neil Armstrong --- arch/arm/dts/Makefile | 3 + arch/arm/dts/meson-axg-s400.dts

[PATCH v2 7/9] doc: boards: amlogic: update for Odroid HC4

2021-09-08 Thread Neil Armstrong
Add documentation bits for the Odroid-HC4. Signed-off-by: Neil Armstrong --- doc/board/amlogic/index.rst | 2 +- doc/board/amlogic/odroid-c4.rst | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst index

[PATCH v2 6/9] ARM: amlogic: add support for Odroid-HC4 device

2021-09-08 Thread Neil Armstrong
The Odroid-HC4 is a variant of the Odroid-C4 board but with an PCIe-SATA bridge instead of the USB3 ports. Signed-off-by: Neil Armstrong --- arch/arm/dts/meson-sm1-odroid-hc4-u-boot.dtsi | 23 + configs/odroid-hc4_defconfig | 83 +++ 2 files changed, 106

[PATCH v2 4/9] configs: meson64: add SCSI boot target

2021-09-08 Thread Neil Armstrong
Add SCSI target to be able to boot from the SATA disks on the Odroid HC4 using an on-board AHCI PCIe controller. Signed-off-by: Neil Armstrong Signed-off-by: Mark Kettenis --- include/configs/meson64.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/configs/meson64.h

[PATCH v2 5/9] distro_bootcmd: run pci enum for scsi_boot just like it is done for nvme_boot

2021-09-08 Thread Neil Armstrong
The SCSI device can be a PCIe adapter, so run pcie enum if enabled. Signed-off-by: Mark Kettenis Signed-off-by: Neil Armstrong --- include/config_distro_bootcmd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index

[PATCH v2 3/9] ARM: meson-axg: remove local USB nodes

2021-09-08 Thread Neil Armstrong
Drop the local USB nodes after Linux 5.14 sync. Signed-off-by: Neil Armstrong --- arch/arm/dts/meson-axg-s400-u-boot.dtsi | 8 arch/arm/dts/meson-axg-u-boot.dtsi | 62 - 2 files changed, 70 deletions(-) delete mode 100644 arch/arm/dts/meson-axg-u-boot.dtsi

[PATCH v2 2/9] ARM: meson: keep HW order for MMC devices

2021-09-08 Thread Neil Armstrong
Since Linux commmit [1], the order is fixed with aliases, in order to keep the MMC device order, set it back to HW order in U-Boot dtsi files. [1] ab547c4fb39f ("arm64: dts: amlogic: Assign a fixed index to mmc devices") Signed-off-by: Neil Armstrong ---

Re: imx: imx8mq: mxc_get_clock for MXC_I2C_CLK is missing

2021-09-08 Thread Heiko Thiery
Hi, Am Mi., 8. Sept. 2021 um 15:08 Uhr schrieb Heiko Thiery : > > Hi Peng, > > I faced an issue with the I2C bus speed in SPL for the imx8mq. I > figured out that the bus frequency is set to about 1MHz. While digging > into that I found that the clk ID for the I2C is not returned for the > imx8mq

Re: [PATCH 1/1] ARM: vexpress_ca9x4: Reintroduce board in order to use with QEMU.

2021-09-08 Thread Tom Rini
On Tue, Sep 07, 2021 at 08:37:51AM +0200, Kristian Amlie wrote: > vexpress_ca9x4 is seemingly the only board except for qemu_arm which > is able to run U-Boot correctly, using the `-M vexpress-a9` option to > QEMU. Building for qemu_arm and running qemu-system-arm with the `-M > virt` argument

[PATCH] doc: board: toradex: fix file names

2021-09-08 Thread Oleksandr Suvorov
Fix the documentation file names: s/apalix/apalis/. Signed-off-by: Oleksandr Suvorov --- board/toradex/apalis-imx8/MAINTAINERS| 2 +- doc/board/toradex/{apalix-imx8.rst => apalis-imx8.rst} | 0 doc/board/toradex/{apalix-imx8x.rst => apalis-imx8x.rst} | 0

tools: Check for already migrated symbols in a given file

2021-09-08 Thread Tom Rini
Hey all, As I look over patchwork I see (as one would expect) platforms showing up that will come in either to -next, or once v2021.10 is out. Given the number of newly migrated symbols now in -next, along with my hope to get more done soon as well has having discovered lots of already migrated

Re: [PATCH v6] arm: add initial support for the Phytium Pomelo Board

2021-09-08 Thread Andre Przywara
On 9/7/21 6:34 AM, nicholas_zh...@outlook.com wrote: From: weichangzheng This adds platform code and the device tree for the Phytium Pomelo Board. The initial support comprises the UART and the PCIE. Signed-off-by: weichangzheng Changes since v1: updated to DT Changes since v2:

[PATCH 02/35] x86: Create a new header for EFI

2021-09-08 Thread Simon Glass
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. Signed-off-by: Simon Glass --- arch/x86/include/asm/efi.h| 32

[PATCH 35/35] efi: Allow easy selection of serial-only operation

2021-09-08 Thread Simon Glass
Add info about how to select vidconsole or serial. Signed-off-by: Simon Glass --- include/configs/efi-x86_app.h | 25 + 1 file changed, 25 insertions(+) diff --git a/include/configs/efi-x86_app.h b/include/configs/efi-x86_app.h index 6061a6db0a4..cdd60be9f85 100644 ---

[PATCH 32/35] efi: Check for failure when initing the app

2021-09-08 Thread Simon Glass
The stub checks for failure with efi_init(). Add this for the app as well. It is unlikely that anything can be done, but we may as well stop. Signed-off-by: Simon Glass --- lib/efi/efi_app.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/efi/efi_app.c

[PATCH 33/35] efi: Mention that efi_info_get() is only used in the stub

2021-09-08 Thread Simon Glass
This provides access to EFI tables after U-Boot as exited boot services. It is not needed in the app since boot services remain alive and we can just call them whenever needed. Add a comment to explain this. Signed-off-by: Simon Glass --- include/efi.h | 4 1 file changed, 4

[PATCH 34/35] efi: Show when allocated pages are used

2021-09-08 Thread Simon Glass
Add a message here so that both paths of memory allocation are reported. Signed-off-by: Simon Glass --- lib/efi/efi_app.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c index e0666d1fae2..c8f4784eb7d 100644 --- a/lib/efi/efi_app.c +++

[PATCH 31/35] efi: Move exit_boot_services into a function

2021-09-08 Thread Simon Glass
At present this code is inline in the app and stub. But they do the same thing. The difference is that the stub does it immediately and the app doesn't want to do it until the end (when it boots a kernel) or not at all, if returning to UEFI. Also store the memory map so that it can be accessed

[PATCH 30/35] efi: Share struct efi_priv between the app and stub code

2021-09-08 Thread Simon Glass
At present each of these has its own static variable and helper functions. Move them into a shared file. Signed-off-by: Simon Glass --- include/efi.h | 21 + lib/efi/efi.c | 29 + lib/efi/efi_app.c | 21 ++---

[PATCH 28/35] efi: Fix ll_boot_init() operation with the app

2021-09-08 Thread Simon Glass
This should return false when the EFI app is running, since UEFI has done the required low-level init. Fix it. Signed-off-by: Simon Glass --- include/init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/init.h b/include/init.h index c781789e367..6d682b02b05 100644

[PATCH 27/35] efi: Add comments to struct efi_priv

2021-09-08 Thread Simon Glass
This structure is uncommented. Fix it. Signed-off-by: Simon Glass --- include/efi.h | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/include/efi.h b/include/efi.h index c0fddf7f6cd..2db60a36f0b 100644 --- a/include/efi.h +++ b/include/efi.h @@

[PATCH 29/35] efi: Add a few comments to the stub

2021-09-08 Thread Simon Glass
Comment some functions that need more information. Signed-off-by: Simon Glass --- lib/efi/efi_stub.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index b3393e47fae..156cbf0b928 100644 --- a/lib/efi/efi_stub.c +++

[PATCH 26/35] x86: efi: Add room for the binman definition in the dtb

2021-09-08 Thread Simon Glass
At present only 4KB of spare space is left in the DTB when building the EFI app. Increase this to 32KB so there is plenty of space to insert the binman definition. This cannot be expanded later (as with OF_SEPARATE) because the ELF image has already been built. Signed-off-by: Simon Glass ---

[PATCH 25/35] x86: Don't process the kernel command line unless enabled

2021-09-08 Thread Simon Glass
If the 'bootm' command is not enabled then this code is not available and this causes a link error. Fix it. Note that for the EFI app, there is no indication of missing code. It just hangs! Signed-off-by: Simon Glass --- arch/x86/lib/zimage.c | 13 - 1 file changed, 8

[PATCH 23/35] bloblist: Support allocating the bloblist

2021-09-08 Thread Simon Glass
Typically the bloblist is positioned at a fixed address in memory until relocation. This is convenient when it is set up in SPL or before relocation. But for EFI we want to set it up only when U-Boot proper is running. Add a way to allocate it using malloc() and update the documentation to cover

[PATCH 22/35] bloblist: Move to rST format

2021-09-08 Thread Simon Glass
Move this documentation to the new format. Signed-off-by: Simon Glass --- doc/{README.bloblist => develop/bloblist.rst} | 4 ++-- doc/develop/index.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) rename doc/{README.bloblist => develop/bloblist.rst} (97%)

[PATCH 24/35] x86: Allow booting a kernel from the EFI app

2021-09-08 Thread Simon Glass
At present this is disabled, but it should work so long as the kernel does not need EFI services. Enable it and add a note about remaining work. Signed-off-by: Simon Glass --- arch/x86/lib/bootm.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git

[PATCH 21/35] efi: serial: Support arrow keys

2021-09-08 Thread Simon Glass
At present only the backspace key is supported in U-Boot, when running as an EFI app. Add support for arrows, home and end as well, to make the CLI more friendly. Signed-off-by: Simon Glass --- drivers/serial/serial_efi.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff

[PATCH 20/35] binman: Support updating the dtb in an ELF file

2021-09-08 Thread Simon Glass
WIth EFI we must embed the devicetree in an ELF image so that it is loaded as part of the executable file. We want it to include the binman definition in there also, which in some cases cannot be created until the ELF (u-boot) is built. Add an option to binman to support writing the updated dtb to

[PATCH 17/35] binman: Support reading the offset of an ELF-file symbol

2021-09-08 Thread Simon Glass
Binman needs to be able to update the contents of an ELF file after it has been build. To support this, add a function to locate the position of a symbol's contents within the file. Fix the comments on bss_data.c and Symbol while we are here. Signed-off-by: Simon Glass --- tools/binman/elf.py

[PATCH 19/35] binman: Tidy up comments on _DoTestFile()

2021-09-08 Thread Simon Glass
The comment for this function is missing an argument and the return value. Fix it. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 8199a4fc7e0..39a4b94cd0b 100644 ---

[PATCH 18/35] binman: Allow timeout to occur in the image or its section

2021-09-08 Thread Simon Glass
At present testThreadTimeout() assumes that the expected timeout happens first when building the section, but it can just as easily happen at the top-level image. Update the test to cope with both. Signed-off-by: Simon Glass --- tools/binman/ftest.py | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH 16/35] binman: Report an error if test files fail to compile

2021-09-08 Thread Simon Glass
At present any error from the 'make' command is silently swallowed by the test system. Fix this by showing it when detected. Signed-off-by: Simon Glass --- tools/binman/elf_test.py | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/binman/elf_test.py

[PATCH 14/35] efi: Locate all block devices in the app

2021-09-08 Thread Simon Glass
When starting the app, locate all block devices and make them available to U-Boot. This allows listing partitions and accessing files in filesystems. EFI also has the concept of 'disks', meaning boot media. For now, this is not obviously useful in U-Boot, but add code to at least locate these.

[PATCH 15/35] patman: Use a ValueError exception if tools.Run() fails

2021-09-08 Thread Simon Glass
The Exception base class is a very vague and could be confusing to the test system. Use the more specific ValueError exception instead. Signed-off-by: Simon Glass --- tools/patman/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/patman/tools.py

[PATCH 13/35] efi: Add a media/block driver for EFI block devices

2021-09-08 Thread Simon Glass
Add a block driver which handles read/write for EFI block devices. This driver actually already exists ('efi_block') but is not really suitable for use as a real U-Boot driver: - The operations do not provide a udevice - The code is designed for running as part of EFI loader, so uses

[PATCH 12/35] efi: Add EFI uclass for media

2021-09-08 Thread Simon Glass
At present UCLASS_EFI is used to represent an EFI filesystem The description of this uclass is "EFI managed devices" which is pretty vague. The only driver that uses this uclass is in fact not a real U-Boot driver, since its operations do not include a struct udevice. Rather than mess with this,

[PATCH 10/35] efi: Add video support to the app

2021-09-08 Thread Simon Glass
The current EFI video driver only works when running in the stub. In that case the stub calls boot services (before jumping to U-Boot proper) and copies the graphics info over to the efi table. This is necessary because the stub exits boot services before jumping to U-Boot. The app maintains

[PATCH 11/35] RFC: efi: Drop code that doesn't work with driver model

2021-09-08 Thread Simon Glass
This code should never have been added as it builds a new feature on top of legacy code. Drop it and add a dependency on BLK for this feature. Boards which want EFI_LOADER should migrate to driver model first. Signed-off-by: Simon Glass --- lib/efi_driver/Makefile | 2 +-

[PATCH 07/35] efi: Create a 64-bit app

2021-09-08 Thread Simon Glass
Most modern platforms use 64-bit EFI so it is useful to have a U-Boot app that runs under that. Add a (non-functional) build for this. Note that --whole-archive causes the gcc 9.2 linker to crash, so disable this for now. Once this is resolved, things should work. For now, avoid meantioning the

[PATCH 08/35] x86: Don't duplicate global_ptr in 64-bit EFI app

2021-09-08 Thread Simon Glass
This variable is already defined by the EFI code. Drop the duplicate definition when building a 64-bit EFI app. Signed-off-by: Simon Glass --- arch/x86/cpu/x86_64/cpu.c | 16 arch/x86/cpu/x86_64/misc.c | 16 lib/efi/efi.c | 9 + 3 files

[PATCH 09/35] efi: Add a way to obtain boot services in the app

2021-09-08 Thread Simon Glass
Add a function to return this information along with a stub for the efi_info_get() function, since calling it otherwise hangs U-Boot. Signed-off-by: Simon Glass --- include/efi.h | 8 +++- lib/efi/efi_app.c | 10 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git

[PATCH 06/35] x86: Create a 32/64-bit selection for the app

2021-09-08 Thread Simon Glass
Most EFI implementations use 64-bit. In order to spupose a 64-bit app, update the Kconfig to add an option for 32/64 bit. Update the prompt for the existing option so it is clear it relates to the stub. Move both up to just under the choice that controls them, since this looks better and the menu.

[PATCH 05/35] efi: Add a script for building and testing U-Boot on UEFI

2021-09-08 Thread Simon Glass
It is quite complicating to run U-Boot on qemu since we have four different builds and they must use different versions of qemu and the UEFI binaries. Add a script to help. Signed-off-by: Simon Glass --- doc/develop/uefi/u-boot_on_efi.rst | 4 ++ scripts/build-efi.sh | 111

[PATCH 04/35] x86: Tidy up global_data pointer for 64-bit

2021-09-08 Thread Simon Glass
Add an extern declaration so that it is possible to use this macro in files other than the one that defines it. Signed-off-by: Simon Glass --- arch/x86/cpu/x86_64/cpu.c | 3 +++ arch/x86/include/asm/global_data.h | 2 ++ 2 files changed, 5 insertions(+) diff --git

[PATCH 01/35] x86: Keep symbol information in u-boot ELF file

2021-09-08 Thread Simon Glass
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 --- arch/x86/config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/config.mk b/arch/x86/config.mk index

[PATCH 03/35] x86: Show some EFI info with the bdinfo command

2021-09-08 Thread Simon Glass
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(). Signed-off-by: Simon Glass --- arch/x86/cpu/efi/payload.c | 13

[PATCH 00/35] efi: Improvements to U-Boot running on top of UEFI

2021-09-08 Thread Simon Glass
At present U-Boot can be built as an EFI app, but it is really just for testing, with very few features. Instead, the payload build is used for booting on top of UEFI, where U-Boot takes over the machine immediately and supplies its own drivers. But the app could be made more useful. This series

Re: Hints on how to use efi_driver/efi_block_device.c

2021-09-08 Thread Simon Glass
Hi Christian, On Fri, 13 Aug 2021 at 04:02, Heinrich Schuchardt wrote: > > > > On 8/13/21 9:56 AM, Christian Melki wrote: > > > > > > On 8/13/21 2:36 AM, Heinrich Schuchardt wrote: > >> On 8/12/21 11:49 PM, Simon Glass wrote: > >>> +Heinrich Schuchardt too > >>> > >>> On Thu, 12 Aug 2021 at

Re: [PATCH u-boot] dm: pci: Fix handling of errors when scanning device

2021-09-08 Thread Pali Rohár
On Wednesday 08 September 2021 20:57:06 Bin Meng wrote: > On Wed, Sep 8, 2021 at 8:02 PM Marek Behún wrote: > > > > On Wed, 8 Sep 2021 09:06:28 +0800 > > Bin Meng wrote: > > > > > On Wed, Sep 8, 2021 at 12:07 AM Marek Behún > > > wrote: > > > > > > > > From: Pali Rohár > > > > > > > > Some

imx: imx8mq: mxc_get_clock for MXC_I2C_CLK is missing

2021-09-08 Thread Heiko Thiery
Hi Peng, I faced an issue with the I2C bus speed in SPL for the imx8mq. I figured out that the bus frequency is set to about 1MHz. While digging into that I found that the clk ID for the I2C is not returned for the imx8mq correctly. Can you confirm that this is missing here. This is what I

Re: [PATCH v6] arm: add initial support for the Phytium Pomelo Board

2021-09-08 Thread Rob Herring
On Tue, Sep 7, 2021 at 12:34 AM wrote: > > From: weichangzheng > > This adds platform code and the device tree for the Phytium Pomelo Board. > The initial support comprises the UART and the PCIE. > > Signed-off-by: weichangzheng > Changes since v1: > updated to DT > Changes since v2: >

Re: [PATCH] arm: imx8mp-evk: CLOCK Enable SPI and QOS clock

2021-09-08 Thread Ramon Fried
On Wed, Sep 8, 2021 at 8:27 AM Arendt, Steffen wrote: > Enable clocks for SPI and QOS (Ethernet) for the imx8mp SoC > > > diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c > index c77500bcce..1ab5587e4e 100644 > --- a/drivers/clk/imx/clk-imx8mp.c > +++

  1   2   >