Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 08:25:56PM +0200, Heinrich Schuchardt wrote: > On 5/13/21 10:18 AM, Masami Hiramatsu wrote: > > 2021年5月13日(木) 16:24 AKASHI Takahiro : > > > > > > > > > BTW, IMHO, if u-boot.bin can not find the ESL in the device tree, > > > > > > > it should skip authentication too. > > > >

Re: [PATCH 1/1] sandbox: ensure that state->ram_buf is in low memory

2021-05-13 Thread Heinrich Schuchardt
On 5/14/21 1:56 AM, Simon Glass wrote: Hi Heinrich, On Thu, 13 May 2021 at 08:53, Heinrich Schuchardt wrote: On 5/13/21 4:36 PM, Simon Glass wrote: Hi Heinrich, On Wed, 12 May 2021 at 15:28, Heinrich Schuchardt wrote: Am 12. Mai 2021 18:01:17 MESZ schrieb Simon Glass : Hi Heinrich, On

Re: [PATCH] Revert "riscv: cpu: fu740: clear feature disable CSR"

2021-05-13 Thread Rick Chen
> From: Bin Meng > Sent: Friday, May 14, 2021 11:50 AM > To: Green Wan > Cc: Rick Jian-Zhi Chen(陳建志) ; Sean Anderson > ; U-Boot Mailing List > Subject: Re: [PATCH] Revert "riscv: cpu: fu740: clear feature disable CSR" > > On Fri, May 14, 2021 at 11:45 AM Green Wan wrote: > > > > Hi Bin, > > >

Re: [PATCH 1/2] reset: Do not return NULL on error for devm_reset_control_get_optional()

2021-05-13 Thread Kishon Vijay Abraham I
Hi Simon, On 14/05/21 5:26 am, Simon Glass wrote: > Hi Kishon, > > On Thu, 13 May 2021 at 00:15, Kishon Vijay Abraham I wrote: >> >> Hi Simon, >> >> On 11/05/21 10:09 pm, Simon Glass wrote: >>> Hi Kishon, >>> >>> On Tue, 11 May 2021 at 00:26, Kishon Vijay Abraham I wrote: Hi Simon, >>

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 07:42:04PM +0300, Ilias Apalodimas wrote: > [...] > > > > FWIW I personally don't think we should even have a config option. But > > > > even > > > > if we did it certainly must not be dictated by a hardware config. > > > > > > > > When you install distro packages you acce

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread AKASHI Takahiro
On Thu, May 13, 2021 at 06:32:13PM +0200, Heinrich Schuchardt wrote: > On 5/13/21 6:12 PM, Masami Hiramatsu wrote: > > 2021年5月13日(木) 19:27 Ilias Apalodimas : > > > > > > On Thu, May 13, 2021 at 05:38:51PM +0900, AKASHI Takahiro wrote: > > > > On Thu, May 13, 2021 at 05:18:36PM +0900, Masami Hirama

Re: [PATCH] Revert "riscv: cpu: fu740: clear feature disable CSR"

2021-05-13 Thread Bin Meng
On Fri, May 14, 2021 at 11:45 AM Green Wan wrote: > > Hi Bin, > > Thanks, I'll include that revert. Just traced back the git log. My original > patch is based on fu740. I guess it was merged to fu540 since fu740 series > wasn't present yet. > > Hi Rick, > > Not sure whether you'll pick fu740 ser

Re: [PATCH] Revert "riscv: cpu: fu740: clear feature disable CSR"

2021-05-13 Thread Green Wan
Hi Bin, Thanks, I'll include that revert. Just traced back the git log. My original patch is based on fu740. I guess it was merged to fu540 since fu740 series wasn't present yet. Hi Rick, Not sure whether you'll pick fu740 series soon or if any parts need more revisement. Do you prefer that I ap

[PATCH v3 1/1] clk: zynq: Add clock wizard driver

2021-05-13 Thread zhengxun
The Clocking Wizard IP supports clock circuits customized to your clocking requirements. The wizard support for dynamically reconfiguring the clocking primitives for Multiply, Divide, Phase Shift/Offset, or Duty Cycle. Limited by uboot clk uclass without set_phase API, this patch only provides set

[PATCH v3 0/1] Add Xilinx clock wizard driver support

2021-05-13 Thread zhengxun
Add support to enable clock wizard for zynq platform. Changes in v3: - remove incorrect usage in of_to_plat - get frequencies via clock framework - delete incorrect naming Changes in v2: - naming is aligned with linux - delete inappropriate description and code zhengxun (1): clk: zynq: Add clo

RE: [PATCH] arm: dts: lx2162aqds: support eMMC HS400 mode on esdhc1

2021-05-13 Thread Y.b. Lu
Sent out v2 to update copyright. Any comments on v2. Thank you. > -Original Message- > From: Yangbo Lu > Sent: 2021年4月27日 16:28 > To: u-boot@lists.denx.de; Priyanka Jain ; Meenakshi > Aggarwal > Cc: Y.b. Lu > Subject: [PATCH] arm: dts: lx2162aqds: support eMMC HS400 mode on esdhc1 > >

