Re: bootefi with initramfs

2023-09-24 Thread Sughosh Ganu
hi, On Fri, 22 Sept 2023 at 16:40, Song Sam wrote: > > Hi all, > > I am currently in the process of booting the Linux kernel using the U-boot > 'bootefi' command. However, I am facing an issue with the root file system > (rootfs) disk, which is not functioning properly. As a solution, I am > cons

[PATCH v3] env: ti: ti_common.env: Fix get_overlaystring for FIT Image

2023-09-24 Thread Manorit Chawdhry
After the refactor with conf- nodes in fitImage, overlaystring wasn't didn't handle the new conf- nodes in FIT Booting. Fix get_overlaystring to handle conf- nodes. Fixes: 837833a724b7 ("environment: ti: Add get_fit_config command to get FIT config string") Reported-by: Aniket Limaye Signed-off-

Re: [PATCH v2 3/3] trace: Fix alignment logic in flyrecord header

2023-09-24 Thread Michal Simek
Hi Simon, On 9/23/23 20:13, Simon Glass wrote: Current alignment which is using 16 bytes is not correct in connection to trace_clocks description and it's length. That's why use start_addr variable and record proper size based on used entries. Fixes: be16fc81b2ed ("trace: Update proftool to us

Re: [PATCH v2] riscv: enable multi-range memory layout

2023-09-24 Thread Wu, Fei
On 9/14/2023 6:21 PM, Heinrich Schuchardt wrote: > On 9/14/23 09:42, Wu, Fei wrote: >> On 9/14/2023 3:20 PM, Heinrich Schuchardt wrote: >>> On 9/14/23 08:48, Wu, Fei wrote: On 9/14/2023 2:05 PM, Heinrich Schuchardt wrote: > > > Am 14. September 2023 07:30:55 MESZ schrieb Fei Wu >>>

Re: [PATCH] binman: openssl: x509: ti_secure_rom: Add support for bootcore_opts

2023-09-24 Thread Kumar, Udit
On 9/22/2023 2:45 PM, Neha Malcom Francis wrote: According to the TRMs of K3 platform of devices, the ROM boot image Below tear line, giving  some link of TRM, with section information where this format is mentioned will be helpful for reviewers. format specifies a "Core Options Field" tha

Re: Question about boot failure of AM64-SK

2023-09-24 Thread Vignesh Raghavendra
Hi, On 21/09/23 21:52, Masahiro Yamada wrote: > On Fri, Sep 22, 2023 at 12:03 AM Masahiro Yamada wrote: >> >> Hi. >> >> I am seeing a boot failure on AM64-SK. >> >> >> I got the following error in SPL of the main core. >> Do you have any clue? > > > > As a side-topic, I downloaded a prebuilt i

Re: Question about boot failure of AM64-SK

2023-09-24 Thread Vignesh Raghavendra
Hi Masahiro, On 21/09/23 20:33, Masahiro Yamada wrote: > Hi. [...] > spl: mmc boot mode: fs > Found FIT > Error reading cluster > fit read sector 0, sectors=985528, dst=, count=18446744073709551615, > size=0xf09b8 > SPL: failed to boot from all boot devices > ### ERROR ### Please RESET the board

Re: [PATCH] lmb: remove overlapping region with next range

2023-09-24 Thread Kumar, Udit
On 9/24/2023 7:21 PM, Heinrich Schuchardt wrote: Am 24. September 2023 13:18:32 MESZ schrieb Udit Kumar : In case of new memory range to be added is coalesced with any already added non last lmb region. And there is possibility that, then region in which new memory range added is not adjacent

[PATCH] sunxi: R528: add SMHC2 pin pull ups support

2023-09-24 Thread Okhunjon Sobirjonov
Added support for on-chip EMMC(SMHC2) pin pull ups for sunxi R528 board. Otherwise, "No pinmux setup defined for MMC2" appears. Moreover, adding CONFIG_MMC_SUNXI_SLOT_EXTRA=2 to defconfig might be needed in order to inform SPL code that another MMC instance on top of the default 0 for booting shoul

[PATCH 2/3] common: Drop time.h from common header

2023-09-24 Thread Simon Glass
Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass --- api/api.c | 1 + arch/arm/include/asm/arch-tegra/timer.h| 1 + arch/arm/mach-at91/arm920t/clock.c | 1 + arch/arm/

[PATCH 0/3] common: Remove a few more header files

2023-09-24 Thread Simon Glass
This series removes two more header files from the common.h header. It also tidies up code style for time.h functions, to simplify similar maintenance in future. Simon Glass (3): Fix code style for time functions common: Drop time.h from common header common: Drop linux/string.h from common

[PATCH 1/3] Fix code style for time functions

2023-09-24 Thread Simon Glass
Fix the code style used for some time functions. Signed-off-by: Simon Glass --- arch/powerpc/lib/interrupts.c | 2 +- arch/powerpc/lib/time.c | 5 +++-- board/armltd/integrator/timer.c | 2 +- drivers/fpga/ACEX1K.c | 4 ++-- drivers/fpga/spartan2.c | 24 +

Re: [PATCH 00/25] Tidy up use of CONFIG_CMDLINE

2023-09-24 Thread Tom Rini
On Sun, Sep 24, 2023 at 02:39:18PM -0600, Simon Glass wrote: > It should be possible to disable CONFIG_CMDLINE and have all commands > and related functionality dropped from U-Boot. This is useful when > trying to reduce the size of U-Boot. > > Recent changes have stopped this from working. > >

[PATCH] power: mp5416: Fix LDO SVAL for MP5416 PMIC

2023-09-24 Thread Sidharth Prabukumar
The MP5416 PMIC's LDO set-value formula is incorrect. This patch fixes it by using the correct formula. Signed-off-by: Sidharth Prabukumar Cc: Jaehoon Chung --- include/power/mp5416.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/power/mp5416.h b/include/power/mp54

[PATCH 00/25] Tidy up use of CONFIG_CMDLINE

2023-09-24 Thread Simon Glass
It should be possible to disable CONFIG_CMDLINE and have all commands and related functionality dropped from U-Boot. This is useful when trying to reduce the size of U-Boot. Recent changes have stopped this from working. This series repairs the feature for sandbox and adds a test to stop it break

Re: [PATCH 07/25] tegra: Change #ifdef for nop

2023-09-24 Thread Tom Rini
On Sun, Sep 24, 2023 at 02:39:25PM -0600, Simon Glass wrote: > This code is normally compiled for Tegra, but sandbox can also compile > it. We should not use UNIT_TEST as a synonym for SANDBOX, since it is > possible to disable UNIT_TEST for sandbox. > > Correct the condition. > > Signed-off-by:

Re: [PATCH 03/25] autoboot: Correct dependencies on CMDLINE

2023-09-24 Thread Tom Rini
On Sun, Sep 24, 2023 at 02:39:21PM -0600, Simon Glass wrote: > Make AUTOBOOT depend on CMDLINE since it is mostly meaningless without it. > > Signed-off-by: Simon Glass > --- > > boot/Kconfig | 23 ++- > 1 file changed, 14 insertions(+), 9 deletions(-) > > diff --git a/boo

Re: [PATCH] arm: mvebu: sata_mv: Add bootstd hook to enable sata_bootdev

2023-09-24 Thread Tony Dinh
Hi Simon, On Sun, Sep 24, 2023 at 1:40 PM Simon Glass wrote: > > Hi Tony, > > On Tue, 5 Sept 2023 at 23:23, Tony Dinh wrote: > > > > Add hook in sata_mv probe to enable bootstd bootdev. > > > > Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is > > not enabled for ahci sata

Re: Trying to boot custom kernel on Wink Hub (i.MX28)

2023-09-24 Thread Fabio Estevam
Hi Rogan, On Sun, Sep 24, 2023 at 5:16 PM Rogan Dawes wrote: > > Hi folks, > > I eventually decided that I did need to figure out the DRAM timings for the > Micron chip on my board, but I found an easier way than actually > "understanding what I'm doing"! :-) > > I pulled the vendor U-Boot imag

