Re: [PATCH v10 00/13] fpga: zynqmp: Adding support of loading authenticated images

2022-06-17 Thread Adrian Fiergolski
zynqmppl.c - prepare for passing a "compatible" FDT property to any fpga driver. Adrian Fiergolski (1): fpga: zynqmp: support loading encrypted bitfiles Oleksandr Suvorov (12): fpga: add option for loading FPGA secure bitstreams fpga: xilinx: add missed identifier names fpga: xi

Re: [PATCH v9 00/13] fpga: zynqmp: Adding support of loading authenticated images

2022-06-07 Thread Adrian Fiergolski
e attribute. - move all ZynqMP-specific logic to drivers/fpga/zynqmppl.c - prepare for passing a "compatible" FDT property to any fpga driver. Adrian Fiergolski (1): fpga: zynqmp: support loading encrypted bitfiles Oleksandr Suvorov (12): fpga: add option for loading FPGA secure

Re: [PATCH v7 2/7] fpga: add fit_fpga_load function

2022-05-09 Thread Adrian Fiergolski
Michal, On 09.05.2022 15:28, Oleksandr Suvorov wrote: Hi Adrian, On Mon, May 9, 2022 at 2:35 PM Adrian Fiergolski wrote: Hi Oleksandr, On 09.05.2022 13:02, Oleksandr Suvorov wrote: Hi Adrian, On Wed, May 4, 2022 at 5:28 PM Adrian Fiergolski wrote: Hi Oleksandr, On 03.05.2022 09:42

Re: [PATCH v7 2/7] fpga: add fit_fpga_load function

2022-05-09 Thread Adrian Fiergolski
Hi Oleksandr, On 09.05.2022 13:02, Oleksandr Suvorov wrote: Hi Adrian, On Wed, May 4, 2022 at 5:28 PM Adrian Fiergolski wrote: Hi Oleksandr, On 03.05.2022 09:42, Michal Simek wrote: On 4/11/22 20:00, Adrian Fiergolski wrote: From: Oleksandr Suvorov Introduce a function which passes an

Re: [PATCH v7 2/7] fpga: add fit_fpga_load function

2022-05-09 Thread Adrian Fiergolski
Hi Oleksandr, On 04.05.2022 20:26, Oleksandr Suvorov wrote: Hi Adrian, On Wed, May 4, 2022 at 5:28 PM Adrian Fiergolski wrote: Hi Oleksandr, On 03.05.2022 09:42, Michal Simek wrote: On 4/11/22 20:00, Adrian Fiergolski wrote: From: Oleksandr Suvorov Introduce a function which passes an

Re: [PATCH v7 2/7] fpga: add fit_fpga_load function

2022-05-04 Thread Adrian Fiergolski
Hi Oleksandr, On 03.05.2022 09:42, Michal Simek wrote: On 4/11/22 20:00, Adrian Fiergolski wrote: From: Oleksandr Suvorov Introduce a function which passes an fpga compatible string from FIT images to FPGA drivers. This lets the different implementations decide how to handle it. Some code

[PATCH v7 7/7] fpga: zynqmp: support loading encrypted bitfiles

2022-04-11 Thread Adrian Fiergolski
the FSBL is not encrypted. This prevents using the BBRAM or eFUSE as the key source to the AES engine during run-time applications." Signed-off-and-tested-by: Adrian Fiergolski --- doc/uImage.FIT/source_file_format.txt | 2 ++ drivers/fpga/zynqmppl.c | 14 ++

[PATCH v7 6/7] fpga: zynqmp: support loading authenticated images

2022-04-11 Thread Adrian Fiergolski
Tested-by: Ricardo Salveti Co-developed-by: Adrian Fiergolski Signed-off-by: Adrian Fiergolski --- boot/Kconfig | 4 ++-- doc/uImage.FIT/source_file_format.txt | 5 - drivers/fpga/zynqmppl.c | 21 + 3 files changed, 27 insertions(+), 3

[PATCH v7 5/7] fpga: xilinx: pass xilinx_desc pointer address into load() ops

2022-04-11 Thread Adrian Fiergolski
From: Oleksandr Suvorov Pass an address of xilinx_desc pointer in an fpga_desc into a load() callback of struct xilinx_fpga_op. It allows getting parent fpga_desc structure members inside xilinx fpga drivers. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti --- drivers/fpga/spartan

