[U-Boot] [PATCH v2 1/3] ARM: HYP/non-sec: migrate stack

2018-06-13 Thread Mark Kettenis
The current code that switches into HYP mode doesn't bother to set up a stack for HYP mode. This doesn't work for EFI applications as they expect a usable stack. Fix this by migrating the stack pointer from SP_svc to SP_hyp while in Monitor mode. This restores the stack pointer when we drop into

[U-Boot] [PATCH v2 2/3] efi_loader: ARM: run EFI payloads non-secure

2018-06-13 Thread Mark Kettenis
If desired (and possible) switch into HYP mode or non-secure SVC mode before calling the entry point of an EFI application. This allows U-Boot to provide a usable PSCI implementation and makes it possible to boot kernels into hypervisor mode using an EFI bootloader. Based on diffs from Heinrich S

[U-Boot] [PATCH v2 3/3] Revert "efi_loader: no support for ARMV7_NONSEC=y"

2018-06-13 Thread Mark Kettenis
This reverts commit c524997acb3d322e1bbd36c06ad02ef589705e7c. Booting ARMv7 in non-secure mode using bootefi works now. Signed-off-by: Mark Kettenis --- doc/README.uefi| 2 -- lib/efi_loader/Kconfig | 2 -- 2 files changed, 4 deletions(-) diff --git a/doc/README.uefi b/doc/README.uefi

[U-Boot] [PATCH v2 0/3] efi_loader: ARM: add support for ARMV7_NONSEC=y

2018-06-13 Thread Mark Kettenis
This series makes it possible to run EFI applications in non-secure mode. It allows me to run OpenBSD on the Technexion PICO-PI-IMX7 and Banana Pi boards using the PSCI implementation provided by U-Boot. This second version avoid using r3 to pass the original stack pointer. For some reason that r

Re: [U-Boot] [PATCH 0/3] efi_loader: ARM: add support for ARMV7_NONSEC=y

2018-06-13 Thread Mark Kettenis
> From: Heinrich Schuchardt > Date: Tue, 12 Jun 2018 20:00:28 +0200 > > On 06/12/2018 07:27 PM, Mark Kettenis wrote: > > This series makes it possible to run EFI applications in non-secure > > mode. It allows me to run OpenBSD on the imx7d-pico-pi board while > > using the PSCI implementation pr

[U-Boot] [PATCH v3 0/3] efi_loader: ARM: add support for ARMV7_NONSEC=y

2018-06-13 Thread Mark Kettenis
This series makes it possible to run EFI applications in non-secure mode. It allows me to run OpenBSD on the Technexion PICO-PI-IMX7 and Banana Pi boards using the PSCI implementation provided by U-Boot. The second version avoids using r3 to pass the original stack pointer. For some reason that r

[U-Boot] [PATCH v3 1/3] ARM: HYP/non-sec: migrate stack

2018-06-13 Thread Mark Kettenis
The current code that switches into HYP mode doesn't bother to set up a stack for HYP mode. This doesn't work for EFI applications as they expect a usable stack. Fix this by migrating the stack pointer from SP_svc to SP_hyp while in Monitor mode. This restores the stack pointer when we drop into

[U-Boot] [PATCH v3 2/3] efi_loader: ARM: run EFI payloads non-secure

2018-06-13 Thread Mark Kettenis
If desired (and possible) switch into HYP mode or non-secure SVC mode before calling the entry point of an EFI application. This allows U-Boot to provide a usable PSCI implementation and makes it possible to boot kernels into hypervisor mode using an EFI bootloader. Based on diffs from Heinrich S

[U-Boot] [PATCH v3 3/3] Revert "efi_loader: no support for ARMV7_NONSEC=y"

2018-06-13 Thread Mark Kettenis
This reverts commit c524997acb3d322e1bbd36c06ad02ef589705e7c. Booting ARMv7 in non-secure mode using bootefi works now. Signed-off-by: Mark Kettenis --- doc/README.uefi| 2 -- lib/efi_loader/Kconfig | 2 -- 2 files changed, 4 deletions(-) diff --git a/doc/README.uefi b/doc/README.uefi

Re: [U-Boot] [PATCH 1/2] net: Add option to prefer bootp/dhcp serverip

2018-06-13 Thread Joe Hershberger
On Wed, Jun 13, 2018 at 3:46 AM, Rick Chen wrote: > Hi Joe and Alex > > > After trace, I found that in store_net_params( ) > if CONFIG_BOOTP_SERVERIP is not define, > net_boot_file_name will be replaced by bp->bp_file > > copy_filename(net_boot_file_name, bp->bp_file,sizeof(net_boot_file_name)); >

