Re: [U-Boot] how to support usbtty

2008-08-27 Thread Bryan O'Donoghue
On Wed, 27 Aug 2008 10:20:58 -0400 mike zheng [EMAIL PROTECTED] wrote: I am using an embedded system with MPC8567 as processor and ISP1561 as USB PCI host controller. There is USB port on this board. A sealevel USB/RS232 cable is connect to the USB port on the board, and it converts USB port

Re: [U-Boot] how to support usbtty

2008-08-27 Thread Bryan O'Donoghue
On Wed, 27 Aug 2008 10:20:58 -0400 mike zheng [EMAIL PROTECTED] wrote: Or is there any other solution for me? I don't have to use the USB-RS232 cable. I just need the Uboot console from USB port. One more thing. If the isp1561 supports slave mode - you can implement usbdcore_isp1561.c and add

[U-Boot] [PATCH v2] usb: f_mass_storage: Fix compile on x86

2018-04-27 Thread Bryan O'Donoghue
of set_bit and clear bit. This patch renames to _set_bit() and _clear_bit() respectively to avoid the namespace collision. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Lukasz Majewski <lu...@denx.de> Cc: Marek Vasut <ma...@denx.de> --- drivers/usb/gadget/f_

Re: [U-Boot] [PATCH v2] usb: f_mass_storage: Fix compile on x86

2018-04-27 Thread Bryan O'Donoghue
On 26/04/18 22:21, Marek Vasut wrote: On 04/26/2018 10:47 PM, Bryan O'Donoghue wrote: Compiling the f_mass_storage driver for an x86 target results in a compilation error as set_bit and clear_bit are provided by bitops.h The local version of set_bit and clear_bit are doing some IP-block

[U-Boot] [PATCH 1/9] x86: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-27 Thread Bryan O'Donoghue
x86 bitops.h provides a __set_bit() but does not define PLATFORM__SET_BIT as a result generic_set_bit() is used instead of the architecturally provided __set_bit(). Hook the arch __set_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Simon Glass <s...@chr

[U-Boot] [PATCH 3/9] riscv: : Define PLATFORM__CLEAR_BIT for generic_clear_bit()

2018-04-27 Thread Bryan O'Donoghue
riscv bitops.h provides a __clear_bit() but does not define PLATFORM__CLEAR_BIT as a result generic_clear_bit() is used instead of the architecturally provided __clear_bit(). Hook the arch __clear_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Rick C

[U-Boot] [PATCH v2 6/9] nds32: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-27 Thread Bryan O'Donoghue
nds32 bitops.h provides a __set_bit() but does not define PLATFORM__SET_BIT as a result generic_set_bit() is used instead of the architecturally provided __set_bit(). Hook the arch __set_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Macpaul Lin

[U-Boot] [PATCH v2 9/9] usb: composite convert __set_bit to generic_set_bit

2018-04-27 Thread Bryan O'Donoghue
that the composite device is using __set_bit(). This patch switches over to generic_set_bit to maintain consistency between the two gadget drivers. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Lukasz Majewski <lu...@denx.de> Cc: Marek Vasut <ma...@denx.de> ---

[U-Boot] [PATCH v2 4/9] nios2: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-27 Thread Bryan O'Donoghue
nios2 bitops.h provides a __set_bit() but does not define PLATFORM__SET_BIT as a result generic_set_bit() is used instead of the architecturally provided __set_bit(). Hook the arch __set_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Thomas Cho

[U-Boot] [PATCH 2/9] riscv: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-27 Thread Bryan O'Donoghue
riscv bitops.h provides a __set_bit() but does not define PLATFORM__SET_BIT as a result generic_set_bit() is used instead of the architecturally provided __set_bit(). Hook the arch __set_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Rick Chen <r...@ande

[U-Boot] [PATCH 4/9] nios2: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-27 Thread Bryan O'Donoghue
nios2 bitops.h provides a __set_bit() but does not define PLATFORM__SET_BIT as a result generic_set_bit() is used instead of the architecturally provided __set_bit(). Hook the arch __set_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Thomas Cho