Re: [PATCH 05/25] treewide: Correct use of long help

2023-09-24 Thread Tom Rini
On Sun, Sep 24, 2023 at 02:39:23PM -0600, Simon Glass wrote: > Some commands assume that CONFIG_SYS_LONGHELP is always defined. > Declaration of long help should be bracketed by an #ifdef to avoid an > 'unused variable' warning. > > Fix this treewide. > > Signed-off-by: Simon Glass [snip] > diff

Re: [PATCH 08/25] fastboot: Avoid depending on CMDLINE

2023-09-24 Thread Tom Rini
On Sun, Sep 24, 2023 at 02:39:26PM -0600, Simon Glass wrote: > When CMDLINE is not enabled, this code fails to build. Correct this by > adding conditions. > > Note that this should not happen in normal use, since the use of > 'select CMDLINE' will cause a visible warning. But it is needed for the

[PATCH 1/1] efi_selftest: BitBlt test

2023-09-24 Thread Heinrich Schuchardt
The BitBlt test leaves the serial console output in disarray. * Call ClearScreen() where needed. * Test CheckEvent() for EFI_SIMPLE_TEXT_INPUT_PROTOCOL.WaitForKey via adding navigation keys * Correct timer comment For testing on the sandbox: CONFIG_CMD_BOOTEFI_SELFTEST=y CONFIG_CONSOLE