Re: [U-Boot] [PATCH 2/4] ARM: Introduce ability to enable invalidate of BTB with ICIALLU on Cortex-A15 for CVE-2017-5715

2018-06-13 Thread Marek Vasut
On 06/13/2018 11:32 PM, Nishanth Menon wrote: > On 15:46-20180613, Tom Rini wrote: >> On Wed, Jun 13, 2018 at 08:32:15AM -0500, Nishanth Menon wrote: >>> On 23:05-20180612, Marek Vasut wrote: >>>> On 06/12/2018 10:24 PM, Nishanth Menon

[U-Boot] [PATCH v5] x86: use EFI calling convention for efi_main on x86_64

2018-06-13 Thread Ivan Gorinov
UEFI specifies the calling convention used in Microsoft compilers; first arguments of a function are passed in (%rcx, %rdx, %r8, %r9). All other compilers use System V ABI by default, passing first integer arguments of a function in (%rdi, %rsi, %rdx, %rcx, %r8, %r9). These ABI also specify diffe

[U-Boot] [PATCH v5] x86: use EFI calling convention for efi_main on x86_64

2018-06-13 Thread Ivan Gorinov
UEFI specifies the calling convention used in Microsoft compilers; first arguments of a function are passed in (%rcx, %rdx, %r8, %r9). All other compilers use System V ABI by default, passing first integer arguments of a function in (%rdi, %rsi, %rdx, %rcx, %r8, %r9). These ABI also specify diffe

Re: [U-Boot] [PATCH v2] x86: Add 64-bit setjmp/longjmp implementation

2018-06-13 Thread Ivan Gorinov
On Tue, Jun 12, 2018 at 05:57:34PM +0200, Heinrich Schuchardt wrote: > On 06/06/2018 08:28 PM, Ivan Gorinov wrote: > > Add setjmp/longjmp functions for x86_64. > > The FPU control word and MXCSR control bits are preserved across calls. > > With this patch > > make mrproper && make qemu-x86_64_def

[U-Boot] [PATCH] configs: db410c: Set eMMC env partition to BOOT2

2018-06-13 Thread Ramon Fried
BOOT2 partition is empty and free for using to store the environment. Use that instead of the default user partition. Signed-off-by: Ramon Fried --- include/configs/dragonboard410c.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonbo

[U-Boot] [PATCH 2/2] configs: dragonboard410c: remove env partition offset

2018-06-13 Thread Ramon Fried
BOOT2 is not partitioned, no need for partition offset. Signed-off-by: Ramon Fried --- arch/arm/dts/dragonboard410c-uboot.dtsi | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm/dts/dragonboard410c-uboot.dtsi b/arch/arm/dts/dragonboard410c-uboot.dtsi index b968f5eb68..5675086c91 10

[U-Boot] [PATCH 1/2] configs: db410c: Set eMMC env partition to BOOT2

2018-06-13 Thread Ramon Fried
BOOT2 partition is empty and free for using to store the environment. Use that instead of the default user partition. Signed-off-by: Ramon Fried --- include/configs/dragonboard410c.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonbo

[U-Boot] [PATCH v6 0/5] drivers: Add reset ctrl to drivers

2018-06-13 Thread Ley Foon Tan
Add reset ctrl to dwmmc socfpga, designware Ethernet and ns16550 serial drivers. A reset property is an optional feature, so only print out a warning and do not fail if a reset property is not present. If a reset property is discovered, then use it to deassert, thus bringing the IP out of res

[U-Boot] [PATCH v6 1/5] reset: Rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESET

2018-06-13 Thread Ley Foon Tan
Rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESET, so can use CONFIG_IS_ENABLED(DM_RESET) checking in reset.h later. Signed-off-by: Ley Foon Tan --- arch/arm/mach-stm32mp/Kconfig | 2 +- common/spl/Kconfig| 2 +- drivers/Makefile | 2 +- 3 files changed, 3 insertion

[U-Boot] [PATCH v6 3/5] mmc: dwmmc: socfpga: Add reset ctrl to driver

2018-06-13 Thread Ley Foon Tan
Add code to reset all reset signals as in mmc DT node. A reset property is an optional feature, so only print out a warning and do not fail if a reset property is not present. If a reset property is discovered, then use it to deassert, thus bringing the IP out of reset. Signed-off-by: Ley Foon T

[U-Boot] [PATCH v6 2/5] include: reset: Change to use CONFIG_IS_ENABLED(DM_RESET)