[U-Boot] [PATCH 6/9] nds32: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-27 Thread Bryan O'Donoghue
nds32 bitops.h provides a __set_bit() but does not define PLATFORM__SET_BIT as a result generic_set_bit() is used instead of the architecturally provided __set_bit(). Hook the arch __set_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Macpaul Lin

[U-Boot] [PATCH 0/9] Fixup set_bit/clear_bit definition and usage

2018-04-27 Thread Bryan O'Donoghue
need to change IMO. Bryan O'Donoghue (9): x86: Define PLATFORM__SET_BIT for generic_set_bit() riscv: Define PLATFORM__SET_BIT for generic_set_bit() riscv: : Define PLATFORM__CLEAR_BIT for generic_clear_bit() nios2: Define PLATFORM__SET_BIT for generic_set_bit() nios2: : Define

[U-Boot] [PATCH 5/9] nios2: : Define PLATFORM__CLEAR_BIT for generic_clear_bit()

2018-04-27 Thread Bryan O'Donoghue
nios2 bitops.h provides a __clear_bit() but does not define PLATFORM__CLEAR_BIT as a result generic_clear_bit() is used instead of the architecturally provided __clear_bit(). Hook the arch __clear_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Thomas Cho

[U-Boot] [PATCH 9/9] usb: composite convert __set_bit to generic_set_bit

2018-04-27 Thread Bryan O'Donoghue
that the composite device is using __set_bit(). This patch switches over to generic_set_bit to maintain consistency between the two gadget drivers. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Lukasz Majewski <lu...@denx.de> Cc: Marek Vasut <ma...@denx.de> ---

[U-Boot] [PATCH v2 5/9] nios2: Define PLATFORM__CLEAR_BIT for generic_clear_bit()

2018-04-27 Thread Bryan O'Donoghue
nios2 bitops.h provides a __clear_bit() but does not define PLATFORM__CLEAR_BIT as a result generic_clear_bit() is used instead of the architecturally provided __clear_bit(). Hook the arch __clear_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Thomas Cho

[U-Boot] [PATCH v2 7/9] nds32: Define PLATFORM__CLEAR_BIT for generic_clear_bit()

2018-04-27 Thread Bryan O'Donoghue
nds2 bitops.h provides a __clear_bit() but does not define PLATFORM__CLEAR_BIT as a result generic_clear_bit() is used instead of the architecturally provided __clear_bit(). Hook the arch __clear_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Macpaul Lin

[U-Boot] [PATCH v2 8/9] usb: f_mass_storage: Fix set_bit and clear_bit usage

2018-04-27 Thread Bryan O'Donoghue
and Intel Edison Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Lukasz Majewski <lu...@denx.de> Cc: Marek Vasut <ma...@denx.de> --- drivers/usb/gadget/f_mass_storage.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/

[U-Boot] [PATCH 7/9] nds2: : Define PLATFORM__CLEAR_BIT for generic_clear_bit()

2018-04-27 Thread Bryan O'Donoghue
nds2 bitops.h provides a __clear_bit() but does not define PLATFORM__CLEAR_BIT as a result generic_clear_bit() is used instead of the architecturally provided __clear_bit(). Hook the arch __clear_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Macpaul Lin

[U-Boot] [PATCH v2 0/9] Fixup set_bit/clear_bit definition and usage

2018-04-27 Thread Bryan O'Donoghue
consistencies. There are some usages of __set_bit() but those are in SoC specific GPIO code-paths and therefore don't really need to change IMO. Bryan O'Donoghue (9): x86: Define PLATFORM__SET_BIT for generic_set_bit() riscv: Define PLATFORM__SET_BIT for generic_set_bit() riscv: Define PLATFO

[U-Boot] [PATCH v2 1/9] x86: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-27 Thread Bryan O'Donoghue
x86 bitops.h provides a __set_bit() but does not define PLATFORM__SET_BIT as a result generic_set_bit() is used instead of the architecturally provided __set_bit(). Hook the arch __set_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Simon Glass <s...@chr

[U-Boot] [PATCH v2 3/9] riscv: Define PLATFORM__CLEAR_BIT for generic_clear_bit()

