Re: [PATCHv3 19/26] arm: mach-k3: do board config for PM and RM only if supported

2021-05-08 Thread Vignesh Raghavendra
On 5/5/21 11:25 PM, Tero Kristo wrote: > From: Tero Kristo > > If the raw PM support is built in, we are operating in the split > firmware approach mode where RM and PM support is not available. In this > case, skip the board config for these two. > > Signed-off-by: Tero Kristo > Signed-off-

Re: [PATCH 01/17] sandbox: net: Ensure host name is always a valid string

2021-05-08 Thread Ramon Fried
On Sun, May 9, 2021 at 1:00 AM Simon Glass wrote: > > At present if ifname is exactly IFNAMSIZ characters then it will result > in an unterminated string. Fix this by using strlcpy() instead. > > Reported-by: Coverity (CID: 316358) > > Signed-off-by: Simon Glass > --- > > drivers/net/sandbox-raw

Re: [PATCH 16/17] clk: Detect failure to set defaults

2021-05-08 Thread Sean Anderson
On 5/8/21 6:00 PM, Simon Glass wrote: When the default clocks cannot be set, the clock is silently probed and the error is ignored. This is incorrect, since having the clocks at the correct speed may be important for operation of the system. Fix it by checking the return code. Signed-off-by: Si

[PATCH] fastboot: fix fastboot_set_reboot_flag()

2021-05-08 Thread Roman Stratiienko
In case CONFIG_FASTBOOT_FLASH_MMC_DEV == 0, compile-time condition is not met and fastboot_set_reboot_flag() fails. Fixes: a362ce214f03 ("fastboot: Implement generic fastboot_set_reboot_flag") Signed-off-by: Roman Stratiienko --- drivers/fastboot/fb_common.c | 2 +- 1 file changed, 1 insertion(+

[PATCH 14/17] tpm: Check outgoing command size

2021-05-08 Thread Simon Glass
In tpm_sendrecv_command() the command buffer is passed in. If a mistake is somehow made in setting this up, the size could be out of range. Add a sanity check for this. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 331152) --- lib/tpm-common.c | 5 + 1 file changed, 5 insertions(+)

[PATCH 17/17] RFC: clk: Return error code from clk_set_default_get_by_id()

2021-05-08 Thread Simon Glass
At present the error code is never returned. Fix it. With this change, the following error is produced: test/dm/clk.c:50, dm_test_clk(): 0 == uclass_get_device_by_name(UCLASS_CLK, "clk-sbox", &dev_clk): Expected 0x0 (0), got 0xfffe (-2) Test: dm_test_clk: clk.c (flat tree)

[PATCH 13/17] pinctrl: Avoid coverity warning when checking width

2021-05-08 Thread Simon Glass
The width is set up in single_of_to_plat() and can only have three values, all of which result in a non-zero divisor. Add a comment to help coverity. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 331154) --- drivers/pinctrl/pinctrl-single.c | 1 + 1 file changed, 1 insertion(+) diff -

[PATCH 12/17] cbfs: Check offset range when reading a file

2021-05-08 Thread Simon Glass
Add a check that the offset is within the allowed range. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 331155) --- fs/cbfs/cbfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c index 415ea28b871..3e905c74e58 100644 --- a/fs/cbfs/cbfs.c +++ b/fs/cb

[PATCH 15/17] sandbox: Silence coverity warning in state_read_file()

2021-05-08 Thread Simon Glass
In this case the value seems save to pass to os_free(). Silence the warning. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 165109) --- arch/sandbox/cpu/state.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index f63cfd38ee4..4cd

[PATCH 16/17] clk: Detect failure to set defaults

2021-05-08 Thread Simon Glass
When the default clocks cannot be set, the clock is silently probed and the error is ignored. This is incorrect, since having the clocks at the correct speed may be important for operation of the system. Fix it by checking the return code. Signed-off-by: Simon Glass --- drivers/clk/clk-uclass.

[PATCH 11/17] sandbox: cros_ec: Update error handling when reading matrix

