Re: [PATCH v2 2/4] bootflow: bootmeth_efi: Don't set bootdev again

2023-11-18 Thread Ilias Apalodimas
Hi Simon, Thanks for looping me in On Sat, 18 Nov 2023 at 19:11, Simon Glass wrote: > > +Ilias too as this involves a design decision > > Hi Shantur, > > On Fri, 17 Nov 2023 at 14:22, Shantur Rathore wrote: > > > > efi_set_bootdev is already called as part of tftp while doing dhcp_run() > > Is

Re: [PATCH 1/2] usb: ci: Fix gadget reinit

2023-11-18 Thread Marek Vasut
On 11/19/23 02:04, Simon Holesch wrote: The ChipIdea device controller wasn't properly cleaned up when disabled. So enabling it again left it in a broken state. The problem occurred for example when the host unbinds the driver and binds it again. During the first setup, when the out request is q

Re: [PATCH 2/2] usb: fastboot: Add missing newline in pr_err

2023-11-18 Thread Marek Vasut
On 11/19/23 02:04, Simon Holesch wrote: Please also add missing commit message (can be just the subject copied into the body) Signed-off-by: Simon Holesch --- drivers/usb/gadget/f_fastboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/f_fastboot.

Re: [PATCH V2 1/4] board: rockchip: Refactor panel auto-detect code

2023-11-18 Thread Chris Morgan
On Sat, Nov 18, 2023 at 10:10:04AM -0700, Simon Glass wrote: > Hi Chris, > > On Fri, 17 Nov 2023 at 14:15, Chris Morgan wrote: > > > > From: Chris Morgan > > > > Make the inability to detect a panel using the auto detection code not > > fail the entire boot process. This means that if the panel

[PATCH 2/2] usb: fastboot: Add missing newline in pr_err

2023-11-18 Thread Simon Holesch
Signed-off-by: Simon Holesch --- drivers/usb/gadget/f_fastboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 741775a7bc..9f322c9550 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget

[PATCH 1/2] usb: ci: Fix gadget reinit

2023-11-18 Thread Simon Holesch
The ChipIdea device controller wasn't properly cleaned up when disabled. So enabling it again left it in a broken state. The problem occurred for example when the host unbinds the driver and binds it again. During the first setup, when the out request is queued, the endpoint is primed (`epprime`).

Re: bootstd: Support for distro specific EFI folders

2023-11-18 Thread Heinrich Schuchardt
On 11/19/23 01:43, Simon Glass wrote: Hi Heinrich, On Sat, 18 Nov 2023 at 15:52, Heinrich Schuchardt wrote: On 11/18/23 22:28, Shantur Rathore wrote: Hi Heinrich, On Fri, Nov 17, 2023 at 3:12 PM Heinrich Schuchardt wrote: On 11/16/23 19:45, Shantur Rathore wrote: On Thu, Nov 16, 2023 at

Re: [PATCH 1/1] efi_loader: create memory reservations in ACPI case

2023-11-18 Thread Simon Glass
Hi Heinrich, On Sat, 18 Nov 2023 at 16:06, Heinrich Schuchardt wrote: > > On 11/18/23 18:58, Simon Glass wrote: > > Hi Heinrich, > > > > On Sat, 18 Nov 2023 at 10:34, Heinrich Schuchardt > > wrote: > >> > >> On 11/18/23 18:10, Simon Glass wrote: > >>> Hi Heinrich, > >>> > >>> On Thu, 16 Nov 2023

Re: [PATCH v2 2/4] bootflow: bootmeth_efi: Don't set bootdev again

2023-11-18 Thread Simon Glass
Hi Shantur, On Sat, 18 Nov 2023 at 14:17, Shantur Rathore wrote: > > Hi Simon, > > On Sat, Nov 18, 2023 at 5:11 PM Simon Glass wrote: > > > > +Ilias too as this involves a design decision > > > > Hi Shantur, > > > > On Fri, 17 Nov 2023 at 14:22, Shantur Rathore wrote: > > > > > > efi_set_bootde

Re: [PATCH v3 2/4] bootflow: bootmeth_efi: set bflow->fname from bootfile name

2023-11-18 Thread Simon Glass
On Sat, 18 Nov 2023 at 15:07, Shantur Rathore wrote: > > We need to set boot->fname before calling efi_set_bootdev > otherwise this crashes as bflow->fname is null. > > Signed-off-by: Shantur Rathore > --- > boot/bootmeth_efi.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > Re

Re: [PATCH v3 2/2] cmd: acpi: fix acpi list command

2023-11-18 Thread Simon Glass
On Sat, 18 Nov 2023 at 15:54, Heinrich Schuchardt wrote: > > ACPI tables may comprise either RSDT, XSDT, or both. The current code fails > to check the presence of the RSDT table before accessing it. This leads to > an exception if the RSDT table is not provided. > > The XSDT table takes precedenc

Re: [PATCH v2] smbios: arm64: Allow table to be written at a fixed addr

2023-11-18 Thread Simon Glass
Hi Tom, On Sat, 18 Nov 2023 at 12:15, Tom Rini wrote: > > Splitting things in two again.. > > On Sat, Nov 18, 2023 at 10:10:17AM -0700, Simon Glass wrote: > > [snip] > > This is the bug report of trying to boot into U-Boot on arm64 with > > more than 3GB of memory. > > OK, so can we just please f