2018-06-13 Thread Ley Foon Tan
Change to use CONFIG_IS_ENABLED(DM_RESET), so this can work in SPL build (CONFIG_SPL_DM_RESET) and U-boot build (CONFIG_DM_RESET). Signed-off-by: Ley Foon Tan --- include/reset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/reset.h b/include/reset.h index 201bafc..

[U-Boot] [PATCH v6 4/5] serial: ns16550: Add reset ctrl to driver

2018-06-13 Thread Ley Foon Tan
Add code to reset all reset signals as in serial DT node. A reset property is an optional feature, so do not fail if a reset property is not present. If a reset property is discovered, then use it to deassert, thus bringing the IP out of reset. Signed-off-by: Ley Foon Tan Reviewed-by: Marek Vas

[U-Boot] [PATCH 2/2] Revert "powerpc/T104xRDB: Fix endian access issue on EHCI intinalization"

2018-06-13 Thread Ran Wang
There was an EHCI endian accessor issue. Now it's fixed by commit 9829ce2ff25c ("usb: ehci: Fix accessors for big-endian platforms and descriptors") Revert commit e6a727fffec7b2002e ("powerpc/T104xRDB: Fix endian access issue on EHCI intinalization") due to it fix that issue in a wrong way. Actua

[U-Boot] [PATCH v6 5/5] net: designware: Add reset ctrl to driver

2018-06-13 Thread Ley Foon Tan
Add code to reset all reset signals as in Ethernet DT node. A reset property is an optional feature, so only print out a warning and do not fail if a reset property is not present. If a reset property is discovered, then use it to deassert, thus bringing the IP out of reset. Signed-off-by: Ley F

[U-Boot] [PATCH 1/2] Revert "powerpc/p1_p2_rdb_pc: Fix endian access issue on EHCI intinalization"

2018-06-13 Thread Ran Wang
There was an EHCI endian accessor issue. Now it's fixed by commit 9829ce2ff25c ("usb: ehci: Fix accessors for big-endian platforms and descriptors"). Revert commit 0f2296bab141 ("powerpc/p1_p2_rdb_pc: Fix endian access issue on EHCI intinalization") due to it fix that issue in a wrong way. Actual

[U-Boot] [PATCH] usb: sunxi: don't touch reset bits in ccm if CONFIG_SUNXI_GEN_SUN6I is not defined

2018-06-13 Thread Vasily Khoruzhick
CCM in sun4i and sun5i doesn't have reset. Fixes commit 1ed9c1118 ("usb: sunxi: ehci: get rid of ifdefs") and commit 56830cee3 ("usb: sunxi: ohci: get rid of ifdefs") Signed-off-by: Vasily Khoruzhick --- drivers/usb/host/ehci-sunxi.c | 10 -- drivers/usb/host/ohci-sunxi.c | 10 -

Re: [U-Boot] [PATCH] usb: sunxi: don't touch reset bits in ccm if CONFIG_SUNXI_GEN_SUN6I is not defined

2018-06-13 Thread Chen-Yu Tsai
On Thu, Jun 14, 2018 at 11:04 AM, Vasily Khoruzhick wrote: > CCM in sun4i and sun5i doesn't have reset. > > Fixes commit 1ed9c1118 ("usb: sunxi: ehci: get rid of ifdefs") > and commit 56830cee3 ("usb: sunxi: ohci: get rid of ifdefs") > > Signed-off-by: Vasily Khoruzhick > --- > drivers/usb/host/

Re: [U-Boot] [PATCH] usb: sunxi: don't touch reset bits in ccm if CONFIG_SUNXI_GEN_SUN6I is not defined