2021-05-08 Thread Simon Glass
At present the return value of ofnode_get_property() is not checked, which causes a coverity warning. While we are here, use logging for the errors. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 331157) --- drivers/misc/cros_ec_sandbox.c | 12 +++- 1 file changed, 7 insertions(

[PATCH 09/17] dm: core: Check uclass_get() return value when dumping

2021-05-08 Thread Simon Glass
Update dm_dump_drivers() to use the return value from uclass_get() to check the validity of uc. This is equivalent and should be more attractive to Coverity. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 316601) --- drivers/core/dump.c | 7 --- 1 file changed, 4 insertions(+), 3 de

[PATCH 10/17] sandbox: scmi: Indicate dead code for coverity

2021-05-08 Thread Simon Glass
This code is not used due to the value of SCMI_TEST_DEVICES_RD_COUNT. However, it might increase one day, so add an annotation for coverity to quieten the warning. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 312942) --- drivers/firmware/scmi/sandbox-scmi_devices.c | 1 + 1 file chang

[PATCH 08/17] test: Avoid random numbers in dm_test_devm_regmap()

2021-05-08 Thread Simon Glass
There is no good reason to use a sequence from rand() here. We may as well invent our own sequence. This should molify Coverity which does not use rand() being used. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 312949) --- test/dm/regmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 d

[PATCH 05/17] tools: Avoid showing return value of clock_gettime()

2021-05-08 Thread Simon Glass
This value is either 0 for success or -1 for error. Coverity reports that "ret" is passed to a parameter that cannot be negative, pointing to the condition 'if (ret < 0)'. Adjust it to just check for non-zero and avoid showing -1 in the error message, which is pointless. Perhaps these changes will

[PATCH 07/17] reset: Avoid a warning in devm_regmap_init()

2021-05-08 Thread Simon Glass
The devres_alloc() function is intended to avoid the need for freeing memory, although in practice it may not be enabled, thus leading to a true leak. Nevertheless this is intended. Add a comment to molify Coverity. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 312951) --- drivers/cor

[PATCH 03/17] sandbox: Indicate NULL-pointer access in 'sigsegv' command

2021-05-08 Thread Simon Glass
This is intended to crash. Add an annotation to keep coverity happy. Reported-by: Coverity (CID: 316347) Signed-off-by: Simon Glass --- cmd/sandbox/exception.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/sandbox/exception.c b/cmd/sandbox/exception.c index 1aa1d673aed..d865922e863

[PATCH 06/17] reset: Avoid a warning in devm_reset_bulk_get_by_node()

2021-05-08 Thread Simon Glass
The devres_alloc() function is intended to avoid the need for freeing memory, although in practice it may not be enabled, thus leading to a true leak. Nevertheless this is intended. Add a comment to molify Coverity. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 312952) --- drivers/res

[PATCH 04/17] test: Rename final check in setexpr_test_backref()

2021-05-08 Thread Simon Glass
The bug in setexpr is fixed now, so this test can be enabled. Reported-by: Coverity (CID: 316346) Signed-off-by: Simon Glass --- test/cmd/setexpr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/cmd/setexpr.c b/test/cmd/setexpr.c index c537e893538..08b6e6e7243 100644 --- a/test/cmd/

[PATCH 00/17] Fix various coverity warnings

2021-05-08 Thread Simon Glass
This series includes fixes for various coverity warnings reported in recent months. Unfortunately I am not sure how to fix the clock problems, as the fix produces test failures, so the last two patches are marked RFC. I hope that Stephen or Jean-Jacques can take a look. Simon Glass (17): sandb

[PATCH 02/17] video: Check return value in pwm_backlight_of_to_plat()

2021-05-08 Thread Simon Glass
This cannot actually fail, but check the value anyway to keep coverity happy. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 316351) --- drivers/video/pwm_backlight.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/video/pwm_backlight.c b/drivers/video/

[PATCH 01/17] sandbox: net: Ensure host name is always a valid string

2021-05-08 Thread Simon Glass
At present if ifname is exactly IFNAMSIZ characters then it will result in an unterminated string. Fix this by using strlcpy() instead. Reported-by: Coverity (CID: 316358) Signed-off-by: Simon Glass --- drivers/net/sandbox-raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2 27/28] fs/squashfs: sqfs_read: fragmented files are not supported