[PATCH v7 4/7] fpga: xilinx: add missed identifier names

2022-04-11 Thread Adrian Fiergolski
From: Oleksandr Suvorov Function definition arguments should also have identifier names. Add missed ones to struct xilinx_fpga_op callbacks, unifying code. Signed-off-by: Oleksandr Suvorov --- include/xilinx.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/inclu

[PATCH v7 2/7] fpga: add fit_fpga_load function

2022-04-11 Thread Adrian Fiergolski
-developed-by: Adrian Fiergolski Signed-off-by: Adrian Fiergolski --- common/spl/spl_fit.c | 6 ++ drivers/fpga/fpga.c | 23 ++- include/fpga.h | 4 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index

[PATCH v7 3/7] fpga: xilinx: pass an address of xilinx_desc in fpga_desc

2022-04-11 Thread Adrian Fiergolski
From: Oleksandr Suvorov Pass an address of xilinx_desc pointer in an fpga_desc to use parent fpga_desc structure members inside a xilinx fpga driver. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Co-developed-by: Adrian Fiergolski Signed-off-by: Adrian Fiergolski --- drivers

[PATCH v7 1/7] fpga: add option for loading FPGA secure bitstreams

2022-04-11 Thread Adrian Fiergolski
From: Oleksandr Suvorov It allows using this feature without enabling the "fpga loads" command. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti Co-developed-by: Adrian Fiergolski Signed-off-by: Adrian Fiergolski --- cmd/Kconfig | 3 ++- drivers/fpga/Kconf

[PATCH v7 0/7] fpga: zynqmp: Adding support of loading authenticated images

2022-04-11 Thread Adrian Fiergolski
oad() ops fpga: zynqmp: support loading authenticated images Adrian Fiergolski (1): fpga: zynqmp: support loading encrypted bitfiles boot/Kconfig | 4 +-- cmd/Kconfig | 3 ++- common/spl/spl_fit.c | 6 ++--- doc/uImage.FIT/source_

[PATCH] tools: zynqmp: add support for PM_CONFIG_OBJECT_TYPE_BASE define

2022-03-07 Thread Adrian Fiergolski
The new define has been added in Vivado 2021.2. Signed-off-by: Adrian Fiergolski --- tools/zynqmp_pm_cfg_obj_convert.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/zynqmp_pm_cfg_obj_convert.py b/tools/zynqmp_pm_cfg_obj_convert.py index 0a44710e1e..239991a526 100755 --- a/tools

Re: FIT image: load secure FPGA

2022-02-09 Thread Adrian Fiergolski
Hi, On 09.02.2022 08:51, Jorge Ramirez-Ortiz, Foundries wrote: I have also shared with the community a patch, on top of your changes, adding encrypted bitfile support in u-boot. awesome. btw how is the bitstream decrypted? I didnt look into that, I suppose there is probably a doc somewhere?

Re: FIT image: load secure FPGA

2022-02-07 Thread Adrian Fiergolski
 18:48, Oleksandr Suvorov wrote: Hi Adrian, On Wed, Jan 19, 2022 at 7:23 PM Jorge Ramirez-Ortiz, Foundries wrote: On 19/01/22, Jorge Ramirez-Ortiz, Foundries wrote: On 19/01/22, Jorge Ramirez-Ortiz, Foundries wrote: On 19/01/22, Adrian Fiergolski wrote: Hi Jorge, hi Adrian, Have you

[PATCH v6 7/7] fpga: zynqmp: support loading encrypted bitfiles

2022-02-07 Thread Adrian Fiergolski
the FSBL is not encrypted. This prevents using the BBRAM or eFUSE as the key source to the AES engine during run-time applications." Signed-off-and-tested-by: Adrian Fiergolski --- doc/uImage.FIT/source_file_format.txt | 2 ++ drivers/fpga/zynqmppl.c | 16

[PATCH v6 5/7] fpga: xilinx: pass xilinx_desc pointer address into load() ops

2022-02-07 Thread Adrian Fiergolski
From: Oleksandr Suvorov Pass an address of xilinx_desc pointer in an fpga_desc into a load() callback of struct xilinx_fpga_op. It allows getting parent fpga_desc structure members inside xilinx fpga drivers. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti --- drivers/fpga/spartan

[PATCH v6 6/7] fpga: zynqmp: support loading authenticated images