Re: [PATCH v3 3/4] bootflow: bootmeth_efi: Handle fdt not available.

2023-11-18 Thread Simon Glass
On Sat, 18 Nov 2023 at 15:07, Shantur Rathore wrote: > > While booting with efi, if fdt isn't available externally, > just use the built-in one. > > Signed-off-by: Shantur Rathore > --- Change log needed when you send a new version > boot/bootmeth_efi.c | 19 +-- > include/boot

Re: [PATCH v2 2/2] test: unit test for acpi_find_table()

2023-11-18 Thread Simon Glass
On Sat, 18 Nov 2023 at 14:57, Heinrich Schuchardt wrote: > > Provide a unit test for acpi_find_table() > > Signed-off-by: Heinrich Schuchardt > --- > v2: > new patch > --- > test/dm/acpi.c | 96 ++ > 1 file changed, 96 insertions(+) > Revi

Re: [PATCH v3 4/4] bootflow: bootmeth_efi: don't free buffer

2023-11-18 Thread Simon Glass
Hi Shantur, On Sat, 18 Nov 2023 at 15:07, Shantur Rathore wrote: > > bootmeth_efi doesn't allocate any buffer to load efi in any case. > enable static buffer flag for all cases. > > Signed-off-by: Shantur Rathore > --- > boot/bootmeth_efi.c | 7 ++- > 1 file changed, 6 insertions(+), 1 dele

Re: bootstd: Support for distro specific EFI folders

2023-11-18 Thread Simon Glass
Hi Heinrich, On Sat, 18 Nov 2023 at 15:52, Heinrich Schuchardt wrote: > > On 11/18/23 22:28, Shantur Rathore wrote: > > Hi Heinrich, > > > > On Fri, Nov 17, 2023 at 3:12 PM Heinrich Schuchardt > > wrote: > >> > >> On 11/16/23 19:45, Shantur Rathore wrote: > >>> On Thu, Nov 16, 2023 at 6:15 PM He

Re: [PATCH v2 1/2] acpi: consider XSDT in acpi_find_table()

2023-11-18 Thread Simon Glass
On Sat, 18 Nov 2023 at 14:57, Heinrich Schuchardt wrote: > > The RSDT table is deprecated and does not exist on all systems. > > By preference scan XSDT for the table to find. If no XSDT table exists, try > to use the RSDT table. > > Signed-off-by: Heinrich Schuchardt > --- > v2: > consid

Re: [PATCH v3 1/4] bootflow: bootmeth_efi: Set bootp_arch as hex

2023-11-18 Thread Simon Glass
Hi Shantur, On Sat, 18 Nov 2023 at 15:04, Shantur Rathore wrote: > > bootmeth_efi sets up bootp_arch which is read later in bootp.c > Currently bootp_arch is being set as integer string and being > read in bootp.c as hex, this sends incorrect arch value to dhcp server > which in return sends wron

Re: [PATCH v2] arch: arm: Kconfig: Enable BOOTSTD_FULL for Rockchip SoCs

2023-11-18 Thread Simon Glass
On Tue, 14 Nov 2023 at 13:34, Shantur Rathore wrote: > > Signed-off-by: Shantur Rathore > --- > arch/arm/Kconfig | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Simon Glass But it needs a commit message > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index d812685c98..fca6ef6d7

Re: [PATCH 1/1] acpi: simplify acpi_write_ssdt()

2023-11-18 Thread Simon Glass
On Sat, 18 Nov 2023 at 14:52, Heinrich Schuchardt wrote: > > * Converting to void * is superfluous when calling memset(). > * acpi_fill_header() already fills oem_table_id. > > Fixes: d953137526cc ("x86: Move SSDT table to a writer function") > Signed-off-by: Heinrich Schuchardt > --- > lib/acpi

Re: [PATCH 1/1] efi_loader: create memory reservations in ACPI case

2023-11-18 Thread Heinrich Schuchardt
On 11/18/23 18:58, Simon Glass wrote: Hi Heinrich, On Sat, 18 Nov 2023 at 10:34, Heinrich Schuchardt wrote: On 11/18/23 18:10, Simon Glass wrote: Hi Heinrich, On Thu, 16 Nov 2023 at 02:29, Heinrich Schuchardt wrote: ACPI tables cannot convey memory reservations for least ARM and RISC-V.

[PATCH v3 1/2] acpi: fix struct acpi_xsdt

2023-11-18 Thread Heinrich Schuchardt
The size of the ACPI table header is not a multiple of 8. We have to mark struct acpi_xsdt as packed to correctly access field Entry. Add a unit test for the offsets of field Entry in the RSDT and XSDT tables. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- v3: no change

[PATCH v3 0/2] cmd: acpi: fix acpi list command

2023-11-18 Thread Heinrich Schuchardt
The size of the ACPI table header is not a multiple of 8. We have to mark struct acpi_xsdt as packed to correctly access field Entry. Add a unit test for the offsets of field Entry in the RSDT and XSDT tables. ACPI tables may comprise either RSDT, XSDT, or both. The current code fails to check th

