[U-Boot] [PATCH v2 3/3] sunxi-mmc: use new mode on both controllers on A64

2018-11-09 Thread Vasily Khoruzhick
Using new mode improves stability of eMMC and SD cards. Without it SPL fails to load u-boot from SD on Pinebook. Signed-off-by: Vasily Khoruzhick Reviewed-by: Chen-Yu Tsai --- arch/arm/mach-sunxi/Kconfig | 1 + drivers/mmc/sunxi_mmc.c | 10 +++--- 2 files changed, 8 insertions(+), 3 de

[U-Boot] [PATCH v2 2/3] sunxi-mmc: don't double clock for new mode unconditionally

2018-11-09 Thread Vasily Khoruzhick
Comment in Linux driver says that clock needs to be doubled only if we use DDR modes, moreover divider has to be set accordingly. U-boot driver doesn't declare support for any DDR modes and doesn't set internal clock divider in CLKCR, so it doubles clock unconditionally when new mode is used. Som

[U-Boot] [PATCH v2 1/3] sunxi-mmc: introduce new MMC_SUNXI_HAS_MODE_SWITCH option

2018-11-09 Thread Vasily Khoruzhick
A64 doesn't have a mode switch in CCM, and CCM_MMC_CTRL_MODE_SEL_NEW is not defined, so compilation fails if MMC_SUNXI_HAS_NEW_MODE is enabled Introduce new MMC_SUNXI_HAS_MODE_SWITCH option to be able to ifdef usage of CCM_MMC_CTRL_MODE_SEL_NEW Signed-off-by: Vasily Khoruzhick --- arch/arm/mach

[U-Boot] [PATCH v2 0/3] sunxi-mmc: enable new clock mode on A64

2018-11-09 Thread Vasily Khoruzhick
A64 requires new clock mode on SD and eMMC controllers. Not using new clock mode causes stability issues of the driver - SPL may occasionally fail to load u-boot from SD for some particular SD card on some particular devices. This series depends on "sunxi: add support for automatic delay calibrati

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

2018-11-09 Thread Fabio Estevam
Hi Simon, On Fri, Nov 9, 2018 at 7:25 PM Simon Goldschmidt wrote: > I have a patched version running here with the above mentioned changes > that should fix this issue. A few cleanups are missing before sending a > patch though (changes are in fs.c and lmb.c only). That's good news, thanks. ___

Re: [U-Boot] am33xx board with no external RTC crystal issue

2018-11-09 Thread Alex Kiernan
On Fri, Nov 9, 2018 at 7:09 AM Belisko Marek wrote: > > Hi Alex, > > On Tue, Oct 30, 2018 at 7:12 AM Alex Kiernan wrote: > > > > On Mon, Oct 29, 2018 at 11:36 PM Belisko Marek > > wrote: > > > > > > Hi, > > > > > > I'm working on custome am33xx based HW which have no external 32KHz > > > crysta

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

2018-11-09 Thread Simon Goldschmidt
On 09.11.2018 11:24, Simon Goldschmidt wrote: On Fri, Nov 9, 2018 at 10:46 AM Andrea Barisani wrote: On Fri, Nov 09, 2018 at 07:11:36AM +0100, Simon Goldschmidt wrote: On Fri, Nov 9, 2018 at 1:37 AM Fabio Estevam wrote: Hi Andrea, On Tue, Nov 6, 2018 at 12:57 PM Andrea Barisani wrote: #

Re: [U-Boot] [PATCH] mtd: sf_probe: add jedec,spi-nor compatible

2018-11-09 Thread Simon Goldschmidt
On 06.11.2018 10:24, Neil Armstrong wrote: There is no reason not to use the Linux "jedec,spi-nor" binding in u-boot. This patch adds this compatible into sf_probe and will avoid changing the device tree files to add a u-boot specific compatible to probe a spi flash. This change is needed to ena

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

