Re: [U-Boot] [PATCH] configs: at91: add CONFIG_OF_EMBED=y in all defconfigs

2018-11-13 Thread Eugen.Hristev
On 13.11.2018 17:04, Radu Pirea wrote: > U-boot must have dtb built in because at91bootstrap can not load it. Hello, The DTB is already appended in the image with the current defconfigs. This has been in place for our boards for a long time, and I do not see any reason for change. Anyway, not

[U-Boot] [PATCH] efi_loader: correct a function prototype of QueryCapsuleCapabilities()

2018-11-13 Thread AKASHI Takahiro
See UEFI specification v2.7, section 8.5.3. Signed-off-by: AKASHI Takahiro --- include/efi_api.h| 4 ++-- lib/efi_loader/efi_runtime.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index f0c23a28e3d6..10917bad43a7 10064

[U-Boot] [PATCH] efi_loader: SetVirtualAddressMap() should return EFI_UNSUPPORTED

2018-11-13 Thread AKASHI Takahiro
See UEFI specification 2.7, section 8.4. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index abcf03c5a42e..2c8bbb4eba4d 100644 --- a/lib/efi_loader/ef

Re: [U-Boot] [PATCH v2 3/4] arm: socfpga: stratix10: Add Stratix10 FPGA into FPGA device table

2018-11-13 Thread Ang, Chee Hong
On Thu, 2018-10-11 at 10:03 +, Marek Vasut wrote: > On 10/11/2018 08:21 AM, Ang, Chee Hong wrote: > > > > On Wed, 2018-10-10 at 12:27 +0200, Marek Vasut wrote: > > > > > > On 10/10/2018 07:30 AM, Ang, Chee Hong wrote: > > > > > > > > > > > > On Tue, 2018-10-09 at 14:48 +0200, Marek Vasut wr

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

2018-11-13 Thread Baruch Siach
Hi Ricardo, On Tue, Nov 13, 2018 at 11:42:44AM -0200, Ricardo Salveti wrote: > On Thu, Sep 6, 2018 at 12:52 PM Fabio Estevam wrote: > > On Thu, Sep 6, 2018 at 12:42 PM, Baruch Siach wrote: > > > > > I tested current master successfully on Hummingboard2 with i.MX6 Solo > > > (SOM rev 1.5): > > >

[U-Boot] [PATCH v13 2/4] efi: Split out test init/uninit into functions

2018-11-13 Thread Simon Glass
The functions in bootefi are very long because they mix high-level code and control with the low-level implementation. To help with this, create functions which handle preparing for running the test and cleaning up afterwards. Also shorten the awfully long variable names here. Signed-off-by: Simo

[U-Boot] [PATCH v13 3/4] efi: Create a function to set up for running EFI code

2018-11-13 Thread Simon Glass
There is still duplicated code in efi_loader for tests and normal operation. Add a new bootefi_run_prepare() function which holds common code used to set up U-Boot to run EFI code. Make use of this from the existing bootefi_test_prepare() function, as well as do_bootefi_exec(). Also shorten a few

[U-Boot] [PATCH v13 4/4] efi: Rename bootefi_test_finish() to bootefi_run_finish()

2018-11-13 Thread Simon Glass
This function can be used from do_bootefi_exec() so that we use mostly the same code for a normal EFI application and an EFI test. Rename the function and use it in both places. Signed-off-by: Simon Glass --- Changes in v13: - Drop 'efi_loader: Drop setup_ok' as we have an existing patch for th

[U-Boot] [PATCH v13 1/4] sandbox: smbios: Update to support sandbox

2018-11-13 Thread Simon Glass
At present this code casts addresses to pointers so cannot be used with sandbox. Update it to use mapmem instead. Signed-off-by: Simon Glass --- Changes in v13: - Update code to deal with the struct_table_address member Changes in v12: None Changes in v11: - Fix the EFI code that has since been

[U-Boot] [PATCH v13 0/4] efi_loader: Code refactoring and improvement

2018-11-13 Thread Simon Glass
This collects the patches previously sent to break up the very large functions in efi_loader into smaller pieces. Now that the other sandbox stuff is applied, perhaps it is time to apply these patches. This also adds a few new patches to fix more recent breakages. Unfortunately we still cannot ena

Re: [U-Boot] [PATCH] mmc: Parse HS400 DT properties

2018-11-13 Thread Peng Fan
> -Original Message- > From: Marek Vasut [mailto:marek.va...@gmail.com] > Sent: 2018年11月14日 7:39 > To: u-boot@lists.denx.de > Cc: Marek Vasut ; Tom Rini > ; Jaehoon Chung ; > Jean-Jacques Hiblot ; Kishon Vijay Abraham I > ; Peng Fan ; Simon Glass > > Subject: [PATCH] mmc: Parse HS400 DT

Re: [U-Boot] [PATCH 15/15] imx: add i.MX8MQ EVK support

2018-11-13 Thread Peng Fan
> -Original Message- > From: Jon Nettleton [mailto:j...@solid-run.com] > Sent: 2018年11月13日 15:53 > To: Troy Kisky > Cc: Peng Fan ; sba...@denx.de; Fabio Estevam > ; U-Boot Mailing List ; > dl-linux-imx > Subject: Re: [U-Boot] [PATCH 15/15] imx: add i.MX8MQ EVK support > > On Fri, Nov 9

[U-Boot] using contents from https://www.denx.de/wiki/U-Boot or git repo

2018-11-13 Thread Prabhakar Kushwaha
Hi, I am trying to use some content from https://www.denx.de/wiki/U-Boot and http://git.denx.de/?p=u-boot.git;a=summary in one publication. I am trying to provide details about u-boot boot-loader and its feature list. I am not sure, if I can use content without any permission. or I need to get

Re: [U-Boot] [PATCH u-boot v2] spi: Add Amlogic Meson SPI Flash Controller driver