2018-04-27 Thread Bryan O'Donoghue
riscv bitops.h provides a __clear_bit() but does not define PLATFORM__CLEAR_BIT as a result generic_clear_bit() is used instead of the architecturally provided __clear_bit(). Hook the arch __clear_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Rick C

[U-Boot] [PATCH v3 8/9] usb: f_mass_storage: Fix set_bit and clear_bit usage

2018-04-27 Thread Bryan O'Donoghue
and Intel Edison Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Lukasz Majewski <lu...@denx.de> Cc: Marek Vasut <ma...@denx.de> --- drivers/usb/gadget/f_mass_storage.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/

[U-Boot] [PATCH v2 2/9] riscv: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-27 Thread Bryan O'Donoghue
riscv bitops.h provides a __set_bit() but does not define PLATFORM__SET_BIT as a result generic_set_bit() is used instead of the architecturally provided __set_bit(). Hook the arch __set_bit() now. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Rick Chen <r...@ande

Re: [U-Boot] [PATCH 1/4] mx7: psci: add cpu hotplug support

2018-05-28 Thread Bryan O'Donoghue
On 28/05/18 07:17, Anson Huang wrote: This patch adds cpu hotplug support, previous imx_cpu_off implementation is NOT safe, a CPU can NOT power down itself in runtime, it will cause system bus hang due to pending transaction. So need to use other online CPU to kill it when it is ready for

[U-Boot] [PATCH] usb: f_mass_storage: Fix compile on x86

2018-04-26 Thread Bryan O'Donoghue
Compiling the f_mass_storage driver for an x86 target results in a compilation error as set_bit and clear_bit are provided by bitops.h Fix that now by only compiling up the local definition of set_bit and clear_bit only if not already provided by the environment. Signed-off-by: Bryan O'Donoghue

Re: [U-Boot] [PATCH] usb: f_mass_storage: Fix compile on x86

2018-04-26 Thread Bryan O'Donoghue
On 26/04/18 16:14, Marek Vasut wrote: On 04/26/2018 04:41 PM, Bryan O'Donoghue wrote: Compiling the f_mass_storage driver for an x86 target results in a compilation error as set_bit and clear_bit are provided by bitops.h Fix that now by only compiling up the local definition of set_bit

[U-Boot] [PATCH v3 0/9] Fixup set_bit/clear_bit definition and usage

2018-04-30 Thread Bryan O'Donoghue
se are in SoC specific GPIO code-paths and therefore don't really need to change IMO. Bryan O'Donoghue (9): x86: Define PLATFORM__SET_BIT for generic_set_bit() riscv: Define PLATFORM__SET_BIT for generic_set_bit() riscv: Define PLATFORM__CLEAR_BIT for generic_clear_bit() nios2: Define PLAT

[U-Boot] [PATCH v3 4/9] nios2: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-30 Thread Bryan O'Donoghue
() is called - as opposed to the default cross-platform generic_set_bit(). Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Thomas Chou <tho...@wytron.com.tw> --- arch/nios2/include/asm/bitops/non-atomic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/nios2

[U-Boot] [PATCH v3 3/9] riscv: Define PLATFORM__CLEAR_BIT for generic_clear_bit()

2018-04-30 Thread Bryan O'Donoghue
generic_clear_bit() is called - as opposed to the default cross-platform generic_clear_bit(). Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Rick Chen <r...@andestech.com> Cc: Greentime Hu <green...@gmail.com> --- arch/riscv/include/asm/bitops.h | 2 ++ 1 file cha

[U-Boot] [PATCH v3 9/9] usb: composite convert __set_bit to generic_set_bit

2018-04-30 Thread Bryan O'Donoghue
that the composite device is using __set_bit(). This patch switches over to generic_set_bit to maintain consistency between the two gadget drivers. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Lukasz Majewski <lu...@denx.de> Cc: Marek Vasut <ma...@denx.de> ---

[U-Boot] [PATCH v3 6/9] nds32: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-30 Thread Bryan O'Donoghue
() is called - as opposed to the default cross-platform generic_set_bit(). Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Macpaul Lin <macp...@andestech.com> --- arch/nds32/include/asm/bitops.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/nds32/include/as