2021-05-08 Thread Simon Glass
Hi, On Thu, 4 Feb 2021 at 15:32, João Marcos Costa wrote: > > > > Em qua., 27 de jan. de 2021 às 12:15, Simon Glass > escreveu: >> >> Hi Joao, > > Hello! >> >> >> >> This test works the first time I run it but fails the second time, >> since the directory already exists. This makes it necessary

[PATCH v4 2/2] log: Convert log values to printf() if not enabled

2021-05-08 Thread Simon Glass
At present if logging not enabled, log_info() becomes a nop. But we want log output at the 'info' level to be akin to printf(). Update the macro to pass the output straight to printf() in this case. This mimics the behaviour for the log_...() macros like log_debug() and log_info(), so we can drop

[PATCH v4 1/2] sandbox: log: Avoid build error with !CONFIG_LOG

2021-05-08 Thread Simon Glass
The pr_cont_test.c test requires CONFIG_LOG since it directly accesses fields in global_data that require it. Move the test into the CONFIG_LOG condition to avoid build errors. Enable CONFIG_LOG on sandbox (not sandbox_spl, etc.) so that we still run this test. This requires resyncing of the confi

[PATCH v4 0/2] log: Allow multiple lines and conversion to printf()

2021-05-08 Thread Simon Glass
At present when logging is not enabled, all log() calls become nops. This does not seem right, since if the log level is high enough then there should be some sort of message. So in that case, this series updates it to print the message if the log level is above LOGL_INFO. This mimics the behaviou

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-08 Thread Tianrui Wei
On 5/9/2021 1:39 AM, Sean Anderson wrote: On 5/8/21 1:27 PM, Tianrui Wei wrote: On 5/7/2021 10:59 AM, Sean Anderson wrote: On 5/6/21 10:57 PM, Tianrui Wei wrote: Hi Sean, Thanks for reviewing the patches, I'll fix the initialization thing and the tegra_mmc credit :P Please also add a c

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-08 Thread Tianrui Wei
On 5/8/2021 11:14 PM, Sean Anderson wrote: On 5/8/21 12:57 AM, Tianrui Wei wrote: Hi Sean, On 5/7/2021 9:03 PM, Sean Anderson wrote: On 5/6/21 11:48 PM, Tianrui Wei wrote: On 5/7/2021 11:41 AM, Sean Anderson wrote: On 5/6/21 11:28 PM, Tianrui Wei wrote: On 5/7/2021 11:15 AM, Sean Anders

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-08 Thread Tianrui Wei
On 5/9/2021 1:39 AM, Sean Anderson wrote: On 5/8/21 1:27 PM, Tianrui Wei wrote: On 5/7/2021 10:59 AM, Sean Anderson wrote: On 5/6/21 10:57 PM, Tianrui Wei wrote: Hi Sean, Thanks for reviewing the patches, I'll fix the initialization thing and the tegra_mmc credit :P Please also add a c

Re: [PATCH v2 10/11] riscv: qemu: Switch to use binman to generate u-boot.itb

2021-05-08 Thread Simon Glass
Hi Bin, On Sat, 8 May 2021 at 09:00, Bin Meng wrote: > > Hi Simon, > > On Sat, May 8, 2021 at 11:49 PM Simon Glass wrote: > > > > Hi Bin, > > > > On Sat, 8 May 2021 at 08:15, Bin Meng wrote: > > > > > > By utilizing the newly introduced BINMAN_DTB option, along with a > > > new dedicated device

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-08 Thread Sean Anderson
On 5/8/21 1:27 PM, Tianrui Wei wrote: On 5/7/2021 10:59 AM, Sean Anderson wrote: On 5/6/21 10:57 PM, Tianrui Wei wrote: Hi Sean, Thanks for reviewing the patches, I'll fix the initialization thing and the tegra_mmc credit :P Please also add a changelog to your next revision. It helps revi

Re: [PATCH V4 1/2] mmc: add OpenPiton mmc support