2018-11-13 Thread Jagan Teki
On Tue, Nov 13, 2018 at 4:20 PM Neil Armstrong wrote: > > The Amlogic Meson SoCs embeds a Flash oriented SPI Controller name SPIFC. > This driver, ported from the Linux meson-spi-spifc driver, add support > for this controller on the Amlogic Meson GX SoCs in U-Boot. > > [ported from linux version

Re: [U-Boot] [PATCH 05/19] riscv: Add a SYSCON driver for Core Local Interruptor

2018-11-13 Thread Bin Meng
Hi Lukas, On Tue, Nov 13, 2018 at 10:45 PM Auer, Lukas wrote: > > Hi Bin, > > On Tue, 2018-11-13 at 00:21 -0800, Bin Meng wrote: > > This adds U-Boot syscon driver for RISC-V Core Local Interruptor > > (CLINT). The CLINT block holds memory-mapped control and status > > registers associated with s

Re: [U-Boot] [PATCH v4 14/18] serial: 16550: allow the driver to support MediaTek serial

2018-11-13 Thread Ryder Lee
On Tue, 2018-11-13 at 11:53 -0800, Simon Glass wrote: > Hi Ryder, > > On 6 November 2018 at 01:47, Ryder Lee wrote: > > This patch adds an extra operation in ns16550.c to suuport MediaTek > > SoCs as we have a highspeed register which influences the calcualtion > > of the divisor. > > > > Note th

Re: [U-Boot] [PATCH 02/19] dm: cpu: Add timebase frequency to the platdata

2018-11-13 Thread Bin Meng
Hi Simon, On Wed, Nov 14, 2018 at 4:02 AM Simon Glass wrote: > > On 13 November 2018 at 00:21, Bin Meng wrote: > > This adds a timebase_freq member to the 'struct cpu_platdata', to > > hold the "timebase-frequency" value in the cpu or /cpus node. > > > > Signed-off-by: Bin Meng > > --- > > > >

Re: [U-Boot] [PATCH] Makefile: Only build dtc if needed

2018-11-13 Thread Marek Vasut
On 11/13/2018 11:43 PM, Simon Glass wrote: > At present U-Boot always builds dtc if CONFIG_OF_CONTROL is defined. This > is wasteful when the system already has a suitable version available. > > Update the Makefile logic to build dtc only if the version available is > too old. > > This saves abou

[U-Boot] [PATCH 5/5] ARM: rmobile: Enable MMC HS400 on Salvator-X, ULCB, Ebisu

2018-11-13 Thread Marek Vasut
Enable the HS400 support code on H3, M3W, M3N Salvator-X(S) and ULCB boards as well as E3 Ebisu board. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- configs/r8a7795_salvator-x_defconfig | 1 + configs/r8a7795_ulcb_defconfig| 1 + configs/r8a77965_salvator-x_defconfig | 1 + conf

[U-Boot] [PATCH 2/5] ARM: dts: rmobile: Enable SDR104 on Salvator-X and ULCB

2018-11-13 Thread Marek Vasut
Enable SDR104 modes on M3W and H3 boards. With the SDHI fixes in place, it is now possible to use SDR104. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- arch/arm/dts/salvator-common.dtsi | 10 ++ arch/arm/dts/ulcb.dtsi| 5 + 2 files changed, 15 insertions(+) diff

[U-Boot] [PATCH 4/5] ARM: dts: rmobile: Enable HS400 on Salvator-X, ULCB, Ebisu

2018-11-13 Thread Marek Vasut
Enable the HS400 support in DT on H3, M3W, M3N Salvator-X(S) and ULCB boards as well as E3 Ebisu board. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- arch/arm/dts/r8a77990-ebisu.dts | 5 +++-- arch/arm/dts/salvator-common.dtsi | 1 + arch/arm/dts/ulcb.dtsi| 1 + 3 files cha

[U-Boot] [PATCH 3/5] ARM: dts: rmobile: Enable SDR modes on E3 Ebisu

2018-11-13 Thread Marek Vasut
Add regulators and pinmuxes for SDHI0 and SDHI1 SD and microSD slots on E3 Ebisu and mark them as capable of up to SDR104 mode of operation. With the SDHI fixes in place, it is now possible to use SDR104. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- arch/arm/dts/r8a77990-ebisu.dts | 101

[U-Boot] [PATCH V3 6/6] mmc: tmio: sdhi: Add HS400 support

2018-11-13 Thread Marek Vasut
Add support for the HS400 mode to SDHI driver. This uses the up-tune mechanism from already supported HS200 tuning. Signed-off-by: Marek Vasut Cc: Masahiro Yamada --- V3: New patch --- drivers/mmc/renesas-sdhi.c | 103 ++--- drivers/mmc/tmio-common.h | 1 + 2

[U-Boot] [PATCH 1/5] ARM: dts: rmobile: Add eMMC DS pinmux

2018-11-13 Thread Marek Vasut
Add pinmux entry for the eMMC DS line, as it is connected on these boards. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- arch/arm/dts/salvator-common.dtsi | 4 ++-- arch/arm/dts/ulcb.dtsi| 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/dts/sal

[U-Boot] [PATCH V3 5/6] mmc: tmio: sdhi: Move tap_pos to private data

2018-11-13 Thread Marek Vasut
Move the tap_pos variable, which is the HS200/HS400/SDR104 calibration offset, into private data, so it can be passed around. This is done in preparation for the HS400 mode, which needs to adjust this value. Signed-off-by: Marek Vasut Cc: Masahiro Yamada --- V3: New patch --- drivers/mmc/renesa

[U-Boot] [PATCH V3 4/6] mmc: tmio: sdhi: Filter out HS400 on certain SoCs

2018-11-13 Thread Marek Vasut
Filter out HS400 support on SoCs where HS400 is not supported yet. Signed-off-by: Marek Vasut Cc: Masahiro Yamada --- V3: New patch --- drivers/mmc/renesas-sdhi.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c in

[U-Boot] [PATCH V3 3/6] mmc: tmio: Keep generating clock when clock are enabled

2018-11-13 Thread Marek Vasut
The TMIO core has a feature where it can automatically disable clock output when the bus is not in use. While this is useful, it also interferes with switching the bus to 1.8V and other background tasks of the SD/MMC cards, which require clock to be enabled. This patch respects the mmc->clk_disabl

[U-Boot] [PATCH V3 2/6] mmc: tmio: Do not set divider to 1 in DDR mode

2018-11-13 Thread Marek Vasut
The TMIO core has a quirk where divider == 1 must not be set in DDR modes. Handle this by setting divider to 2, as suggested in the documentation. Signed-off-by: Marek Vasut Cc: Masahiro Yamada --- drivers/mmc/tmio-common.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/tmi

[U-Boot] [PATCH V3 1/6] mmc: tmio: Switch to clock framework

2018-11-13 Thread Marek Vasut
Switch the driver to using clk_get_rate()/clk_set_rate() instead of caching the mclk frequency in it's private data. This is required on the SDHI variant of the controller, where the upstream mclk need to be adjusted when using UHS modes. Platforms which do not support clock framework or do not su

[U-Boot] [PATCH] mmc: Parse HS400 DT properties

2018-11-13 Thread Marek Vasut
Add HS400 properties parsing support to mmc_of_parse(). Signed-off-by: Marek Vasut Cc: Tom Rini Cc: Jaehoon Chung Cc: Jean-Jacques Hiblot Cc: Kishon Vijay Abraham I Cc: Peng Fan Cc: Simon Glass --- drivers/mmc/mmc-uclass.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/mmc

[U-Boot] [PATCH] clk: renesas: Allow reconfiguring SDHI clock on Gen3

2018-11-13 Thread Marek Vasut
The SDHI clock must be configured differently for HS200/HS400/SDR104 modes. Add support for reconfiguring the SDHI clock settings into the clock driver. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- drivers/clk/renesas/clk-rcar-gen3.c | 10 +++--- 1 file changed, 3 insertions(+), 7 d

Re: [U-Boot] [PATCH 3/4] fs: prevent overwriting reserved memory

2018-11-13 Thread Heinrich Schuchardt
On 11/13/18 10:47 PM, Simon Goldschmidt wrote: > > > Am Di., 13. Nov. 2018, 22:37 hat Heinrich Schuchardt > geschrieben: > > On 11/13/18 9:01 PM, Simon Goldschmidt wrote: > > On 13.11.2018 20:42, Heinrich Schuchardt wrote: > >> On 11/13/18 6:47 AM, Simon G

[U-Boot] [PATCH v3] sandbox: Use memmove() to move overlapping regions

2018-11-13 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 memmove() instead. Reported-by: Coverity (CID: 173279) S

[U-Boot] [PATCH] Makefile: Only build dtc if needed

2018-11-13 Thread Simon Glass
At present U-Boot always builds dtc if CONFIG_OF_CONTROL is defined. This is wasteful when the system already has a suitable version available. Update the Makefile logic to build dtc only if the version available is too old. This saves about 3 seconds of CPU time on a clean build for me. Signed-

Re: [U-Boot] [U-Boot, v12, 1/6] sandbox: Put CPUs under a cpu-bus node

2018-11-13 Thread Alexander Graf
> The CPU uclass expects that all CPUs have a parent device which is a > cpu-bus. Fix up the sandbox test DT to follow this convention. This allow > the code in smbios_write_type4_dm() to work, since it calls > dev_get_parent_platdata() on each CPU. > > Signed-off-by: Simon Glass Thanks, applied

Re: [U-Boot] [PATCH v2 8/9] efi_loader: do not use magic address for fdt

2018-11-13 Thread Alexander Graf
On 13.11.18 22:31, Heinrich Schuchardt wrote: > On 11/13/18 10:21 PM, Alexander Graf wrote: >> >> >> On 12.11.18 18:55, Heinrich Schuchardt wrote: >>> We currently place the flattened device tree 127 MiB from the start of the >>> first memory bank. This may be in a reserved memory area. >>> >>> S

Re: [U-Boot] [PATCH v2 1/9] fdt_support: fdt reservations on the sandbox

2018-11-13 Thread Alexander Graf
On 13.11.18 22:45, Heinrich Schuchardt wrote: > On 11/13/18 10:35 PM, Simon Glass wrote: >> Hi, >> >> On 13 November 2018 at 12:39, Alexander Graf wrote: >>> >>> >>> On 12.11.18 18:55, Heinrich Schuchardt wrote: On the sandbox the memory addresses in the device tree refer to the virtual >>>

Re: [U-Boot] [PATCH v3 27/28] riscv: qemu: detect and boot the kernel passed by QEMU

2018-11-13 Thread Auer, Lukas
On Tue, 2018-11-13 at 10:01 +0100, Alexander Graf wrote: > > On 09.11.18 13:59, Lukas Auer wrote: > > QEMU embeds the location of the kernel image in the device tree. > > Store > > this address in the environment as variable kernel_start. It is > > used in > > the board-local distro boot command Q

Re: [U-Boot] [PATCH 3/4] fs: prevent overwriting reserved memory

2018-11-13 Thread Simon Goldschmidt
Am Di., 13. Nov. 2018, 22:37 hat Heinrich Schuchardt geschrieben: > On 11/13/18 9:01 PM, Simon Goldschmidt wrote: > > On 13.11.2018 20:42, Heinrich Schuchardt wrote: > >> On 11/13/18 6:47 AM, Simon Goldschmidt wrote: > >>> On Tue, Nov 13, 2018 at 3:23 AM Fabio Estevam > >>> wrote: > Hi Simo

Re: [U-Boot] [PATCH v2 1/9] fdt_support: fdt reservations on the sandbox

2018-11-13 Thread Heinrich Schuchardt
On 11/13/18 10:35 PM, Simon Glass wrote: > Hi, > > On 13 November 2018 at 12:39, Alexander Graf wrote: >> >> >> On 12.11.18 18:55, Heinrich Schuchardt wrote: >>> On the sandbox the memory addresses in the device tree refer to the virtual >>> address space of the sandbox. This implies that the mem

Re: [U-Boot] [PATCH v2 2/9] efi_loader: fix efi_find_free_memory()

2018-11-13 Thread Alexander Graf
On 13.11.18 22:21, Heinrich Schuchardt wrote: > On 11/13/18 9:56 PM, Alexander Graf wrote: >> >> >> On 12.11.18 18:55, Heinrich Schuchardt wrote: >>> In efi_find_free_memory() the sandbox uses its virtual address space. >>> Add the missing mapping. >>> >>> Signed-off-by: Heinrich Schuchardt >> >

Re: [U-Boot] [PATCH 3/4] fs: prevent overwriting reserved memory

2018-11-13 Thread Heinrich Schuchardt
On 11/13/18 9:01 PM, Simon Goldschmidt wrote: > On 13.11.2018 20:42, Heinrich Schuchardt wrote: >> On 11/13/18 6:47 AM, Simon Goldschmidt wrote: >>> On Tue, Nov 13, 2018 at 3:23 AM Fabio Estevam >>> wrote: Hi Simon, On Mon, Nov 12, 2018 at 7:25 PM Simon Goldschmidt wrote:

Re: [U-Boot] [PATCH v2 1/9] fdt_support: fdt reservations on the sandbox

2018-11-13 Thread Simon Glass
Hi, On 13 November 2018 at 12:39, Alexander Graf wrote: > > > On 12.11.18 18:55, Heinrich Schuchardt wrote: >> On the sandbox the memory addresses in the device tree refer to the virtual >> address space of the sandbox. This implies that the memory reservations for >> the fdt also have to be conv

Re: [U-Boot] [PATCH 1/1] efi_loader: eliminate sandbox addresses

2018-11-13 Thread Simon Glass
Hi Alex, On 13 November 2018 at 11:58, Alexander Graf wrote: > > > On 13.11.18 20:53, Simon Glass wrote: >> Hi Heinrich, >> >> On 10 November 2018 at 14:30, Heinrich Schuchardt wrote: >>> Do not use the sandbox's virtual address space for the internal structures >>> of the memory map. This way w

Re: [U-Boot] [PATCH v12 2/6] efi_loader: Drop setup_ok

2018-11-13 Thread Simon Glass
Hi Alex, On 13 November 2018 at 11:59, Alexander Graf wrote: > > > On 06.11.18 23:57, Simon Glass wrote: >> This value is stored in data which appears to be read-only with sandbox on >> my Ubuntu 18.04 machine. In any case it is not good practice to store >> run-time data in a build-time linker l

Re: [U-Boot] [U-Boot, v2, 1/2] rockchip: add support for veyron-speedy (ASUS Chromebook C201)

2018-11-13 Thread Simon Glass
Hi, On 13 November 2018 at 11:58, Vagrant Cascadian wrote: > On 2018-09-13, Marty E. Plummer wrote: >> This adds support for the ASUS C201, a RK3288-based clamshell >> device. The device tree comes from linus's linux tree at >> 3f16503b7d2274ac8cbab11163047ac0b4c66cfe. The SDRAM parameters >> are

Re: [U-Boot] UBoot running UBoot - is it possible?

2018-11-13 Thread Simon Glass
Hi Simon, On 13 November 2018 at 12:17, Simon Goldschmidt wrote: > On 13.11.2018 20:53, Simon Glass wrote: >> >> Hi Allan, >> >> On 12 November 2018 at 18:38, Allan Chandler >> wrote: >>> >>> Hello, bods. >>> >>> We're trying to architect a relatively safe solution for updating UBoot >>> in the

Re: [U-Boot] [PATCH v2 8/9] efi_loader: do not use magic address for fdt

2018-11-13 Thread Heinrich Schuchardt
On 11/13/18 10:21 PM, Alexander Graf wrote: > > > On 12.11.18 18:55, Heinrich Schuchardt wrote: >> We currently place the flattened device tree 127 MiB from the start of the >> first memory bank. This may be in a reserved memory area. >> >> So let's change the sequence: first create memory reserv

Re: [U-Boot] [PATCH v2 8/9] efi_loader: do not use magic address for fdt

2018-11-13 Thread Alexander Graf
On 12.11.18 18:55, Heinrich Schuchardt wrote: > We currently place the flattened device tree 127 MiB from the start of the > first memory bank. This may be in a reserved memory area. > > So let's change the sequence: first create memory reservations and then > copy the device tree. > > Do not u

Re: [U-Boot] [PATCH v2 2/9] efi_loader: fix efi_find_free_memory()

2018-11-13 Thread Heinrich Schuchardt
On 11/13/18 9:56 PM, Alexander Graf wrote: > > > On 12.11.18 18:55, Heinrich Schuchardt wrote: >> In efi_find_free_memory() the sandbox uses its virtual address space. >> Add the missing mapping. >> >> Signed-off-by: Heinrich Schuchardt > > The real bug here is much worse. According to 2.3.4 "x

Re: [U-Boot] [PATCH v2 7/9] efi_loader: fix memory mapping for sandbox

2018-11-13 Thread Alexander Graf
On 12.11.18 18:55, Heinrich Schuchardt wrote: > The sandbox is using a virtual address space. The addresses used insided > the flattened device tree use the virtual address space. The EFI subsystem > uses the addressable address space and this is where the fdt is stored. > > Fix all incorrect ad

Re: [U-Boot] [PATCH v2 6/9] efi_loader: macro efi_size_in_pages()

2018-11-13 Thread Alexander Graf
On 12.11.18 18:55, Heinrich Schuchardt wrote: > When allocating EFI memory pages the size in bytes has to be converted to > pages. > > Provide a macro efi_size_in_pages() for this conversion. > Use it in the EFI subsystem and correct related comments. > > Signed-off-by: Heinrich Schuchardt > -

Re: [U-Boot] CVE-2018-18439, CVE-2018-18440 - U-Boot verified boot bypass vulnerabilities

2018-11-13 Thread Simon Goldschmidt
On 06.11.2018 15:51, Andrea Barisani wrote: [..] The issue can be exploited by several means: - An excessively large crafted boot image file is parsed by the `tftp_handler` function which lacks any size checks, allowing the memory overwrite. - A malicious server can manipulate T

Re: [U-Boot] [PATCH v2 2/9] efi_loader: fix efi_find_free_memory()

2018-11-13 Thread Alexander Graf
On 12.11.18 18:55, Heinrich Schuchardt wrote: > In efi_find_free_memory() the sandbox uses its virtual address space. > Add the missing mapping. > > Signed-off-by: Heinrich Schuchardt The real bug here is much worse. According to 2.3.4 "x64 Platforms" of the UEFI spec: === Paging mode is enab

Re: [U-Boot] [PATCH v2 1/9] fdt_support: fdt reservations on the sandbox

2018-11-13 Thread Alexander Graf
On 12.11.18 18:55, Heinrich Schuchardt wrote: > On the sandbox the memory addresses in the device tree refer to the virtual > address space of the sandbox. This implies that the memory reservations for > the fdt also have to be converted to this address space. > > Signed-off-by: Heinrich Schucha

Re: [U-Boot] [PATCH v12 5/6] efi: Create a function to set up for running EFI code

2018-11-13 Thread Alexander Graf
On 06.11.18 23:57, Simon Glass wrote: > There is still duplicated code in efi_loader for tests and normal > operation. > > Add a new bootefi_run_prepare() function which holds common code used to > set up U-Boot to run EFI code. Make use of this from the existing > bootefi_test_prepare() functio

Re: [U-Boot] UBoot running UBoot - is it possible?

2018-11-13 Thread Simon Goldschmidt
On 13.11.2018 20:53, Simon Glass wrote: Hi Allan, On 12 November 2018 at 18:38, Allan Chandler wrote: Hello, bods. We're trying to architect a relatively safe solution for updating UBoot in the field. What we have at the moment is an iMX6-based board with two UBoot partitions and two system

Re: [U-Boot] [PATCH v12 4/6] efi: Split out test init/uninit into functions

2018-11-13 Thread Alexander Graf
On 06.11.18 23:57, Simon Glass wrote: > The functions in bootefi are very long because they mix high-level code > and control with the low-level implementation. To help with this, create > functions which handle preparing for running the test and cleaning up > afterwards. > > Also shorten the aw

Re: [U-Boot] [PATCH v12 3/6] sandbox: smbios: Update to support sandbox

2018-11-13 Thread Alexander Graf
On 06.11.18 23:57, Simon Glass wrote: > At present this code casts addresses to pointers so cannot be used with > sandbox. Update it to use mapmem instead. > > Signed-off-by: Simon Glass > --- > > Changes in v12: None > Changes in v11: > - Fix the EFI code that has since been added and relies

Re: [U-Boot] [PATCH 1/1] efi_loader: eliminate sandbox addresses

2018-11-13 Thread Alexander Graf
On 13.11.18 20:53, Simon Glass wrote: > Hi Heinrich, > > On 10 November 2018 at 14:30, Heinrich Schuchardt wrote: >> Do not use the sandbox's virtual address space for the internal structures >> of the memory map. This way we can eliminate a whole lot of unnecessary >> conversions. >> >> The on

Re: [U-Boot] [PATCH v12 2/6] efi_loader: Drop setup_ok

2018-11-13 Thread Alexander Graf
On 06.11.18 23:57, Simon Glass wrote: > This value is stored in data which appears to be read-only with sandbox on > my Ubuntu 18.04 machine. In any case it is not good practice to store > run-time data in a build-time linker list. > > The value does not seem to be that useful, since tests that

Re: [U-Boot] [PATCH 3/4] fs: prevent overwriting reserved memory

2018-11-13 Thread Simon Goldschmidt
On 13.11.2018 20:42, Heinrich Schuchardt wrote: On 11/13/18 6:47 AM, Simon Goldschmidt wrote: On Tue, Nov 13, 2018 at 3:23 AM Fabio Estevam wrote: Hi Simon, On Mon, Nov 12, 2018 at 7:25 PM Simon Goldschmidt wrote: diff --git a/fs/fs.c b/fs/fs.c index adae98d021..4baf6b1c39 100644 --- a/fs/

Re: [U-Boot] [U-Boot, v2, 1/2] rockchip: add support for veyron-speedy (ASUS Chromebook C201)

2018-11-13 Thread Vagrant Cascadian
On 2018-09-13, Marty E. Plummer wrote: > This adds support for the ASUS C201, a RK3288-based clamshell > device. The device tree comes from linus's linux tree at > 3f16503b7d2274ac8cbab11163047ac0b4c66cfe. The SDRAM parameters > are for 4GB Samsung LPDDR3, decoded from coreboot's > src/mainboard/go

Re: [U-Boot] [PATCH v7 2/5] dma: add channels support

2018-11-13 Thread Simon Glass
On 10 November 2018 at 13:06, Grygorii Strashko wrote: > From: Álvaro Fernández Rojas > > This adds channels support for dma controllers that have multiple channels > which can transfer data to/from different devices (enet, usb...). > > DMA channle API: > dma_get_by_index() > dma_get_by_name()

Re: [U-Boot] Pull request: u-boot-sunxi/master

2018-11-13 Thread Jagan Teki
On Wed 14 Nov, 2018, 1:12 AM Tom Rini On Wed, Nov 14, 2018 at 12:49:45AM +0530, Jagan Teki wrote: > > > Hi Tom, > > > > Please pull this PR. > > > > thanks, > > Jagan. > > > > The following changes since commit > 454cf76184c65426b68033a23da086e73663f2fc: > > > > Prepare v2018.11-rc3 (2018-10-29

Re: [U-Boot] [PATCH 1/2] Revert "imx8qxp_mek: Disable CONFIG_DISPLAY_CPUINFO"

2018-11-13 Thread Simon Glass
On 12 November 2018 at 19:32, Simon Glass wrote: > On 12 November 2018 at 08:02, Bin Meng wrote: >> >> This reverts commit c5bbfaf05dc8592b479a44df6abaadbab54fec2b. >> >> Disabling CONFIG_DISPLAY_CPUINFO was a temporary solution to get >> the v2018.11 release out. Now the merge window opens, reve

Re: [U-Boot] [PATCH v7 3/5] test: dma: add dma-uclass test

2018-11-13 Thread Simon Glass
On 10 November 2018 at 13:06, Grygorii Strashko wrote: > Add a sandbox DMA driver implementation (provider) and corresponding DM > test. > > Reviewed-by: Tom Rini > Signed-off-by: Grygorii Strashko > --- > arch/sandbox/dts/test.dts | 8 ++ > configs/sandbox_defconfig | 3 + > driv

Re: [U-Boot] [PATCH 02/19] dm: cpu: Add timebase frequency to the platdata

2018-11-13 Thread Simon Glass
On 13 November 2018 at 00:21, Bin Meng wrote: > This adds a timebase_freq member to the 'struct cpu_platdata', to > hold the "timebase-frequency" value in the cpu or /cpus node. > > Signed-off-by: Bin Meng > --- > > include/cpu.h | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Simon Gla

Re: [U-Boot] [PATCH 2/2] fdt_region: Ensure that depth never goes below -1

2018-11-13 Thread Simon Glass
On 7 November 2018 at 11:51, Tom Rini wrote: > From: Konrad Beckmann > > A specially crafted FIT image makes it possible to overflow the stack > with controlled values when using the verified boot feature. Depending > on the memory layout, this could be used to overwrite configuration > variables

Re: [U-Boot] [PATCH] SPL: Add HAB image authentication to FIT

2018-11-13 Thread Simon Glass
Hi Peng, On 9 November 2018 at 01:14, Peng Fan wrote: > From: Ye Li > > Introduce two board level callback functions to FIT image loading process, and > a SPL_FIT_FOUND flag to differentiate FIT image or RAW image. > > Implement functions in imx common SPL codes to call HAB function > to authent

Re: [U-Boot] [PATCH 1/2] image-sig: Ensure that hashed-nodes is null-terminated

2018-11-13 Thread Simon Glass
On 7 November 2018 at 11:51, Tom Rini wrote: > From: Konrad Beckmann > > A specially crafted FIT image leads to memory corruption in the stack > when using the verified boot feature. The function fit_config_check_sig > has a logic error that makes it possible to write past the end of the > stack

Re: [U-Boot] [PATCH v3 14/18] serial: 16550: allow the driver to support MediaTek serial

2018-11-13 Thread Simon Glass
Hi Weijie, On 5 November 2018 at 19:48, Weijie Gao wrote: > On Mon, 2018-11-05 at 16:37 +0800, Ryder Lee wrote: >> On Mon, 2018-11-05 at 10:20 +0800, Ryder Lee wrote: >> > On Sat, 2018-11-03 at 00:09 -0600, Simon Glass wrote: >> > > Hi Ryder, >> > > >> > > On 2 November 2018 at 09:15, Ryder Lee

Re: [U-Boot] [PATCH 2/2] imx8: scu: Update call to lists_bind_fdt()

2018-11-13 Thread Simon Glass
On 12 November 2018 at 19:32, Simon Glass wrote: > On 12 November 2018 at 08:02, Bin Meng wrote: >> This commit should be squashed into >> >> commit 2bba642dbaa4 ("dm: core: Respect drivers with the >> DM_FLAG_PRE_RELOC flag in lists_bind_fdt()") >> >> on u-boot-dm/master branch. >> >> Signed-off

Re: [U-Boot] [PATCH v3 1/1] dm: video: correctly set the cursor position

2018-11-13 Thread Simon Glass
On 10 November 2018 at 10:55, Heinrich Schuchardt wrote: > The terminal escape sequence ESC [ ; H is used to set the cursor > position. According to the ECMA 48 standard the upper left corner in the > escape sequences is [1, 1]. The video uclass uses [0, 0] as upper left > corner. > > Signed-off

Re: [U-Boot] [PATCH v4 14/18] serial: 16550: allow the driver to support MediaTek serial

2018-11-13 Thread Simon Glass
Hi Ryder, On 6 November 2018 at 01:47, Ryder Lee wrote: > This patch adds an extra operation in ns16550.c to suuport MediaTek > SoCs as we have a highspeed register which influences the calcualtion > of the divisor. > > Note that we don't support the baudrate greater than 115200 currently. > > Si

Re: [U-Boot] UBoot running UBoot - is it possible?

2018-11-13 Thread Simon Glass
Hi Allan, On 12 November 2018 at 18:38, Allan Chandler wrote: > Hello, bods. > > We're trying to architect a relatively safe solution for updating UBoot in > the field. What we have at the moment is an iMX6-based board with two UBoot > partitions and two system partitions but we only use the fi

Re: [U-Boot] [PATCH 1/1] efi_loader: eliminate sandbox addresses

2018-11-13 Thread Simon Glass
Hi Heinrich, On 10 November 2018 at 14:30, Heinrich Schuchardt wrote: > Do not use the sandbox's virtual address space for the internal structures > of the memory map. This way we can eliminate a whole lot of unnecessary > conversions. > > The only conversion remaining is the one when adding know

Re: [U-Boot] [PATCH v12 0/6] efi_loader: Code refactoring and improvement

2018-11-13 Thread Simon Glass
Hi, On 6 November 2018 at 14:57, Simon Glass wrote: > This collects the patches previously sent to break up the very large > functions in efi_loader into smaller pieces. Now that the other sandbox > stuff is applied, perhaps it is time to apply these patches. > > This also adds a few new patches

Re: [U-Boot] [PATCH 3/3] misc: fs_loader: Fix compiler warning

2018-11-13 Thread Simon Glass
On 4 November 2018 at 23:04, Keerthy wrote: > Fix compiler warning > > drivers/misc/fs_loader.c:193:9: warning: format ‘%d’ expects > argument of type ‘int’, but argument 5 has type ‘size_t > {aka long unsigned int}’ [-Wformat=] > > Signed-off-by: Keerthy > --- > drivers/misc/fs_loader.c | 2 +-

Re: [U-Boot] [PATCH v2 2/2] core: ofnode: Add ofnode_get_addr_size_index

2018-11-13 Thread Simon Glass
On 4 November 2018 at 22:55, Keerthy wrote: > Add ofnode_get_addr_size_index function to fetch the address > and size of the reg space based on index. > > Signed-off-by: Keerthy > --- > > Changes in v2: > > * Added the missing header file declaration of the new function. > > drivers/core/ofnod

Re: [U-Boot] [PATCH 4/4] pinctrl: stm32: make pinctrl use hwspinlock

2018-11-13 Thread Simon Glass
Hi Benjamin, On 13 November 2018 at 01:51, Benjamin Gaignard wrote: > From: Benjamin Gaignard > > Protect configuration registers with a hardware spinlock Can you please add a bit more detail about what problem this fixes? > > Signed-off-by: Benjamin Gaignard > --- > arch/arm/dts/stm32mp157c

Re: [U-Boot] [PATCH 1/2] core: ofnode: Fix ofnode_get_addr_size_index function

2018-11-13 Thread Simon Glass
On 4 November 2018 at 22:47, Keerthy wrote: > Currently the else part of ofnode_get_addr_size_index function > does not fetch addresses based on the index but rather just > returns the base address. Fix that. > > Signed-off-by: Keerthy > --- > drivers/core/ofnode.c | 13 - > 1 file c

Re: [U-Boot] [PATCH 2/3] misc: fs_loader: Use device_get_global_by_ofnode to get to node

2018-11-13 Thread Simon Glass
On 4 November 2018 at 23:04, Keerthy wrote: > Instead of two staged ofnode_to_offset followed by > device_get_global_by_of_offset approach, direcly use the > device_get_global_by_ofnode to fetch the device. > > Signed-off-by: Keerthy > --- > drivers/misc/fs_loader.c | 5 ++--- > 1 file changed,

Re: [U-Boot] [PATCH v3 02/19] dm: i2c: Make i2c_get_chip_for_busnum() fail if the chip is not detected

2018-11-13 Thread Simon Glass
Hi Jean-Jacques, On 5 November 2018 at 02:38, Jean-Jacques Hiblot wrote: > Hi Simon, > > > On 03/11/2018 07:07, Simon Glass wrote: >> >> Hi Jean-Jacques, >> >> On 22 October 2018 at 08:12, Jean-Jacques Hiblot wrote: >>> >>> i2c_get_chip_for_busnum() really should check the presence of the chip o

Re: [U-Boot] [PATCH 1/3] fs: Makefile: Add fs.c under SPL as well as it is needed for fs_loader

2018-11-13 Thread Simon Glass
On 4 November 2018 at 23:04, Keerthy wrote: > Add fs.c under SPL as well as it is needed for fs_loader > > Signed-off-by: Keerthy > --- > fs/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Simon Glass ___ U-Boot mailing

Re: [U-Boot] [PATCH 3/4] hwspinlock: add stm32 hardware spinlock support

2018-11-13 Thread Simon Glass
Hi Benjamin, On 13 November 2018 at 01:51, Benjamin Gaignard wrote: > Implement hardware spinlock support for STM32MP1. > > Signed-off-by: Benjamin Gaignard > --- > arch/arm/dts/stm32mp157c-ed1.dts | 4 ++ > arch/arm/dts/stm32mp157c.dtsi | 9 > configs/stm32mp15_basic_defcon

Re: [U-Boot] [PATCH 1/4] dm: Add Hardware Spinlock class

2018-11-13 Thread Simon Glass
Hi Benjamin, On 13 November 2018 at 01:51, Benjamin Gaignard wrote: > > From: Benjamin Gaignard > > This is uclass for Hardware Spinlocks. > It implements two mandatory operations: lock and unlock > and one optional relax operation. > > Signed-off-by: Benjamin Gaignard > --- > arch/sandbox/dts

Re: [U-Boot] [PATCH] board: rockchip: rk3399: add Rockpro64 board support

2018-11-13 Thread Alexander Graf
On 03.11.18 12:28, Akash Gajjar wrote: > Rockpro64 is rk3399 based board from pine64.org. add initial board support for > Rockpro64. complete board support will be added later in upcoming patchsets. > > Signed-off-by: Akash Gajjar > --- [...] > diff --git a/board/rockchip/rockpro64/rockpro64.

Re: [U-Boot] [PATCH 3/4] fs: prevent overwriting reserved memory

2018-11-13 Thread Heinrich Schuchardt
On 11/13/18 6:47 AM, Simon Goldschmidt wrote: > On Tue, Nov 13, 2018 at 3:23 AM Fabio Estevam wrote: >> >> Hi Simon, >> >> On Mon, Nov 12, 2018 at 7:25 PM Simon Goldschmidt >> wrote: >> >>> diff --git a/fs/fs.c b/fs/fs.c >>> index adae98d021..4baf6b1c39 100644 >>> --- a/fs/fs.c >>> +++ b/fs/fs.c

Re: [U-Boot] Pull request: u-boot-sunxi/master

2018-11-13 Thread Tom Rini
On Wed, Nov 14, 2018 at 12:49:45AM +0530, Jagan Teki wrote: > Hi Tom, > > Please pull this PR. > > thanks, > Jagan. > > The following changes since commit 454cf76184c65426b68033a23da086e73663f2fc: > > Prepare v2018.11-rc3 (2018-10-29 16:04:26 -0400) > > are available in the Git repository a

Re: [U-Boot] [PATCH] board: rockchip: rk3399: add Rockpro64 board support

2018-11-13 Thread Alexander Graf
On 05.11.18 08:42, akash wrote: > Hi Jagan, > > On 05/11/18 12:40 PM, Jagan Teki wrote: >> On 03/11/18 4:58 PM, Akash Gajjar wrote: >>> Rockpro64 is rk3399 based board from pine64.org. add initial board >>> support for >>> Rockpro64. complete board support will be added later in upcoming >>> pat

[U-Boot] Pull request: u-boot-sunxi/master

2018-11-13 Thread Jagan Teki
Hi Tom, Please pull this PR. thanks, Jagan. The following changes since commit 454cf76184c65426b68033a23da086e73663f2fc: Prepare v2018.11-rc3 (2018-10-29 16:04:26 -0400) are available in the Git repository at: git://git.denx.de/u-boot-sunxi.git master for you to fetch changes up to 7d121

[U-Boot] Pull request, v2018.11, v2: u-boot-spi/master

2018-11-13 Thread Jagan Teki
Hi Tom, Here is v2 PR MTD, DFU fixes, please pull the same. Change for v2: - Fixed patches for travis-ci build The following changes since commit c80cc3df3d196302c401e45c92d8a769c55e78e9: Merge tag 'u-boot-imx-20181112' of git://git.denx.de/u-boot-imx (2018-11-12 08:06:34 -0500) are availab

Re: [U-Boot] Rockchip RV1108 eMMC initialization fail

2018-11-13 Thread Otavio Salvador
On Tue, Nov 13, 2018 at 1:47 PM alex94 wrote: > I tried that, but the same error happens. > > I saw that here in the first post: > > http://u-boot.10912.n7.nabble.com/Rockchip-RV1108-eMMC-support-not-working-td343843.html#a343866 > > in the U-boot log, GPLL is 38400, where in my log is 1188000

Re: [U-Boot] efi disks in u-boot

2018-11-13 Thread Simon Glass
Hi Akahsi, On 5 November 2018 at 20:15, AKASHI Takahiro wrote: > Hello Simon, > > You said, in efi/lib_loader/efi_disk.c, > > ===8<=== > * TODO(s...@chromium.org): Actually with CONFIG_BLK, U-Boot does have this. > * Consider converting the code to look up devices as needed. The EFI device > *

Re: [U-Boot] UBoot running UBoot - is it possible?

2018-11-13 Thread Stefano Babic
Hi Simon, On 13/11/18 18:43, Simon Goldschmidt wrote: > > > Am Di., 13. Nov. 2018, 17:53 hat Stefano Babic > geschrieben: > > On 13/11/18 17:07, Simon Goldschmidt wrote: > > On 13.11.2018 17:00, Wolfgang Denk wrote: > >> Dear Simon, > >> > >> In messa

Re: [U-Boot] UBoot running UBoot - is it possible?

2018-11-13 Thread Simon Goldschmidt
Am Di., 13. Nov. 2018, 17:53 hat Stefano Babic geschrieben: > On 13/11/18 17:07, Simon Goldschmidt wrote: > > On 13.11.2018 17:00, Wolfgang Denk wrote: > >> Dear Simon, > >> > >> In message > >> > >> you wrote: > >>> My idea was to let SPL implement a dedicated boot counter/watchdog > >>> that d

Re: [U-Boot] UBoot running UBoot - is it possible?

2018-11-13 Thread Stefano Babic
On 13/11/18 17:07, Simon Goldschmidt wrote: > On 13.11.2018 17:00, Wolfgang Denk wrote: >> Dear Simon, >> >> In message >> >> you wrote: >>> My idea was to let SPL implement a dedicated boot counter/watchdog >>> that detects problems starting U-Boot and using a backup copy if it >>> fails multiple

Re: [U-Boot] [PATCH] sunxi: use 6MHz PLL_VIDEO step for DE2 for higher resolution LCD

2018-11-13 Thread Jagan Teki
On Tue, Nov 13, 2018 at 10:11 PM Vasily Khoruzhick wrote: > > On Tue, Nov 13, 2018 at 8:32 AM Jagan Teki wrote: > > > > On Mon, Oct 29, 2018 at 2:08 PM Maxime Ripard > > wrote: > > > > > > On Sun, Oct 28, 2018 at 02:26:12PM -0700, Vasily Khoruzhick wrote: > > > > From: Icenowy Zheng > > > > >

Re: [U-Boot] [PATCH 2/2] board: allwinner: sun50i-h6: Add Orangepi Lite2 support

2018-11-13 Thread Jagan Teki
On Mon, Nov 5, 2018 at 8:57 PM Maxime Ripard wrote: > > On Mon, Nov 05, 2018 at 01:20:40PM +0530, Jagan Teki wrote: > > OrangePi Lite2 is Allwinner H6 based open-source SBC, > > which support: > > - Allwinner H6 Quad-core 64-bit ARM Cortex-A53 > > - GPU Mali-T720 > > - 1GB LPDDR3 RAM > > - AXP805

  1   2   >