Re: Please pull u-boot-dm/next

2023-09-24 Thread Tom Rini
On Sat, Sep 23, 2023 at 01:52:55PM -0600, Simon Glass wrote: > Hi Tom, > > This is for the -next branch > > https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/17836 > > > The following changes since commit b05a184379631d13c4a49e423aa1324dc1ae6158: > > Merge tag 'x86-pull-2023092

Re: [PATCH] common: Drop linux/printk.h from common header

2023-09-24 Thread Tom Rini
On Thu, 14 Sep 2023 18:21:46 -0600, Simon Glass wrote: > This old patch was marked as deferred. Bring it back to life, to continue > towards the removal of common.h > > Move this out of the common header and include it only where needed. > > Applied to u-boot/next, thanks! -- Tom

[PATCH 25/25] sandbox: Add a test for disabling CONFIG_CMDLINE

2023-09-24 Thread Simon Glass
Now that everything is working, add a test to make sure that this builds correctly. Signed-off-by: Simon Glass --- test/py/tests/test_sandbox_opts.py | 20 1 file changed, 20 insertions(+) create mode 100644 test/py/tests/test_sandbox_opts.py diff --git a/test/py/tests/te

[PATCH 24/25] sandbox: Avoid requiring cmdline

2023-09-24 Thread Simon Glass
Use 'imply' rather than 'select' for command-related options, so that it is possible to build sandbox without CONFIG_CMDLINE enabled. Signed-off-by: Simon Glass --- arch/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 19f2891ba

[PATCH 23/25] cmd: Make all commands depend on CMDLINE

2023-09-24 Thread Simon Glass
If this option is disabled, commands should not be available. Convert the CMDLINE option into a menuconfig and make every command in cmd/Kconfig depend on it. Signed-off-by: Simon Glass --- cmd/Kconfig | 29 - 1 file changed, 8 insertions(+), 21 deletions(-) diff --

[PATCH 22/25] efi: Depend on CMDLINE for efi_loader

2023-09-24 Thread Simon Glass
This features currently requires the command line, so make this explicit. Future work could adjust this, but it needs effort within the booting support first, like the bootm command. Signed-off-by: Simon Glass --- lib/efi_loader/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ef

[PATCH 21/25] video: Dont require the font command

2023-09-24 Thread Simon Glass
While it is nice to have the font command, using 'select' makes it impossible to build the console code without it. Change this to use 'imply' instead. Signed-off-by: Simon Glass --- drivers/video/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/Kconfig

[PATCH 20/25] video: Allow use without CONFIG_CMDLINE

2023-09-24 Thread Simon Glass
Provide a fallback for when CONFIG_SYS_CBSIZE is not provided, so that the console can still be used. Signed-off-by: Simon Glass --- drivers/video/console_truetype.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c index

[PATCH 19/25] log: Allow use without CONFIG_CMDLINE

2023-09-24 Thread Simon Glass
When CONFIG_SYS_CBSIZE is not used we need an alternative. For logging it seems that CONFIG_SYS_PBSIZE is a better choice anyway, so update this. Signed-off-by: Simon Glass --- common/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/log.c b/common/log.c index

[PATCH 18/25] net: Depend on CONFIG_CMDLINE

2023-09-24 Thread Simon Glass
At present it isn't possible to use networking without the command line enabled. Add this as a condition. Signed-off-by: Simon Glass --- cmd/Kconfig | 1 + net/Kconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 5f6834b335dc..c3428d19f31d 100644 --- a/c

[PATCH 17/25] fdt: Move working_fdt into fdt_support

2023-09-24 Thread Simon Glass
This can be accessed even when commands are not enabled. Move it into the fdt_support.c file, which is where most of the FDT helpers are. Signed-off-by: Simon Glass --- boot/fdt_support.c | 5 + cmd/fdt.c | 5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/boo

[PATCH 16/25] bootm: Allow building when cleanup functions are missing