2022-02-07 Thread Adrian Fiergolski
From: Oleksandr Suvorov Add supporting new compatible string "u-boot,zynqmp-fpga-ddrauth" to handle loading authenticated images (DDR). Based on solution by Jorge Ramirez-Ortiz Signed-off-by: Oleksandr Suvorov Co-developed-by: Ricardo Salveti Signed-off-by: Ricardo Salveti Tested-by: Ricardo

[PATCH v6 4/7] fpga: xilinx: add missed identifier names

2022-02-07 Thread Adrian Fiergolski
From: Oleksandr Suvorov Function definition arguments should also have identifier names. Add missed ones to struct xilinx_fpga_op callbacks, unifying code. Signed-off-by: Oleksandr Suvorov --- include/xilinx.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/inclu

[PATCH v6 3/7] fpga: xilinx: pass an address of xilinx_desc in fpga_desc

2022-02-07 Thread Adrian Fiergolski
From: Oleksandr Suvorov Pass an address of xilinx_desc pointer in an fpga_desc to use parent fpga_desc structure members inside a xilinx fpga driver. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti --- drivers/fpga/fpga.c | 4 ++-- drivers/fpga/xilinx.c | 4 +++- include/xilinx

[PATCH v6 2/7] fpga: add fit_fpga_load function

2022-02-07 Thread Adrian Fiergolski
From: Oleksandr Suvorov Introduce a function which passes an fpga compatible string from FIT images to FPGA drivers. This lets the different implementations decide how to handle it. Some code of Jorge Ramirez-Ortiz is reused. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti --- c

[PATCH v6 1/7] fpga: add option for loading FPGA secure bitstreams

2022-02-07 Thread Adrian Fiergolski
From: Oleksandr Suvorov It allows using this feature without enabling the "fpga loads" command. Signed-off-by: Oleksandr Suvorov Tested-by: Ricardo Salveti --- cmd/Kconfig | 3 ++- drivers/fpga/Kconfig| 14 ++ drivers/fpga/fpga.c | 2 +- drivers/fpga/xilinx.c

[PATCH v6 0/7] fpga: zynqmp: Adding support of loading authenticated images

2022-02-07 Thread Adrian Fiergolski
fier names fpga: xilinx: pass xilinx_desc pointer address into load() ops fpga: zynqmp: support loading authenticated images Adrian Fiergolski (1): fpga: zynqmp: support loading encrypted bitfiles

Re: FIT image: load secure FPGA