[U-Boot] [PATCH v3 8/9] usb: f_mass_storage: Fix set_bit and clear_bit usage

2018-04-30 Thread Bryan O'Donoghue
and Intel Edison Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Lukasz Majewski <lu...@denx.de> Cc: Marek Vasut <ma...@denx.de> --- drivers/usb/gadget/f_mass_storage.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/

[U-Boot] [PATCH v3 7/9] nds32: Define PLATFORM__CLEAR_BIT for generic_clear_bit()

2018-04-30 Thread Bryan O'Donoghue
generic_clear_bit() is called - as opposed to the default cross-platform generic_clear_bit(). Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Macpaul Lin <macp...@andestech.com> --- arch/nds32/include/asm/bitops.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/nds32

[U-Boot] [PATCH v3 2/9] riscv: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-30 Thread Bryan O'Donoghue
() is called - as opposed to the default cross-platform generic_set_bit(). Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Rick Chen <r...@andestech.com> Cc: Greentime Hu <green...@gmail.com> --- arch/riscv/include/asm/bitops.h | 2 ++ 1 file changed, 2 insertions(+)

[U-Boot] [PATCH v3 1/9] x86: Define PLATFORM__SET_BIT for generic_set_bit()

2018-04-30 Thread Bryan O'Donoghue
() is called - as opposed to the default cross-platform generic_set_bit(). Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Simon Glass <s...@chromium.org> Cc: Bin Meng <bmeng...@gmail.com> --- arch/x86/include/asm/bitops.h | 2 ++ 1 file changed, 2 insertions(+) dif

Re: [U-Boot] [PATCH v3 8/9] usb: f_mass_storage: Fix set_bit and clear_bit usage

2018-04-30 Thread Bryan O'Donoghue
On 27/04/18 17:20, Lukasz Majewski wrote: Hi Bryan, Compiling the f_mass_storage driver for an x86 target results in a compilation error as set_bit and clear_bit are provided by bitops.h Looking at the provenance of the current u-boot code and the git change history in the kernel, it looks

Re: [U-Boot] [PATCH v2 12/23] arm: imx: hab: Print CSF based on IVT descriptor

2017-12-29 Thread Bryan O'Donoghue
On 29/12/17 16:42, Breno Matheus Lima wrote: The hab_rvt_authenticate_image() is usually executed for extending the root of trust beyond the initial boot image (zImage, u-boot-ivt.img), in my understanding the layout described on the NXP documentation " | IVT | BINARY | CSF | " just applies

Re: [U-Boot] [PATCH v2 04/23] arm: imx: hab: Optimise flow of authenticate_image on hab_entry fail

2017-12-29 Thread Bryan O'Donoghue
On 29/12/17 16:36, Breno Matheus Lima wrote: Secure boot enabled HAB Configuration: 0xcc, HAB State: 0x99 No HAB Events Found! => In this situation the "hab_rvt_authenticate_image()" is not executed, It's a bit confusing to receive a "No HAB Events Found!" message after running hab_auth_img

[U-Boot] [PATCH v3 00/25] Fix and extend i.MX HAB layer

2017-12-29 Thread Bryan O'Donoghue
nality. - hab_rvt_check_target is a recommended check in the NXP documents to perform prior to hab_rvt_authenticate_image - hab_rvt_failsafe is a useful function to set the board into BootROM USB recovery mode. Bryan O'Donoghue (25): arm: imx: hab: Make authenticate_image return int arm: imx: ha

[U-Boot] [PATCH v3 16/25] arm: imx: hab: Implement hab_rvt_check_target

2017-12-29 Thread Bryan O'Donoghue
. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfeld <sven.ebenf...@gmail.com> Cc:

[U-Boot] [PATCH v3 13/25] arm: imx: hab: Print CSF based on IVT descriptor

2017-12-29 Thread Bryan O'Donoghue
The IVT gives the absolute address of the CSF. There is no requirement for the CSF to be located adjacent to the IVT so lets use the address provided in the IVT header instead of the hard-coded fixed CSF offset currently in place. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org&