2023-09-24 Thread Simon Glass
There are two cleanup functions needed during boot which depend on CMD_BOOTM: bootm_disable_interrupts() and board_quiesce_devices() Provide static inline versions of these for when commands are not enabled. Signed-off-by: Simon Glass --- arch/arm/lib/bootm.c | 2 ++ boot/bootm.c | 10

[PATCH 15/25] console: Move SYS_PBSIZE into common/

2023-09-24 Thread Simon Glass
This relates to printing output and does not need a command line. Move it next to the other console-related options. Signed-off-by: Simon Glass --- cmd/Kconfig| 5 - common/Kconfig | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index

[PATCH 14/25] env: Split out non-command code into a new file

2023-09-24 Thread Simon Glass
It is not possible to set environment variables without having CONFIG_CMD_NVEDIT enabled. When CONFIG_CMDLINE is disabled, we need a way to set variables. Split the setting code out into its own file, so that env_set() is available even when CONFIG_CMDLINE is not. If it is never called, the code w

[PATCH 13/25] pxe: Depend on CMDLINE

2023-09-24 Thread Simon Glass
We cannot use PXE or sysboot commands without CONFIG_CMDLINE so add the required condition. Signed-off-by: Simon Glass --- cmd/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index cdc22a067b27..a254c41110ec 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -

[PATCH 12/25] armffa: Correct command help condition

2023-09-24 Thread Simon Glass
The help text should not be build unless CONFIG_SYS_LONGHELP is enabled. Add this as a condition. Signed-off-by: Simon Glass --- cmd/armffa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/armffa.c b/cmd/armffa.c index 7e6eafc03ad7..28b65678a8e9 100644 --- a/cmd/armffa.c +++ b/cmd/ar

[PATCH 11/25] Move bootmenu_conv_key() into its own file

2023-09-24 Thread Simon Glass
This conversion function is used by expo which does not require CMDLINE. The menu feature does require CMDLINE. Move the function into a separate file so that it can be used even when CMDLINE is not enabled. Signed-off-by: Simon Glass --- common/Makefile| 2 +- common/cli_getch.c | 1 +

[PATCH 10/25] cmd: Use an #ifdef around run_commandf()

2023-09-24 Thread Simon Glass
This is not available if CMDLINE is disabled, so add an #ifdef to correct this. Signed-off-by: Simon Glass --- common/cli.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cli.c b/common/cli.c index 3916a7b10a7d..4d0fea4387f2 100644 --- a/common/cli.c +++ b/common/cli.c @@ -129,6 +

[PATCH 09/25] cli: Always build cli_getch

2023-09-24 Thread Simon Glass
This module is used for user input with menus, not just with the command line. Compile it always, so it is available even when CMDLINE is disabled. Signed-off-by: Simon Glass --- common/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/Makefile b/common/Makef

[PATCH 08/25] fastboot: Avoid depending on CMDLINE

2023-09-24 Thread Simon Glass
When CMDLINE is not enabled, this code fails to build. Correct this by adding conditions. Note that this should not happen in normal use, since the use of 'select CMDLINE' will cause a visible warning. But it is needed for the sandbox build to pass without CMDLINE. Signed-off-by: Simon Glass ---

[PATCH 07/25] tegra: Change #ifdef for nop