2022-01-19 Thread Adrian Fiergolski
Hi Jorge, Have you succeeded to enable secure boot on ZynqMP with SPL (not Xilinx's FSBL)? Is it documented somewhere? Any configuration files/yocto recipes? Have you managed to resolve problem of the bitstream loaded in such a case by SPL? I need to use an encrypted bitstream. However, it r

[PATCH v2 3/3] misc: atsha204a: fix i2c address readout from DTS

2022-01-11 Thread Adrian Fiergolski
resent the address and size based on sizeof(fdt_addr_t) and sizeof(fdt_size_t)". Signed-off-by: Adrian Fiergolski --- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c index d264477927..b8

[PATCH v2 2/3] misc: atsha204a: add delay after sending the message

2022-01-11 Thread Adrian Fiergolski
Once request is sent, and before receiving a response, the delay is required. This patch fixes missing delay for before first response try. Signed-off-by: Adrian Fiergolski --- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc

[PATCH v2 1/3] misc: atsha204a: return timeout from wakeup function

2022-01-11 Thread Adrian Fiergolski
If the maximum number of wake-up attempts is exceeded, return -ETIMEDOUT. Signed-off-by: Adrian Fiergolski --- drivers/misc/atsha204a-i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c index 715dabb279

[PATCH v2 0/3] misc: atsha204a: bug fixes

2022-01-11 Thread Adrian Fiergolski
Series of patches fixing atsha204a driver. Partially inspired by Enclustra's repo [1]. [1] https://github.com/enclustra-bsp/xilinx-uboot Adrian Fiergolski (3): misc: atsha204a: return timeout from wakeup function misc: atsha204a: add delay after sending the message misc: atsha204a

Re: [PATCH 3/3] misc: atsha204a: fix i2c address readout from DTS

2022-01-11 Thread Adrian Fiergolski
Hi Marek, Thank you for your review. On 21.12.2021 18:52, Marek Behún wrote: On Tue, 21 Dec 2021 17:17:22 +0100 Adrian Fiergolski wrote: This patch replaces use fdtdec_get_addr with recommended fdtdec_get_addr_size_auto_parent. And why is that required? I didn't debug why exactly, b

[PATCH 3/3] misc: atsha204a: fix i2c address readout from DTS

2021-12-21 Thread Adrian Fiergolski
This patch replaces use fdtdec_get_addr with recommended fdtdec_get_addr_size_auto_parent. Signed-off-by: Adrian Fiergolski --- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c index

[PATCH 2/3] misc: atsha204a: add delay after sending the message

2021-12-21 Thread Adrian Fiergolski
Once request is sent, and before receiving a response, the delay is required. This patch fixes missing delay for before first response try. Signed-off-by: Adrian Fiergolski --- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc

[PATCH 1/3] misc: atsha204a: return timeout from wakeup function

2021-12-21 Thread Adrian Fiergolski
If the maximum number of wake-up attempts is exceeded, return -ETIMEDOUT. Signed-off-by: Adrian Fiergolski --- drivers/misc/atsha204a-i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c index 715dabb279

[PATCH 0/3] misc: atsha204a: bug fixes

2021-12-21 Thread Adrian Fiergolski
Series of patches fixing atsha204a driver. Partially inspired by Enclustra's repo [1]. [1] https://github.com/enclustra-bsp/xilinx-uboot Adrian Fiergolski (3): misc: atsha204a: return timeout from wakeup function misc: atsha204a: add delay after sending the message misc: atsha204a

Re: [PATCH 2/2] firmware: zynqmp: fix write to an uninitialised pointer in ipi_req()

2021-10-18 Thread Adrian Fiergolski
damaging the original data under this address. The patch, in > case ret_payload is NULL, assigns the pointer to the array holding the IPI > message being sent. > > Signed-off-by: Adrian Fiergolski > Signed-off-by: Michal Simek Reviewed-by: Adrian Fiergolski Thanks, Adrian >

Re: [PATCH 1/2] firmware: zynqmp: Handle errors from ipi_req properly

2021-10-18 Thread Adrian Fiergolski
On 15.10.2021 16:57, Michal Simek wrote: > There are multiple errors what can happen in ipi_req but they are not > propagated properly. That's why propage all error properly. > > Signed-off-by: Michal Simek Reviewed-by: Adrian Fiergolski Thanks, Adrian > --- > >

Re: [PATCH v4 2/2] firmware: zynqmp: return status in EL2 from xilinx_pm_request.

2021-10-14 Thread Adrian Fiergolski
My mistake. Please ignore this version of the patch series. I send v5 already. Regards, Adrian On 14.10.2021 14:39, Adrian Fiergolski wrote: > This patch fixes xilinx_pm_request to return a valid status from > xilinx_pm_request in EL2. > > Signed-off-by: Adrian Fiergolski >

[PATCH v5 2/2] firmware: zynqmp: return status in EL2 from xilinx_pm_request.

2021-10-14 Thread Adrian Fiergolski
This patch fixes xilinx_pm_request to return a valid status from xilinx_pm_request in EL2. Signed-off-by: Adrian Fiergolski --- drivers/firmware/firmware-zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware

[PATCH v5 1/2] firmware: zynqmp: fix write to an uninitialised pointer in xilinx_pm_request

2021-10-14 Thread Adrian Fiergolski
patch, in case ret_payload is NULL, assigns the pointer to the array holding the IPI message being sent. Signed-off-by: Adrian Fiergolski --- Fix casting of ret (ingore v4). drivers/firmware/firmware-zynqmp.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v4 2/2] firmware: zynqmp: return status in EL2 from xilinx_pm_request.

2021-10-14 Thread Adrian Fiergolski
This patch fixes xilinx_pm_request to return a valid status from xilinx_pm_request in EL2. Signed-off-by: Adrian Fiergolski --- drivers/firmware/firmware-zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware

[PATCH v4 1/2] firmware: zynqmp: fix write to an uninitialised pointer in xilinx_pm_request

2021-10-14 Thread Adrian Fiergolski
patch, in case ret_payload is NULL, assigns the pointer to the array holding the IPI message being sent. Signed-off-by: Adrian Fiergolski --- Fix casting of ret. drivers/firmware/firmware-zynqmp.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/firmware

[PATCH v3 2/2] firmware: zynqmp: return status in EL2 from xilinx_pm_request.