[PATCH v3 2/2] cmd: acpi: fix acpi list command

2023-11-18 Thread Heinrich Schuchardt
ACPI tables may comprise either RSDT, XSDT, or both. The current code fails to check the presence of the RSDT table before accessing it. This leads to an exception if the RSDT table is not provided. The XSDT table takes precedence over the RSDT table. The return values of list_rsdt() and list_rsd

Re: bootstd: Support for distro specific EFI folders

2023-11-18 Thread Heinrich Schuchardt
On 11/18/23 22:28, Shantur Rathore wrote: Hi Heinrich, On Fri, Nov 17, 2023 at 3:12 PM Heinrich Schuchardt wrote: On 11/16/23 19:45, Shantur Rathore wrote: On Thu, Nov 16, 2023 at 6:15 PM Heinrich Schuchardt wrote: On 11/16/23 17:52, Shantur Rathore wrote: Hi Simon, Currently bootstd -

[PATCH v2 2/4] clk: get correct ops for clk_enable() and clk_disable()

2023-11-18 Thread Yang Xiwen via B4 Relay
From: Yang Xiwen assign clk_dev_ops(clkp->dev) to ops to ensure correct clk operations are called on clocks. This fixes the incorrect enable_count issue as described in [1]. [1]: https://lore.kernel.org/all/sezpr06mb695927a6deeef8489a06897396...@sezpr06mb6959.apcprd06.prod.outlook.com/ Signed

[PATCH v2 1/4] clk: clk_sandbox_ccf: assign ccf_clk_ops to .ops of the driver

2023-11-18 Thread Yang Xiwen via B4 Relay
From: Yang Xiwen It can now act as an clk provider on which ccf_clk_ops can be tested. Also add "#clock-cells=<1>" to test.dts. Signed-off-by: Yang Xiwen --- arch/sandbox/dts/test.dts | 1 + drivers/clk/clk_sandbox_ccf.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/sandbox/dt

[PATCH v2 3/4] clk: clk_sandbox: get devm clock i2c_root