2023-09-24 Thread Simon Glass
This code is normally compiled for Tegra, but sandbox can also compile it. We should not use UNIT_TEST as a synonym for SANDBOX, since it is possible to disable UNIT_TEST for sandbox. Correct the condition. Signed-off-by: Simon Glass --- include/k210/pll.h | 2 +- 1 file changed, 1 insertion(+

[PATCH 05/25] treewide: Correct use of long help

2023-09-24 Thread Simon Glass
Some commands assume that CONFIG_SYS_LONGHELP is always defined. Declaration of long help should be bracketed by an #ifdef to avoid an 'unused variable' warning. Fix this treewide. Signed-off-by: Simon Glass --- arch/arm/mach-imx/cmd_dek.c| 3 ++- arch/arm/mach-imx/cmd_mfgprot

[PATCH 06/25] test: Make UNIT_TEST depend on CMDLINE

2023-09-24 Thread Simon Glass
Many tests make some use of the command line, so require it for all test code. This could be teased apart, perhaps with a test flag indicating that ut uses the command line. Leave that for later. Signed-off-by: Simon Glass --- test/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/te

Re: [PATCH] arm: mvebu: sata_mv: Add bootstd hook to enable sata_bootdev

2023-09-24 Thread Simon Glass
Hi Tony, On Tue, 5 Sept 2023 at 23:23, Tony Dinh wrote: > > Add hook in sata_mv probe to enable bootstd bootdev. > > Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is > not enabled for ahci sata yet. > > Signed-off-by: Tony Dinh > --- > > drivers/ata/sata_mv.c | 8 +++-

[PATCH 04/25] cmd: Add a few more dependencies on CMDLINE

2023-09-24 Thread Simon Glass
Add this to some more commands to avoid build errors with sandbox. Signed-off-by: Simon Glass --- cmd/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 64d723bd483b..cdc22a067b27 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -224,6 +224,7 @@ menu

[PATCH 03/25] autoboot: Correct dependencies on CMDLINE

2023-09-24 Thread Simon Glass
Make AUTOBOOT depend on CMDLINE since it is mostly meaningless without it. Signed-off-by: Simon Glass --- boot/Kconfig | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index f74ac7e9cc72..41ec2c34bf74 100644 --- a/boot/Kcon

[PATCH 02/25] bootstd: Correct dependencies on CMDLINE

2023-09-24 Thread Simon Glass
With recent changes in boot/Kconfig it is no-longer possible to disable CMDLINE. It results in various link errors because some options which require CMDLINE are enabled regardless of whether it is available. Add the necessary conditions to fix this. Note that it would be better to have all comma

[PATCH 01/25] buildman: Use oldconfig when adjusting the config

2023-09-24 Thread Simon Glass
We cannot be sure that the new config is consistent, particularly when changing a major item like CONFIG_CMDLINE. Use 'make oldconfig' to check that and avoid any such problems. Signed-off-by: Simon Glass --- tools/buildman/builder.py | 2 +- tools/buildman/builderthread.py | 6 ++ to

Re: Trying to boot custom kernel on Wink Hub (i.MX28)

2023-09-24 Thread Rogan Dawes
Hi folks, I eventually decided that I did need to figure out the DRAM timings for the Micron chip on my board, but I found an easier way than actually "understanding what I'm doing"! :-) I pulled the vendor U-Boot image off the flash, skipped the appropriate number of bytes until I was actually d

[PATCH v3 02/38] spl: Rename SYS_SPL_ARGS_ADDR to SPL_PAYLOAD_ARGS_ADDR

2023-09-24 Thread Simon Glass
Rename this so that SPL is first, as per U-Boot convention. Also add PAYLOAD_ since this is where in memory the parameters for the payload have been stored. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Rename based on Tom's feedback arch/arm/cpu/armv8/fsl-layerscape/d

[PATCH v3 00/38] spl: Preparation for Universal Payload

2023-09-24 Thread Simon Glass
This series tidies up SPL a little and adds some core ofnode functions needed to support Universal Payload. It also includes a few minor fix-ups for sandbox. For SPL the changes include CONFIG naming, removing various #ifdefs and tidying up the FIT code. One notable piece of the ofnode improvemen

[PATCH v3 38/38] pci: serial: Support reading PCI-register size with base

2023-09-24 Thread Simon Glass
The PCI helpers read only the base address for a PCI region. In some cases the size is needed as well, e.g. to pass along to a driver which needs to know the size of its register area. Update the functions to allow the size to be returned. For serial, record the information and provided it with th

[PATCH v3 37/38] command: Include a required header in command.h

2023-09-24 Thread Simon Glass
This uses ARRAY_SIZE() but does not include the header file which declares it. Fix this, so that command.h can be included without common.h Signed-off-by: Simon Glass --- (no changes since v1) include/command.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/command.h b/include/

[PATCH v3 36/38] fdt: Allow the devicetree to come from a bloblist