RE: [PATCH] armv8: layerscape: enable eMMC HS400 workarounds for LX2160A/LX2162A

2021-05-13 Thread Y.b. Lu
Any comments. Thanks! > -Original Message- > From: Yangbo Lu > Sent: 2021年4月27日 16:42 > To: u-boot@lists.denx.de; Priyanka Jain ; Meenakshi > Aggarwal > Cc: Y.b. Lu > Subject: [PATCH] armv8: layerscape: enable eMMC HS400 workarounds for > LX2160A/LX2162A > > Enable eMMC HS400 workaroun

[v2] arm: dts: lx2162aqds: support eMMC HS400 mode on esdhc1

2021-05-13 Thread Yangbo Lu
Add properties related to eMMC HS400 mode for esdhc1. Signed-off-by: Yangbo Lu --- Changes for v2: - Updated copyright. --- arch/arm/dts/fsl-lx2162a-qds-sd1-17.dtsi | 8 +++- arch/arm/dts/fsl-lx2162a-qds-sd1-18.dtsi | 8 +++- arch/arm/dts/fsl-lx2162a-qds-sd1-20.dtsi | 8 +++-

Re: [PATCH 2/4] tools: mkeficapsule: remove device-tree related operation

2021-05-13 Thread Masami Hiramatsu
Hi Heinrich, 2021年5月14日(金) 2:42 Heinrich Schuchardt : > > On 5/13/21 9:13 AM, AKASHI Takahiro wrote: > > On Thu, May 13, 2021 at 07:08:12AM +0200, Heinrich Schuchardt wrote: > >> On 5/13/21 4:33 AM, AKASHI Takahiro wrote: > >>> On Wed, May 12, 2021 at 12:01:32PM +0200, Heinrich Schuchardt wrote: >

Re: [PATCH 2/4] tools: mkeficapsule: remove device-tree related operationy

2021-05-13 Thread AKASHI Takahiro
Heinrich, You are discussing two different issues: 1. if we should remove "-K/-D" options from mkeficapsule 2. if it is safe or not to store a key in device tree It makes the discussion in this thread confusing. On Thu, May 13, 2021 at 07:42:23PM +0200, Heinrich Schuchardt wrote: > On 5/13/21 9:

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

2021-05-13 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 v2 14/16] sandbox: Silence coverity warning in state_read_file()

2021-05-13 Thread Simon Glass
In this case the value seems save to pass to os_free(). Add a comment. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 165109) --- Changes in v2: - Add a standard comment instead of a Coverity annotation arch/sandbox/cpu/state.c | 4 1 file changed, 4 insertions(+) diff --git a/ar

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

2021-05-13 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 --- (no changes since v1)

[PATCH v2 12/16] pinctrl: Avoid coverity warning when checking width

2021-05-13 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. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 331154) --- Changes in v2: - Add a standard comment instead of a Coverity annotation drivers/pinctrl/pinct

[PATCH v2 13/16] tpm: Check outgoing command size

2021-05-13 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) --- (no changes since v1) lib/tpm-common.c | 5 + 1 file c

[PATCH v2 11/16] cbfs: Check offset range when reading a file

2021-05-13 Thread Simon Glass
Add a check that the offset is within the allowed range. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 331155) --- (no changes since v1) 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/

[PATCH v2 08/16] dm: core: Check uclass_get() return value when dumping

2021-05-13 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) --- (no changes since v1) drivers/core/dump.c | 7 --- 1 file changed

[PATCH v2 10/16] sandbox: cros_ec: Update error handling when reading matrix

2021-05-13 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) --- (no changes since v1) drivers/misc/cros_ec_sandbox.c | 12 +++- 1 file

[PATCH v2 09/16] sandbox: scmi: Indicate dead code for coverity

2021-05-13 Thread Simon Glass
This code is not used due to the value of SCMI_TEST_DEVICES_RD_COUNT. However, it might increase one day. Add a comment. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 312942) --- Changes in v2: - Add a standard comment instead of a Coverity annotation drivers/firmware/scmi/sandbox-scm

[PATCH v2 04/16] tools: Avoid showing return value of clock_gettime()

2021-05-13 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 v2 07/16] test: Avoid random numbers in dm_test_devm_regmap()

2021-05-13 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) --- (no changes since v1) test/dm/regmap.c | 3 +-- 1 file chang

[PATCH v2 03/16] test: Rename final check in setexpr_test_backref()

2021-05-13 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 --- (no changes since v1) 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

[PATCH v2 06/16] reset: Avoid a warning in devm_regmap_init()

2021-05-13 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. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 312951) --- Changes in v2: - Add a standard

[PATCH v2 05/16] reset: Avoid a warning in devm_reset_bulk_get_by_node()

2021-05-13 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 explain this. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 312952) --- Changes in v2:

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

2021-05-13 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. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 316358) --- Changes in v2: - Put 'Reported-by:' after the sign-off drivers/net/sandbox-raw.c | 2 +- 1

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

2021-05-13 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) --- (no changes since v1) drivers/video/pwm_backlight.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/video/pwm_backl

[PATCH 3/3] arm: dts: k3-am642-sk: Add sysreset controller node

