Re: [U-Boot] Unable to saveenv to MMC

2018-12-17 Thread Lothar Waßmann
Hi, On Thu, 6 Dec 2018 10:12:11 -0800 Robin Polak wrote: > Hello. > > I'm having trouble persisting my environment variables to the SD Card > onto which I have FAT formatted and then written U-Boot to using the > following command: > > sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/disk2 bs=1024

Re: [U-Boot] [PATCH v3 8/8] cmd: env: add "-e" option for handling UEFI variables

2018-12-17 Thread Heinrich Schuchardt
On 12/18/18 6:05 AM, AKASHI Takahiro wrote: > "env [print|set] -e" allows for handling uefi variables without > knowing details about mapping to corresponding u-boot variables. > > Signed-off-by: AKASHI Takahiro Hello Takahiro, in several patch series you are implementing multiple interactive c

Re: [U-Boot] [PATCH] am57xx_evm_defconfig: Enable YMODEM support

2018-12-17 Thread Lokesh Vutla
+Tom On 17/12/18 7:57 PM, yan-...@ti.com wrote: From: Yan Liu Enable CONFIG_SPL_YMODEM_SUPPORT to support UART boot Signed-off-by: Yan Liu Reviewed-by: Lokesh Vutla Thanks and regards, Lokesh --- configs/am57xx_evm_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/config

[U-Boot] [PATCH v3 1/8] cmd: add efishell command

2018-12-17 Thread AKASHI Takahiro
Currently, there is no easy way to add or modify UEFI variables. In particular, bootmgr supports BootOrder/Boot variables, it is quite hard to define them as u-boot variables because they are represented in a complicated and encoded format. The new command, efishell, helps address these issues

[U-Boot] [PATCH v3 5/8] cmd: efishell: add memmap command

2018-12-17 Thread AKASHI Takahiro
"memmap" command prints uefi-specific memory map information. => efi memmap Type StartEnd Attributes == CONVENTIONAL 4000-7de27000 WB RUNTIME DATA 7de27000-7de

[U-Boot] [PATCH v3 0/8] cmd: add efishell for efi environment

2018-12-17 Thread AKASHI Takahiro
# This patch set contains only efishell-specific part of my original patch[1]. See also the other patch[2]. This patch set is a collection of patches to enhance efi user interfaces /commands. It will help improve user experience on efi boot and make it more usable *without* edk2's shell utility.

[U-Boot] [PATCH v3 8/8] cmd: env: add "-e" option for handling UEFI variables

2018-12-17 Thread AKASHI Takahiro
"env [print|set] -e" allows for handling uefi variables without knowing details about mapping to corresponding u-boot variables. Signed-off-by: AKASHI Takahiro --- cmd/nvedit.c | 61 ++-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git

[U-Boot] [PATCH v3 2/8] cmd: efishell: add devices command

2018-12-17 Thread AKASHI Takahiro
"devices" command prints all the uefi variables on the system. => efishell devices Device Name /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b) /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0) /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/

[U-Boot] [PATCH v3 3/8] cmd: efishell: add drivers command

2018-12-17 Thread AKASHI Takahiro
"drivers" command prints all the uefi drivers on the system. => efi drivers Driver Name Image Path (unknown) +(not found) guid: 18a031ab-b443-4d1a-a5c0-0c09261e9f71 Currently, no useful information can be printed. Signed-off-by: AKASHI Ta

[U-Boot] [PATCH v3 7/8] cmd: efishell: export uefi variable helper functions

2018-12-17 Thread AKASHI Takahiro
Those function will be used for integration with 'env' command so as to handle uefi variables. Signed-off-by: AKASHI Takahiro --- cmd/efishell.c| 38 ++ include/command.h | 4 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/cmd/efishe

[U-Boot] [PATCH v3 4/8] cmd: efishell: add images command

2018-12-17 Thread AKASHI Takahiro
"images" command prints loaded images-related information. Signed-off-by: AKASHI Takahiro --- cmd/efishell.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cmd/efishell.c b/cmd/efishell.c index ed8de9e0355d..010870df63c8 100644 --- a/cmd/efishell.c +++ b/cmd/ef

[U-Boot] [PATCH v3 6/8] cmd: efishell: add dh command