2023-11-18 Thread Yang Xiwen via B4 Relay
From: Yang Xiwen This clock is added to dts. Get it in the devm group in the driver or the testcases will fail. Signed-off-by: Yang Xiwen --- arch/sandbox/dts/test.dts | 5 +++-- arch/sandbox/include/asm/clk.h | 1 + drivers/clk/clk_sandbox_test.c | 5 + 3 files changed, 9 insertions(

[PATCH v2 0/4] clk: ccf: fix enable_count mismatch

2023-11-18 Thread Yang Xiwen via B4 Relay
As described in [1], enable_count is incremented by 2 when ccf_clk_enable() is called. This series of patch fixed this issue and added a testcase for that. [1]: https://lore.kernel.org/all/sezpr06mb695927a6deeef8489a06897396...@sezpr06mb6959.apcprd06.prod.outlook.com/ Signed-off-by: Yang Xiwen

u-boot@lists.denx.de

2023-11-18 Thread Yang Xiwen via B4 Relay
From: Yang Xiwen get i2c_root clock from device tree. In this way we get an CCF clock and also test ccf_clk_ops. Signed-off-by: Yang Xiwen --- test/dm/clk_ccf.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/dm/clk_ccf.c b/test/dm/clk_ccf.c index e4ebb

[PATCH v3 4/4] bootflow: bootmeth_efi: don't free buffer

2023-11-18 Thread Shantur Rathore
bootmeth_efi doesn't allocate any buffer to load efi in any case. enable static buffer flag for all cases. Signed-off-by: Shantur Rathore --- boot/bootmeth_efi.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index 370d6fba9f..

[PATCH v3 3/4] bootflow: bootmeth_efi: Handle fdt not available.

2023-11-18 Thread Shantur Rathore
While booting with efi, if fdt isn't available externally, just use the built-in one. Signed-off-by: Shantur Rathore --- boot/bootmeth_efi.c | 19 +-- include/bootflow.h | 2 ++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_

[PATCH v3 2/4] bootflow: bootmeth_efi: set bflow->fname from bootfile name

2023-11-18 Thread Shantur Rathore
We need to set boot->fname before calling efi_set_bootdev otherwise this crashes as bflow->fname is null. Signed-off-by: Shantur Rathore --- boot/bootmeth_efi.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index 682cf5b23b..

[PATCH 1/4] clk: clk_sandbox_ccf: assign ccf_clk_ops to .ops of the driver

2023-11-18 Thread Yang Xiwen via B4 Relay
From: Yang Xiwen It can now act as an clk provider on which ccf_clk_ops can be tested. Also add "#clock-cells=<1>" to test.dts. --- arch/sandbox/dts/test.dts | 1 + drivers/clk/clk_sandbox_ccf.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dt

u-boot@lists.denx.de

2023-11-18 Thread Yang Xiwen via B4 Relay
From: Yang Xiwen get i2c_root clock from device tree. In this way we get an CCF clock and also test ccf_clk_ops. Signed-off-by: Yang Xiwen --- test/dm/clk_ccf.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/dm/clk_ccf.c b/test/dm/clk_ccf.c index e4ebb

[PATCH 0/4] clk: ccf: fix enable_count mismatch

2023-11-18 Thread Yang Xiwen via B4 Relay
As described in [1], enable_count is incremented by 2 when ccf_clk_enable() is called. This series of patch fixed this issue and added a testcase for that. [1]: https://lore.kernel.org/all/sezpr06mb695927a6deeef8489a06897396...@sezpr06mb6959.apcprd06.prod.outlook.com/ Signed-off-by: Yang Xiwen

[PATCH 2/4] clk: get correct ops for clk_enable() and clk_disable()

2023-11-18 Thread Yang Xiwen via B4 Relay
From: Yang Xiwen assign clk_dev_ops(clkp->dev) to ops to ensure correct clk operations are called on clocks. This fixes the incorrect enable_count issue as described in [1]. [1]: https://lore.kernel.org/all/sezpr06mb695927a6deeef8489a06897396...@sezpr06mb6959.apcprd06.prod.outlook.com/ Signed

[PATCH 3/4] clk: clk_sandbox: get devm clock i2c_root

2023-11-18 Thread Yang Xiwen via B4 Relay
From: Yang Xiwen This clock is added to dts. Get it in the devm group in the driver or the testcases will fail. Signed-off-by: Yang Xiwen --- arch/sandbox/dts/test.dts | 5 +++-- arch/sandbox/include/asm/clk.h | 1 + drivers/clk/clk_sandbox_test.c | 5 + 3 files changed, 9 insertions(

[PATCH v3 1/4] bootflow: bootmeth_efi: Set bootp_arch as hex

2023-11-18 Thread Shantur Rathore
bootmeth_efi sets up bootp_arch which is read later in bootp.c Currently bootp_arch is being set as integer string and being read in bootp.c as hex, this sends incorrect arch value to dhcp server which in return sends wrong file for network boot. For ARM64 UEFI Arch value is 0xb (11), here we set

[PATCH v3 0/4] bootflow: bootmeth_efi: Fix network efi boot.

2023-11-18 Thread Shantur Rathore
Currently bootmeth_efi crashes while doing a network (dhcp) boot. This patch series fixes issues and both network and disk boot works. Shantur Rathore (4): bootflow: bootmeth_efi: Set bootp_arch as hex bootflow: bootmeth_efi: set bflow->fname from bootfile name bootflow: bootmeth_efi: Handle

[PATCH v2 1/2] acpi: consider XSDT in acpi_find_table()

2023-11-18 Thread Heinrich Schuchardt
The RSDT table is deprecated and does not exist on all systems. By preference scan XSDT for the table to find. If no XSDT table exists, try to use the RSDT table. Signed-off-by: Heinrich Schuchardt --- v2: consider that map_sysmem(0, 0) != NULL --- lib/acpi/acpi.c | 20 -

[PATCH v2 2/2] test: unit test for acpi_find_table()

2023-11-18 Thread Heinrich Schuchardt
Provide a unit test for acpi_find_table() Signed-off-by: Heinrich Schuchardt --- v2: new patch --- test/dm/acpi.c | 96 ++ 1 file changed, 96 insertions(+) diff --git a/test/dm/acpi.c b/test/dm/acpi.c index 5997bda649..58cc6c3474 100644 --

[PATCH v2 0/2] acpi: consider XSDT in acpi_find_table()

2023-11-18 Thread Heinrich Schuchardt
The RSDT table is deprecated and does not exist on all systems. By preference scan XSDT for the table to find. If no XSDT table exists, try to use the RSDT table. Provide a unit test for acpi_find_table(). v2: Consider that map_sysmem(0, 0) != NULL. Add unit test. *** BLURB HERE

[PATCH 1/1] acpi: simplify acpi_write_ssdt()

2023-11-18 Thread Heinrich Schuchardt
* Converting to void * is superfluous when calling memset(). * acpi_fill_header() already fills oem_table_id. Fixes: d953137526cc ("x86: Move SSDT table to a writer function") Signed-off-by: Heinrich Schuchardt --- lib/acpi/ssdt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --g

Re: bootstd: Support for distro specific EFI folders

2023-11-18 Thread Shantur Rathore
Hi Heinrich, On Fri, Nov 17, 2023 at 3:12 PM Heinrich Schuchardt wrote: > > On 11/16/23 19:45, Shantur Rathore wrote: > > On Thu, Nov 16, 2023 at 6:15 PM Heinrich Schuchardt > > wrote: > >> > >> On 11/16/23 17:52, Shantur Rathore wrote: > >>> Hi Simon, > >>> > >>> Currently bootstd - bootmethod_

Re: [PATCH v2 2/4] bootflow: bootmeth_efi: Don't set bootdev again

2023-11-18 Thread Shantur Rathore
Hi Simon, On Sat, Nov 18, 2023 at 5:11 PM Simon Glass wrote: > > +Ilias too as this involves a design decision > > Hi Shantur, > > On Fri, 17 Nov 2023 at 14:22, Shantur Rathore wrote: > > > > efi_set_bootdev is already called as part of tftp while doing dhcp_run() > > Is that in tftp_complete()

[PATCH v3 00/32] bootm: Refactoring to reduce reliance on CMDLINE (part A)

2023-11-18 Thread Simon Glass
It would be useful to be able to boot an OS when CONFIG_CMDLINE is disabled. This could allow reduced code size. Standard boot provides a way to handle programmatic boot, without scripts, so such a feature is possible. The main impediment is the inability to use the booting features of U-Boot with

[PATCH v3 31/32] bootstd: Introduce programmatic boot

2023-11-18 Thread Simon Glass
At present bootstd requires CONFIG_CMDLINE to operate. Add a new 'programmatic' boot which can be used when no command line is available. For now it does almost nothing, since most bootmeths require the command line. Signed-off-by: Simon Glass --- Changes in v3: - Add a panic if programmatic boo

[PATCH v3 24/32] bootm: Reduce arguments to boot_get_loadables()

2023-11-18 Thread Simon Glass
This function only uses two arguments. The 'arch' always has a constant value, so drop it. This simplifies the function call. Tidy up the function comment while we are here. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 3 +-- boot/image-boa

[PATCH v3 22/32] bootm: Reduce arguments to boot_get_fdt()

2023-11-18 Thread Simon Glass
This function only uses one argument from bootm (argv[2]) so pass it in directly. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 5 +++-- boot/image-fdt.c | 9 +++-- include/image.h | 5 ++--- 3 files changed, 8 insertions(+), 11 deletions(-

[PATCH v3 23/32] bootm: Reduce arguments to boot_get_fpga()

2023-11-18 Thread Simon Glass
This function only uses two arguments. The 'arch' always has a constant value, so drop it. This simplifies the function call. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 3 +-- boot/image-board.c | 5 ++--- include/image.h| 9 +++--

[PATCH v3 27/32] bootm: optee: Drop special call to bootm_find_other()

2023-11-18 Thread Simon Glass
The normal bootm flow calls bootm_find_other() can call the BOOTM_STATE_FINDOTHER state as part of its processing. Fix the condition there so that this hack can be removed. Also drop the confusing check for the OS type, since do_bootm_tee() is only called if the condition is met - see bootm_os_get

[PATCH v3 25/32] bootm: Simplify Android ramdisk addr in bootm_find_images()

2023-11-18 Thread Simon Glass
The Android mechanism uses the loadaddr envrionment-variable to get the load address, if none is provided. This is equivalent to image_load_addr so use that instead, converting it to a string as needed. This change will permit passing img_addr to this function, in a future change. Signed-off-by:

[PATCH v3 32/32] command: Introduce functions to obtain command arguments

2023-11-18 Thread Simon Glass
Add some functions which provide an argument to a command, or NULL if the argument does not exist. Use the same numbering as argv[] since it seems less confusing than the previous idea. Signed-off-by: Simon Glass Suggested-by: Tom Rini --- Changes in v3: - Drop RFC tag Changes in v2: - Add ne

[PATCH v3 26/32] bootm: efi: Drop special call to bootm_find_other()

2023-11-18 Thread Simon Glass
The normal bootm flow calls bootm_find_other() can call the BOOTM_STATE_FINDOTHER state as part of its processing. Fix the condition there so that this hack can be removed. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootm.c| 10 +- boot/bootm_os.c | 6 -- 2 file

[PATCH v3 28/32] bootm: Adjust the parameters of bootm_find_images()

2023-11-18 Thread Simon Glass
Rather than passing it all the command-line args, pass in the pieces that it needs. These are the image address, the ramdisk address/name and the FDT address/name. Ultimately this will allow usage of this function without being called from the command line. Move the function comment to the header

[PATCH v3 29/32] bootm: Add a function to check overlap

2023-11-18 Thread Simon Glass
Move this code into a function to reduce code size and make it easier to understand. Drop the unnecessary 0x to help a little with code size. Use this in bootm_find_images() Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 51 +

[PATCH v3 30/32] bootm: Reduce arguments to bootm_find_other()

2023-11-18 Thread Simon Glass
Rather than passing the full list of command arguments, pass only those which are needed. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/boot/bootm.c b/boot/bootm

[PATCH v3 20/32] bootm: Drop #ifdef in bootm_find_images()

2023-11-18 Thread Simon Glass
The OF_LIBFDT #ifdef makes it harder to use a local variable for that code block. Convert it to if() instead. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootm.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/boot/

[PATCH v3 13/32] bootm: Adjust position of unmap_sysmem() in boot_get_kernel()

2023-11-18 Thread Simon Glass
These unmaps should happen regardless of the return value. Move them before the 'return' statement. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - Add new patch to adjust position of unmap_sysmem() in boot_get_kernel() boot/bootm.c | 4 ++-- 1 fil

[PATCH v3 21/32] bootm: Pass image buffer to boot_get_fdt()

2023-11-18 Thread Simon Glass
Rather than having boot_get_fdt() calculate this, move the calculation into the caller. This removes the access to argv[0] in this function, so we can later refactor it to just accept argv[2] instead of the whole argv[]. Move the function comment to the header file and fix the u8 argument, while w

[PATCH v3 19/32] fdt: Allow use of fdt_support inside if() statements

2023-11-18 Thread Simon Glass
Most of the fdt_support.h header file is included only if OF_LIBFDT or OF_CONTROL are enabled. This means that calling functions defined in that file must happen inside an #ifdef This is unnecessary, so reduce the condition to just !USE_HOSTCC Signed-off-by: Simon Glass Reviewed-by: Tom Rini --

[PATCH v3 18/32] bootm: Reduce arguments to boot_get_ramdisk()

2023-11-18 Thread Simon Glass
This function normally only uses one argument so pass it in directly. Move comments to the header file so could one day include these functions in API docs. Fix up the u8 argument while here, since it avoids the compiler having to mask the value on some machines. The Android case here is bit stran

[PATCH v3 17/32] bootm: Reduce arguments to bootm_find_os()

2023-11-18 Thread Simon Glass
This function only uses one argument so pass it in directly. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - Fix 'boot_find_os' typo - Pass in the command name boot/bootm.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) d

[PATCH v3 16/32] bootm: Move error printing out of boot_get_kernel()

2023-11-18 Thread Simon Glass
The same error message is printed in two places. Move it out to the caller so we can avoid passing in the command name. Leave the bootstage handling where it is. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - Use the command table to provide the com

[PATCH v3 04/32] treewide: Tidy up semicolon after command macros

2023-11-18 Thread Simon Glass
The U_BOOT_CMD_COMPLETE() macro has a semicolon at the end, perhaps inadvertently. Some code has taken advantage of this. Tidy this up by dropping the semicolon from the macro and adding it to macro invocations as required. Signed-off-by: Simon Glass Reviewed-by: Tom Rini Reviewed-by: Ilias Apa

[PATCH v3 02/32] README: Correct docs for CONFIG_SPL_BUILD

2023-11-18 Thread Simon Glass
This option is defined in both SPL and TPL builds, so correct the docs related to this. Also point to spl_phase() which is normally a better option. Mention VPL as well. Signed-off-by: Simon Glass Reported-by: Heinrich Schuchardt --- (no changes since v1) README | 26 ++---

[PATCH v3 15/32] bootstage: Drop BOOTSTAGE_ID_FIT_KERNEL_INFO

2023-11-18 Thread Simon Glass
This is a misnomer since we don't necessarily know that the image is a FIT. Use the existing BOOTSTAGE_ID_CHECK_IMAGETYPE instead. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c| 2 +- include/bootstage.h | 1 - 2 files changed, 1 insertion(+),

[PATCH v3 14/32] bootm: Use the error return from boot_get_kernel()

2023-11-18 Thread Simon Glass
Rather than looking for a zero-sized image, use the error code returned to determine if things are OK. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - Use the command table to provide the command name, instead of "bootm" boot/bootm.c | 6 +++--- 1

[PATCH v3 07/32] bootm: Simplify arguments for bootm_pre_load()

2023-11-18 Thread Simon Glass
Move the argument decoding to the caller, to avoid needing to pass the command-line arguments. Add a function comment while we are here. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 23 --- 1 file changed, 16 insertions(+), 7 d

[PATCH v3 11/32] image: Document error codes from fit_image_load()

2023-11-18 Thread Simon Glass
Put a list of these in the function documentation so it is easier to decode what went wrong. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) include/image.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/image.h b/include/image.h

[PATCH v3 12/32] bootm: Adjust boot_get_kernel() to return an error

2023-11-18 Thread Simon Glass
This function obtains lots of error codes and then throws them away. Update it to return the error, moving the image pointer to an argument. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v2) Changes in v2: - Use the command table to provide the command name, instead of

