[U-Boot] [PATCH] block: Add SPL_BLOCK_CACHE and default n

2018-06-09 Thread Adam Ford
When enabling BLOCK_CACHE on devices with limited RAM during SPL, some devices may not boot. This creates an option to enable block caching in SPL by defaults off. It is dependent on BLOCK_CACHE and SPL_BLK Fixes: 46960ad6d09b ("block: Have BLOCK_CACHE default to y in some cases")

Re: [U-Boot] [PATCH 3/8] sandbox: Use memcpy() to move overlapping regions

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 08:22 PM, Simon Glass wrote: > The use of strcpy() to remove characters at the start of a string is safe > in U-Boot, since we know the implementation. But in os.c we are using the > C library's strcpy() function, where this behaviour is not permitted. > > Update the code to use

Re: [U-Boot] Logo for U-Boot

2018-06-09 Thread Marek Vasut
On 06/09/2018 07:34 PM, Simon Glass wrote: > Hi, > > On 6 May 2018 at 12:31, Tom Rini wrote: >> On Sun, May 06, 2018 at 09:49:42PM +0200, Alexander Graf wrote: >> >>> On 06.05.18 18:02, Heinrich Schuchardt wrote: On 05/04/2018 11:18 AM, Marek Vasut wrote: > On 05/04/2018 08:46 AM,

Re: [U-Boot] [PATCH RESEND 1/2] rockchip: make_fit_atf: use elf entry point

2018-06-09 Thread Mian Yousaf Kaukab
On 06/08/2018 08:09 PM, Dr. Philipp Tomsich wrote: Mian, Did you change anything or is this just a resend with the same content? Its a resend with the same content. Just sending both patches together. I didn’t have a chance to review this yet, so wanted to make sure I work off the latest

[U-Boot] [PATCH v3] tegra: nyan-big: Update CONFIG_SYS_TEXT to the default in README.chromium

2018-06-09 Thread Peter Robinson
To build U-Boot on a Nyan Big Chromebook the docs outline adjusting the Tegra124 defined CONFIG_SYS_TEXT_BASE but this has since been moved to individual config files. We should have the default required for U-Boot chain loading on the chromebook as the default CONFIG_SYS_TEXT_BASE and update the

Re: [U-Boot] [PATCH] sandbox_flattree: Switch to TPMv2 support

2018-06-09 Thread Miquel Raynal
Hi Simon, On Fri, 8 Jun 2018 13:59:07 -0800, Simon Glass wrote: > Hi Miquel, > > On 7 June 2018 at 23:36, Miquel Raynal wrote: > > Hi Simon, > > > > On Thu, 7 Jun 2018 16:25:28 -0800, Simon Glass wrote: > > > >> Hi Miquel, > >> > >> On 6 June 2018 at 23:38, Miquel Raynal wrote: > >> >

[U-Boot] [PATCH 5/8] fdtgrep: Separate out checking of two allocations

2018-06-09 Thread Simon Glass
The current code might succeed on the first allocation and fail on the second. Separate the checks to avoid this problem. Of course, free() will never fail and the chances that (when allocating two small areas) one will succeed and one will fail are just as remote. But this keeps coverity happy.

[U-Boot] [PATCH 8/8] sandbox: swap_case: Increase number of base address regs

2018-06-09 Thread Simon Glass
At present the code overruns the bar[] array. Fix this. Reported-by: Coverity (CID: 131199) Signed-off-by: Simon Glass --- drivers/misc/swap_case.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c index

[U-Boot] [PATCH 4/8] fdtgrep: Fix logic of free() in do_fdtgrep()

2018-06-09 Thread Simon Glass
This loop never actually exits, but the way the code is written this is not obvious. Add an explicit error check. Reported-by: Coverity (CID: 131280) Signed-off-by: Simon Glass --- tools/fdtgrep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/fdtgrep.c

[U-Boot] [PATCH 6/8] rsa: Fix missing memory leak on error in fdt_add_bignum()

2018-06-09 Thread Simon Glass
Thsi function can fail without freeing all its memory. Fix it. Reported-by: Coverity (CID: 131217) Signed-off-by: Simon Glass --- lib/rsa/rsa-sign.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index d2788bf79a..2a09d2b19e