2021-10-14 Thread Adrian Fiergolski
This patch fixes xilinx_pm_request to return a valid status from xilinx_pm_request in EL2. Signed-off-by: Adrian Fiergolski --- drivers/firmware/firmware-zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware

[PATCH v3 1/2] firmware: zynqmp: fix write to an uninitialised pointer in xilinx_pm_request

2021-10-14 Thread Adrian Fiergolski
patch, in case ret_payload is NULL, assigns the pointer to the array holding the IPI message being sent. Signed-off-by: Adrian Fiergolski --- Follow Michhals suggestion regarding log formatting. Clean the code. drivers/firmware/firmware-zynqmp.c | 13 - 1 file changed, 12 insertions

Re: [PATCHv2] firmware: zynqmp: add handling of the NULL return payload pointer in xilinx_pm_request.

2021-10-14 Thread Adrian Fiergolski
On 14.10.2021 11:47, Michal Simek wrote: > > > On 10/14/21 10:54, Adrian Fiergolski wrote: >> On 14.10.2021 at 09:22, Michal Simek wrote: >>> >>> First of all subject is quite long. Please make it shorter and remove >>> dot at the end. >>>

Re: [PATCHv2] firmware: zynqmp: add handling of the NULL return payload pointer in xilinx_pm_request.

2021-10-14 Thread Adrian Fiergolski
On 14.10.2021 at 09:22, Michal Simek wrote: > > First of all subject is quite long. Please make it shorter and remove > dot at the end. > > > On 10/13/21 18:21, Adrian Fiergolski wrote: >> When a caller is not interested in the returned message, the >> ret_payload p

[PATCHv2] firmware: zynqmp: add handling of the NULL return payload pointer in xilinx_pm_request.

2021-10-13 Thread Adrian Fiergolski
patch, in case ret_payload is NULL, assigns the pointer to the array holding the IPI message being sent. Signed-off-by: Adrian Fiergolski --- drivers/firmware/firmware-zynqmp.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/firmware

[PATCH] Bugfix in xilinx_pm_request: add handling of the NULL return payload pointer.

2021-10-13 Thread Adrian Fiergolski
Signed-off-by: Adrian Fiergolski --- drivers/firmware/firmware-zynqmp.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c index d4dc856baf..7517a84f0e 100644 --- a/drivers/firmware

[PATCH v1] [ZynqMP] Writing correct value to ANALOG_BUS.

2021-06-08 Thread Adrian Fiergolski
in Xilinx:embeddedsw[1]. [1] https://github.com/Xilinx/embeddedsw Signed-off-by: Adrian Fiergolski --- Changes in v1: - fix patch log - based on v2021.07-rc4 branch arch/arm/mach-zynqmp/include/mach/hardware.h | 5 + board/xilinx/zynqmp/zynqmp.c | 11 +++

[PATCH] [ZynqMP] Writing correct value to ANALOG_BUS.

2021-06-07 Thread Adrian Fiergolski
in Xilinx:embeddedsw[1]. [1] https://github.com/Xilinx/embeddedsw Signed-off-by: Adrian Fiergolski %% original patch: 0001-zynqmp-Writing-correct-value-to-ANALOG_BUS.patch --- arch/arm/mach-zynqmp/include/mach/hardware.h | 5 + board/xilinx/zynqmp/zynqmp.c | 11 +++

[PATCH v2] tools: zynqmp: Fix regex expression around XPm_ConfigObject.

2020-11-24 Thread Adrian Fiergolski
))) = +#elif defined (__ICCARM__) +#pragma location = ".sys_cfg_data" +__root const u32 XPm_ConfigObject[] = +#endif +{ Change the matching regex to handle both cases. Signed-off-by: Adrian Fiergolski --- Changes in v2: Fix the patch tile. tools/zynqmp_pm_cfg_obj_convert.py | 2 +

[PATCH] tools: The XPm_ConfigObject array definition generated by Vitis 2020.1 differs from previous Vivado versions (before 2019.2).

2020-11-24 Thread Adrian Fiergolski
#endif +{ Change the matching regex to handle both cases. Signed-off-by: Adrian Fiergolski --- tools/zynqmp_pm_cfg_obj_convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/zynqmp_pm_cfg_obj_convert.py b/tools/zynqmp_pm_cfg_obj_convert.py index dd27f47921.