[PATCH v3 10/32] bootm: Reduce arguments to boot_get_kernel()

2023-11-18 Thread Simon Glass
This function only uses one argument and just needs to know the name of the command which called it. Adjust the function to use only what it needs. This will make it easier to call from a non-command context. Tidy up the function comment while we are here. Signed-off-by: Simon Glass Reviewed-by:

[PATCH v3 09/32] image: Tidy up genimg_get_kernel_addr_fit()

2023-11-18 Thread Simon Glass
This function does not modify its first argument, so mark it const. Also move the comments to the header file and expand them to provide more useful information. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 3 +-- boot/image-board.c | 17 +--

[PATCH v3 06/32] bootm: Drop arguments from bootm_start()

2023-11-18 Thread Simon Glass
This function does not use its arguments. Drop them. Signed-off-by: Simon Glass Reviewed-by: Tom Rini Reviewed-by: Ilias Apalodimas --- (no changes since v1) boot/bootm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index cb61485c226c..

[PATCH v3 05/32] bootstd: Add missing header file from bootdev.h

2023-11-18 Thread Simon Glass
Add a dm/uclass-id.h to the bootdev header file, since it uses enum uclass_id Signed-off-by: Simon Glass Reviewed-by: Ilias Apalodimas --- (no changes since v1) include/bootdev.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/bootdev.h b/include/bootdev.h index b079a91b5b7f..c136