Re: [U-Boot] [PATCH 6/8] rsa: Fix missing memory leak on error in fdt_add_bignum()

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 08:22 PM, Simon Glass wrote: > Thsi function can fail without freeing all its memory. Fix it. > > Reported-by: Coverity (CID: 131217) > Signed-off-by: Simon Glass > --- > > lib/rsa/rsa-sign.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git

Re: [U-Boot] [PATCH] block: Add SPL_BLOCK_CACHE and default n

2018-06-09 Thread Alex Kiernan
On Sat, Jun 9, 2018 at 3:04 PM Adam Ford wrote: > > On Sat, Jun 9, 2018 at 8:26 AM Alex Kiernan wrote: > > > > On Fri, Jun 8, 2018 at 9:48 PM Adam Ford wrote: > > > > > > When enabling BLOCK_CACHE on devices with limited RAM during SPL, > > > some devices may not boot. This creates an option

Re: [U-Boot] [PATCH 4/8] fdtgrep: Fix logic of free() in do_fdtgrep()

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 08:22 PM, Simon Glass wrote: > This loop never actually exits, but the way the code is written this is > not obvious. Add an explicit error check. > > Reported-by: Coverity (CID: 131280) > > Signed-off-by: Simon Glass > --- > > tools/fdtgrep.c | 4 +++- > 1 file changed, 3

Re: [U-Boot] Logo for U-Boot

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 07:34 PM, Simon Glass wrote: > Hi, > > On 6 May 2018 at 12:31, Tom Rini wrote: >> On Sun, May 06, 2018 at 09:49:42PM +0200, Alexander Graf wrote: >> >>> On 06.05.18 18:02, Heinrich Schuchardt wrote: On 05/04/2018 11:18 AM, Marek Vasut wrote: > On 05/04/2018 08:46 AM,

[U-Boot] [PATCH 0/8] Fix some coverity warnings

2018-06-09 Thread Simon Glass
This series attempts to fix various problems reported by Coverity, in subsystems where I have some knowledge. Simon Glass (8): log: Fix incorect range check in log_get_cat_name() console: Fix handling of NULL global_data sandbox: Use memcpy() to move overlapping regions fdtgrep: Fix

[U-Boot] [PATCH 1/8] log: Fix incorect range check in log_get_cat_name()

2018-06-09 Thread Simon Glass
This allows access to an element after the end of the array. Fix it. Reported-by: Coverity (CID: 173279) Signed-off-by: Simon Glass --- common/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/log.c b/common/log.c index 3b5588ebe7..4e488eca5b 100644 ---

Re: [U-Boot] [PATCH 5/8] fdtgrep: Separate out checking of two allocations

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 08:22 PM, Simon Glass wrote: > The current code might succeed on the first allocation and fail on the > second. Separate the checks to avoid this problem. > > Of course, free() will never fail and the chances that (when allocating > two small areas) one will succeed and one will

Re: [U-Boot] [PATCH] block: Add SPL_BLOCK_CACHE and default n

2018-06-09 Thread Alex Kiernan
On Fri, Jun 8, 2018 at 9:48 PM Adam Ford wrote: > > When enabling BLOCK_CACHE on devices with limited RAM during SPL, > some devices may not boot. This creates an option to enable > block caching in SPL by defaults off. It is dependant on BLOCK_CACHE > and SPL_BLK > > Fixes: 46960ad6d09b

[U-Boot] [PATCH 1/1] efi_loader: avoid initializer element is not constant

2018-06-09 Thread Heinrich Schuchardt
When building with -pedantic the current definition of EFI_GUID() causes an error 'initializer element is not constant'. Currently EFI_GUID() is used both as an anonymous constant and as an intializer. A conversion to efi_guid_t is not allowable when using EFI_GUID() as an initializer. But it is

[U-Boot] sun50i: h5: Add initial Orange Pi Zero Plus support

2018-06-09 Thread Hauke Mehrtens
Orange Pi Zero Plus is an open-source single-board computer using the Allwinner H5 SOC. H5 Orangepi Zero Plus has - Quad-core Cortex-A53 - 512MB DDR3 - micrSD slot - 16MBit SPI Nor flash - Debug TTL UART - 1GBit/s Ethernet (RTL8211E) - Wifi (RTL8189FTV) - USB 2.0 Host - USB 2.0 OTG +

Re: [U-Boot] [ANN] U-Boot v2018.05 released