2021-05-08 Thread Tianrui Wei
On 5/7/2021 10:59 AM, Sean Anderson wrote: On 5/6/21 10:57 PM, Tianrui Wei wrote: Hi Sean, Thanks for reviewing the patches, I'll fix the initialization thing and the tegra_mmc credit :P Please also add a changelog to your next revision. It helps reviewers know what you have fixed. --Sea

Re: [PATCH v2 08/11] binman: Support packaging U-Boot for scenarios like OF_PRIOR_STAGE

2021-05-08 Thread Bin Meng
Hi Simon, On Sun, May 9, 2021 at 1:22 AM Simon Glass wrote: > > Hi Bin, > > On Sat, 8 May 2021 at 10:07, Bin Meng wrote: > > > > Hi Simon, > > > > On Sun, May 9, 2021 at 12:48 AM Simon Glass wrote: > > > > > > Hi Bin, > > > > > > On Sat, 8 May 2021 at 08:55, Bin Meng wrote: > > > > > > > > Hi

Re: [PATCH v2 08/11] binman: Support packaging U-Boot for scenarios like OF_PRIOR_STAGE

2021-05-08 Thread Simon Glass
Hi Bin, On Sat, 8 May 2021 at 10:07, Bin Meng wrote: > > Hi Simon, > > On Sun, May 9, 2021 at 12:48 AM Simon Glass wrote: > > > > Hi Bin, > > > > On Sat, 8 May 2021 at 08:55, Bin Meng wrote: > > > > > > Hi Simon, > > > > > > On Sat, May 8, 2021 at 11:47 PM Simon Glass wrote: > > > > > > > > Hi

Re: [PATCH v2 08/11] binman: Support packaging U-Boot for scenarios like OF_PRIOR_STAGE

2021-05-08 Thread Bin Meng
On Sun, May 9, 2021 at 12:48 AM Simon Glass wrote: > > Hi Bin, > > On Sat, 8 May 2021 at 08:55, Bin Meng wrote: > > > > Hi Simon, > > > > On Sat, May 8, 2021 at 11:47 PM Simon Glass wrote: > > > > > > Hi Bin, > > > > > > On Sat, 8 May 2021 at 08:15, Bin Meng wrote: > > > > > > > > For scenarios

Re: [PATCH v2 08/11] binman: Support packaging U-Boot for scenarios like OF_PRIOR_STAGE

2021-05-08 Thread Bin Meng
Hi Simon, On Sun, May 9, 2021 at 12:48 AM Simon Glass wrote: > > Hi Bin, > > On Sat, 8 May 2021 at 08:55, Bin Meng wrote: > > > > Hi Simon, > > > > On Sat, May 8, 2021 at 11:47 PM Simon Glass wrote: > > > > > > Hi Bin, > > > > > > On Sat, 8 May 2021 at 08:15, Bin Meng wrote: > > > > > > > > Fo

Re: [Question] Reloading pcie + nvme drivers

2021-05-08 Thread Simon Glass
Hi Brian, On Sat, 8 May 2021 at 09:34, Brian McKee wrote: > > Thanks Simon, > > The NVMe driver does work, at least for me. There are some issues with cache > and Device Tree mapping, but I think those are handled in 2021.04. > [please try to avoid posting your reply at the top] > I attempted

Re: [PATCH v2 08/11] binman: Support packaging U-Boot for scenarios like OF_PRIOR_STAGE

2021-05-08 Thread Simon Glass
Hi Bin, On Sat, 8 May 2021 at 08:55, Bin Meng wrote: > > Hi Simon, > > On Sat, May 8, 2021 at 11:47 PM Simon Glass wrote: > > > > Hi Bin, > > > > On Sat, 8 May 2021 at 08:15, Bin Meng wrote: > > > > > > For scenarios like OF_PRIOR_STAGE, no device tree blob is provided > > > in the U-Boot build

Re: [Question] Reloading pcie + nvme drivers