[U-Boot] [PATCH v3 05/25] arm: imx: hab: Move IVT_SIZE to hab.h

2017-12-29 Thread Bryan O'Donoghue
The size of the IVT header should be defined in hab.h move it there now. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <al

[U-Boot] [PATCH v3 17/25] arm: imx: hab: Add a hab_rvt_check_target to image auth

2017-12-29 Thread Bryan O'Donoghue
and perform that check as directed. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfel

[U-Boot] [PATCH v3 18/25] arm: imx: hab: Make internal functions and data static

2017-12-29 Thread Bryan O'Donoghue
There is no need to export these functions and data structures externally. Make them all static now. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.co

[U-Boot] [PATCH v3 03/25] arm: imx: hab: Optimise flow of authenticate_image on is_enabled fail

2017-12-29 Thread Bryan O'Donoghue
There is no need to call is_enabled() twice in authenticate_image - it does nothing but add an additional layer of indentation. We can check for is_enabled() at the start of the function and return the result code directly. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: S

[U-Boot] [PATCH v3 21/25] arm: imx: hab: Make imx_hab_is_enabled global

2017-12-29 Thread Bryan O'Donoghue
It will be helpful to boot commands to know if the HAB is enabled. Export imx_hab_is_enabled() now to facilitate further work with this data-point in a secure-boot context. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: F

[U-Boot] [PATCH v3 20/25] arm: imx: hab: Prefix authenticate_image with imx_hab

2017-12-29 Thread Bryan O'Donoghue
imx_hab_authenticate_image() is on the other hand very explicit. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net>

[U-Boot] [PATCH v3 21/25] arm: imx: hab: Rename is_hab_enabled imx_hab_is_enabled

2017-12-29 Thread Bryan O'Donoghue
() is a tautology. A more logical name is imx_hab_is_enabled(). Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net>

[U-Boot] [PATCH v3 23/25] arm: imx: hab: Implement hab_rvt_failsafe

2017-12-29 Thread Bryan O'Donoghue
on the alternative BootROM API. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfeld <sv

[U-Boot] [PATCH v3 14/25] arm: imx: hab: Print additional IVT elements during debug

2017-12-29 Thread Bryan O'Donoghue
This patch enables printout of the IVT entry, dcd and csf data fields. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u

[U-Boot] [PATCH v3 01/25] arm: imx: hab: Make authenticate_image return int

2017-12-29 Thread Bryan O'Donoghue
. The first step is fixing the return type in authenticate_image() so do that now. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <al

[U-Boot] [PATCH v3 06/25] arm: imx: hab: Move CSF_PAD_SIZE to hab.h

2017-12-29 Thread Bryan O'Donoghue
CSF_PAD_SIZE should be defined in hab.h, move it to that location now. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u

[U-Boot] [PATCH v3 08/25] arm: imx: hab: Fix authenticate image lockup on MX7

2017-12-29 Thread Bryan O'Donoghue
performance impact with dcache switched off so this fix is relatively pain-free. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u

[U-Boot] [PATCH v3 22/25] arm: imx: hab: Define rvt_failsafe()

2017-12-29 Thread Bryan O'Donoghue
ce invoked the part will drop down to its BootROM USB recovery mode. Should it be the case that the part is in secure boot mode - only an appropriately signed binary will be accepted by the ROM and subsequently executed. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic

[U-Boot] [PATCH v3 10/25] arm: imx: hab: Add IVT header verification

2017-12-29 Thread Bryan O'Donoghue
The IVT header contains a magic number, fixed length and one of two version identifiers. Validate these settings before doing anything with a putative IVT binary. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam

[U-Boot] [PATCH v3 25/25] arm: imx: hab: Add hab_failsafe console command

2017-12-29 Thread Bryan O'Donoghue
ux dmesg thus allowing download of a new image via the BootROM USB download protocol routine. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert A

[U-Boot] [PATCH v3 19/25] arm: imx: hab: Prefix authenticate_image with imx_hab

2017-12-29 Thread Bryan O'Donoghue
imx_hab_authenticate_image() is on the other hand very explicit. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net>

[U-Boot] [PATCH v3 25/25] arm: imx: hab: Print HAB event log only after calling ROM