2021-05-13 Thread Suman Anna
The AM64x SoC uses a central Device Management and Security Controller (DMSC) processor that manages all the low-level device controls including the system-wide SoC reset. The system-wide reset is managed through the system reset driver. Add a sysreset controller node as a child of the dmsc node t

[PATCH 2/3] arm: dts: k3-am642-evm: Add sysreset controller node

2021-05-13 Thread Suman Anna
The AM64x SoC uses a central Device Management and Security Controller (DMSC) processor that manages all the low-level device controls including the system-wide SoC reset. The system-wide reset is managed through the system reset driver. Add a sysreset controller node as a child of the dmsc node t

[PATCH 1/3] firmware: ti_sci: Update ti_sci_msg_req_reboot to include domain

2021-05-13 Thread Suman Anna
From: Dave Gerlach The ti_sci_msg_req_reboot message payload has been extended to include a domain field, but for the purposes of u-boot this should be zero to reset the entire SoC as it did before. Include domain for completeness and set to zero to ensure proper operation. Signed-off-by: Dave G

[PATCH 0/3] Fix 'reset' for TI K3 AM64x and J721E/J7200 boards

2021-05-13 Thread Suman Anna
Hi Lokesh, The following patches fix the 'reset' command functionality for various TI K3 SoCs. Patches are based on the latest master that includes the AM64x board support, commit ea184cbff99e ("Merge tag 'ti-v2021.07-rc3' of https://source.denx.de/u-boot/custodians/u-boot-ti";). The first patch

Re: [PATCH 1/1] sandbox: add symbol _init for RISC-V compilation

2021-05-13 Thread Bin Meng
On Fri, May 14, 2021 at 7:56 AM Simon Glass wrote: > > Hi Heinrich, > > On Thu, 13 May 2021 at 08:46, Heinrich Schuchardt wrote: > > > > The sandbox does not build on RISC-V when _init is not defined. Errors like > > the following were observed. Which function was referred to depended on the > >

[PATCH v8 3/3] efi_loader: add PE/COFF image measurement

2021-05-13 Thread Masahisa Kojima
"TCG PC Client Platform Firmware Profile Specification" requires to measure every attempt to load and execute a OS Loader(a UEFI application) into PCR[4]. This commit adds the PE/COFF image measurement, extends PCR, and appends measurement into Event Log. Acked-by: Ilias Apalodimas Tested-by: Ili

[PATCH v8 2/3] efi_loader: expose efi_image_parse() even if UEFI Secure Boot is disabled

2021-05-13 Thread Masahisa Kojima
This is preparation for PE/COFF measurement support. PE/COFF image hash calculation is same in both UEFI Secure Boot image verification and measurement in measured boot. PE/COFF image parsing functions are gathered into efi_image_loader.c, and exposed even if UEFI Secure Boot is not enabled. This

[PATCH v8 1/3] lib: introduce HASH_CALCULATE option

2021-05-13 Thread Masahisa Kojima
Build error occurs when CONFIG_EFI_SECURE_BOOT or CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, because hash-checksum.c is not compiled. Since hash_calculate() implemented in hash-checksum.c can be commonly used aside from FIT image signature verification, this commit itroduces HASH_CALCULATE option

[PATCH v8 0/3] PE/COFF measurement support

2021-05-13 Thread Masahisa Kojima
This patch series add the PE/COFF measurement support. Extending PCR and Event Log is tested with fTPM running as a OP-TEE TA. Unit test will be added in the separate series. Masahisa Kojima (3): lib: introduce HASH_CALCULATE option efi_loader: expose efi_image_parse() even if UEFI Secure Boot

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

2021-05-13 Thread Masahisa Kojima
On Fri, 14 May 2021 at 00:33, Heinrich Schuchardt wrote: > > On 5/13/21 4:48 PM, Masahisa Kojima wrote: > > This is preparation for PE/COFF measurement support. > > PE/COFF image hash calculation is same in both > > UEFI Secure Boot image verification and measurement in > > measured boot. PE/COFF

[PATCH] arm: dts: k3-j721e: Fix up MAIN R5FSS cluster mode back to Split-mode