2023-09-24 Thread Simon Glass
Standard passage provides for a bloblist to be passed from one firmware phase to the next. That can be used to pass the devicetree along as well. Add an option to support this. Tests for this will be added as part of the Universal Payload work. Signed-off-by: Simon Glass --- (no changes since v

[PATCH v3 35/38] bloblist: Support initing from multiple places

2023-09-24 Thread Simon Glass
Typically the bloblist is set up after the devicetree is present. This makes sense because bloblist may use malloc() to allocate the space it needs. However sometimes the devicetree itself may be present in the bloblist. In that case it is at a known location in memory so we can init the bloblist

[PATCH v3 34/38] sandbox: Move the bloblist down a little in memory

2023-09-24 Thread Simon Glass
Move this down by 4KB so that it is large enough to hold the devicetree. Also fix up the devicetree address in the documetation while we are here. Signed-off-by: Simon Glass --- (no changes since v1) common/Kconfig | 2 +- doc/arch/sandbox/sandbox.rst | 4 ++-- test/lib/kconfig.

[PATCH v3 33/38] sandbox: Only read the state if we have a state file

2023-09-24 Thread Simon Glass
We should not read this unless requested. Make it conditional on the option being provided. Add some debugging to show the state being written. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/start.c | 8 +--- arch/sandbox/cpu/state.c | 1 + 2 files changed, 6 insert

[PATCH v3 32/38] sandbox: Init the EC properly even if no state file is available

2023-09-24 Thread Simon Glass
This currently relies on sandbox attempting to read a state file. At present it always does, even when there is no state file, in which case it fails, but still inits the EC. That is a bug, so update this driver to set the current image always, even if no state is read. Signed-off-by: Simon Glass

[PATCH v3 31/38] sandbox: Move reading the RAM buffer into a better place

2023-09-24 Thread Simon Glass
This should not happen in the argument-parsing function. Move it to the main program. Add some debugging for reading/writing. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/start.c | 19 +++ arch/sandbox/cpu/state.c | 1 + 2 files changed, 12 insertions

[PATCH v3 30/38] dm: core: Add tests for oftree_path()

2023-09-24 Thread Simon Glass
Add a few simple tests for getting the root node, since this is handled as a special case in the implementation. Signed-off-by: Simon Glass --- (no changes since v1) test/dm/ofnode.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index e078a9755a8

[PATCH v3 29/38] dm: core: Support writing a 64-bit value

2023-09-24 Thread Simon Glass
Add support for writing a single 64-bit value into a property. Repurpose the existing tests to handle this case too. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/ofnode.c | 17 - include/dm/ofnode.h | 10 ++ test/dm/ofnode.c | 15 +++

[PATCH v3 28/38] dm: core: Support writing a boolean

2023-09-24 Thread Simon Glass
Add functions to write a boolean property. This involves deleting it if the value is false. Add a new ofnode_has_property() as well. Add a comment about the behaviour of of_read_property() when the property value is empty. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/ofno

[PATCH v3 27/38] dm: core: Add a way to convert a devicetree to a dtb

2023-09-24 Thread Simon Glass
Add a way to flatten a devicetree into binary form. For livetree this involves generating the devicetree using fdt_property() and other calls. For flattree it simply involves providing the buffer containing the tree. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/ofnode.c |

[PATCH v3 26/38] dm: core: Add a way to delete a node

2023-09-24 Thread Simon Glass
Add a function to delete a node in an existing tree. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/of_access.c | 65 drivers/core/ofnode.c| 23 ++ include/dm/of_access.h | 18 +++ include/dm/ofnode.h |

[PATCH v3 25/38] dm: core: Add a way to copy a node

2023-09-24 Thread Simon Glass
Add a function to copy a node to another place under a new name. This is useful at least for testing, since copying a test node with existing properties is easier than writing the code to generate it all afresh. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/ofnode.c | 20 ++

[PATCH v3 24/38] dm: core: Add a function to create an empty tree

2023-09-24 Thread Simon Glass
Provide a function to create a new, empty tree. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/ofnode.c | 56 +++ include/dm/ofnode.h | 9 +++ include/of_live.h | 8 +++ lib/of_live.c | 19 +++ test/

[PATCH v3 23/38] dm: core: Tidy up comments in the ofnode tests

2023-09-24 Thread Simon Glass
Add comments to the functions where the test name does not indicate what is being tested. Rename functions in a few cases, so that a search for the function will also file its test. Signed-off-by: Simon Glass --- (no changes since v1) test/dm/ofnode.c | 46 +

[PATCH v3 22/38] dm: core: Ensure we run flattree tests on ofnode

2023-09-24 Thread Simon Glass
We need the UT_TESTF_SCAN_FDT flag set for these tests to run with flat tree. In some cases it is missing, so add it. Signed-off-by: Simon Glass --- (no changes since v1) test/dm/ofnode.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/te

[PATCH v3 21/38] dm: core: Reverse the argument order in ofnode_copy_props()

2023-09-24 Thread Simon Glass
Follow the order used by memcpy() as it may be less confusing. Signed-off-by: Simon Glass --- (no changes since v1) boot/vbe_request.c| 2 +- boot/vbe_simple_os.c | 2 +- drivers/core/ofnode.c | 2 +- include/dm/ofnode.h | 6 +++--- test/dm/ofnode.c | 9 - 5 files changed,

[PATCH v3 20/38] spl: Move bloblist writing until the image is known

2023-09-24 Thread Simon Glass
The bloblist should not be finalised until the image is fully set up. This allows any final handoff information to be included in the bloblist. Signed-off-by: Simon Glass --- (no changes since v1) common/spl/spl.c | 24 1 file changed, 12 insertions(+), 12 deletions(-)

[PATCH v3 19/38] spl: Use the correct FIT_..._PROP constants

2023-09-24 Thread Simon Glass
Rather than open-coding the property names, use the existing constants provided for this purpose. This better aligns the simple-FIT code with the full FIT implementation. Signed-off-by: Simon Glass --- (no changes since v1) common/spl/spl_fit.c | 11 ++- 1 file changed, 6 insertions(+)

[PATCH v3 18/38] spl: Move the full FIT code to spl_fit.c

2023-09-24 Thread Simon Glass
For some reason this code was put in the main spl.c file. Move it out to the FIT implementation where it belongs. Signed-off-by: Simon Glass --- (no changes since v1) common/spl/spl.c | 108 +++ common/spl/spl_fit.c | 93

[PATCH v3 17/38] spl: Rename spl_load_fit_image() to load_simple_fit()

2023-09-24 Thread Simon Glass
We have two functions called spl_load_fit_image(), one in spl.c and one in spl_fit.c Rename the second one, to indicate that it relates to simple FIT parsing, rather than the full version. Signed-off-by: Simon Glass --- (no changes since v1) common/spl/spl_fit.c | 21 ++--- 1

[PATCH v3 16/38] spl: Remove #ifdefs with BOOTSTAGE

2023-09-24 Thread Simon Glass
This feature has some helpers in its header file so that its functions resolve to nothing when the feature is disabled. Add a few more and use these to simplify the code. With this there are no more #ifdefs in board_init_r() Signed-off-by: Simon Glass --- (no changes since v1) common/spl/spl.

[PATCH v3 14/38] dm: core: Correct help in TPL_DM and VPL_DM

2023-09-24 Thread Simon Glass
There are copying errors in the help. Fix these. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to correct help in TPL_DM and VPL_DM drivers/core/Kconfig | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig

[PATCH v3 15/38] spl: Avoid an #ifdef when printing gd->malloc_ptr

2023-09-24 Thread Simon Glass
Use an accessor in the header file to avoid this. Signed-off-by: Simon Glass --- Changes in v3: - Rebase on the new patch Changes in v2: - Use the same condition for both pieces to avoid possible problems common/spl/spl.c | 9 + include/asm-generic/global_data.h | 6 +

[PATCH v3 13/38] doc: Clean up SYS_MALLOC_SIMPLE

2023-09-24 Thread Simon Glass
Move the useful help to Kconfig. Drop mention of CONFIG_SYS_MALLOC_SIMPLE since it doesn't exist. Correct a 'CONFIGSYS_MALLOC_F_LEN' typo Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to clean up SYS_MALLOC_SIMPLE documentation Kconfig | 15 +++ R

[PATCH v3 12/38] Tidy up uses of CONFIG_SYS_MALLOC_F_LEN

2023-09-24 Thread Simon Glass
Use CONFIG_SYS_MALLOC_F instead to of CONFIG_SYS_MALLOC_F_LEN to determine whether pre-relocation malloc() is enabled. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to tidy up uses of CONFIG_SYS_MALLOC_F_LEN Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH v3 11/38] spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LEN