2017-12-29 Thread Bryan O'Donoghue
and received some sort of status code. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Suggested-by: Cc: Breno Matheus Lima <brenomath...@gmail.com> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com>

[U-Boot] [PATCH v3 22/25] arm: imx: hab: Make imx_hab_is_enabled global

2017-12-29 Thread Bryan O'Donoghue
It will be helpful to boot commands to know if the HAB is enabled. Export imx_hab_is_enabled() now to facilitate further work with this data-point in a secure-boot context. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: F

[U-Boot] [PATCH v3 02/25] arm: imx: hab: Fix authenticate_image result code

2017-12-29 Thread Bryan O'Donoghue
: 36c1ca4d46ef ("imx: Support i.MX6 High Assurance Boot authentication") Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.

[U-Boot] [PATCH v3 15/25] arm: imx: hab: Define rvt_check_target()

2017-12-29 Thread Bryan O'Donoghue
ory region is good. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfeld <sven

[U-Boot] [PATCH v3 18/25] arm: imx: hab: Print HAB event log only after calling ROM

2017-12-29 Thread Bryan O'Donoghue
and received some sort of status code. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Suggested-by: Cc: Breno Matheus Lima <brenomath...@gmail.com> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com>

[U-Boot] [PATCH v3 04/25] arm: imx: hab: Optimise flow of authenticate_image on hab_entry fail

2017-12-29 Thread Bryan O'Donoghue
The current code disjoins an entire block of code on hab_entry pass/fail resulting in a large chunk of authenticate_image being offset to the right. Fix this by checking hab_entry() pass/failure and exiting the function directly if in an error state. Signed-off-by: Bryan O'Donoghue <bryan.odo

[U-Boot] [PATCH v3 07/25] arm: imx: hab: Fix authenticate_image input parameters

2017-12-29 Thread Bryan O'Donoghue
This patch is the first step in making that happen subsequent patches will focus on removing hard-coded offsets to the IVT, which again is not mandated to live at the end of a .imx image. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de

[U-Boot] [PATCH v3 24/25] arm: imx: hab: Implement hab_rvt_failsafe

2017-12-29 Thread Bryan O'Donoghue
on the alternative BootROM API. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfeld <sv

[U-Boot] [PATCH v3 12/25] arm: imx: hab: Only call ROM once headers are verified

2017-12-29 Thread Bryan O'Donoghue
-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfeld <sven.ebenf...@gmail.com> Cc:

[U-Boot] [PATCH v3 19/25] arm: imx: hab: Make internal functions and data static

2017-12-29 Thread Bryan O'Donoghue
There is no need to export these functions and data structures externally. Make them all static now. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.co

[U-Boot] [PATCH v3 11/25] arm: imx: hab: Verify IVT self matches calculated address

2017-12-29 Thread Bryan O'Donoghue
The IVT is a self-describing structure which contains a self field. The self field is the absolute physical base address the IVT ought to be at in memory. Use the IVT self field to validate the calculated ivt_addr bugging out if the two values differ. Signed-off-by: Bryan O'Donoghue <bryan.odo

[U-Boot] [PATCH v3 09/25] arm: imx: hab: Add IVT header definitions

2017-12-29 Thread Bryan O'Donoghue
in later patches, where we will break the current incorrect dependence on fixed offsets in favour of an IVT described parsing of incoming binaries. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com>

[U-Boot] [PATCH v3 20/25] arm: imx: hab: Rename is_hab_enabled imx_hab_is_enabled

2017-12-29 Thread Bryan O'Donoghue
() is a tautology. A more logical name is imx_hab_is_enabled(). Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net>

[U-Boot] [PATCH v3 24/25] arm: imx: hab: Add hab_failsafe console command

2017-12-29 Thread Bryan O'Donoghue
ux dmesg thus allowing download of a new image via the BootROM USB download protocol routine. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert A

[U-Boot] [PATCH v3 23/25] arm: imx: hab: Define rvt_failsafe()

2017-12-29 Thread Bryan O'Donoghue
ce invoked the part will drop down to its BootROM USB recovery mode. Should it be the case that the part is in secure boot mode - only an appropriately signed binary will be accepted by the ROM and subsequently executed. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic

Re: [U-Boot] [PATCH v5 00/24] Fix and extend i.MX HAB layer

2018-01-09 Thread Bryan O'Donoghue
On 09/01/18 15:53, Breno Matheus Lima wrote: Hi Bryan, 2018-01-08 15:36 GMT-02:00 Bryan O'Donoghue <bryan.odonog...@linaro.org>: v5: - Drop dcache disable across HAB call. We can't replicate this error on the current codebase and the available images. We'll have to wait for the

[U-Boot] [PATCH v5 04/24] arm: imx: hab: Optimise flow of authenticate_image on hab_entry fail

2018-01-08 Thread Bryan O'Donoghue
The current code disjoins an entire block of code on hab_entry pass/fail resulting in a large chunk of authenticate_image being offset to the right. Fix this by checking hab_entry() pass/failure and exiting the function directly if in an error state. Signed-off-by: Bryan O'Donoghue <bryan.odo

[U-Boot] [PATCH v5 01/24] arm: imx: hab: Make authenticate_image return int

2018-01-08 Thread Bryan O'Donoghue
. The first step is fixing the return type in authenticate_image() so do that now. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <al

[U-Boot] [PATCH v5 00/24] Fix and extend i.MX HAB layer

2018-01-08 Thread Bryan O'Donoghue
nality. - hab_rvt_check_target is a recommended check in the NXP documents to perform prior to hab_rvt_authenticate_image - hab_rvt_failsafe is a useful function to set the board into BootROM USB recovery mode. Bryan O'Donoghue (24): arm: imx: hab: Make authenticate_image return int arm: imx: ha

[U-Boot] [PATCH v5 15/24] arm: imx: hab: Implement hab_rvt_check_target

2018-01-08 Thread Bryan O'Donoghue
. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfeld <sven.ebenf...@gmail.com> Cc:

[U-Boot] [PATCH v5 20/24] arm: imx: hab: Rename is_hab_enabled imx_hab_is_enabled

2018-01-08 Thread Bryan O'Donoghue
() is a tautology. A more logical name is imx_hab_is_enabled(). Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net>

[U-Boot] [PATCH v5 13/24] arm: imx: hab: Print additional IVT elements during debug

2018-01-08 Thread Bryan O'Donoghue
This patch enables printout of the IVT entry, dcd and csf data fields. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u

[U-Boot] [PATCH v5 17/24] arm: imx: hab: Print HAB event log only after calling ROM

2018-01-08 Thread Bryan O'Donoghue
and received some sort of status code. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Suggested-by: Cc: Breno Matheus Lima <brenomath...@gmail.com> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com>

[U-Boot] [PATCH v5 05/24] arm: imx: hab: Move IVT_SIZE to hab.h

2018-01-08 Thread Bryan O'Donoghue
The size of the IVT header should be defined in hab.h move it there now. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <al

[U-Boot] [PATCH v5 02/24] arm: imx: hab: Fix authenticate_image result code

2018-01-08 Thread Bryan O'Donoghue
: 36c1ca4d46ef ("imx: Support i.MX6 High Assurance Boot authentication") Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.

[U-Boot] [PATCH v5 23/24] arm: imx: hab: Implement hab_rvt_failsafe

2018-01-08 Thread Bryan O'Donoghue
on the alternative BootROM API. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfeld <sv

[U-Boot] [PATCH v5 24/24] arm: imx: hab: Add hab_failsafe console command

2018-01-08 Thread Bryan O'Donoghue
ux dmesg thus allowing download of a new image via the BootROM USB download protocol routine. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert A

[U-Boot] [PATCH v5 18/24] arm: imx: hab: Make internal functions and data static

2018-01-08 Thread Bryan O'Donoghue
There is no need to export these functions and data structures externally. Make them all static now. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.co

[U-Boot] [PATCH v5 07/24] arm: imx: hab: Fix authenticate_image input parameters

2018-01-08 Thread Bryan O'Donoghue
This patch is the first step in making that happen subsequent patches will focus on removing hard-coded offsets to the IVT, which again is not mandated to live at the end of a .imx image. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de