2018-06-13 Thread Vasily Khoruzhick
On Wed, Jun 13, 2018 at 8:23 PM, Chen-Yu Tsai wrote: >> + if (priv->cfg->has_reset) { >> +#ifdef CONFIG_SUNXI_GEN_SUN6I > > The "has_reset" field is supposed to deal with this. Is it not working? There's no ahb_reset0_cfg in ccm on sun4i and sun5i, so compilation fails with drivers/usb/ho

[U-Boot] [PATCH] ARM: rmobile: Enable RPCHF on Draak

2018-06-13 Thread Marek Vasut
Enable the Renesas RPC HF driver on R8A77995 D3 Draak. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- configs/r8a77995_draak_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig index d3cccec8fc..f451950add 10064

[U-Boot] [PATCH] clk: rmobile: Add R8A77995 RPC clock

2018-06-13 Thread Marek Vasut
Add missing RPC entry into the R8A77995 clock driver tables. Signed-off-by: Marek Vasut Cc: Nobuhiro Iwamatsu --- drivers/clk/renesas/r8a77995-cpg-mssr.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/clk/renesas/r8a77995-cpg-mssr.c b/drivers/clk/renesas/r8a77995-cpg-mssr.c i

Re: [U-Boot] [PATCH] usb: sunxi: don't touch reset bits in ccm if CONFIG_SUNXI_GEN_SUN6I is not defined

2018-06-13 Thread Jagan Teki
On Thu, Jun 14, 2018 at 9:01 AM, Vasily Khoruzhick wrote: > On Wed, Jun 13, 2018 at 8:23 PM, Chen-Yu Tsai wrote: > >>> + if (priv->cfg->has_reset) { >>> +#ifdef CONFIG_SUNXI_GEN_SUN6I >> >> The "has_reset" field is supposed to deal with this. Is it not working? > > There's no ahb_reset0_cfg

Re: [U-Boot] [PATCH] usb: sunxi: don't touch reset bits in ccm if CONFIG_SUNXI_GEN_SUN6I is not defined

2018-06-13 Thread Vasily Khoruzhick
On Wed, Jun 13, 2018 at 10:29 PM, Jagan Teki wrote: > On Thu, Jun 14, 2018 at 9:01 AM, Vasily Khoruzhick wrote: >> On Wed, Jun 13, 2018 at 8:23 PM, Chen-Yu Tsai wrote: >> + if (priv->cfg->has_reset) { +#ifdef CONFIG_SUNXI_GEN_SUN6I >>> >>> The "has_reset" field is supposed to dea

Re: [U-Boot] [PATCH] usb: sunxi: don't touch reset bits in ccm if CONFIG_SUNXI_GEN_SUN6I is not defined

2018-06-13 Thread Jagan Teki
On Thu, Jun 14, 2018 at 11:06 AM, Vasily Khoruzhick wrote: > On Wed, Jun 13, 2018 at 10:29 PM, Jagan Teki wrote: >> On Thu, Jun 14, 2018 at 9:01 AM, Vasily Khoruzhick >> wrote: >>> On Wed, Jun 13, 2018 at 8:23 PM, Chen-Yu Tsai wrote: >>> > + if (priv->cfg->has_reset) { > +#ifdef

[U-Boot] [PATCH v2] usb: sunxi: access ahb_reset0_cfg in CCM using its offset

2018-06-13 Thread Vasily Khoruzhick
struct sunxi_ccm_reg doesn't have ahb_reset0_cfg on sun4i and sun5i, thus compilation fails with: drivers/usb/host/ohci-sunxi.c:96:26: error: 'struct sunxi_ccm_reg' has no member named 'ahb_reset0_cfg' Access this reg using its offset to fix this issue. Fixes commit 1ed9c1118 ("usb: sunxi: ehci:

[U-Boot] [PATCH] microblaze: Add new syscalls io_pgetevents and rseq

2018-06-13 Thread Michal Simek
Wire up new syscalls io_pgetevents and rseq. Signed-off-by: Michal Simek --- arch/microblaze/include/asm/unistd.h | 2 +- arch/microblaze/include/uapi/asm/unistd.h | 2 ++ arch/microblaze/kernel/syscall_table.S| 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/m

[U-Boot] [UBOOT PATCH] spi: zynq_qspi: Fixed incorrect return value error

2018-06-13 Thread Vipul Kumar
This patch replaced "return 0" with "return status" to fix the incorrect return value error reported by the coverity. Signed-off-by: Vipul Kumar --- drivers/spi/zynq_qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index

Re: [U-Boot] [PATCH 1/4] lib: fdtdec: Fill initial ram top with DDR start value from dt

2018-06-13 Thread Siva Durga Prasad Paladugu
Hi Simon, > -Original Message- > From: s...@google.com [mailto:s...@google.com] On Behalf Of Simon Glass > Sent: Saturday, June 09, 2018 3:29 AM > To: Michal Simek > Cc: Siva Durga Prasad Paladugu ; U-Boot Mailing List > ; Tom Rini > Subject: Re: [PATCH 1/4] lib: fdtdec: Fill initial ram

Re: [U-Boot] [PATCH v2 01/13] x86: doc: Fix reference to EFI doc in U-Boot

2018-06-13 Thread Bin Meng
Hi Heinrich, On Wed, Jun 13, 2018 at 7:06 AM, Bin Meng wrote: > Hi Heinrich, > > On Wed, Jun 13, 2018 at 12:04 AM, Heinrich Schuchardt > wrote: >> On 06/12/2018 05:36 PM, Bin Meng wrote: >>> Since commit f3b5056c4e72 ("efi_loader: split README.efi into two >>> separate documents"), the original

<    1   2