[PATCH v3 08/32] bootm: Move boot_get_kernel() higher in the file

2023-11-18 Thread Simon Glass
Move this code and image_get_kernel() higher in the file to avoid the need for a forward declaration. No attempt is made to remove #ifdefs or adjust the code in any other way. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) boot/bootm.c | 376 ++

[PATCH v3 03/32] mmc: env: Unify the U_BOOT_ENV_LOCATION conditions

2023-11-18 Thread Simon Glass
The declaration of U_BOOT_ENV_LOCATION() uses a different #ifdef condition from the code it calls. Use the same condition to avoid a build warning if CONFIG_CMD_SAVEENV is disabled. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) env/mmc.c | 2 +- 1 file changed, 1

[PATCH v3 01/32] arm: x86: Drop discarding of command linker-lists

2023-11-18 Thread Simon Glass
Since we can now cleanly disable CMDLINE when needed, drop the rules which discard the command code. It will not be built in the first place. Signed-off-by: Simon Glass Reviewed-by: Tom Rini Reviewed-by: Ilias Apalodimas --- (no changes since v1) arch/arm/cpu/u-boot.lds | 3 --- arch/x8

Pull request for efi-next-18112023

2023-11-18 Thread Ilias Apalodimas
Hi Tom, The following changes since commit ae7ec8b0be41b59ef323f7531c0fe6745e8fef45: Merge branch '2023-11-16-assorted-updates' into next (2023-11-17 08:38:05 -0500) are available in the Git repository at: https://source.denx.de/u-boot/custodians/u-boot-tpm/ tags/efi-next-18112023 for you