2018-11-09 Thread Troy Kisky
On 11/9/2018 1:17 AM, Peng Fan wrote: > Add i.MX8MQ EVK support. SPL will initialize ddr and load ddr phy > firmware. Then loading FIT image, ATF to OCRAM, U-Boot and DTB to > DRAM > + > +static struct dram_cfg_param lpddr4_ddrc_cfg[] = { > + /* Start to config, default 3200mbps */ > +

Re: [U-Boot] [PATCH 14/15] drivers: ddr: introduce DDR driver for i.MX8M

2018-11-09 Thread Troy Kisky
On 11/9/2018 1:17 AM, Peng Fan wrote: > Introduce DDR driver for i.MX8M. The driver will be used by SPL to > initialze DDR PHY and DDR Controller. > > Signed-off-by: Peng Fan > --- > arch/arm/include/asm/arch-imx8m/ddr.h | 575 > ++ > drivers/Makefile

Re: [U-Boot] [U-Boot, v2, 1/1] common: Compile error with CONFIG_MULTI_DTB_FIT and not SPL

2018-11-09 Thread Tom Rini
On Tue, Oct 23, 2018 at 10:21:25AM +0200, Lars Povlsen wrote: > common/common_fit.c is including , but not actually using it. The > inclusion will cuase compile error on platforms using CONFIG_OF_SEPARATE > and not SPL. > > Signed-off-by: Lars Povlsen > Reviewed-by: Jean-Jacques Hiblot Applied

Re: [U-Boot] fit: Add missing CR in debug output in fit_find_config_node()

2018-11-09 Thread Tom Rini
On Thu, Nov 08, 2018 at 07:00:31AM +0100, Stefan Roese wrote: > Testing has shown that a line-break is missing in one debug line in > fit_find_config_node(). > > Signed-off-by: Stefan Roese Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___

Re: [U-Boot] MAINTAINERS: Update stm32mp entry

2018-11-09 Thread Tom Rini
On Thu, Nov 08, 2018 at 05:52:21PM +0100, Patrick Delaunay wrote: > Add mailing list for stm32mp architecture and board. > > Signed-off-by: Patrick Delaunay Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature ___ U-Bo

Re: [U-Boot] [U-Boot, v2, 23/23] spl: Add support for passing handoff info to U-Boot proper

2018-11-09 Thread Tom Rini
On Tue, Oct 02, 2018 at 05:22:53AM -0600, Simon Glass wrote: > There is some basic informaton that SPL normally wants to pass through to > U-Boot, such as the SDRAM size and bank information. > > Mkae use of the new bloblist structure for this. Add a new 'handoff' blob > which is set up in SPL an

Re: [U-Boot] [U-Boot,v1] dm: Fix typo - missed semicolon

2018-11-09 Thread Tom Rini
On Mon, Nov 05, 2018 at 06:24:03PM +0200, Andy Shevchenko wrote: > The commit > > 484fdf5ba058 ("dm: Add support for all targets which requires MANUAL_RELOC") > > introduces subtle typo, i.e. missed semicolon. > > Fixes: 484fdf5ba058 ("dm: Add support for all targets which requires > MANUAL_

Re: [U-Boot] spl: fix debug prints for tiny printf

2018-11-09 Thread Tom Rini
On Fri, Nov 02, 2018 at 09:49:52PM +0100, Simon Goldschmidt wrote: > Tiny printf does not support %.*s and %lX. Since tiny printf should > be very common in SPL, replace these by %32s (for printing image > name) and %lx. > > Signed-off-by: Simon Goldschmidt > Reviewed-by: Simon Glass Applied t

Re: [U-Boot] [U-Boot, v2, 08/23] spl: Support hash, input, pch, pci, rtc, tpm in SPL

2018-11-09 Thread Tom Rini
On Tue, Oct 02, 2018 at 05:22:38AM -0600, Simon Glass wrote: > At present these subsystems are only supported in U-Boot proper but it is > sometimes necessary to support them in SPL, or even TPL. Update the > Kconfig and Makefile to support this. Also adjust GPIO so that it can be > used in TPL if

Re: [U-Boot] [U-Boot, v2, 10/23] spl: Make SPL_DISABLE_BANNER_PRINT a positive option

2018-11-09 Thread Tom Rini
On Tue, Oct 02, 2018 at 05:22:40AM -0600, Simon Glass wrote: > Rather than having a negative option, make this a positive option and > enable it by default. This makes it easier to understand. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signat

Re: [U-Boot] [U-Boot, v2, 12/23] spl: Print a message if we are unable to load an image

2018-11-09 Thread Tom Rini
On Tue, Oct 02, 2018 at 05:22:42AM -0600, Simon Glass wrote: > It can confusing when U-Boot SPL hangs for no obvious reason, when it is > unable to load U-Boot. Add a message to indicate the cause. > > Signed-off-by: Simon Glass > --- > > Changes in v2: None > > common/spl/spl.c | 1 + > 1 fi

Re: [U-Boot] [U-Boot,v2,04/23] spl: Set up the bloblist in SPL

2018-11-09 Thread Tom Rini
On Tue, Oct 02, 2018 at 05:22:34AM -0600, Simon Glass wrote: > The bloblist is normally set up in SPL ready for use by U-Boot. Add > a simple implementation of this to the common SPL code. > > Signed-off-by: Simon Glass > --- > > Changes in v2: None > > common/spl/spl.c | 18 --

Re: [U-Boot] [U-Boot,v2,11/23] spl: Add a comment to spl_set_bd()

2018-11-09 Thread Tom Rini
On Tue, Oct 02, 2018 at 05:22:41AM -0600, Simon Glass wrote: > There is a strange feature to set global_data to a data-section variable > early in SPL. This only works if SPL actually has access to SRAM which is > not the case on x86, for eaxmple. Add a comment to this effect. > > Signed-off-by:

Re: [U-Boot] [U-Boot, v2, 09/23] spl: Add a define for SPL_TPL_PROMPT

2018-11-09 Thread Tom Rini
On Tue, Oct 02, 2018 at 05:22:39AM -0600, Simon Glass wrote: > We should use a macro rather than hard-coding the SPL prompt to 'spl' > since the code can be used by TPL too. Add a macro that works for both > and use it in various places. > > This allows TPL to use the same code without printing c

Re: [U-Boot] [U-Boot, v2, 03/23] Add core support for a bloblist to convey data from SPL

2018-11-09 Thread Tom Rini
On Tue, Oct 02, 2018 at 05:22:33AM -0600, Simon Glass wrote: > At present there is no standard way in U-Boot to pass information from SPL > to U-Boot proper. But sometimes SPL wants to convey information to U-Boot > that U-Boot cannot easily figure out. For example, if SPL sets up SDRAM > then it

Re: [U-Boot] [U-Boot,v2,05/23] bloblist: Locate bloblist in U-Boot

2018-11-09 Thread Tom Rini
On Tue, Oct 02, 2018 at 05:22:35AM -0600, Simon Glass wrote: > Add support for locating a bloblist in U-Boot that has been set up by SPL. > It is copied into RAM during relocation. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

Re: [U-Boot] [U-Boot, v2, 02/23] spl: Add support for logging in SPL and TPL

2018-11-09 Thread Tom Rini
On Tue, Oct 02, 2018 at 05:22:32AM -0600, Simon Glass wrote: > It is sometimes useful to log information in SPL and TPL. Add support for > this. > > Signed-off-by: Simon Glass Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature

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

2018-11-09 Thread Tom Rini
On Thu, Nov 08, 2018 at 10:58:35AM +0100, Heiko Schocher wrote: > Hello Tom, > > please pull from u-boot-ubi-git master > > as it is a Bugfix, I think it should go into current release. > > The following changes since commit dd610e616cceda16a81dfa6f9a134877f783548c: > > Merge tag 'u-boot-imx

Re: [U-Boot] [PATCH 09/15] imx: imx8m: introduce script to generate fit image

2018-11-09 Thread Troy Kisky
On 11/9/2018 1:16 AM, Peng Fan wrote: > Introduce script to generate fit image for i.MX8M > > Signed-off-by: Peng Fan > --- > arch/arm/mach-imx/mkimage_fit_atf.sh | 137 > +++ > 1 file changed, 137 insertions(+) > create mode 100755 arch/arm/mach-imx/mkimage_fit

Re: [U-Boot] [PATCH 07/15] imx: imx8m: clock refactor dram pll part

2018-11-09 Thread Troy Kisky
On 11/9/2018 1:16 AM, Peng Fan wrote: > Refactor dram_pll_init to accept args to configure different pll freq. > Introduce dram_enable_bypass and dram_disable_bypass > > Signed-off-by: Peng Fan > --- > arch/arm/include/asm/arch-imx8m/clock.h | 44 +++ > arch/arm/mach-imx/imx8m/clock.c

Re: [U-Boot] [PATCH 06/15] imx: spl: add MMC BOOT Device for i.MX8M

2018-11-09 Thread Troy Kisky
On 11/9/2018 10:14 AM, Troy Kisky wrote: > On 11/9/2018 1:16 AM, Peng Fan wrote: >> Add MMC BOOT Device for i.MX8M >> >> Signed-off-by: Peng Fan >> --- >> arch/arm/mach-imx/spl.c | 9 + >> 1 file changed, 9 insertions(+) >> >> diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c

Re: [U-Boot] [PATCH 06/15] imx: spl: add MMC BOOT Device for i.MX8M

2018-11-09 Thread Troy Kisky
On 11/9/2018 1:16 AM, Peng Fan wrote: > Add MMC BOOT Device for i.MX8M > > Signed-off-by: Peng Fan > --- > arch/arm/mach-imx/spl.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c > index e82eaa5682..d4852eef92 100644 > --- a/ar

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

2018-11-09 Thread Alexander Graf
> Am 09.11.2018 um 16:05 schrieb 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

[U-Boot] [PATCH v3 00/28] General fixes / cleanup for RISC-V and improvements to qemu-riscv

2018-11-09 Thread Lukas Auer
This patch series includes general fixes and cleanup for RISC-V. It also adds support for booting Linux on qemu-riscv. At the moment, only single-core systems are supported. Support for multi-core systems will be added with a future patch series. To boot Linux on qemu-riscv, Linux must be compile

[U-Boot] [PATCH u-boot 16/19] clk: Add clock driver for AXG

2018-11-09 Thread Neil Armstrong
This patch adds a minimal clock driver for the Amlogic AXG SoC to handle the basic gates and PLLs. Signed-off-by: Neil Armstrong --- arch/arm/include/asm/arch-meson/clock-axg.h | 104 + drivers/clk/Makefile| 2 +- drivers/clk/clk_meson_axg.c | 31

[U-Boot] [PATCH u-boot 13/19] ARM: meson: rework soc arch file to prepare for new SoC

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet We are about to add support for the Amlogic AXG SoC. While very close to the Gx SoC family, we will need to handle a few thing which are different in this SoC. Rework the meson arch directory to prepare for this. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong --

[U-Boot] [PATCH u-boot 18/19] ARM: meson: factorize common code out amlogic's boards

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet Now we have moved all the Amlogic board support to common generic board code, we can move the identical board_init() and ft_board_setup() functions to weak functions into the board-common mach-meson file. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong --- arch/

[U-Boot] [PATCH u-boot 15/19] ARM: dts: Sync Amlogic Meson AXG DT from Linux 4.20-rc1

2018-11-09 Thread Neil Armstrong
Synchronize the Amlogic AXG Device Tree files and bindings include from the recent Linux 4.20-rc1, because it includes patches fixing support for U-boot. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong --- arch/arm/dts/Makefile |3 +- arch/arm/dts/mes

[U-Boot] [PATCH u-boot 19/19] ARM: meson: Add boot device discovery

2018-11-09 Thread Neil Armstrong
The Amlogic Meson SoCs ROM supports a boot over USB with a custom protocol. When no other boot medium are available (or by forcing the USB mode), the ROM sets the primary USB port as device mode and waits for a Host to enumerate. When enumerated, a custom protocol described at [1] permits writing

[U-Boot] [PATCH u-boot 12/19] clk: meson: silence debug print

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet This debug print was not designed to be active in non-debug mode. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong --- drivers/clk/clk_meson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk_meson.c b/drivers/clk/clk_meson.c in

[U-Boot] [PATCH u-boot 14/19] ARM: meson: Add support for AXG family

2018-11-09 Thread Neil Armstrong
This patch adds support for the Amlogic AXG SoC, which is very close from the Amlogic GXL SoCs with : - Same 4xCortex-A53 CPUs but clocked at 1.2GHZ max - DDR Interface limited to DDR4 16bit - The whole physical register address space has been moved to 0xfxxx - The pinctrl setup has changed - T

[U-Boot] [PATCH u-boot 17/19] board: amlogic: add support for S400 board

2018-11-09 Thread Neil Armstrong
The S400 board is the Amlogic AXG SoC reference board including : - Amlogic A113DX ARM Cortex-A53 quad-core SoC @ 1.2GHz - 1GB DDR4 SDRAM - 10/100 Ethernet - 2 x USB 2.0 Host - eMMC - Infrared receiver - SDIO WiFi Module - MIPI DSI Connector - Audio HAT Connector - PCI-E M.2 Connectors S

[U-Boot] [PATCH u-boot 10/19] pinctrl: meson: add axg support

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet This adds support for the Amlogic AXG SoC pinctrl and GPIO controller using a specific set of pinctrl functions which differs from the GX SoCs. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong --- drivers/pinctrl/meson/Kconfig | 8 + drivers/pin

[U-Boot] [PATCH u-boot 08/19] pinctrl: meson: rework gx pmx function

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet In preparation of supporting the new Amlogix AGX SoCs, we need to move the Amlogic GX pinmux functions out of the common code to be able to add a different set of SoC specific pinmux functions for AXG. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong --- drivers/

[U-Boot] [PATCH u-boot 09/19] pinctrl: meson: select generic pinctrl

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet Meson pinctrl needs generic pinctrl, rather than depending on it select it Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong --- drivers/pinctrl/meson/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/meson/Kconfig b/drive

[U-Boot] [PATCH u-boot 07/19] configs: meson: change default load addresses

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet The original chosen addresses conflict with the BL2 initialisation. So far there was no issue with them but if we preload binaries in RAM (ROMUSB boot) before running the BL2 they get corrupted by the execution of BL2 init. If we load them around 0x0800, there is no such

[U-Boot] [PATCH u-boot 11/19] clk: meson: add static to meson_gates table

2018-11-09 Thread Neil Armstrong
The meson_gates table should be set static in the clk_meson driver. Signed-off-by: Neil Armstrong --- drivers/clk/clk_meson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk_meson.c b/drivers/clk/clk_meson.c index 236d734..509872b 100644 --- a/drivers/clk/clk_

[U-Boot] [PATCH u-boot 03/19] board: amlogic: remove p212 derivatives

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet The Khadas vim and the libretech aml-s905x-cc (aka Potato) derive from amlogic s905x reference design (P212). All the code in these board is a copy/paste from the p212, which is tedious to maintain. This change use p212 u-boot board for all these boards, while keeping a dedic

[U-Boot] [PATCH u-boot 06/19] ARM: rework amlogic configuration

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet Rework the board SYS_BOARD, SYS_VENDOR and SYS_CONFIG_NAME setup by moving the board Kconfig into the mach-meson Kconfig to make it easier to add new boards for a SoC architecture and add a custom config header or custom board handler for a platform. This drops the board CONF

[U-Boot] [PATCH u-boot 04/19] board: amlogic: move khadas-vim2 as q200 ref board

2018-11-09 Thread Neil Armstrong
The Khadas vim2 derive from amlogic s912 reference design (Q200). This patch moves the khadas-vim2 board support to a generic Q200 board, while keeping a dedicated defconfig to customize the names and device tree. Signed-off-by: Neil Armstrong --- arch/arm/mach-meson/Kconfig | 9 +

[U-Boot] [PATCH u-boot 05/19] board: amlogic: factorise gxbb boards

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet The nanopi-k2 and the odroid-c2 are similar enough to be supported by the same u-boot board. This change use odroid-c2 u-boot board for the nanopi-k2 as well. Dedicated defconfig are kept to customize the names and device tree. Signed-off-by: Jerome Brunet Signed-off-by: Nei

[U-Boot] [PATCH u-boot 02/19] configs: meson: remove unnecessary MESON_FDTFILE_SETTING

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet MESON_FDTFILE_SETTING is used to define the default name of the fdt file in u-boot environment. We can easily derive it from CONFIG_DEFAULT_DEVICE_TREE instead. This will help factorize the code a bit Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong --- include/c

[U-Boot] [PATCH u-boot 01/19] ARM: meson: clean-up platform selection

2018-11-09 Thread Neil Armstrong
From: Jerome Brunet Even if multiple board are selected through Kconfig, u-boot will only compile one. This makes sense since compiling these targets will export global symbols, such as board_init() The change rework amlogic Kconfig so only one board may be selected at a time Signed-off-by: Jer

[U-Boot] [PATCH u-boot 00/19] Amlogic Meson cleanup for AXG SoC support

2018-11-09 Thread Neil Armstrong
This patchset will refactor the Amlogic Meson SoC support in order to easily add support for the Amlogic AXg SoC family, and later the G12x SoCs. In order : - Cleanup the mach-meson configs - Move board support to reference design common boards - Move board Kconfig into mach-meson - Add AXG pinctr

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

2018-11-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) Si

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

2018-11-09 Thread Tom Rini
On Fri, Nov 09, 2018 at 09:14:00AM +, 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 au

Re: [U-Boot] [PATCH 01/15] Introduce CONFIG_FIT_EXTERNAL_OFFSET

2018-11-09 Thread Tom Rini
On Fri, Nov 09, 2018 at 09:16:14AM +, Peng Fan wrote: > Introduce CONFIG_FIT_EXTERNAL_OFFSET to give user a choice to choose > where to put the external data. > > Signed-off-by: Peng Fan > --- > Kconfig | 6 ++ > Makefile | 2 +- > 2 files changed, 7 insertions(+), 1 deletion(-) > > d

Re: [U-Boot] [PATCH v1 2/2] imx: mkimage: add size check to the u-boot.imx make target

2018-11-09 Thread Marcel Ziswiler
Hi Stefano On Thu, 2018-11-08 at 15:07 +0100, Stefano Babic wrote: > Hi Marcel, > > On 08/11/18 02:55, Fabio Estevam wrote: > > [Adding Stefano] > > > > On Wed, Nov 7, 2018 at 8:41 PM Marcel Ziswiler > > wrote: > > > > > > From: Marcel Ziswiler > > > > > > The make macro to check if the bina

[U-Boot] [PATCH v2 4/4] imx: mkimage: add size check to the u-boot.imx make target

2018-11-09 Thread Marcel Ziswiler
From: Marcel Ziswiler The make macro to check if the binary exceeds the board size limit is taken straight from the root Makefile. Without this and e.g. enabled EFI Vybrid fails booting as the regular size limit check does not take the final u-boot.imx binary size into account which is bigger du

[U-Boot] [PATCH v2 2/4] board: toradex: colibri_vf: unset CONFIG_CMDLINE_EDITING

2018-11-09 Thread Marcel Ziswiler
From: Marcel Ziswiler Unset CONFIG_CMDLINE_EDITING saving precious 4 Kb on boards with tough size restrictions. Signed-off-by: Marcel Ziswiler --- Changes in v2: New configs/colibri_vf_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/colibri_vf_defconfig b/configs/colib

[U-Boot] [PATCH v2 3/4] board: toradex: colibri_vf: drop SPI support

2018-11-09 Thread Marcel Ziswiler
From: Marcel Ziswiler Drop SPI support saving precious 4 Kb on boards with tough size restrictions. Signed-off-by: Marcel Ziswiler Signed-off-by: Marcel Ziswiler --- Changes in v2: New configs/colibri_vf_defconfig | 4 1 file changed, 4 deletions(-) diff --git a/configs/colibri_vf_def

[U-Boot] [PATCH v2 1/4] board: toradex: colibri_vf: efi_loader: unset CONFIG_EFI_UNICODE_CAPITALIZATION

2018-11-09 Thread Marcel Ziswiler
From: Marcel Ziswiler Unset CONFIG_EFI_UNICODE_CAPITALIZATION on boards with tough size restrictions. This is analogous to commit a90bf07afc43 ("efi_loader: unset CONFIG_EFI_UNICODE_CAPITALIZATION"). Signed-off-by: Marcel Ziswiler Reviewed-by: Alexander Graf --- Changes in v2: None config

[U-Boot] [PATCH u-boot 1/2] net: designware: add meson meson gxbb compatible

2018-11-09 Thread Neil Armstrong
Add the compatible string for the Amlogic GXBB SoC family. Signed-off-by: Neil Armstrong --- drivers/net/designware.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 19db0a8..cdcc03f 100644 --- a/drivers/net/designware.c +++ b/drivers

[U-Boot] [PATCH u-boot 2/2] net: designware: add meson meson axg compatible

2018-11-09 Thread Neil Armstrong
Add the compatible string for the upcoming Amlogic AXG SoC family. Signed-off-by: Neil Armstrong --- drivers/net/designware.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/designware.c b/drivers/net/designware.c index cdcc03f..4fa26ab 100644 --- a/drivers/net/designware.c +++ b

[U-Boot] [PATCH u-boot 0/2] net: designware: add meson meson compatibles

2018-11-09 Thread Neil Armstrong
Add the compatible strings in the Synopsys DWMAC driver for : - The Amlogic GXBB (and other GX) SoC - The Amlogic AXG (and other GX) SoC Neil Armstrong (2): net: designware: add meson meson gxbb comptatible net: designware: add meson meson axg compatible drivers/net/designware.c | 2 ++ 1 fi

[U-Boot] [PATCH u-boot] mmc: meson-gx: Add AXG compatible

2018-11-09 Thread Neil Armstrong
Add the compatible string for the upcoming Amlogic AXG SoC family. Signed-off-by: Neil Armstrong --- drivers/mmc/meson_gx_mmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c index 332f1e1..767dfff 100644 --- a/drivers/mmc/meson_gx_mmc

[U-Boot] [PATCH] tools: improve portability of imx_cntr_image.sh

2018-11-09 Thread Martin Husemann
Replace non-portable operator == with = The operator == in sh(1) / test(1) is non-POSIX and only implemented by some shells (like bash). It is equivalent to the standard defined operator =. --- tools/imx_cntr_image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/imx_

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

2018-11-09 Thread Lukas Auer
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 QEMU to boot the kernel with the U-Boot device tree. The QEMU boot command is added as the first boot target device. Si

[U-Boot] [PATCH v3 19/28] riscv: do not blindly modify the mstatus CSR

2018-11-09 Thread Lukas Auer
The mstatus CSR includes WPRI (writes preserve values, reads ignore values) fields and must therefore not be set to zero without preserving these fields. It is not apparent why mstatus is set to zero here since it is not required for U-Boot to run. Remove it. This instruction and others encode zer

[U-Boot] [PATCH v3 24/28] distro_bootcmd: add VirtIO distro boot command

2018-11-09 Thread Lukas Auer
Add a boot command to distro boot to support disks connected over the VirtIO bus. The boot command uses the shared block environment. Signed-off-by: Lukas Auer --- Changes in v3: - New patch to add VirtIO distro boot command Changes in v2: None doc/README.distro | 3 ++- includ

[U-Boot] [PATCH v3 22/28] riscv: qemu: support booting Linux

2018-11-09 Thread Lukas Auer
Support booting Linux (as payload of BBL) from FIT images. For this, the default CONFIG_SYS_BOOTM_LEN is increased to 16 MB, and the environment variables fdt_high and initrd_high are set to mark the device tree and initrd as in-place. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng --- Changes

[U-Boot] [PATCH v3 25/28] riscv: qemu: enable distro boot

2018-11-09 Thread Lukas Auer
Enable distro boot on the qemu-riscv32/64 boards. Supported boot target devices are VirtIO and DHCP. Signed-off-by: Lukas Auer --- Changes in v3: - New patch to enable distro boot on qemu-riscv32/64 Changes in v2: None configs/qemu-riscv32_defconfig | 2 ++ configs/qemu-riscv64_defconfig |

[U-Boot] [PATCH v3 18/28] riscv: remove unused labels in start.S

2018-11-09 Thread Lukas Auer
The labels nmi_vector, trap_vector and handle_reset in start.S are not used for RISC-V. Remove them. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng --- Changes in v3: None Changes in v2: - Drop removal of code that stores the contents of a2; this broke the board ax25-ae350. The code will be re

[U-Boot] [PATCH v3 07/28] riscv: enable -fdata-sections

2018-11-09 Thread Lukas Auer
Enable the -fdata-sections compiler option for RISC-V. Buildman reports the binary size decrease from this as 8365.3 bytes. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- Changes in v3: None Changes in v2: None arch/riscv/config.mk | 3 ++- 1 file changed, 2 inser

[U-Boot] [PATCH v3 14/28] riscv: implement the invalidate_icache_* functions

2018-11-09 Thread Lukas Auer
Implement the functions invalidate_icache_range() and invalidate_icache_all(). RISC-V does not have instructions for explicit cache-control. The functions in this patch are implemented with the memory ordering instruction for synchronizing the instruction and data streams. This may be implemented

[U-Boot] [PATCH v3 28/28] riscv: qemu: clear kernel-start/-end in device tree as workaround for BBL

2018-11-09 Thread Lukas Auer
QEMU specifies the location of Linux (supplied with the -kernel argument) in the device tree using the riscv,kernel-start and riscv,kernel-end properties. We currently rely on the SBI implementation of BBL to run Linux and therefore embed Linux as payload in BBL. This causes an issue, because BBL d

[U-Boot] [PATCH v3 23/28] riscv: align bootm implementation with that of other architectures

2018-11-09 Thread Lukas Auer
The bootm implementation of RISC-V diverges from that of other architectures. Update it to match the implementation of other architectures. The ARM implementation is used as a reference. This adds the following features and changes to RISC-V. * Add support for the BOOTM_STATE_OS_FAKE_GO command *

[U-Boot] [PATCH v3 06/28] riscv: set -march and -mabi based on the Kconfig configuration

2018-11-09 Thread Lukas Auer
Use the new Kconfig entries to construct the ISA string for the -march compiler flag. The -mabi compiler flag is selected based on the base integer instruction set. With this change, the C (compressed instructions) ISA extension is now enabled for all boards with CONFIG_RISCV_ISA_C set. Buildman r

[U-Boot] [PATCH v3 16/28] riscv: align mtvec on a 4-byte boundary

2018-11-09 Thread Lukas Auer
The machine trap-vector base address (mtvec) must be aligned on a 4-byte boundary. Add the necessary align directive to trap_entry. This patch also removes the global directive for trap_entry, which is not required. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng --- Changes in v3: None Change

[U-Boot] [PATCH v3 17/28] Drop CONFIG_INIT_CRITICAL

2018-11-09 Thread Lukas Auer
From: Bin Meng This is now deprecated and no board is using it. Drop it. Signed-off-by: Bin Meng Signed-off-by: Lukas Auer --- Changes in v3: None Changes in v2: - New patch to replace patch "riscv: remove CONFIG_INIT_CRITICAL" arch/nds32/cpu/n1213/start.S | 51 ---

[U-Boot] [PATCH v3 15/28] riscv: fix inconsistent use of spaces and tabs in start.S

2018-11-09 Thread Lukas Auer
start.S uses both tabs and spaces after instructions. Fix this by only using tabs after instructions. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- Changes in v3: None Changes in v2: None arch/riscv/cpu/start.S | 322 - 1 f

[U-Boot] [PATCH v3 05/28] riscv: add Kconfig entries for the C and A ISA extensions

2018-11-09 Thread Lukas Auer
Add Kconfig entries for the C (compressed instructions) and A (atomic instructions) ISA extensions. Only the C ISA extension is selectable. This matches the configuration in Linux. The Kconfig entries are not used yet. A follow-up patch will select the appropriate compiler flags based on the Kconf

[U-Boot] [PATCH v3 20/28] riscv: save hart ID and device tree passed by prior boot stage

2018-11-09 Thread Lukas Auer
Store the hart ID and device tree passed by the prior boot stage (in a0 and a1) in registers s0 and s1. Replace one use of s1 in start.S to avoid overwriting it. The device tree is also stored in memory to make it available to U-Boot with the configuration CONFIG_OF_PRIOR_STAGE. Signed-off-by: Lu

[U-Boot] [PATCH v3 26/28] dm: core: add missing prototype for ofnode_read_u64

2018-11-09 Thread Lukas Auer
Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v3: None Changes in v2: - Move prototype location to match the location of the function in ofnode.c include/dm/ofnode.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/dm/ofnode.h b

[U-Boot] [PATCH v3 21/28] riscv: qemu: use device tree passed by prior boot stage

2018-11-09 Thread Lukas Auer
QEMU provides a device tree, which is passed to U-Boot using register a1. We are now able to directly select the device tree with the configuration CONFIG_OF_PRIOR_STAGE. Replace the hard-coded address in qemu-riscv with it. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen

[U-Boot] [PATCH v3 11/28] riscv: complete the list of exception codes

2018-11-09 Thread Lukas Auer
Only the first four exception codes are defined. Add the missing exception codes from the definition in RISC-V Privileged Architecture Version 1.10. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- Changes in v3: None Changes in v2: None arch/riscv/lib/interrupts.c

[U-Boot] [PATCH v3 13/28] riscv: hang on unhandled exceptions

2018-11-09 Thread Lukas Auer
Hang on unhandled exceptions to prevent execution in a faulty state. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- Changes in v3: None Changes in v2: None arch/riscv/lib/interrupts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/lib/interrupts.

[U-Boot] [PATCH v3 10/28] riscv: do not reimplement generic io functions

2018-11-09 Thread Lukas Auer
RISC-V U-Boot reimplements the generic io functions from asm-generic/io.h. Remove the redundant implementation and include the generic io.h instead. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- Changes in v3: None Changes in v2: None arch/riscv/include/asm/io.h

[U-Boot] [PATCH v3 08/28] riscv: fix use of incorrectly sized variables

2018-11-09 Thread Lukas Auer
The RISC-V arch incorrectly uses 32-bit instead of 64-bit variables in several places. Fix this. In addition, BITS_PER_LONG is set to 64 on RV64I systems. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng --- Changes in v3: None Changes in v2: - Remove 0-padding in the format string to avoid prin

[U-Boot] [PATCH v3 04/28] riscv: select CONFIG_PHYS_64BIT on RV64I systems

2018-11-09 Thread Lukas Auer
CONFIG_PHYS_64BIT should be enabled on RV64I systems. Select it. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- Changes in v3: None Changes in v2: None arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig i

[U-Boot] [PATCH v3 12/28] riscv: treat undefined exception codes as reserved

2018-11-09 Thread Lukas Auer
Undefined exception codes currently lead to an out-of-bounds array access. Prevent this by treating undefined exception codes as "reserved". Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- Changes in v3: None Changes in v2: None arch/riscv/lib/interrupts.c | 8

[U-Boot] [PATCH v3 09/28] riscv: make use of the barrier functions from Linux

2018-11-09 Thread Lukas Auer
Replace the barrier functions in arch/riscv/include/asm/io.h with those defined in barrier.h, which is imported from Linux. This version is modified to remove the include statement of asm-generic/barrier.h, which is not available in U-Boot or required. Signed-off-by: Lukas Auer Reviewed-by: Bin M

[U-Boot] [PATCH v3 03/28] riscv: rename CPU_RISCV_32/64 to match architecture names ARCH_RV32I/64I

2018-11-09 Thread Lukas Auer
RISC-V defines the base integer instruction sets as RV32I and RV64I. Rename CPU_RISCV_32 and CPU_RISCV_64 to ARCH_RV32I and ARCH_RV64I to match this convention. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- Changes in v3: None Changes in v2: None arch/riscv/Kconf

[U-Boot] [PATCH v3 02/28] dts: riscv: update makefile to also clean the RISC-V dts directory

2018-11-09 Thread Lukas Auer
Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- Changes in v3: None Changes in v2: None dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dts/Makefile b/dts/Makefile index 9a9a3d5c98..cd6e9a968e 100644 --- a/dts/Makefile +++ b/dts/Make

[U-Boot] [PATCH v3 01/28] tools: .gitignore: add prelink-riscv

2018-11-09 Thread Lukas Auer
Ignore tools/prelink-riscv. Signed-off-by: Lukas Auer Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- Changes in v3: None Changes in v2: None tools/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/.gitignore b/tools/.gitignore index c8cdaef90c..e5ede22842 100644 --- a/to

Re: [U-Boot] Portability of sh scripts

2018-11-09 Thread Tom Rini
On Fri, Nov 09, 2018 at 01:08:42PM +0100, Martin Husemann wrote: > Hey folks, > > I noticed that tools/imx_cntr_image.sh contains non-portable code: > > if [ $f == "u-boot-dtb.bin" ]; then > > This is a "bash-ism", the operator "==" is not implemented by most test(1) > or sh(1) impmlement

[U-Boot] Portability of sh scripts

2018-11-09 Thread Martin Husemann
Hey folks, I noticed that tools/imx_cntr_image.sh contains non-portable code: if [ $f == "u-boot-dtb.bin" ]; then This is a "bash-ism", the operator "==" is not implemented by most test(1) or sh(1) impmlementations. Simply replacing it with "=" fixes this. Should I send a trivial patch

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

2018-11-09 Thread Simon Goldschmidt
On Fri, Nov 9, 2018 at 10:46 AM Andrea Barisani wrote: > > On Fri, Nov 09, 2018 at 07:11:36AM +0100, Simon Goldschmidt wrote: > > On Fri, Nov 9, 2018 at 1:37 AM Fabio Estevam wrote: > > > > > > Hi Andrea, > > > > > > On Tue, Nov 6, 2018 at 12:57 PM Andrea Barisani > > > wrote: > > > > > > > # lo

Re: [U-Boot] [PATCH v1 2/2] imx: mkimage: add size check to the u-boot.imx make target

2018-11-09 Thread Marcel Ziswiler
On Fri, 2018-11-09 at 10:41 +0100, Alexander Graf wrote: > On 11/09/2018 10:18 AM, Marcel Ziswiler wrote: > > Hi Stefano > > > > On Thu, 2018-11-08 at 15:07 +0100, Stefano Babic wrote: > > > Hi Marcel, > > > > > > On 08/11/18 02:55, Fabio Estevam wrote: > > > > [Adding Stefano] > > > > > > > > O

[U-Boot] [PATCH v3] net: phy: add TSE PCS support to dwmac-socfpga

2018-11-09 Thread Ooi, Joyce
This adds support for TSE PCS (Triple Speed Ethernet Physical Coding Sublayer) that uses SGMII adapter when the phy-mode in device tree is set to sgmii. Signed-off-by: Ooi, Joyce --- arch/arm/mach-socfpga/include/mach/misc.h |3 + arch/arm/mach-socfpga/misc_s10.c |6 + drivers/n

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

2018-11-09 Thread Andrea Barisani
On Fri, Nov 09, 2018 at 07:11:36AM +0100, Simon Goldschmidt wrote: > On Fri, Nov 9, 2018 at 1:37 AM Fabio Estevam wrote: > > > > Hi Andrea, > > > > On Tue, Nov 6, 2018 at 12:57 PM Andrea Barisani > > wrote: > > > > > # load large file > > > => ext2load mmc 0 0x6000 fitimage.itb > > > > Does t

Re: [U-Boot] [PATCH v1 2/2] imx: mkimage: add size check to the u-boot.imx make target

2018-11-09 Thread Alexander Graf
On 11/09/2018 10:18 AM, Marcel Ziswiler wrote: Hi Stefano On Thu, 2018-11-08 at 15:07 +0100, Stefano Babic wrote: Hi Marcel, On 08/11/18 02:55, Fabio Estevam wrote: [Adding Stefano] On Wed, Nov 7, 2018 at 8:41 PM Marcel Ziswiler wrote: From: Marcel Ziswiler The make macro to check if the

  1   2   >