2023-09-24 Thread Simon Glass
Use the new SPL/TPL/VPL_SYS_MALLOC_F symbols to determine whether the malloc pool exists. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to use SYS_MALLOC_F instead of SYS_MALLOC_F_LEN Kconfig | 9 - arch/arm/lib/bdinfo.c

[PATCH v3 10/38] tpl: Enable CONFIG_TPL_SYS_MALLOC_F where needed

2023-09-24 Thread Simon Glass
Enable CONFIG_TPL_SYS_MALLOC_F for boards which have a non-zero value for CONFIG_TPL_SYS_MALLOC_F_LEN Note that the default is yes in most cases, so no changes are needed to board defconfig options. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to nable CONFIG_TPL_SYS_MALLOC_F w

[PATCH v3 09/38] spl: Enable CONFIG_SPL_SYS_MALLOC_F where needed

2023-09-24 Thread Simon Glass
Enable CONFIG_SPL_SYS_MALLOC_F for boards which have a non-zero value for CONFIG_SPL_SYS_MALLOC_F_LEN Note that the default is yes in most cases, so no changes are needed to board defconfig options. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch to enable CONFIG_SPL_SYS_MALLOC_F

[PATCH v3 08/38] spl: Create proper symbols for enabling the malloc() pool

2023-09-24 Thread Simon Glass
For U-Boot proper we have CONFIG_SYS_MALLOC_F which indicates that a malloc() pool is available before relocation. For SPL we only have CONFIG_SPL_SYS_MALLOC_F_LEN which indicates the size of the pool. In various places we use CONFIG_SPL_SYS_MALLOC_F_LEN == 0 to indicate that there is no pool. T