Re: [PATCH v2] smbios: arm64: Allow table to be written at a fixed addr

2023-11-18 Thread Tom Rini
Splitting things in two again.. On Sat, Nov 18, 2023 at 10:10:17AM -0700, Simon Glass wrote: [snip] > This is the bug report of trying to boot into U-Boot on arm64 with > more than 3GB of memory. OK, so can we just please fix this, for v2024.01, in a way that won't make things harder? Fixed memo

Re: [PATCH v2 2/2] cmd: acpi: fix acpi list command

2023-11-18 Thread Heinrich Schuchardt
On 11/12/23 21:01, Simon Glass wrote: On Sun, 12 Nov 2023 at 00:03, Heinrich Schuchardt wrote: ACPI tables may comprise either RSDT, XSDT, or both. The current code fails to check the presence of the RSDT table before accessing it. This leads to an exception if the RSDT table is not provided.

[PATCH 0/1] Fix DFU updates on the zynqmp platform

2023-11-18 Thread Jared Baur
When using DFU alt info via EFI capsule updates on an Ultra96 V2 board, `dfu_alt_info` is automatically set to write a `boot.bin` file to the SD card when in SD boot mode and not using multiboot. After the update is applied, the board reboots and does not come back up. When writing an upper-case `B

[PATCH 1/1] Write upper-case BOOT.BIN to zynqmp MMC

2023-11-18 Thread Jared Baur
The zynqmp bootrom will not boot from an SD card with a fat32 fileystem with a lowercase boot.bin file on it. This means that using DFU to update the boot.bin file will render the device unusable since it is not written in upper-case. Signed-off-by: Jared Baur --- board/xilinx/zynqmp/zynqmp.c |

Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage

2023-11-18 Thread Tom Rini
On Sat, Nov 18, 2023 at 10:58:50AM -0700, Simon Glass wrote: [snip] > I found these: > > https://patchwork.ozlabs.org/project/uboot/list/?series=262148&state=* > http://patchwork.ozlabs.org/project/uboot/patch/20210925121958.26001-1-p...@kernel.org/ > > IMO the second one from Pali makes sense,

Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage

2023-11-18 Thread Tom Rini
Splitting this in to two different threads.. On Sat, Nov 18, 2023 at 10:58:50AM -0700, Simon Glass wrote: > Hi Tom, > > On Sat, 18 Nov 2023 at 10:45, Tom Rini wrote: > > > > On Sat, Nov 18, 2023 at 10:09:55AM -0700, Simon Glass wrote: > > > Hi Tom, > > > > > > On Fri, 17 Nov 2023 at 15:54, Tom R

Re: [PATCH 13/34] video: Add a function to clear the display

2023-11-18 Thread Simon Glass
Hi, On Sun, 1 Oct 2023 at 19:16, Simon Glass wrote: > > Move the code from the 'cls' command into the console file, so it can > be called from elsewhere. > > Signed-off-by: Simon Glass > --- > > cmd/cls.c | 25 +++-- > common/console.c | 31 +

Re: [PATCH 1/1] efi_loader: create memory reservations in ACPI case

2023-11-18 Thread Simon Glass
Hi Heinrich, On Sat, 18 Nov 2023 at 10:34, Heinrich Schuchardt wrote: > > On 11/18/23 18:10, Simon Glass wrote: > > Hi Heinrich, > > > > On Thu, 16 Nov 2023 at 02:29, Heinrich Schuchardt > > wrote: > >> > >> ACPI tables cannot convey memory reservations for least ARM and RISC-V. > >> x86 uses th

Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage

2023-11-18 Thread Simon Glass
Hi Tom, On Sat, 18 Nov 2023 at 10:45, Tom Rini wrote: > > On Sat, Nov 18, 2023 at 10:09:55AM -0700, Simon Glass wrote: > > Hi Tom, > > > > On Fri, 17 Nov 2023 at 15:54, Tom Rini wrote: > > > > > > Remove and replace common.h and config.h in sandbox when it's not needed > > > and add some explici

Re: [PATCH 4/5] sandbox: Audit config.h and common.h usage

2023-11-18 Thread Tom Rini
On Sat, Nov 18, 2023 at 10:09:55AM -0700, Simon Glass wrote: > Hi Tom, > > On Fri, 17 Nov 2023 at 15:54, Tom Rini wrote: > > > > Remove and replace common.h and config.h in sandbox when it's not needed > > and add some explicit includes where needed. > > > > Signed-off-by: Tom Rini > > --- > >

Re: [PATCH 1/1] efi_loader: create memory reservations in ACPI case

2023-11-18 Thread Heinrich Schuchardt
On 11/18/23 18:10, Simon Glass wrote: Hi Heinrich, On Thu, 16 Nov 2023 at 02:29, Heinrich Schuchardt wrote: ACPI tables cannot convey memory reservations for least ARM and RISC-V. x86 uses the BIOS E820 table for this purpose. We cannot simply ignore the device-tree when booting via ACPI. W

Re: [PATCH 1/5] qe: Add to linux/immap_qe.h

2023-11-18 Thread Simon Glass
On Fri, 17 Nov 2023 at 15:53, Tom Rini wrote: > > Given how we define QE_MURAM_SIZE today, this header needs to have > added to it. > > Signed-off-by: Tom Rini > --- > include/linux/immap_qe.h | 2 ++ > 1 file changed, 2 insertions(+) > Reviewed-by: Simon Glass

Re: [PATCH v2] smbios: arm64: Allow table to be written at a fixed addr

2023-11-18 Thread Simon Glass
Hi Tom, On Fri, 3 Nov 2023 at 14:13, Tom Rini wrote: > > On Fri, Nov 03, 2023 at 01:38:59PM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Fri, 3 Nov 2023 at 13:26, Tom Rini wrote: > > > > > > On Fri, Nov 03, 2023 at 12:14:46PM -0600, Simon Glass wrote: > > > > Hi Heinrich, > > > > > > > > On

Re: [PATCH v5 1/2] arm: mediatek: add mt8195 SOC support

2023-11-18 Thread Simon Glass
Hi, On Fri, 4 Aug 2023 at 05:05, Macpaul Lin wrote: > > From: Fabien Parent > > The MediaTek MT8195 is a ARM64-based SoC with a quad-core Cortex-A73 and > a quad-core Cortex-A53. It is including UART, SPI, USB3.0 device and hosts, > SD and MMC cards, UFS, PWM, I2C, I2S, S/PDIF, and several LPDDR

Re: [PATCH v2 3/5] bootm: Allow omitting the load address

2023-11-18 Thread Simon Glass
Hi Tom, On Tue, 14 Nov 2023 at 11:04, Tom Rini wrote: > > On Tue, Nov 14, 2023 at 11:38:46AM -0500, Tom Rini wrote: > > On Sat, Nov 11, 2023 at 08:49:55PM -0700, Simon Glass wrote: > > > > > The kernel_noload image type indicates that no loading is to be done by > > > U-Boot. This works well when

Re: [PATCH 1/1] acpi: consider XSDT in acpi_find_table()

2023-11-18 Thread Simon Glass
Hi Heinrich, On Tue, 14 Nov 2023 at 09:39, Heinrich Schuchardt wrote: > > The RSDT table is deprecated and does not exist on all systems. > > By preference scan XSDT for the table to find. If no XSDT table exists, try > to use the RSDT table. > > Signed-off-by: Heinrich Schuchardt > --- > lib/a

Re: [PATCH 1/1] efi_loader: create memory reservations in ACPI case

2023-11-18 Thread Simon Glass
Hi Heinrich, On Thu, 16 Nov 2023 at 02:29, Heinrich Schuchardt wrote: > > ACPI tables cannot convey memory reservations for least ARM and RISC-V. > x86 uses the BIOS E820 table for this purpose. We cannot simply ignore the > device-tree when booting via ACPI. Why is that? I had thought that we h

Re: [PATCH 1/6] acpi: do not write ACPI tables on TARGET_QEMU_VIRT

2023-11-18 Thread Simon Glass
Hi Heinrich, On Thu, 16 Nov 2023 at 12:43, Heinrich Schuchardt wrote: > > On 11/16/23 19:33, Tom Rini wrote: > > On Wed, Nov 15, 2023 at 03:23:50PM +0100, Heinrich Schuchardt wrote: > > > >> RISC-V QEMU provides the ACPI tables. We do not need to generate them > >> ourselves. > >> > >> Signed-off

Re: [PATCH V2 1/4] board: rockchip: Refactor panel auto-detect code

2023-11-18 Thread Simon Glass
Hi Chris, On Fri, 17 Nov 2023 at 14:15, Chris Morgan wrote: > > From: Chris Morgan > > Make the inability to detect a panel using the auto detection code not > fail the entire boot process. This means that if the panel ID cannot > be read we don't set an environment variable for the panel, and i

Re: [PATCH 5/5] global: Drop common.h inclusion

2023-11-18 Thread Simon Glass
On Fri, 17 Nov 2023 at 15:54, Tom Rini wrote: > > In order to make it easier to move on to dropping common.h from code > directly, remove common.h inclusion from the rest of the header file > which had been including it. > > Signed-off-by: Tom Rini > --- > board/BuR/common/br_resetc.h

  1   2   >