[U-Boot] [PATCH v5 09/24] arm: imx: hab: Add IVT header verification

2018-01-08 Thread Bryan O'Donoghue
The IVT header contains a magic number, fixed length and one of two version identifiers. Validate these settings before doing anything with a putative IVT binary. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam

[U-Boot] [PATCH v5 21/24] arm: imx: hab: Make imx_hab_is_enabled global

2018-01-08 Thread Bryan O'Donoghue
It will be helpful to boot commands to know if the HAB is enabled. Export imx_hab_is_enabled() now to facilitate further work with this data-point in a secure-boot context. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: F

[U-Boot] [PATCH v5 03/24] arm: imx: hab: Optimise flow of authenticate_image on is_enabled fail

2018-01-08 Thread Bryan O'Donoghue
There is no need to call is_enabled() twice in authenticate_image - it does nothing but add an additional layer of indentation. We can check for is_enabled() at the start of the function and return the result code directly. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: S

[U-Boot] [PATCH v5 11/24] arm: imx: hab: Only call ROM once headers are verified

2018-01-08 Thread Bryan O'Donoghue
-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfeld <sven.ebenf...@gmail.com> Cc:

[U-Boot] [PATCH v5 14/24] arm: imx: hab: Define rvt_check_target()

2018-01-08 Thread Bryan O'Donoghue
ory region is good. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfeld <sven

[U-Boot] [PATCH v5 08/24] arm: imx: hab: Add IVT header definitions

2018-01-08 Thread Bryan O'Donoghue
in later patches, where we will break the current incorrect dependence on fixed offsets in favour of an IVT described parsing of incoming binaries. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com>

[U-Boot] [PATCH v5 06/24] arm: imx: hab: Move CSF_PAD_SIZE to hab.h

2018-01-08 Thread Bryan O'Donoghue
CSF_PAD_SIZE should be defined in hab.h, move it to that location now. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u

[U-Boot] [PATCH v5 10/24] arm: imx: hab: Verify IVT self matches calculated address

2018-01-08 Thread Bryan O'Donoghue
The IVT is a self-describing structure which contains a self field. The self field is the absolute physical base address the IVT ought to be at in memory. Use the IVT self field to validate the calculated ivt_addr bugging out if the two values differ. Signed-off-by: Bryan O'Donoghue <bryan.odo

[U-Boot] [PATCH v5 12/24] arm: imx: hab: Print CSF based on IVT descriptor

2018-01-08 Thread Bryan O'Donoghue
The IVT gives the absolute address of the CSF. There is no requirement for the CSF to be located adjacent to the IVT so lets use the address provided in the IVT header instead of the hard-coded fixed CSF offset currently in place. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org&

[U-Boot] [PATCH v5 19/24] arm: imx: hab: Prefix authenticate_image with imx_hab

2018-01-08 Thread Bryan O'Donoghue
imx_hab_authenticate_image() is on the other hand very explicit. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net>

[U-Boot] [PATCH v5 16/24] arm: imx: hab: Add a hab_rvt_check_target to image auth

2018-01-08 Thread Bryan O'Donoghue
and perform that check as directed. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Sven Ebenfel

[U-Boot] [PATCH v5 22/24] arm: imx: hab: Define rvt_failsafe()

2018-01-08 Thread Bryan O'Donoghue
ce invoked the part will drop down to its BootROM USB recovery mode. Should it be the case that the part is in secure boot mode - only an appropriately signed binary will be accepted by the ROM and subsequently executed. Signed-off-by: Bryan O'Donoghue <bryan.odonog...@linaro.org> Cc: Stefano Babic

Re: [U-Boot] [PATCH 0/9] Add new OPTEE bootm support to u-boot

2018-01-15 Thread Bryan O'Donoghue
On 15/01/18 12:03, Peng Fan wrote: Providing the bootm way gives developer a choice for those that does not support SPL. We have been using bootm to boot optee for long time. Thanks, Peng Philipp, My understanding is that bootm is the preferred armv7 method.. In principle we should be

  1   2   3   4   5   6   >