[PATCH v3 06/38] spl: Avoid #ifdef with CONFIG_SPL_PAYLOAD_ARGS_ADDR

2023-09-24 Thread Simon Glass
Move the condition to the header file to improve readability. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Change the approach to use the header file common/spl/spl.c | 10 -- include/system-constants.h | 7 +++ 2 files changed, 11 insertions(+)

[PATCH v3 07/38] spl: Drop the switch() statement for OS selection

2023-09-24 Thread Simon Glass
This code is pretty ugly, with many #ifdefs There are quite a lot of IH_OS_U_BOOT values so the compiler struggles to create a jump table here. Also, most of the options are normally disabled. Change it to an else...if construct instead. Add an accessor for the spl_image field behind an #ifdef to

[PATCH v3 05/38] spl: Drop #ifdefs for BOARD_INIT and watchdog

2023-09-24 Thread Simon Glass
Avoid using the preprocessor for these checks. Signed-off-by: Simon Glass --- (no changes since v1) common/spl/spl.c | 10 -- include/spl.h| 8 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 4233390d7de2..68e58c93

[PATCH v3 04/38] spl: mx6: powerpc: Drop the condition on timer_init()

2023-09-24 Thread Simon Glass
It doesn't make sense to have some boards do this differently. Drop the condition in the hope that the maintainers can figure out any run-time problems. This has been tested on qemu-ppce500 Signed-off-by: Simon Glass --- Changes in v3: - Mention testing on qemu-ppce500 Changes in v2: - Explic

[PATCH v3 03/38] spl: Avoid #ifdef with CONFIG_SPL_SYS_MALLOC

2023-09-24 Thread Simon Glass
Use IF_ENABLED_INT() to avoid needing to use the preprocessor. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Improve readability by moving the size part to the header file common/spl/spl.c | 8 include/system-constants.h | 7 ++- 2 files changed,

Re: [PATCH] lmb: remove overlapping region with next range

2023-09-24 Thread Heinrich Schuchardt
Am 24. September 2023 13:18:32 MESZ schrieb Udit Kumar : >In case of new memory range to be added is coalesced >with any already added non last lmb region. > >And there is possibility that, then region in which new memory >range added is not adjacent to next region. But have some >sections are o

[PATCH] sunxi: R528: add SMHC2 pin pull ups support

2023-09-24 Thread Okhunjon Sobirjonov
Added support for on-chip EMMC(SMHC2) pin pull ups for sunxi R528 board. Otherwise, "No pinmux setup defined for MMC2" appears. Moreover, adding CONFIG_MMC_SUNXI_SLOT_EXTRA=2 to defconfig might be needed in order to inform SPL code that another MMC instance on top of the default 0 for booting shoul

[PATCH] clk: at91: Fix initializing arrays

2023-09-24 Thread Francois Berder
Arrays are not cleared entirely because ARRAY_SIZE returns the number of elements in an array, not the size in bytes. This commit fixes the calls to memset by providing the array size in bytes instead of the number of elements in the array. Signed-off-by: Francois Berder --- drivers/clk/at91/sam

[PATCH] lmb: remove overlapping region with next range

2023-09-24 Thread Udit Kumar
In case of new memory range to be added is coalesced with any already added non last lmb region. And there is possibility that, then region in which new memory range added is not adjacent to next region. But have some sections are overlapping. So along with adjacency check with next lmb region, c

Looking for suggestion on using above 4G memory on ARM64

2023-09-24 Thread Kumar, Udit
Dear Experts, I am looking for suggestion/guidance, how to use above 4G memory on in u-boot for ARM 64-bit based architecture. On our system, we have low memory from 0x8000_ to 0x_ and above 4G 0x8_8000_ to 0x8__ As per my understanding, we have following pointers in