2018-06-09 Thread Simon Glass
Hi Tom, On 7 May 2018 at 07:34, Tom Rini wrote: > Hey all, > > It's release day, and here we are doing the release. It's live on git > and FTP and ACD (along with the PGP sig file). > > A few things I want to call out here. First, a bunch more NXP PowerPC > boards have just been marked as

[U-Boot] [PATCH 2/8] console: Fix handling of NULL global_data

2018-06-09 Thread Simon Glass
Both putc() and puts() can be called before global_data is set up. Some of the code paths don't handle this correctly. Add an explicit test before any member is accessed. Reported-by: Coverity (CID: 169030) Signed-off-by: Simon Glass --- common/console.c | 8 ++-- 1 file changed, 6

[U-Boot] [PATCH 7/8] spi: sandbox: Fix memory leak in sandbox_sf_bind_emul()

2018-06-09 Thread Simon Glass
Move the strdup() call so that it is only done when we know we will bind the device. Reported-by: Coverity (CID: 131216) Signed-off-by: Simon Glass --- drivers/mtd/spi/sandbox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/spi/sandbox.c

[U-Boot] [PATCH 3/8] sandbox: Use memcpy() to move overlapping regions

2018-06-09 Thread Simon Glass
The use of strcpy() to remove characters at the start of a string is safe in U-Boot, since we know the implementation. But in os.c we are using the C library's strcpy() function, where this behaviour is not permitted. Update the code to use memcpy() instead. Reported-by: Coverity (CID: 173279)

Re: [U-Boot] [PATCH 2/8] console: Fix handling of NULL global_data

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 08:22 PM, Simon Glass wrote: > Both putc() and puts() can be called before global_data is set up. Some of > the code paths don't handle this correctly. Add an explicit test before > any member is accessed. > > Reported-by: Coverity (CID: 169030) > Signed-off-by: Simon Glass

Re: [U-Boot] [PATCH 7/8] spi: sandbox: Fix memory leak in sandbox_sf_bind_emul()

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 08:22 PM, Simon Glass wrote: > Move the strdup() call so that it is only done when we know we will bind > the device. > > Reported-by: Coverity (CID: 131216) > > Signed-off-by: Simon Glass > --- > > drivers/mtd/spi/sandbox.c | 6 +++--- > 1 file changed, 3 insertions(+), 3

[U-Boot] sun8i: h2: Add initial Orange Pi R1 support

2018-06-09 Thread Hauke Mehrtens
Orange Pi R1 is an open-source single-board computer using the Allwinner H2+ SOC. H2+ Orange Pi R1 has - Quad-core Cortex-A7 - 256MB DDR3 - micrSD slot - 128MBit SPI Nor flash - Debug TTL UART - 100MBit/s Ethernet (H2+) - 100MBit/s Ethernet (RTL8152B) - Wifi (RTL8189ETV) - USB 2.0 OTG +

Re: [U-Boot] [PATCH 1/8] log: Fix incorect range check in log_get_cat_name()

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 08:22 PM, Simon Glass wrote: > This allows access to an element after the end of the array. Fix it. > > Reported-by: Coverity (CID: 173279) > Signed-off-by: Simon Glass > --- > > common/log.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/log.c

[U-Boot] [PATCH v2] vboot: Do not use hashed-strings offset

2018-06-09 Thread Teddy Reed
The hashed-strings signature property includes two uint32_t values. The first is unneeded as there should never be a start offset into the strings region. The second, the size, is needed because the added signature node appends to this region. See tools/image-host.c, where a static 0 value is

Re: [U-Boot] [PATCH] block: Add SPL_BLOCK_CACHE and default n

2018-06-09 Thread Adam Ford
On Sat, Jun 9, 2018 at 8:26 AM Alex Kiernan wrote: > > On Fri, Jun 8, 2018 at 9:48 PM Adam Ford wrote: > > > > When enabling BLOCK_CACHE on devices with limited RAM during SPL, > > some devices may not boot. This creates an option to enable > > block caching in SPL by defaults off. It is

[U-Boot] [PATCH v2] vboot: Add FIT_SIGNATURE_MAX_SIZE protection

2018-06-09 Thread Teddy Reed
This adds a new config value FIT_SIGNATURE_MAX_SIZE, which controls the max size of a FIT header's totalsize field. The field is checked before signature checks are applied to protect from reading past the intended FIT regions. This field is not part of the vboot signature so it should be sanity