2021-05-13 Thread Suman Anna
The default U-Boot environment variables and design are all set up for both the MAIN R5FSS clusters to be in Split-mode. This is the setting in v2021.01 U-Boot and the dt nodes are synched with the kernel binding property names in commit 468ec2f3ef8f ("remoteproc: k3_r5: Sync to upstreamed kernel D

Re: [PATCH 1/2] reset: Do not return NULL on error for devm_reset_control_get_optional()

2021-05-13 Thread Simon Glass
Hi Kishon, On Thu, 13 May 2021 at 00:15, Kishon Vijay Abraham I wrote: > > Hi Simon, > > On 11/05/21 10:09 pm, Simon Glass wrote: > > Hi Kishon, > > > > On Tue, 11 May 2021 at 00:26, Kishon Vijay Abraham I wrote: > >> > >> Hi Simon, > >> > >> On 07/05/21 10:04 pm, Simon Glass wrote: > >>> Hi Kis

Re: [PATCH 1/1] sandbox: add symbol _init for RISC-V compilation

2021-05-13 Thread Simon Glass
Hi Heinrich, On Thu, 13 May 2021 at 08:46, Heinrich Schuchardt wrote: > > The sandbox does not build on RISC-V when _init is not defined. Errors like > the following were observed. Which function was referred to depended on the > configuration. > > /usr/bin/ld: common/built-in.o: in function

Re: [PATCH 1/1] sandbox: ensure that state->ram_buf is in low memory

2021-05-13 Thread Simon Glass
Hi Heinrich, On Thu, 13 May 2021 at 08:53, Heinrich Schuchardt wrote: > > On 5/13/21 4:36 PM, Simon Glass wrote: > > Hi Heinrich, > > > > On Wed, 12 May 2021 at 15:28, Heinrich Schuchardt > > wrote: > >> > >> Am 12. Mai 2021 18:01:17 MESZ schrieb Simon Glass : > >>> Hi Heinrich, > >>> > >>> On

Re: [PATCH 3/3] hash: Allow for SHA512 hardware implementations

2021-05-13 Thread Simon Glass
Hi Heinrich, On Thu, 13 May 2021 at 09:38, Heinrich Schuchardt wrote: > > On 5/13/21 4:36 PM, Simon Glass wrote: > > Hi Heinrich, > > > > On Wed, 12 May 2021 at 15:27, Heinrich Schuchardt > > wrote: > >> > >> Am 12. Mai 2021 19:32:42 MESZ schrieb Simon Glass : > >>> Hi Heinrich, > >>> > >>> On

Re: [PATCH v2 16/50] image: Add Kconfig options for FIT in the host build

2021-05-13 Thread Simon Glass
Hi Alex, On Thu, 13 May 2021 at 10:21, Alex G. wrote: > > > > On 5/12/21 12:30 PM, Simon Glass wrote: > > Hi Alex, > > > > On Wed, 12 May 2021 at 10:18, Alex G. wrote: > >> > >> > >> > >> On 5/12/21 10:54 AM, Simon Glass wrote: > >>> Hi Alex, > >>> > >>> On Wed, 12 May 2021 at 09:48, Alex G. wr

Re: [PATCH v3] mmc: Update environment variable with active partition

2021-05-13 Thread Jaehoon Chung
On 5/14/21 7:17 AM, Reuben Dowle wrote: > >> >> Could you also update doc/usage/mmc.rst? >> > > I have sent a v4 patch that also updates the documentation. Thank you! Best Regards, Jaehoon Chung > > > [cid:4RFLogo(Custom)(2)_0f31a7de-6dd6-43cf-bc6a-a097a2b80b6

Re: [PATCH v4] mmc: Update environment variable with active partition

2021-05-13 Thread Jaehoon Chung
On 5/14/21 7:15 AM, Reuben Dowle wrote: > This patch allows uboot scripts make choices about where to boot from based > on the active mmc boot partition. This allows having two copies of kernel, > filesystems etc, and choosing which to boot from based off of the active > bootloader partition. > >

Re: [PATCH 1/1] sandbox: add symbol _init for RISC-V compilation

2021-05-13 Thread Bin Meng
On Thu, May 13, 2021 at 10:46 PM Heinrich Schuchardt wrote: > > The sandbox does not build on RISC-V when _init is not defined. Errors like > the following were observed. Which function was referred to depended on the > configuration. > > /usr/bin/ld: common/built-in.o: in function `parse_stre

RE: [PATCH v3] mmc: Update environment variable with active partition

2021-05-13 Thread Reuben Dowle
> > Could you also update doc/usage/mmc.rst? > I have sent a v4 patch that also updates the documentation.

[PATCH v4] mmc: Update environment variable with active partition

2021-05-13 Thread Reuben Dowle
This patch allows uboot scripts make choices about where to boot from based on the active mmc boot partition. This allows having two copies of kernel, filesystems etc, and choosing which to boot from based off of the active bootloader partition. Signed-off-by: Reuben Dowle --- cmd/mmc.c

Re: [PATCH v3] mmc: Update environment variable with active partition

2021-05-13 Thread Jaehoon Chung
Hi Reuben, On 5/13/21 12:40 PM, Reuben Dowle wrote: > This patch allows uboot scripts make choices about where to boot from based > on the active mmc boot partition. This allows having two copies of kernel, > filesystems etc, and choosing which to boot from based off of the active > bootloader par

Re: [PATCH] efi_loader: consider no-map property of reserved memory

2021-05-13 Thread Mark Kettenis
> From: Heinrich Schuchardt > Date: Thu, 13 May 2021 21:41:40 +0200 Hi Heinrich & Atish, > On 5/11/21 1:47 AM, Atish Patra wrote: > > On Wed, Sep 2, 2020 at 12:10 AM Heinrich Schuchardt > > wrote: > >> > >> On 31.08.20 20:08, Atish Patra wrote: > >>> On Thu, Aug 27, 2020 at 9:16 AM Heinrich Sc

Re: [EXT] [PATCH] mtd: mxs_nand: default to legacy bch and rename to modern bch option

2021-05-13 Thread han.xu
On 21/05/11 07:08AM, Sean Nyekjaer wrote: > Caution: EXT Email > > On 11/05/2021 04.49, han.xu wrote: > > On 21/05/10 12:00PM, Sean Nyekjaer wrote: > >> Caution: EXT Email > >> > >> Linux kernel defaults to use legacy bch setting, this was creating a > >> mismatch between U-boot and Linux default

[PATCH] dm: core: fix no null pointer detection in ofnode_get_addr_size_index()

2021-05-13 Thread chenguanqiao
From: Chen Guanqiao Fixed a defect of a null pointer being discovered by Coverity Scan: CID 331544: Null pointer dereferences (REVERSE_INULL) Null-checking "size" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Signed-off-by: Chen Gu

Re: 【外部邮件!】[scan-ad...@coverity.com: New Defects reported by Coverity Scan for Das U-Boot]

2021-05-13 Thread 陈冠桥
Hi Sorry, A null pointer detection is missing here, I will fix it later. On May 13, 2021, at 6:30 AM, Tom Rini mailto:tr...@konsulko.com>> wrote: - Forwarded message from scan-ad...@coverity.com - Date: Mon, 10 May 2021 21:17:32 + (UTC) From: scan-

Re: [PATCH] efi_loader: consider no-map property of reserved memory

2021-05-13 Thread Heinrich Schuchardt
On 5/11/21 1:47 AM, Atish Patra wrote: On Wed, Sep 2, 2020 at 12:10 AM Heinrich Schuchardt wrote: On 31.08.20 20:08, Atish Patra wrote: On Thu, Aug 27, 2020 at 9:16 AM Heinrich Schuchardt wrote: If a reserved memory node in the device tree has the property no-map, remove it from the UEFI m

Re: [PATCH v5 10/10] am335x: add support for cape detect functionality

2021-05-13 Thread Tom Rini
On Tue, May 04, 2021 at 07:31:30PM +0200, Kory Maincent wrote: > Update the Kconfig and the board file to make the am335x board compatible > with cape detection. > > Signed-off-by: Kory Maincent Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v5 09/10] arm: am335x: add support for i2c2 bus

2021-05-13 Thread Tom Rini
On Tue, May 04, 2021 at 07:31:29PM +0200, Kory Maincent wrote: > The am335x from BeagleBone use i2c EEPROM to detect capes. > The memory is wired to i2c bus 2 therefore it need to be enabled. > > Add i2c2 clock, pinmux description and pinmux enable function. > > Signed-off-by: Kory Maincent Ap

Re: [PATCH v5 08/10] configs: CHIP: add support for DIP detect functionality

2021-05-13 Thread Tom Rini
On Tue, May 04, 2021 at 07:31:28PM +0200, Kory Maincent wrote: > This commit enables using the extension board detection mechanism on > CHIP boards > > Signed-off-by: Kory Maincent > Acked-by: Maxime Ripard > Acked-by: Andre Przywara Applied to u-boot/master, thanks! -- Tom signature.asc

Re: [PATCH v5 06/10] w1: replace dt detection by automatic detection

2021-05-13 Thread Tom Rini
On Tue, May 04, 2021 at 07:31:26PM +0200, Kory Maincent wrote: > This patch changes the functioning of the detection of w1 devices. > The old way was a comparison between detected w1 and the ones described in > the device tree. Now it will just look for the driver matching the family > id of the w

Re: [PATCH v5 07/10] arm: sunxi: add support for DIP detection to CHIP board

2021-05-13 Thread Tom Rini
On Tue, May 04, 2021 at 07:31:27PM +0200, Kory Maincent wrote: > Add the extension_board_scan specific function to scan the information > of the EEPROM on one-wire and fill the extension struct. > Add the Kconfig symbol to enable the needs to detect DIPs. > > Signed-off-by: Kory Maincent > Revie

Re: [PATCH v5 05/10] am57xx: add support for cape detect functionality

2021-05-13 Thread Tom Rini
On Tue, May 04, 2021 at 07:31:25PM +0200, Kory Maincent wrote: > This commit enables using the extension board detection mechanism on > AM57xx based platforms. > > Signed-off-by: Kory Maincent Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v5 03/10] pytest: add sandbox test for "extension" command

2021-05-13 Thread Tom Rini
On Tue, May 04, 2021 at 07:31:23PM +0200, Kory Maincent wrote: > This commit extends the sandbox to implement a dummy > extension_board_scan() function and enables the extension command in > the sandbox configuration. It then adds a test that checks the proper > functionality of the extension comm

Re: [PATCH v5 04/10] ti/common: add support for extension_scan_board function

2021-05-13 Thread Tom Rini
On Tue, May 04, 2021 at 07:31:24PM +0200, Kory Maincent wrote: > The BeagleBone platforms all use a common mechanism to discover and > identify extension boards (called "capes"): each extension board has an > I2C-connected EEPROM describing itself. > > This patch implements a generic extension_sc

Re: [PATCH v5 02/10] cmd: add support for a new "extension" command

2021-05-13 Thread Tom Rini
On Tue, May 04, 2021 at 07:31:22PM +0200, Kory Maincent wrote: > This patch adds a new "extension" command, which aims at detecting > extension boards connected to the hardware platform, and apply the > Device Tree overlays that describe the hardware present on those > extension boards. > > In or

Re: [PATCH v5 01/10] fdt_support: move fdt_valid from cmd_fdt.c to fdt_support.c

2021-05-13 Thread Tom Rini
On Tue, May 04, 2021 at 07:31:21PM +0200, Kory Maincent wrote: > Move the fdt_valid function to fdt_support. > This changes allow to be able to test the validity of a devicetree in > other c files. > > Update code syntax. > > Signed-off-by: Kory Maincent > Reviewed-by: Tom Rini > Reviewed-by:

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread Heinrich Schuchardt
On 5/13/21 10:18 AM, Masami Hiramatsu wrote: 2021年5月13日(木) 16:24 AKASHI Takahiro : BTW, IMHO, if u-boot.bin can not find the ESL in the device tree, it should skip authentication too. In this case the capsule should be rejected (if CONFIG_EFI_CAPSULE_AUTHENTICATE=y). That's basically right.

Re: [PATCH] efi_loader: consider no-map property of reserved memory

2021-05-13 Thread Atish Patra
On Mon, May 10, 2021 at 4:47 PM Atish Patra wrote: > > On Wed, Sep 2, 2020 at 12:10 AM Heinrich Schuchardt > wrote: > > > > On 31.08.20 20:08, Atish Patra wrote: > > > On Thu, Aug 27, 2020 at 9:16 AM Heinrich Schuchardt > > > wrote: > > >> > > >> If a reserved memory node in the device tree ha

Re: [PATCH 2/4] tools: mkeficapsule: remove device-tree related operation

2021-05-13 Thread Heinrich Schuchardt
On 5/13/21 9:13 AM, AKASHI Takahiro wrote: On Thu, May 13, 2021 at 07:08:12AM +0200, Heinrich Schuchardt wrote: On 5/13/21 4:33 AM, AKASHI Takahiro wrote: On Wed, May 12, 2021 at 12:01:32PM +0200, Heinrich Schuchardt wrote: On 12.05.21 10:01, Ilias Apalodimas wrote: On Wed, May 12, 2021 at 04

Re: [PATCH 2/2] reset: Let reset API's handle gracefully if reset_ctl is -ENODATA

2021-05-13 Thread Simon Glass
Hi Kishon, On Thu, 13 May 2021 at 00:30, Kishon Vijay Abraham I wrote: > > Hi Simon, > > On 07/05/21 10:04 pm, Simon Glass wrote: > > Hi Kishon, > > > > On Fri, 7 May 2021 at 05:02, Kishon Vijay Abraham I wrote: > >> > >> Let reset API's (like reset_assert(), reset_deassert(), ..) handle > >> gr

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread Ilias Apalodimas
[...] > > > FWIW I personally don't think we should even have a config option. But > > > even > > > if we did it certainly must not be dictated by a hardware config. > > > > > > When you install distro packages you accept whatever dependencies the > > > package has. mkeficapsule is a capsule crea

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread Heinrich Schuchardt
On 5/13/21 6:12 PM, Masami Hiramatsu wrote: 2021年5月13日(木) 19:27 Ilias Apalodimas : On Thu, May 13, 2021 at 05:38:51PM +0900, AKASHI Takahiro wrote: On Thu, May 13, 2021 at 05:18:36PM +0900, Masami Hiramatsu wrote: 2021年5月13日(木) 16:24 AKASHI Takahiro : BTW, IMHO, if u-boot.bin can not find t

Re: [PATCH v2 16/50] image: Add Kconfig options for FIT in the host build

2021-05-13 Thread Alex G.
On 5/12/21 12:30 PM, Simon Glass wrote: Hi Alex, On Wed, 12 May 2021 at 10:18, Alex G. wrote: On 5/12/21 10:54 AM, Simon Glass wrote: Hi Alex, On Wed, 12 May 2021 at 09:48, Alex G. wrote: On 5/12/21 9:51 AM, Simon Glass wrote: Hi Alex, On Tue, 11 May 2021 at 13:57, Alex G. wrot

Re: [PATCH 1/4] tools: mkeficapsule: add firmwware image signing

2021-05-13 Thread Masami Hiramatsu
2021年5月13日(木) 19:27 Ilias Apalodimas : > > On Thu, May 13, 2021 at 05:38:51PM +0900, AKASHI Takahiro wrote: > > On Thu, May 13, 2021 at 05:18:36PM +0900, Masami Hiramatsu wrote: > > > 2021年5月13日(木) 16:24 AKASHI Takahiro : > > > > > > > > >> > BTW, IMHO, if u-boot.bin can not find the ESL in the dev

Re: [PATCH] fastboot: Fix overflow when calculating chunk size

2021-05-13 Thread Sean Anderson
Hi Lukasz, Can this make it into 2020.07? Thanks, --Sean On 4/16/21 5:58 PM, Sean Anderson wrote: If a chunk was larger than 4GiB, then chunk_data_sz would overflow and blkcnt would not be calculated correctly. Upgrade it to a u64 and cast its multiplicands as well. Also fix bytes_written whil

Re: Please pull u-boot-marvell/master

2021-05-13 Thread Tom Rini
On Thu, May 13, 2021 at 12:21:38PM +0200, Stefan Roese wrote: > Hi Tom, > > please pull the next batch of Marvell Armada related patches. Here the > summary log: > > > - Add base support for Marvell OcteonTX2 CN9130 DB (mostly done

Re: [PATCH 3/3] hash: Allow for SHA512 hardware implementations

2021-05-13 Thread Heinrich Schuchardt
On 5/13/21 4:36 PM, Simon Glass wrote: Hi Heinrich, On Wed, 12 May 2021 at 15:27, Heinrich Schuchardt wrote: Am 12. Mai 2021 19:32:42 MESZ schrieb Simon Glass : Hi Heinrich, On Wed, 12 May 2021 at 10:25, Heinrich Schuchardt wrote: On 12.05.21 18:05, Simon Glass wrote: Hi Heinrich, On W

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

2021-05-13 Thread Heinrich Schuchardt
On 5/13/21 4:48 PM, Masahisa Kojima wrote: This is preparation for PE/COFF measurement support. PE/COFF image hash calculation is same in both UEFI Secure Boot image verification and measurement in measured boot. PE/COFF image parsing functions are gathered into efi_image_loader.c, and exposed ev

Re: [PATCH v7 1/3] lib: introduce HASH_CALCULATE option

2021-05-13 Thread Heinrich Schuchardt
On 5/13/21 4:48 PM, Masahisa Kojima wrote: Build error occurs when CONFIG_EFI_SECURE_BOOT or CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, because hash-checksum.c is not compiled. Since hash_calculate() implemented in hash-checksum.c can be commonly used aside from FIT image signature verification

Re: [PATCH] Fix flash and erase of EMMC_BOOT2 with fastboot

2021-05-13 Thread Sean Anderson
On 5/13/21 11:07 AM, Oleh Kravchenko wrote: > Hello Sean, > I've used these commands: >> fastboot flash mmc0boot0 u-boot-o4-imx6ull-nano.bin >> fastboot flash mmc0boot1 u-boot-o4-imx6ull-nano.bin > > > But these ones, doesn't work: >> fastboot flash 0.0 u-boot-o4-imx6ull-nano.bin >> Couldn't fi

Re: [PATCH] Fix flash and erase of EMMC_BOOT2 with fastboot

2021-05-13 Thread Oleh Kravchenko
Hello Sean, I've used these commands: > fastboot flash mmc0boot0 u-boot-o4-imx6ull-nano.bin > fastboot flash mmc0boot1 u-boot-o4-imx6ull-nano.bin But these ones, doesn't work: > fastboot flash 0.0 u-boot-o4-imx6ull-nano.bin > Couldn't find partition mmc 0.0 > fastboot flash 0.1 u-boot-o4-imx6ull

Re: [PATCH] Fix flash and erase of EMMC_BOOT2 with fastboot

2021-05-13 Thread Sean Anderson
Hi, Have you considered trying to flash using e.g. flashboot flash 0.1 foo.img instead of fastboot flash boot0 ? I would like to remove these MMC_BOOT2 options but I haven't gotten around to it. On 5/12/21 6:43 PM, Oleh Kravchenko wrote: The current U-Boot version has the next matches for

Re: [PATCH v7 1/3] lib: introduce HASH_CALCULATE option

2021-05-13 Thread Heinrich Schuchardt
On 5/13/21 4:48 PM, Masahisa Kojima wrote: Build error occurs when CONFIG_EFI_SECURE_BOOT or CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, because hash-checksum.c is not compiled. Since hash_calculate() implemented in hash-checksum.c can be commonly used aside from FIT image signature verification

Re: [PATCH 1/1] sandbox: ensure that state->ram_buf is in low memory

2021-05-13 Thread Heinrich Schuchardt
On 5/13/21 4:36 PM, Simon Glass wrote: Hi Heinrich, On Wed, 12 May 2021 at 15:28, Heinrich Schuchardt wrote: Am 12. Mai 2021 18:01:17 MESZ schrieb Simon Glass : Hi Heinrich, On Tue, 11 May 2021 at 13:03, Heinrich Schuchardt wrote: Addresses in state->ram_buf must be in the low 4 GiB of t

[PATCH v7 3/3] efi_loader: add PE/COFF image measurement

2021-05-13 Thread Masahisa Kojima
"TCG PC Client Platform Firmware Profile Specification" requires to measure every attempt to load and execute a OS Loader(a UEFI application) into PCR[4]. This commit adds the PE/COFF image measurement, extends PCR, and appends measurement into Event Log. Acked-by: Ilias Apalodimas Tested-by: Ili

[PATCH v7 2/3] efi_loader: expose efi_image_parse() even if UEFI Secure Boot is disabled

2021-05-13 Thread Masahisa Kojima
This is preparation for PE/COFF measurement support. PE/COFF image hash calculation is same in both UEFI Secure Boot image verification and measurement in measured boot. PE/COFF image parsing functions are gathered into efi_image_loader.c, and exposed even if UEFI Secure Boot is not enabled. This

[PATCH v7 1/3] lib: introduce HASH_CALCULATE option

2021-05-13 Thread Masahisa Kojima
Build error occurs when CONFIG_EFI_SECURE_BOOT or CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, because hash-checksum.c is not compiled. Since hash_calculate() implemented in hash-checksum.c can be commonly used aside from FIT image signature verification, this commit itroduces HASH_CALCULATE option

[PATCH v7 0/3] PE/COFF measurement support

2021-05-13 Thread Masahisa Kojima
This patch series add the PE/COFF measurement support. Extending PCR and Event Log is tested with fTPM running as a OP-TEE TA. Unit test will be added in the separate series. Masahisa Kojima (3): lib: introduce HASH_CALCULATE option efi_loader: expose efi_image_parse() even if UEFI Secure Boot

[PATCH 1/1] sandbox: add symbol _init for RISC-V compilation

2021-05-13 Thread Heinrich Schuchardt
The sandbox does not build on RISC-V when _init is not defined. Errors like the following were observed. Which function was referred to depended on the configuration. /usr/bin/ld: common/built-in.o: in function `parse_stream_outer': /common/cli_hush.c:3175: undefined reference to `_init'

Re: [PATCH 1/1] sandbox: ensure that state->ram_buf is in low memory

2021-05-13 Thread Simon Glass
Hi Heinrich, On Wed, 12 May 2021 at 15:28, Heinrich Schuchardt wrote: > > Am 12. Mai 2021 18:01:17 MESZ schrieb Simon Glass : > >Hi Heinrich, > > > >On Tue, 11 May 2021 at 13:03, Heinrich Schuchardt > >wrote: > >> > >> Addresses in state->ram_buf must be in the low 4 GiB of the address > >space.

Re: [PATCH 3/3] hash: Allow for SHA512 hardware implementations

2021-05-13 Thread Simon Glass
Hi Heinrich, On Wed, 12 May 2021 at 15:27, Heinrich Schuchardt wrote: > > Am 12. Mai 2021 19:32:42 MESZ schrieb Simon Glass : > >Hi Heinrich, > > > >On Wed, 12 May 2021 at 10:25, Heinrich Schuchardt > >wrote: > >> > >> On 12.05.21 18:05, Simon Glass wrote: > >> > Hi Heinrich, > >> > > >> > On We

Re: [PATCH v2] Fix flashing of eMMC user area with Fastboot

2021-05-13 Thread Oleh Kravchenko
Hello guys, Could you please review this patch? > 13 трав. 2021 р. о 17:23 Oleh Kravchenko пише: > > 'gpt' and 'mmc0' fastboot partitions have been treated as the same device, > but it is wrong. > > Signed-off-by: Oleh Kravchenko > Cc: Pantelis Antoniou > Cc: Marek Vasut > --- > > drivers/

[PATCH v2] Fix flashing of eMMC user area with Fastboot

2021-05-13 Thread Oleh Kravchenko
'gpt' and 'mmc0' fastboot partitions have been treated as the same device, but it is wrong. Signed-off-by: Oleh Kravchenko Cc: Pantelis Antoniou Cc: Marek Vasut --- drivers/fastboot/fb_mmc.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/fas

[PATCH] Fix flashing of eMMC user area with Fastboot

2021-05-13 Thread Oleh Kravchenko
Signed-off-by: Oleh Kravchenko Cc: Pantelis Antoniou Cc: Marek Vasut --- drivers/fastboot/fb_mmc.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index 8e74e50e91..7e61fbac17 100644 --- a/drivers/

Re: [PATCH v6 1/3] lib: fix build error for secure boot and capsule authentication

2021-05-13 Thread Masahisa Kojima
On Thu, 13 May 2021 at 16:52, Takahiro Akashi wrote: > > On Thu, May 13, 2021 at 04:18:29PM +0900, Masahisa Kojima wrote: > > Build error occurs when CONFIG_EFI_SECURE_BOOT or > > CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, > > because hash-checksum.c is not compiled. > > > > This commit adds hash

Re: [PATCH v5 00/10] Add support for extension boards detection and DT overlays application

2021-05-13 Thread Thomas Petazzoni
On Thu, 13 May 2021 08:18:53 -0400 Tom Rini wrote: > > Do not hesitate to let us know what is needed to get this series > > considered for merging. > > Thanks for the reminder. I've fixed up a small issue with the test (it > needs to only run on sandbox and not say real hardware wit CMD_FDT)

Re: [PATCH v5 00/10] Add support for extension boards detection and DT overlays application

2021-05-13 Thread Tom Rini
On Wed, May 12, 2021 at 10:37:49PM +0200, Thomas Petazzoni wrote: > Hello Tom, > > On Tue, 4 May 2021 19:31:20 +0200 > Kory Maincent wrote: > > > Kory Maincent (10): > > fdt_support: move fdt_valid from cmd_fdt.c to fdt_support.c > > cmd: add support for a new "extension" command > > pyte

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

2021-05-13 Thread Bin Meng
Hi Sean, On Sun, May 9, 2021 at 12:24 AM Sean Anderson wrote: > > 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

  1   2   >