2021-05-08 Thread Brian McKee
Thanks Simon, The NVMe driver does work, at least for me. There are some issues with cache and Device Tree mapping, but I think those are handled in 2021.04. I attempted to add a remove function to the nvme code. I patterned it after a couple of sata drivers remove commands. It looks like this:

Re: [PATCH] riscv: Fix arch_fixup_fdt always failing without /chosen

2021-05-08 Thread Sean Anderson
On 5/8/21 12:22 PM, Bin Meng wrote: On Sun, May 9, 2021 at 12:13 AM Sean Anderson wrote: If /chosen was missing, chosen_offset would never get updated with the new /chosen node. This would cause fdt_setprop_u32 to fail. This patch fixes this by setting chosen_offset. In addition, log any error

Re: [PATCH] riscv: Fix arch_fixup_fdt always failing without /chosen

2021-05-08 Thread Bin Meng
On Sun, May 9, 2021 at 12:13 AM Sean Anderson wrote: > > If /chosen was missing, chosen_offset would never get updated with the new > /chosen node. This would cause fdt_setprop_u32 to fail. This patch fixes > this by setting chosen_offset. In addition, log any errors from setting > boot-hartid as

[PATCH] riscv: Fix arch_fixup_fdt always failing without /chosen

2021-05-08 Thread Sean Anderson
If /chosen was missing, chosen_offset would never get updated with the new /chosen node. This would cause fdt_setprop_u32 to fail. This patch fixes this by setting chosen_offset. In addition, log any errors from setting boot-hartid as well. Fixes: 177c53fe6c6 ("riscv: Move all fdt fixups together"

Re: [PATCH v2 10/11] riscv: qemu: Switch to use binman to generate u-boot.itb

2021-05-08 Thread Bin Meng
Hi Simon, On Sat, May 8, 2021 at 11:49 PM Simon Glass wrote: > > Hi Bin, > > On Sat, 8 May 2021 at 08:15, Bin Meng wrote: > > > > By utilizing the newly introduced BINMAN_DTB option, along with a > > new dedicated device tree source file for the QEMU virt target used > > for binman only, we can

Re: [PATCH v2 08/11] binman: Support packaging U-Boot for scenarios like OF_PRIOR_STAGE

2021-05-08 Thread Bin Meng
Hi Simon, On Sat, May 8, 2021 at 11:47 PM Simon Glass wrote: > > Hi Bin, > > On Sat, 8 May 2021 at 08:15, Bin Meng wrote: > > > > For scenarios like OF_PRIOR_STAGE, no device tree blob is provided > > in the U-Boot build phase hence the binman node information is not > > available. In order to s

Re: [PATCH v2 10/11] riscv: qemu: Switch to use binman to generate u-boot.itb

2021-05-08 Thread Simon Glass
Hi Bin, On Sat, 8 May 2021 at 08:15, Bin Meng wrote: > > By utilizing the newly introduced BINMAN_DTB option, along with a > new dedicated device tree source file for the QEMU virt target used > for binman only, we can now use binman to generate u-boot.itb. > > Signed-off-by: Bin Meng > > --- >

Re: [PATCH v2 08/11] binman: Support packaging U-Boot for scenarios like OF_PRIOR_STAGE

2021-05-08 Thread Simon Glass
Hi Bin, On Sat, 8 May 2021 at 08:15, Bin Meng wrote: > > For scenarios like OF_PRIOR_STAGE, no device tree blob is provided > in the U-Boot build phase hence the binman node information is not > available. In order to support such use case, a new Kconfig option > BINMAN_DTB is introduced, to tell

[PATCH v3 2/2] log: Convert log values to printf() if not enabled

2021-05-08 Thread Simon Glass
At present if logging not enabled, log_info() becomes a nop. But we want log output at the 'info' level to be akin to printf(). Update the macro to pass the output straight to printf() in this case. This mimics the behaviour for the log_...() macros like log_debug() and log_info(), so we can drop

[PATCH v3 1/2] sandbox: log: Avoid build error with !CONFIG_LOG

2021-05-08 Thread Simon Glass
The pr_cont_test.c test requires CONFIG_LOG since it directly accesses fields in global_data that require it. Move the test into the CONFIG_LOG condition to avoid build errors. Enable CONFIG_LOG on sandbox (not sandbox_spl, etc.) so that we still run this test. This requires resyncing of the confi

[PATCH v3 0/2] log: Allow multiple lines and conversion to printf()

2021-05-08 Thread Simon Glass
At present when logging is not enabled, all log() calls become nops. This does not seem right, since if the log level is high enough then there should be some sort of message. So in that case, this series updates it to print the message if the log level is above LOGL_INFO. This mimics the behaviou

[PATCH v2 11/11] riscv: Drop USE_SPL_FIT_GENERATOR

2021-05-08 Thread Bin Meng
Now that we have switched binman to generate u-boot.itb on both SiFive Unleashed and QEMU virt, USE_SPL_FIT_GENERATOR is no longer needed and can be dropped. Signed-off-by: Bin Meng --- Changes in v2: - new patch: "riscv: Drop USE_SPL_FIT_GENERATOR" arch/riscv/lib/mkimage_fit_opensbi.sh | 100

[PATCH v2 10/11] riscv: qemu: Switch to use binman to generate u-boot.itb

2021-05-08 Thread Bin Meng
By utilizing the newly introduced BINMAN_DTB option, along with a new dedicated device tree source file for the QEMU virt target used for binman only, we can now use binman to generate u-boot.itb. Signed-off-by: Bin Meng --- Changes in v2: - new patch: "riscv: qemu: Switch to use binman to gene

[PATCH v2 09/11] riscv: dts: Sort build targets in alphabetical order

2021-05-08 Thread Bin Meng
Sort the RISC-V dts build targets in alphabetical order. Signed-off-by: Bin Meng --- Changes in v2: - new patch: "riscv: dts: Sort build targets in alphabetical order" arch/riscv/dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/dts/Makefile b/arch/ri

[PATCH v2 07/11] riscv: sifive: unleashed: Switch to use binman to generate u-boot.itb

2021-05-08 Thread Bin Meng
At present SiFive Unleashed board uses the Makefile to create the FIT, using USE_SPL_FIT_GENERATOR, which is deprecated as per the Makefile warning. Update to use binman instead. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- (no changes since v1) arch/riscv/dts/binman.dtsi

[PATCH v2 08/11] binman: Support packaging U-Boot for scenarios like OF_PRIOR_STAGE

2021-05-08 Thread Bin Meng
For scenarios like OF_PRIOR_STAGE, no device tree blob is provided in the U-Boot build phase hence the binman node information is not available. In order to support such use case, a new Kconfig option BINMAN_DTB is introduced, to tell U-Boot build system that a device tree blob is explicitly requir

[PATCH v2 06/11] makefile: Pass OpenSBI blob to binman make rules

2021-05-08 Thread Bin Meng
This updates the make rules to pass OpenSBI blob to binman. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- (no changes since v1) Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 404977efa5..3d88559b67 100644 --- a/Makefile +++ b/Makefile @@ -1287,6

[PATCH v2 05/11] binman: Add support for RISC-V OpenSBI fw_dynamic blob

2021-05-08 Thread Bin Meng
Add an entry for RISC-V OpenSBI's 'fw_dynamic' firmware payload. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v2: - drop "size = <16>" in the binman node tools/binman/entries.rst | 13 + tools/binman/etype/opensbi.py | 23 +++ t

[PATCH v2 04/11] binman: test: Rename 172_fit_fdt.dts to 170_fit_fdt.dts

2021-05-08 Thread Bin Meng
Currently there are 2 binman test cases using the same 172 number. It seems that 172_fit_fdt.dts was originally named as 170_, but commit c0f1ebe9c1b9 ("binman: Allow selecting default FIT configuration") changed its name to 172_ for no reason. Let's change it back. Signed-off-by: Bin Meng Review

[PATCH v2 03/11] binman: Correct the comment for ATF entry type

2021-05-08 Thread Bin Meng
This is wrongly referring to Intel ME, which should be ATF. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- (no changes since v1) tools/binman/etype/atf_bl31.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/binman/etype/atf_bl31.py b/tools/binman/etype/atf_bl3

[PATCH v2 02/11] binman: Correct '-a' description in the doc

2021-05-08 Thread Bin Meng
It needs a space around '-a'. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- (no changes since v1) tools/binman/binman.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst index 1aa2459d50..b3df3a6428 100644 --- a/

[PATCH v2 01/11] common: kconfig: Correct a typo in SPL_LOAD_FIT

2021-05-08 Thread Bin Meng
It should be FDT, not FTD. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- (no changes since v1) common/Kconfig.boot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Kconfig.boot b/common/Kconfig.boot index 5a18d62d78..94d82c27dd 100644 --- a/common/Kconfig.boot

[PATCH v2 00/11] riscv: Switch to use binman to generate u-boot.itb

2021-05-08 Thread Bin Meng
This series updates binman to handle creation of u-boot.itb image for RISC-V boards. Changes in v2: - drop patch: "binman: test: Correct the name of 170_fit_fdt_missing_prop.dts", as it was based on a wrong version - drop patch: "makefile: Update clean rule to remove files generated by binman",

Re: [PATCH V4 2/2] riscv: board: Support OpenPiton SoC

2021-05-08 Thread Sean Anderson
On 5/8/21 12:57 AM, Tianrui Wei wrote: Hi Sean, On 5/7/2021 9:03 PM, Sean Anderson wrote: On 5/6/21 11:48 PM, Tianrui Wei wrote: On 5/7/2021 11:41 AM, Sean Anderson wrote: On 5/6/21 11:28 PM, Tianrui Wei wrote: On 5/7/2021 11:15 AM, Sean Anderson wrote: On 5/6/21 11:06 PM, Tianrui Wei wro

Re: [PATCH v3 1/2] efi_loader: expose efi_image_parse() even if UEFI Secure Boot is disabled

2021-05-08 Thread Heinrich Schuchardt
On 4/28/21 3:16 PM, Heinrich Schuchardt wrote: On 28.04.21 14:19, Masahisa Kojima wrote: /** * cmp_pe_section() - compare virtual addresses of two PE image sections * @arg1: pointer to pointer to first section header @@ -504,6 +565,9 @@ static bool efi_image_authenticate(void *efi,

[PATCH v2 12/12] RFC: display_options: Use print_hex_dump() for print_buffer()

2021-05-08 Thread Simon Glass
These two functions do similar things. When CONFIG_HEXDUMP is enabled, drop the code in print_buffer() and use the hexdump code instead. This increases the code size a little, but makes the API similar to Linux. When CONFIG_HEXDUMP is not enabled, don't do this, since presumably code size is more

[PATCH v2 11/12] log: Add support for logging a buffer

2021-05-08 Thread Simon Glass
The print_buffer() function is very useful for debugging. Add a version of this in the log system also. Signed-off-by: Simon Glass --- (no changes since v1) common/log.c| 30 ++ include/log.h | 35 +++ test/log/log_test.

[PATCH v2 10/12] display_options: Split print_buffer() into two functions

2021-05-08 Thread Simon Glass
At present print_buffer() outputs a hex dump but it is not possible to place this dump in a string. Refactor it into a top-level function which does the printing and a utility function that dumps a line into a string. This makes the code more generally useful. Signed-off-by: Simon Glass --- (no

[PATCH v2 08/12] hexdump: Support any rowsize

2021-05-08 Thread Simon Glass
At present print_hex_dump() only supports either 16- or 32-byte lines. With U-Boot we want to support any line length up to a maximum of 64. Update the function to support this, with 0 defaulting to 16, as with print_buffer(). Signed-off-by: Simon Glass --- (no changes since v1) include/hexdum

[PATCH v2 09/12] hexdump: Allow ctrl-c to interrupt output

2021-05-08 Thread Simon Glass
If a long hexdump is initated the user may wish to interrupt it. Add support for this. Signed-off-by: Simon Glass --- (no changes since v1) include/hexdump.h | 6 -- lib/hexdump.c | 13 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/include/hexdump.h b/i

[PATCH v2 06/12] hexdump: Move API to header file

2021-05-08 Thread Simon Glass
Move the comments to the header file so people can find the function info without digging in the implementation. Fix up the code style and add an enum for the first arg. Signed-off-by: Simon Glass --- (no changes since v1) include/hexdump.h | 75 - l

[PATCH v2 07/12] hexdump: Add support for sandbox

2021-05-08 Thread Simon Glass
The current implementation outputs an address as a pointer. Update the code to use an address instead, respecting the 32/64 nature of the CPU. Add some initial tests copied from print_test_display_buffer(), just the ones that can pass with the current implementation. Note that for this case print

[PATCH v2 05/12] display_options: Drop two spaces before the ASCII column

2021-05-08 Thread Simon Glass
At present with print_buffer() U-Boot shows four spaces between the hex and ASCII data. Two seems enough and matches print_hex_dump(). Change it. Signed-off-by: Simon Glass --- (no changes since v1) lib/display_options.c | 2 +- test/cmd/mem_search.c | 26 +- test/dm/r

[PATCH v2 04/12] test: Add a test for print_buffer()

2021-05-08 Thread Simon Glass
Add a test for this function, to cover the various features. Expand the expect_str length to take acount of the ~300-bytes lines generated in one case. Signed-off-by: Simon Glass --- (no changes since v1) include/test/test.h | 4 +-- test/print_ut.c | 82 ++

[PATCH v2 03/12] test: Convert print tests to use ut framework

2021-05-08 Thread Simon Glass
This test predates the test framework in U-Boot. It uses #define DEBUG and assert() to check the result. Update it to use the framework so it can report failure constitent with other tests. Signed-off-by: Simon Glass --- Changes in v2: - Drop unwanted #if at top of file include/test/suites.h |

[PATCH v2 02/12] test: Detect when expect_str is too small

2021-05-08 Thread Simon Glass
If a line of more than 256 bytes is generated, the test will fail but the reason is not clear. Add a check for this condition and print a helpful message. Signed-off-by: Simon Glass --- (no changes since v1) test/ut.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) dif

[PATCH v2 01/12] console: Report an error when output buffer is exhausted

2021-05-08 Thread Simon Glass
If the console output buffer is exhausted, characters are silently dropped from the end. Detect this condition and report an error when reading back the characters. Signed-off-by: Simon Glass --- (no changes since v1) common/console.c | 18 +++ include/asm-generic/

[PATCH v2 00/12] display_options: Start to unify print_buffer() and hexdump

2021-05-08 Thread Simon Glass
At present we have two ways of showing a hex dump. Once has been in U-Boot since the dawn of time and the other was recently added from Linux. They both have their own unique features. This series makes a few changes to bring them closer together. It also adds support for logging a buffer, which

Re: [PATCH 1/7] rtc: davinci: enable compilation for omap architectures

2021-05-08 Thread Dario Binacchi
Hi Pali, > Il 07/05/2021 09:56 Pali Rohár ha scritto: > > > On Friday 07 May 2021 06:15:02 Dario Binacchi wrote: > > The Davinci's onchip RTC is also present on TI OMAP1, AM33XX, AM43XX and > > DRA7XX SOCs. So, let's enable compilation for these architectures too. > > Hello! If it is availabl

Re: [PATCH 01/18] soc: ti: k3-socinfo: Add entry for AM64X SoC family

2021-05-08 Thread Vignesh Raghavendra
Hi, On 5/6/21 4:44 PM, Lokesh Vutla wrote: > Add support for AM64 SoC identification. > > Signed-off-by: Lokesh Vutla > --- > drivers/soc/soc_ti_k3.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/soc/soc_ti_k3.c b/drivers/soc/soc_ti_k3.c > index ecc3278cb4..9abed7d490 10

Re: [PATCH] pxe_utils: add localcmd defination

2021-05-08 Thread Ramon Fried
On Fri, Feb 26, 2021 at 3:45 PM Artem Lapkin wrote: > > pxe localboot usage too much limited, i think be useful improve it > welcome for any suggestions and feedbacks... > > 1) add localcmd defination which can used with localboot by default > localboot get from env, now we can define it in pxe sc