Re: [U-Boot] Logo for U-Boot

2018-06-09 Thread Simon Glass
Hi, On 6 May 2018 at 12:31, Tom Rini wrote: > On Sun, May 06, 2018 at 09:49:42PM +0200, Alexander Graf wrote: > >> On 06.05.18 18:02, Heinrich Schuchardt wrote: >> > On 05/04/2018 11:18 AM, Marek Vasut wrote: >> >> On 05/04/2018 08:46 AM, Alexander Graf wrote: >> >>> On 05/04/2018 01:04 AM,

Re: [U-Boot] [PATCH 8/8] sandbox: swap_case: Increase number of base address regs

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 08:22 PM, Simon Glass wrote: > At present the code overruns the bar[] array. Fix this. > > Reported-by: Coverity (CID: 131199) > > Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt ___ U-Boot mailing list U-Boot@lists.denx.de

[U-Boot] [PATCH 2/4] soc: qualcomm: Add Shared Memory Manager driver

2018-06-09 Thread Ramon Fried
The Shared Memory Manager driver implements an interface for allocating and accessing items in the memory area shared among all of the processors in a Qualcomm platform. Adapted from the Linux driver (4.17) Changes from the original Linux driver: * Removed HW spinlock mechanism, which is

[U-Boot] [PATCH 3/4] dts: db410c: added smem nodes

2018-06-09 Thread Ramon Fried
Added necessary nodes for Qualcomm smem driver. Signed-off-by: Ramon Fried --- arch/arm/dts/dragonboard410c-uboot.dtsi | 4 arch/arm/dts/dragonboard410c.dts| 16 2 files changed, 20 insertions(+) diff --git a/arch/arm/dts/dragonboard410c-uboot.dtsi

[U-Boot] [PATCH 4/4] dts: db820c: added smem nodes

2018-06-09 Thread Ramon Fried
Added necessary nodes for Qualcomm smem driver. Signed-off-by: Ramon Fried --- arch/arm/dts/dragonboard820c-uboot.dtsi | 4 arch/arm/dts/dragonboard820c.dts| 16 2 files changed, 20 insertions(+) diff --git a/arch/arm/dts/dragonboard820c-uboot.dtsi

[U-Boot] [PATCH v2] net: mvgbe: extract common code for SMI wait

2018-06-09 Thread Chris Packham
Combine repeated code from smi_reg_read/smi_reg_write into a common function smi_wait_ready. Reviewed-by: Stefan Roese Signed-off-by: Chris Packham --- Changes in v2: - collect review from Stefan - use wait_for_bit_le32() drivers/net/mvgbe.c | 47 ++---

Re: [U-Boot] [PATCH] env: Add !ENV_IS_IN_EXT4 dependency to ENV_IS_NOWHERE

2018-06-09 Thread Petr Vorel
Hi Alex, > If ENV_IS_IN_EXT4 is set you shouldn't be able to select ENV_IS_NOWHERE. > Signed-off-by: Alex Kiernan Tested-by: Petr Vorel Nice fix, thanks :) Kind regards, Petr ___ U-Boot mailing list U-Boot@lists.denx.de

Re: [U-Boot] [PATCH 2/4] soc: qualcomm: Add Shared Memory Manager driver

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 01:06 PM, Ramon Fried wrote: > The Shared Memory Manager driver implements an interface for allocating > and accessing items in the memory area shared among all of the > processors in a Qualcomm platform. > > Adapted from the Linux driver (4.17) Please, run scripts/checkpatch on

Re: [U-Boot] [PATCH 2/4] soc: qualcomm: Add Shared Memory Manager driver

2018-06-09 Thread Ramon Fried
On Sat, Jun 9, 2018 at 1:12 PM, Heinrich Schuchardt wrote: > On 06/09/2018 01:06 PM, Ramon Fried wrote: >> The Shared Memory Manager driver implements an interface for allocating >> and accessing items in the memory area shared among all of the >> processors in a Qualcomm platform. >> >> Adapted

Re: [U-Boot] [PATCH 2/4] soc: qualcomm: Add Shared Memory Manager driver