2018-12-17 Thread AKASHI Takahiro
"dh" command prints all the uefi handles used in the system. => efishell dh (T.B.D.) 0: (protocol info not available) 1: (protocol info not available) 2: (protocol info not available) 3: (protocol info not available) 4: (protocol info not available) 5: (protocol info not available) 6: (protocol inf

[U-Boot] [PATCH 2/5] efi_loader: bootmgr: allow for running a given load option

2018-12-17 Thread AKASHI Takahiro
With an extra argument, efi_bootmgr_load() can now load an efi binary based on a "Boot" variable specified. Signed-off-by: AKASHI Takahiro --- cmd/bootefi.c| 2 +- include/efi_loader.h | 3 ++- lib/efi_loader/efi_bootmgr.c | 9 - 3 files changed, 11 insertions

[U-Boot] [PATCH 3/5] cmd: bootefi: carve out fdt parameter handling

2018-12-17 Thread AKASHI Takahiro
The current way how command parameters, particularly "fdt addr," are handled makes it a bit complicated to add a subcommand-specific parameter. So just refactor the code and extract efi_handle_fdt(). This commit is a preparatory change for enhancing bootmgr sub-command. Signed-off-by: AKASHI Taka

[U-Boot] [PATCH 1/5] efi_loader: bootmgr: support BootNext and BootCurrent variable behavior

2018-12-17 Thread AKASHI Takahiro
See UEFI v2.7, section 3.1.2 for details of the specification. With my efishell command[1], you can try as the following: => efi boot add 1 SHELL ... => efi boot add 2 HELLO ... => efi boot order 1 2 => efi bootmgr (starting SHELL ...) => efi setvar BootNext =H0200 => efi bootmgr

[U-Boot] [PATCH 4/5] cmd: bootefi: run an EFI application of a specific load option

2018-12-17 Thread AKASHI Takahiro
With this patch applied, we will be able to selectively execute an EFI application by specifying a load option, say "1" for Boot0001, "2" for Boot0002 and so on. => bootefi bootmgr 1, or bootefi bootmgr - 1 Please note that Boot need not be included in "BootOrder". Signed-off-by: AKA

[U-Boot] [PATCH 5/5] cmd: run: add "-e" option to run an EFI application

2018-12-17 Thread AKASHI Takahiro
"run -e" allows for executing EFI application with a specific "Boot" variable. If no "Boot" is specified or "BootOrder" is specified, it tries to run an EFI application specified in the order of "bootOrder." Signed-off-by: AKASHI Takahiro --- cmd/bootefi.c | 2 +- cmd/nvedit.c

[U-Boot] [PATCH 0/5] efi_loader: run a specific efi application more easily

2018-12-17 Thread AKASHI Takahiro
This patch is a result from re-organizing my previous patches; a combination of [1] and part of [2] so as solely to provide several ways of executing a specific efi application explicitly. * bootmanager via BootNext variable * bootefi with boot id * run -e [1] https://lists.denx.de/pipermail

[U-Boot] [PATCH] efi_loader: move efi_init_obj_list() to a new efi_setup.c

2018-12-17 Thread AKASHI Takahiro
The function, efi_init_obj_list(), can be shared in different pseudo efi applications, like bootefi/bootmgr as well as my efishell. Moreover, it will be utilized to extend efi initialization, for example, my "removable disk support" patch and "capsule-on-disk support" patch in the future. So with

Re: [U-Boot] [PATCH v4 1/2] riscv: configs: Rename ax25-ae350 defconfig

2018-12-17 Thread Bin Meng
On Tue, Dec 18, 2018 at 11:17 AM Andes wrote: > > From: Rick Chen > > Remove cpu name from the defconfig naming. > Because other cpus maybe run on AE350 platform. > So only use platfrom name in defconfig naming > will be better. > > Also sync MAINTAINERS: > Rename > a25-ae350_32_defconfig as ae35

[U-Boot] [PATCH v4 2/2] doc: README.ae350: Sync for ax25-ae350 rename

2018-12-17 Thread Andes
From: Rick Chen Rename ax25-ae350 as ae350_rv[32|64] for 32 or 64 bit. Signed-off-by: Rick Chen Cc: Greentime Hu Reviewed-by: Bin Meng --- doc/README.ae350 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/README.ae350 b/doc/README.ae350 index fe75b80..189a6b7 100644 --

[U-Boot] [PATCH v4 1/2] riscv: configs: Rename ax25-ae350 defconfig

2018-12-17 Thread Andes
From: Rick Chen Remove cpu name from the defconfig naming. Because other cpus maybe run on AE350 platform. So only use platfrom name in defconfig naming will be better. Also sync MAINTAINERS: Rename a25-ae350_32_defconfig as ae350_rv32_defconfig ax25-ae350_64_defconfig as ae350_rv64_defconfig S

[U-Boot] [PATCH v4 0/2] Rename ax25-ae350 defconfig

2018-12-17 Thread Andes
From: Rick Chen Remove cpu name from the defconfig naming. Because other cpus maybe run on AE350 platform. So only use platfrom name in defconfig naming will be better. Changes since v3: - squashed [PATCH v3 2/3] MAINTAINERS: Sync for ax25-ae350 rename into [PATCH v3 1/3] riscv:

Re: [U-Boot] i.MX8M layout, rephrased

2018-12-17 Thread Sergey Kubushyn
On Mon, 17 Dec 2018, Sergey Kubushyn wrote: Yet another thought -- maybe it's time to move all 64-bit ARM stuff to its own arch/arm64 as it is in Linux kernel since I don't remember when? There are quite a few SoCs out there to justify such a move... I'm looking at U-Boot master tree and u-boot

[U-Boot] [PATCH] poplar: save environment at a different offset

2018-12-17 Thread Shawn Guo
From: Alex Elder Change CONFIG_ENV_OFFSET for Poplar to be 1MB further into the eMMC than before. This puts it immediately prior to the space we are reserving offset 0x20-0x40 for UEFI to save its persistent data. Define CONFIG_ENV_SIZE as a product of env_mmc_nblks and the sector size,

Re: [U-Boot] [PATCH v3 2/3] MAINTAINERS: Sync for ax25-ae350 rename

2018-12-17 Thread Rick Chen
Hi Bin Bin Meng 於 2018年12月18日 週二 上午10:50寫道: > > Hi Rick, > > On Tue, Dec 18, 2018 at 10:23 AM Rick Chen wrote: > > > > Hi Bin > > > > Bin Meng 於 2018年12月18日 週二 上午10:12寫道: > > > > > > Hi Rick, > > > > > > On Tue, Dec 18, 2018 at 9:51 AM Andes wrote: > > > > > > > > From: Rick Chen > > > > > >

Re: [U-Boot] [PATCH v3 2/3] MAINTAINERS: Sync for ax25-ae350 rename

2018-12-17 Thread Bin Meng
Hi Rick, On Tue, Dec 18, 2018 at 10:23 AM Rick Chen wrote: > > Hi Bin > > Bin Meng 於 2018年12月18日 週二 上午10:12寫道: > > > > Hi Rick, > > > > On Tue, Dec 18, 2018 at 9:51 AM Andes wrote: > > > > > > From: Rick Chen > > > > > > Rename > > > a25-ae350_32_defconfig as ae350_rv32_defconfig > > > ax25-ae

Re: [U-Boot] [PATCH v3 2/3] MAINTAINERS: Sync for ax25-ae350 rename

2018-12-17 Thread Rick Chen
Hi Bin Bin Meng 於 2018年12月18日 週二 上午10:12寫道: > > Hi Rick, > > On Tue, Dec 18, 2018 at 9:51 AM Andes wrote: > > > > From: Rick Chen > > > > Rename > > a25-ae350_32_defconfig as ae350_rv32_defconfig > > ax25-ae350_64_defconfig as ae350_rv64_defconfig > > > > Signed-off-by: Rick Chen > > Cc: Green

Re: [U-Boot] [PATCH v3 3/3] doc: README.ae350: Sync for ax25-ae350 rename

2018-12-17 Thread Bin Meng
On Tue, Dec 18, 2018 at 9:51 AM Andes wrote: > > From: Rick Chen > > Rename > ax25-ae350 as ae350_rv[32|64] for 32 or 64 bit. > > Signed-off-by: Rick Chen > Cc: Greentime Hu > --- > doc/README.ae350 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Bin Meng _

Re: [U-Boot] [PATCH v3 2/3] MAINTAINERS: Sync for ax25-ae350 rename

2018-12-17 Thread Bin Meng
Hi Rick, On Tue, Dec 18, 2018 at 9:51 AM Andes wrote: > > From: Rick Chen > > Rename > a25-ae350_32_defconfig as ae350_rv32_defconfig > ax25-ae350_64_defconfig as ae350_rv64_defconfig > > Signed-off-by: Rick Chen > Cc: Greentime Hu > --- > board/AndesTech/ax25-ae350/MAINTAINERS | 5 ++--- > 1

[U-Boot] i.MX8M layout, rephrased

2018-12-17 Thread Sergey Kubushyn
I'm looking at U-Boot master tree and u-boot-imx repository. What we have now is quite a mess for i.MX8M. In master we have the following directories: arch/arm/mach-imx/imx8 arch/arm/mach-imx/mx8m arch/arm/include/asm/arch-imx8 arch/arm/include/asm/arch-mx8m In

[U-Boot] [PATCH v3 3/3] doc: README.ae350: Sync for ax25-ae350 rename

2018-12-17 Thread Andes
From: Rick Chen Rename ax25-ae350 as ae350_rv[32|64] for 32 or 64 bit. Signed-off-by: Rick Chen Cc: Greentime Hu --- doc/README.ae350 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/README.ae350 b/doc/README.ae350 index fe75b80..189a6b7 100644 --- a/doc/README.ae350 ++

[U-Boot] [PATCH v3 2/3] MAINTAINERS: Sync for ax25-ae350 rename

2018-12-17 Thread Andes
From: Rick Chen Rename a25-ae350_32_defconfig as ae350_rv32_defconfig ax25-ae350_64_defconfig as ae350_rv64_defconfig Signed-off-by: Rick Chen Cc: Greentime Hu --- board/AndesTech/ax25-ae350/MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/board/AndesTech/a

[U-Boot] [PATCH v3 1/3] riscv: configs: Rename ax25-ae350 defconfig

2018-12-17 Thread Andes
From: Rick Chen Remove cpu name from the defconfig naming. Because other cpus maybe run on AE350 platform. So only use platfrom name in defconfig naming will be better. Signed-off-by: Rick Chen Cc: Greentime Hu Reviewed-by: Bin Meng --- configs/a25-ae350_32_defconfig | 36 --

[U-Boot] [PATCH v3 0/3] Rename ax25-ae350 defconfig

2018-12-17 Thread Andes
From: Rick Chen Remove cpu name from the defconfig naming. Because other cpus maybe run on AE350 platform. So only use platfrom name in defconfig naming will be better. Changes since v2: - Fix travis failure case 6.51 Checkfor configs without MAINTAINERS entry. https://travis-ci.org/rickchen

[U-Boot] [ANN] U-Boot v2019.01-rc2 released

2018-12-17 Thread Tom Rini
Hey all, So it's release day and I've put up v2019.01-rc2, I've updated git and the tarballs are also up now. Thanks again to having signed tags, between -rc1 and -rc2 we have (including but not limited to): - Various important DT syncs with Linux - Risc-V S-Mode - Important NAND/MTD fixups - TPM

Re: [U-Boot] [PATCH] omap3: beagle: Enable DM_MMC and BLK for u-boot only, not SPL

2018-12-17 Thread Tom Rini
On Mon, Dec 17, 2018 at 01:34:53PM -0600, Adam Ford wrote: > On Mon, Dec 17, 2018 at 11:04 AM Guillaume Gardet > wrote: > > > > > > Le 21/11/2018 à 18:06, Tom Rini a écrit : > > > On Wed, Nov 21, 2018 at 04:13:20PM +0100, Guillaume GARDET wrote: > > > > > >> Also disable USB_STORAGE as it is not r

Re: [U-Boot] [PATCH v3 0/5] Add support for MIPS Creator CI20

2018-12-17 Thread Daniel Schwierzeck
Am 16.12.18 um 23:25 schrieb Ezequiel Garcia: > A new round, addressing feedback from Daniel. > > Daniel: do you think this is acceptable as a first submission? > > v3: > * Cleanup SoC reset logic. > * Move gpio driver to SoC specific code, to be used by SPL. >A proper dm gpio driver will

Re: [U-Boot] [PATCH v4 0/7] Add support for the SoCs found in Microsemi switches

2018-12-17 Thread Daniel Schwierzeck
Am 14.12.18 um 16:16 schrieb Gregory CLEMENT: > Hello, > > For the record this the fourth version of the series adding the > support of 2 SoCs: Ocelot and Luton from Microsemi. Both of them > belongs to the same family Vcore III. > > We found them on various advanced switches product. > > The

[U-Boot] [PATCH 1/1] efi_loader: struct efi_configuration_table

2018-12-17 Thread Heinrich Schuchardt
Commit 393fccdf6c73 ("efi_loader: efi_guid_t must be 64-bit aligned") has changed the alignment of efi_guid_t. This changed the size of struct efi_configuration_table on 32-bit systems form 20 to 24 bytes. As an array of this type is pointed to by the system table this breaks compatibility with exi

Re: [U-Boot] [PATCH 1/1] efi_loader: efi_guid_t must be 64-bit aligned

2018-12-17 Thread Heinrich Schuchardt
On 12/16/18 10:32 AM, Ard Biesheuvel wrote: > On Sat, 15 Dec 2018 at 22:40, Heinrich Schuchardt wrote: >> >> The UEFI Specification Version 2.7 Errata A defines: >> >> "EFI_GUID >> 128-bit buffer containing a unique identifier value. >> Unless otherwise specified, aligned on a 64-bit boundary." >>

Re: [U-Boot] Unable to saveenv to MMC

2018-12-17 Thread Robin Polak
The output I'm getting is: => ls mmc 0:0 ** Unrecognized filesystem type ** On Sun, Dec 9, 2018 at 1:43 AM wrote: > just try the ls-command i wrote in uboot-console ;) > > > Gesendet: Sonntag, 09. Dezember 2018 um 04:20 Uhr > Von: "Robin Polak" > An: fran...@public-files.de > Cc: u-boot@lists

Re: [U-Boot] [PATCH v8 10/10] arm: bootm: fix sp detection at end of address range

2018-12-17 Thread Stephen Warren
On 12/17/18 1:08 PM, Simon Goldschmidt wrote: This fixes 'arch_lmb_reserve()' for ARM that tries to detect in which DRAM bank 'sp' is in. This code failed if a bank was at the end of physical address range (i.e. size + length overflowed to 0). To fix this, calculate 'bank_end' as 'size + lengt

Re: [U-Boot] [PATCH] omap3: beagle: Enable DM_MMC and BLK for u-boot only, not SPL

2018-12-17 Thread Adam Ford
On Mon, Dec 17, 2018 at 1:34 PM Adam Ford wrote: > > On Mon, Dec 17, 2018 at 11:04 AM Guillaume Gardet > wrote: > > > > > > Le 21/11/2018 à 18:06, Tom Rini a écrit : > > > On Wed, Nov 21, 2018 at 04:13:20PM +0100, Guillaume GARDET wrote: > > > > > >> Also disable USB_STORAGE as it is not ready fo

[U-Boot] [PATCH 2/2] USB: musb-new: omap2430: Add hooks for Peripheral support.

2018-12-17 Thread Adam Ford
Borrowing from the updates to ti-musb.c, this glue layer checks to see if the MUSB controller is gadget or host. Going under the assumpution there is only one MUSB controller, this only builds either the host probe or the gadget probe. OTG would be preferred, but it doesn't appear to be working y

[U-Boot] [PATCH 1/2] USB: musb-new: omap2430: Prep driver for Peripheral support.

2018-12-17 Thread Adam Ford
The omap2430 driver only currently supports host only. In preparation for supporting peripheral mode, this patch makes the driver support only the host by creating a ofdata_to_platdata function host/peripheral agnostic with a host helper version. Signed-off-by: Adam Ford diff --git a/drivers/us

[U-Boot] [PATCH v8 08/10] lmb: remove unused extern declaration

2018-12-17 Thread Simon Goldschmidt
lmb.h includes an extern declaration of "struct lmb lmb;" which is not used anywhere, so remove it. Signed-off-by: Simon Goldschmidt --- Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v2: - this patch is new in v2 include/lmb.h |

[U-Boot] [PATCH v8 06/10] fs: prevent overwriting reserved memory

2018-12-17 Thread Simon Goldschmidt
This fixes CVE-2018-18440 ("insufficient boundary checks in filesystem image load") by using lmb to check the load size of a file against reserved memory addresses. Signed-off-by: Simon Goldschmidt --- Changes in v8: None Changes in v7: None Changes in v6: - fixed NULL pointer access in 'fdt_blo

[U-Boot] [PATCH v8 09/10] tftp: prevent overwriting reserved memory

2018-12-17 Thread Simon Goldschmidt
This fixes CVE-2018-18439 ("insufficient boundary checks in network image boot") by using lmb to check for a valid range to store received blocks. Signed-off-by: Simon Goldschmidt --- Changes in v8: None Changes in v7: - fix compiling without CONFIG_LMB Changes in v6: None Changes in v5: None C

[U-Boot] [PATCH v8 10/10] arm: bootm: fix sp detection at end of address range

2018-12-17 Thread Simon Goldschmidt
This fixes 'arch_lmb_reserve()' for ARM that tries to detect in which DRAM bank 'sp' is in. This code failed if a bank was at the end of physical address range (i.e. size + length overflowed to 0). To fix this, calculate 'bank_end' as 'size + length - 1' so that such banks end at 0x, not

[U-Boot] [PATCH v8 07/10] bootm: use new common function lmb_init_and_reserve

2018-12-17 Thread Simon Goldschmidt
This reduces duplicate code only. Signed-off-by: Simon Goldschmidt --- Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v2: None common/bootm.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/common/bootm

[U-Boot] [PATCH v8 05/10] lib: lmb: extend lmb for checks at load time

2018-12-17 Thread Simon Goldschmidt
This adds two new functions, lmb_alloc_addr and lmb_get_unreserved_size. lmb_alloc_addr behaves like lmb_alloc, but it tries to allocate a pre-specified address range. Unlike lmb_reserve, this address range must be inside one of the memory ranges that has been set up with lmb_add. lmb_get_unreser

[U-Boot] [PATCH v8 04/10] fdt: parse "reserved-memory" for memory reservation

2018-12-17 Thread Simon Goldschmidt
boot_fdt_add_mem_rsv_regions() adds reserved memory sections to an lmb struct. Currently, it only parses regions described by /memreserve/ entries. Extend this to the more commonly used scheme of the "reserved-memory" node. Signed-off-by: Simon Goldschmidt --- Changes in v8: None Changes in v7:

[U-Boot] [PATCH v8 03/10] lib: lmb: reserving overlapping regions should fail

2018-12-17 Thread Simon Goldschmidt
lmb_add_region handles overlapping regions wrong: instead of merging or rejecting to add a new reserved region that overlaps an existing one, it just adds the new region. Since internally the same function is used for lmb_alloc, change lmb_add_region to reject overlapping regions. Also, to keep r

[U-Boot] [PATCH v8 02/10] lmb: fix allocation at end of address range

2018-12-17 Thread Simon Goldschmidt
The lmb code fails if base + size of RAM overflows to zero. Fix this by calculating end as 'base + size - 1' instead of 'base + size' where appropriate. Added tests to assert this is fixed. Signed-off-by: Simon Goldschmidt --- Changes in v8: None Changes in v7: None Changes in v6: None Changes

[U-Boot] [PATCH v8 01/10] test: add test for lib/lmb.c

2018-12-17 Thread Simon Goldschmidt
Add basic tests for the lmb memory allocation code used to reserve and allocate memory during boot. Signed-off-by: Simon Goldschmidt --- Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: - this patch is new in v5 Changes in v4: None Changes in v2: None test/lib/Makefi

Re: [U-Boot] [PATCH v7 0/9] Fix CVE-2018-18440 and CVE-2018-18439

2018-12-17 Thread Simon Goldschmidt
Am 17.12.2018 um 20:06 schrieb Simon Goldschmidt: This series fixes CVE-2018-18440 ("insufficient boundary checks in filesystem image load") by adding restrictions to the 'load' command and fixes CVE-2018-18439 ("insufficient boundary checks in network image boot") by adding restrictions to the t

Re: [U-Boot] [PATCH] omap3: beagle: Enable DM_MMC and BLK for u-boot only, not SPL

2018-12-17 Thread Adam Ford
On Mon, Dec 17, 2018 at 11:04 AM Guillaume Gardet wrote: > > > Le 21/11/2018 à 18:06, Tom Rini a écrit : > > On Wed, Nov 21, 2018 at 04:13:20PM +0100, Guillaume GARDET wrote: > > > >> Also disable USB_STORAGE as it is not ready for the switch. > >> Tested on a Beagleboard xM rev. B. > >> > >> Sign

[U-Boot] [PATCH v2] image: fix compiling without CMD_FDT

2018-12-17 Thread Simon Goldschmidt
Booting an image currently sets the environment variable "fdtaddr" by calling into 'cmd/fdt.c'. As a result, linking U-Boot fails if CMD_FDT is not enabled. Fix this by adding 'if (CONFIG_IS_ENABLED(CMD_FDT))' to the two places where 'set_working_fdt_addr()' is called. Signed-off-by: Simon Gold

[U-Boot] [PATCH v2] image: fix compiling without CMD_FDT

2018-12-17 Thread Simon Goldschmidt
From: Simon Goldschmidt Booting an image currently sets the environment variable "fdtaddr" by calling into 'cmd/fdt.c'. As a result, linking U-Boot fails if CMD_FDT is not enabled. Fix this by adding 'if (CONFIG_IS_ENABLED(CMD_FDT))' to the two places where 'set_working_fdt_addr()' is called. S

[U-Boot] [PATCH v7 8/9] lmb: remove unused extern declaration

2018-12-17 Thread Simon Goldschmidt
lmb.h includes an extern declaration of "struct lmb lmb;" which is not used anywhere, so remove it. Signed-off-by: Simon Goldschmidt --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v2: - this patch is new in v2 include/lmb.h | 2 -- 1 file changed

[U-Boot] [PATCH v7 4/9] fdt: parse "reserved-memory" for memory reservation

2018-12-17 Thread Simon Goldschmidt
boot_fdt_add_mem_rsv_regions() adds reserved memory sections to an lmb struct. Currently, it only parses regions described by /memreserve/ entries. Extend this to the more commonly used scheme of the "reserved-memory" node. Signed-off-by: Simon Goldschmidt --- Changes in v7: - fix compiling wit

[U-Boot] [PATCH v7 5/9] lib: lmb: extend lmb for checks at load time

2018-12-17 Thread Simon Goldschmidt
This adds two new functions, lmb_alloc_addr and lmb_get_unreserved_size. lmb_alloc_addr behaves like lmb_alloc, but it tries to allocate a pre-specified address range. Unlike lmb_reserve, this address range must be inside one of the memory ranges that has been set up with lmb_add. lmb_get_unreser

[U-Boot] [PATCH v7 9/9] tftp: prevent overwriting reserved memory

2018-12-17 Thread Simon Goldschmidt
This fixes CVE-2018-18439 ("insufficient boundary checks in network image boot") by using lmb to check for a valid range to store received blocks. Signed-off-by: Simon Goldschmidt --- Changes in v7: - fix compiling without CONFIG_LMB Changes in v6: None Changes in v5: None Changes in v4: - this

[U-Boot] [PATCH v7 7/9] bootm: use new common function lmb_init_and_reserve

2018-12-17 Thread Simon Goldschmidt
This reduces duplicate code only. Signed-off-by: Simon Goldschmidt --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v2: None common/bootm.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/common/bootm.c b/common/bootm.c

[U-Boot] [PATCH v7 2/9] lmb: fix allocation at end of address range

2018-12-17 Thread Simon Goldschmidt
The lmb code fails if base + size of RAM overflows to zero. Fix this by calculating end as 'base + size - 1' instead of 'base + size' where appropriate. Added tests to assert this is fixed. Signed-off-by: Simon Goldschmidt --- Changes in v7: None Changes in v6: None Changes in v5: - this patch

[U-Boot] [PATCH v7 6/9] fs: prevent overwriting reserved memory

2018-12-17 Thread Simon Goldschmidt
This fixes CVE-2018-18440 ("insufficient boundary checks in filesystem image load") by using lmb to check the load size of a file against reserved memory addresses. Signed-off-by: Simon Goldschmidt --- Changes in v7: None Changes in v6: - fixed NULL pointer access in 'fdt_blob' passed to 'boot

[U-Boot] [PATCH v7 3/9] lib: lmb: reserving overlapping regions should fail

2018-12-17 Thread Simon Goldschmidt
lmb_add_region handles overlapping regions wrong: instead of merging or rejecting to add a new reserved region that overlaps an existing one, it just adds the new region. Since internally the same function is used for lmb_alloc, change lmb_add_region to reject overlapping regions. Also, to keep r

[U-Boot] [PATCH v7 1/9] test: add test for lib/lmb.c

2018-12-17 Thread Simon Goldschmidt
Add basic tests for the lmb memory allocation code used to reserve and allocate memory during boot. Signed-off-by: Simon Goldschmidt --- Changes in v7: None Changes in v6: None Changes in v5: - this patch is new in v5 Changes in v4: None Changes in v2: None test/lib/Makefile | 1 + test/lib

[U-Boot] [PATCH v7 0/9] Fix CVE-2018-18440 and CVE-2018-18439

2018-12-17 Thread Simon Goldschmidt
This series fixes CVE-2018-18440 ("insufficient boundary checks in filesystem image load") by adding restrictions to the 'load' command and fixes CVE-2018-18439 ("insufficient boundary checks in network image boot") by adding restrictions to the tftp code. The functions from lmb.c are used to setup

Re: [U-Boot] [PATCH] tools: zynqmpimage: round up partition size

2018-12-17 Thread Michael Tretter
On Mon, 17 Dec 2018 14:27:38 +0100, Michal Simek wrote: > On 03. 12. 18 14:42, Alexander Graf wrote: > > On 03.12.18 14:14, Michal Simek wrote: > >> +Alex > >> > >> On 28. 11. 18 11:47, Michael Tretter wrote: > >>> The FSBL copies "Total Partition Word Length" * 4 bytes from the boot.bin, > >>>

Re: [U-Boot] [PATCH] omap3: beagle: Enable DM_MMC and BLK for u-boot only, not SPL

2018-12-17 Thread Guillaume Gardet
Le 21/11/2018 à 18:06, Tom Rini a écrit : On Wed, Nov 21, 2018 at 04:13:20PM +0100, Guillaume GARDET wrote: Also disable USB_STORAGE as it is not ready for the switch. Tested on a Beagleboard xM rev. B. Signed-off-by: Guillaume GARDET Cc: Tom Rini Cc: Simon Glass In the case of USB_STORA

Re: [U-Boot] [BeagleBone Black] Possible bug in U-Boot efi loader for BeagleBone Black

2018-12-17 Thread Heinrich Schuchardt
On 12/14/18 9:15 PM, Heinrich Schuchardt wrote: > On 12/14/18 3:58 PM, Dominik Adamski wrote: >> On 12/12/18 7:11 PM, Heinrich Schuchardt wrote: >>> On 12/12/18 3:02 PM, Dominik Adamski wrote: Hello, I think that I have found a bug in U-Boot UEFI implementation for BeagleBone Black b

[U-Boot] [PATCH] Add an empty stdint.h file

2018-12-17 Thread Simon Glass
Some libraries build by U-Boot may include stdint.h. This is not used by U-Boot itself and causes conflicts with the types defined in linux/types.h. To work around this, add an empty file with this name so that it will be used in preference to the compiler version. Signed-off-by: Simon Glass ---

[U-Boot] [PATCH] sandbox: Correct SDL build flags

2018-12-17 Thread Simon Glass
The check for CONFIG_SANDBOX_SDL in config.mk does not work since the build config is not available by the time that file is included. Remove it so that we always call sdl-config except when NO_SDL is used. Signed-off-by: Simon Glass --- arch/sandbox/config.mk | 2 -- arch/sandbox/cpu/sdl.c | 2

[U-Boot] [PULL] Please pull u-boot-imx: u-boot-imx-20181217

2018-12-17 Thread Stefano Babic
Hi Tom, please pull from u-boot-imx, u-boot-imx-20181217, thanks ! - fix missing MAINTANERS for embestmx6boards - drop Wolfgang's patch - apply V4 of "pico-imx7d: Increase the CONFIG_ENV_OFFSET size " that use fix values for size. The following chang

Re: [U-Boot] Please pull u-boot-imx: u-boot-imx-20181217

2018-12-17 Thread Stefano Babic
On 17/12/18 16:47, Fabio Estevam wrote: > Hi Stefano, > > On Mon, Dec 17, 2018 at 1:43 PM Stefano Babic wrote: >> >> Hi Tom, >> >> this is like u-boot-imx-20191214 with: >> >> - fix missing MAINTANERS for embestmx6boards >> - drop Wolfgang's patch >> - apply V3 of "pico-imx7d: Increase the CONFIG

Re: [U-Boot] Please pull u-boot-imx: u-boot-imx-20181217

2018-12-17 Thread Fabio Estevam
Hi Stefano, On Mon, Dec 17, 2018 at 1:43 PM Stefano Babic wrote: > > Hi Tom, > > this is like u-boot-imx-20191214 with: > > - fix missing MAINTANERS for embestmx6boards > - drop Wolfgang's patch > - apply V3 of "pico-imx7d: Increase the CONFIG_ENV_OFFSET size " that > use fix values for size. v3

[U-Boot] Please pull u-boot-imx: u-boot-imx-20181217

2018-12-17 Thread Stefano Babic
a32c2faa384dddc: Merge branch 'master' of git://git.denx.de/u-boot-i2c (2018-12-13 09:36:55 -0500) are available in the Git repository at: git://www.denx.de/git/u-boot-imx.git tags/u-boot-imx-20181217 for you to fetch changes up to 2e3690b18ae968ce44e72b5ff12051ad75be899e:

[U-Boot] [PATCH v4 03/10] arm: mvebu: turris_mox: Check and configure modules

2018-12-17 Thread Marek Behún
Check if Mox modules are connected in supported mode, then configure the MDIO addresses of switch modules. Signed-off-by: Marek Behún --- arch/arm/dts/armada-3720-turris-mox.dts | 11 ++ board/CZ.NIC/turris_mox/turris_mox.c| 234 +++- 2 files changed, 244 insertions(+),

[U-Boot] [PATCH v4 09/10] arm: mvebu: turris_mox: Support 1 GB version of Turris Mox

2018-12-17 Thread Marek Behún
Use get_ram_size to determine if the RAM size on Turris Mox is 512 MiB or 1 GiB. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/arm64-common.c | 4 ++-- board/CZ.NIC/turris_mox/turris_mox.c | 16 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/arm/mac

[U-Boot] [PATCH v4 06/10] watchdog: armada_37xx: Fix compliance with kernel's driver

2018-12-17 Thread Marek Behún
The Armada 37xx watchdog driver was recently accepted for mainline kernel by watchdog subsystem maintainer, but the driver works a little different than the one in U-Boot. This patch fixes this. In the previous implementation there was a tiny period of time when the watchdog was disabled and the s

[U-Boot] [PATCH v4 10/10] arm: mvebu: configs: turris_mox: Add 64 MiB of boot memory

2018-12-17 Thread Marek Behún
This is needed for some scenarios, such as booting large FIT image. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- include/configs/turris_mox.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h index 0aebe2100b..82cdccecc

[U-Boot] [PATCH v4 05/10] arm: mvebu: turris_mox: Update defconfig

2018-12-17 Thread Marek Behún
Add gpio command to defconfig - this can be used to detect whether the button is pressed or light LEDs. Add DS1307 RTC driver and the date command. Add CONFIG_WATCHDOG, so that U-Boot calls watchdog_reset. Add CONFIG_MISC_INIT_R so that ethernet addresses are read from OTP before network controller

[U-Boot] [PATCH v4 07/10] MAINTAINERS: Add entry for CZ.NIC's Turris project

2018-12-17 Thread Marek Behún
Add myself as the maintainer of CZ.NIC's Turris Omnia and Turris Mox projects. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0fb089807c..83f7d8fc08 100644 --- a/MAINTAINERS +++ b/M

[U-Boot] [PATCH v4 08/10] arm: mvebu: turris_mox: Read info (and ethaddrs) from OTP

2018-12-17 Thread Marek Behún
Add support for reading One-Time Programmable memory via mailbox, which communicates with CZ.NIC's firmware on the Secure Processor (Cortex-M3) of Armada 3720. Display product serial number and additional info, and also set MAC addresses. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese ---

[U-Boot] [PATCH v4 02/10] arm: mvebu: turris_mox: Change SERDES map depending on module topology

2018-12-17 Thread Marek Behún
When SFP module is connected directly to CPU module we want the SGMII lane speed at 1.25 Gbps. This is a temporary solution till there is a comphy driver in the kernel capable of changing SGMII speed at runtime. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_mox/t

[U-Boot] [PATCH v4 01/10] arm: mvebu: turris_mox: Cosmetic restructurization

2018-12-17 Thread Marek Behún
Restructure the board initialization source. Remove the module_topology environment variable since it won't be needed. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_mox/turris_mox.c | 136 ++- 1 file changed, 89 insertions(+), 47 deletions(

[U-Boot] [PATCH v4 04/10] arm: mvebu: dts: Fix Turris Mox device tree

2018-12-17 Thread Marek Behún
DTC issues a warning because #address-cells and #size-cells properties are not set in the mdio node. Also add ethernet1 alias. Also add RTC node. Also fix USB3 regulator startup delay time. Also fix PCI Express SERDES speed to 5 GHz (this is only cosmetic, the speed value is not used byt the comphy

[U-Boot] [PATCH v4 00/10] Changes for Turris Mox

2018-12-17 Thread Marek Behún
This is the fourth version of patches for Turris Mox. Changes from previous version: - changed patch subject prefix from board: turris_mox to arm: mvebu: turris_mox as requested by Stefan - added Reviewed-by Stefan - add description of the changes for watchdog in patch 6 - patch 9 reworked to

Re: [U-Boot] [PATCH v4 6/7] MSCC: add board support for the Luton based evaluation board

2018-12-17 Thread Gregory CLEMENT
Hi Daniel, On lun., déc. 17 2018, Daniel Schwierzeck wrote: > Am 17.12.18 um 10:55 schrieb Gregory CLEMENT: >> Hi Daniel, >> >> On dim., déc. 16 2018, Gregory CLEMENT wrote: >> >>> Hi Daniel, >>> >>> On sam., déc. 15 2018, Daniel Schwierzeck >>> wrote: >>> Am 14.12.18 um 16:16 s

Re: [U-Boot] [PATCH v4] pico-imx7d: Increase the CONFIG_ENV_OFFSET size

2018-12-17 Thread Fabio Estevam
Hi Stefano, On Mon, Dec 17, 2018 at 12:47 PM Stefano Babic wrote: > Yes, I agree with you - we could have a follow up patch when Wolfgang's > patch will be merged. Yes, I will send a follow up patch after Wolfgang's patch is accepted. Thanks ___ U-Bo

Re: [U-Boot] [PATCH v4] pico-imx7d: Increase the CONFIG_ENV_OFFSET size

2018-12-17 Thread Stefano Babic
On 17/12/18 15:13, Fabio Estevam wrote: > Hi Stefano, > > On Fri, Nov 30, 2018 at 12:52 PM Fabio Estevam wrote: >> >> U-Boot binary has grown in such a way that it goes beyond the reserved >> area for the environment variables. >> >> Running "saveenv" causes U-Boot to hang because of this overlap

[U-Boot] [PATCH] am57xx_evm_defconfig: Enable YMODEM support

2018-12-17 Thread yan-liu
From: Yan Liu Enable CONFIG_SPL_YMODEM_SUPPORT to support UART boot Signed-off-by: Yan Liu --- configs/am57xx_evm_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig index aa82830..cc814a8 100644 --- a/configs/am57xx_evm_def

Re: [U-Boot] [PATCH v4] pico-imx7d: Increase the CONFIG_ENV_OFFSET size

2018-12-17 Thread Fabio Estevam
Hi Stefano, On Fri, Nov 30, 2018 at 12:52 PM Fabio Estevam wrote: > > U-Boot binary has grown in such a way that it goes beyond the reserved > area for the environment variables. > > Running "saveenv" causes U-Boot to hang because of this overlap. > > Fix this problem by increasing the CONFIG_ENV

Re: [U-Boot] [PATCH] net: macb: fix mapping of registers

2018-12-17 Thread Ramon Fried
On Mon, Dec 17, 2018 at 2:08 PM Daniel Schwierzeck wrote: > > > > Am 17.12.18 um 02:01 schrieb Ramon Fried: > > Some architectures (MIPS) needs mapping to access IOMEM. > > Fix that. > > > > Fixes: f1dcc19b213d ("net: macb: Convert to driver model") > > > > Signed-off-by: Ramon Fried > > --- > >

Re: [U-Boot] arm: ti: boot: Increase system partition size

2018-12-17 Thread Tom Rini
On Tue, Dec 11, 2018 at 06:20:21PM +0200, Sam Protsenko wrote: > Android code base is growing, so since Android "Pie" the size of > system.img grew up to be about 740 MiB. Let's increase system.img to > 1 GiB to accommodate for those changes and leave some margin for future > changes. We don't wan

[U-Boot] [RFC PATCH] bitops: Fix GENMASK definition for Sandbox

2018-12-17 Thread Vignesh R
In arch/sandbox/include/asm/types.h we have Therefore for 32 bit Sandbox build BITS_PER_LONG turns out to be 32 as CONFIG_PHYS64 is not set This messes up the current logic of GENMASK macro due to mismatch b/w size of unsigned long (64 bit) and that of BITS_PER_LONG. Fix this by using CONFIG_SANDB

[U-Boot] [PATCH v3 7/8] rockchip: rk3399-puma: enable full pinctrl driver in Puma defconfig.

2018-12-17 Thread Christoph Muellner
This patch enables the full pinctrl driver in the defconfig for the RK3399-Q7. Signed-off-by: Christoph Muellner --- Changes in v3: None Changes in v2: None configs/puma-rk3399_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_def

[U-Boot] [PATCH v3 5/8] rockchip: rk3399: Add improved pinctrl driver.

2018-12-17 Thread Christoph Muellner
The current pinctrl driver for the RK3399 has a range of qulity issues. E.g. it only implements the .set_state_simple() callback, it does not parse the available pinctrl information from the DTS (instead uses hardcoded values), is not flexible enough to cover devices without 'interrupt' field in th

  1   2   >