2018-06-09 Thread Ramon Fried
On Sat, Jun 9, 2018 at 1:24 PM, Heinrich Schuchardt wrote: > On 06/09/2018 01:06 PM, Ramon Fried wrote: >> The Shared Memory Manager driver implements an interface for allocating >> and accessing items in the memory area shared among all of the >> processors in a Qualcomm platform. >> >> Adapted

Re: [U-Boot] [PATCH 1/4] dm: SOC (System on chip) uclass

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 01:06 PM, Ramon Fried wrote: > This is a simple uclass for SOC drivers. > It is intend to serve as uclass for SOC specific drivers > that don't fall into any other uclass catagories. > Currently, it doesn't define any special ops. > > Signed-off-by: Ramon Fried Reviewed-by:

[U-Boot] [PATCH 0/4] Qualcomm SMEM driver

2018-06-09 Thread Ramon Fried
This patchset introduces Qualcomm's shared memory manager. In U-boot context, it will allow reading board specific information (IE. RAM address, RAM size) that was prepopulated by the SBL. As part of the patchset a new uclass id is introduced, UCLASS_SOC. The UCLASS_SOC is a class intended for

[U-Boot] [PATCH 1/4] dm: SOC (System on chip) uclass

2018-06-09 Thread Ramon Fried
This is a simple uclass for SOC drivers. It is intend to serve as uclass for SOC specific drivers that don't fall into any other uclass catagories. Currently, it doesn't define any special ops. Signed-off-by: Ramon Fried --- drivers/soc/Makefile | 1 + drivers/soc/soc-uclass.c | 8

Re: [U-Boot] Generic uclass ID

2018-06-09 Thread Ramon Fried
On Fri, Jun 8, 2018 at 2:17 AM, Simon Glass wrote: > Hi Ramon, > > On 7 June 2018 at 13:41, Ramon Fried wrote: >> On Thu, Jun 7, 2018 at 11:28 PM, Simon Glass wrote: >>> Hi Ramon, >>> >>> On 3 June 2018 at 14:32, Ramon Fried wrote: On Sat, Jun 2, 2018 at 10:19 PM, Ramon Fried wrote:

[U-Boot] [BUG] arch/x86/dts/cherryhill.dtb - unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

2018-06-09 Thread Heinrich Schuchardt
Hello Bin, tools/buildman/buildman fails with arch/x86/dts/cherryhill.dtb: Warning (avoid_unnecessary_addr_size): /pci/pch@1f,0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Would you know how to fix this? Best regards Heinrich

Re: [U-Boot] [PATCH 2/4] soc: qualcomm: Add Shared Memory Manager driver

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 01:06 PM, Ramon Fried wrote: > The Shared Memory Manager driver implements an interface for allocating > and accessing items in the memory area shared among all of the > processors in a Qualcomm platform. > > Adapted from the Linux driver (4.17) > > Changes from the original Linux

Re: [U-Boot] [BUG] arch/x86/dts/cherryhill.dtb - unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

2018-06-09 Thread Bin Meng
Hi Heinrich, On Sat, Jun 9, 2018 at 6:02 PM, Heinrich Schuchardt wrote: > Hello Bin, > > tools/buildman/buildman fails with > > arch/x86/dts/cherryhill.dtb: Warning (avoid_unnecessary_addr_size): > /pci/pch@1f,0: unnecessary #address-cells/#size-cells without "ranges" > or child "reg" property >

Re: [U-Boot] [PATCH 2/4] soc: qualcomm: Add Shared Memory Manager driver

2018-06-09 Thread Heinrich Schuchardt
On 06/09/2018 12:29 PM, Ramon Fried wrote: > On Sat, Jun 9, 2018 at 1:12 PM, Heinrich Schuchardt > wrote: >> On 06/09/2018 01:06 PM, Ramon Fried wrote: >>> The Shared Memory Manager driver implements an interface for allocating >>> and accessing items in the memory area shared among all of the

Re: [U-Boot] [PATCH v2] arm64: zynqmp: accept an absolute path for PMUFW_INIT_FILE

2018-06-09 Thread Emmanuel Vadot
On Fri, 8 Jun 2018 08:28:02 +0200 Michal Simek wrote: > On 4.6.2018 12:21, Luca Ceresoli wrote: > > The value of PMUFW_INIT_FILE is prefixed with "$(srctree)/", thus > > forcing it to be a relative path inside the U-Boot source tree. Since > > the PMUFW is a binary file generated outside of