* [PATCHv2] arm64: zynqmp: Print the secure boot status information
@ 2021-10-13 17:04 Jorge Ramirez-Ortiz
2022-02-04 7:47 ` Jorge Ramirez-Ortiz, Foundries
2022-02-04 12:18 ` Michal Simek
0 siblings, 2 replies; 5+ messages in thread
From: Jorge Ramirez-Ortiz @ 2021-10-13 17:04 UTC (permalink / raw)
To: jorge, monstr
Cc: adrian.fiergolski, sjg, ibai.erkiaga-elorza, t.karthik.reddy,
u-boot, ricardo
Output the secure boot configuration to the console.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
---
v2:
Michal review 12 Aug 2021
print information on SPL and UBOOT
improve the print command
add macros to mask the status
arch/arm/mach-zynqmp/include/mach/hardware.h | 6 +++++-
board/xilinx/zynqmp/zynqmp.c | 14 ++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
index eebf38551c..c6b1464a9f 100644
--- a/arch/arm/mach-zynqmp/include/mach/hardware.h
+++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
@@ -141,8 +141,12 @@ struct apu_regs {
#define ZYNQMP_SILICON_VER_MASK 0xF
#define ZYNQMP_SILICON_VER_SHIFT 0
+#define ZYNQMP_CSU_STATUS_AUTHENTICATED BIT(0)
+#define ZYNQMP_CSU_STATUS_ENCRYPTED BIT(1)
+
struct csu_regs {
- u32 reserved0[4];
+ u32 status;
+ u32 reserved0[3];
u32 multi_boot;
u32 reserved1[11];
u32 idcode;
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 000a7cde8d..3e7ca2e9c6 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -358,6 +358,18 @@ static int multi_boot(void)
return multiboot;
}
+static void print_secure_boot(void)
+{
+ u32 status = 0;
+
+ if (zynqmp_mmio_read((ulong)&csu_base->status, &status))
+ return;
+
+ printf("Secure Boot:\t%sauthenticated, %sencrypted\n",
+ status & ZYNQMP_CSU_STATUS_AUTHENTICATED ? "" : "not ",
+ status & ZYNQMP_CSU_STATUS_ENCRYPTED ? "" : "not ");
+}
+
#define PS_SYSMON_ANALOG_BUS_VAL 0x3210
#define PS_SYSMON_ANALOG_BUS_REG 0xFFA50914
@@ -394,6 +406,8 @@ int board_init(void)
fpga_add(fpga_xilinx, &zynqmppl);
#endif
+ /* display secure boot information */
+ print_secure_boot();
if (current_el() == 3)
printf("Multiboot:\t%d\n", multi_boot());
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCHv2] arm64: zynqmp: Print the secure boot status information
2021-10-13 17:04 [PATCHv2] arm64: zynqmp: Print the secure boot status information Jorge Ramirez-Ortiz
@ 2022-02-04 7:47 ` Jorge Ramirez-Ortiz, Foundries
2022-02-04 12:19 ` Michal Simek
2022-02-04 12:18 ` Michal Simek
1 sibling, 1 reply; 5+ messages in thread
From: Jorge Ramirez-Ortiz, Foundries @ 2022-02-04 7:47 UTC (permalink / raw)
To: Jorge Ramirez-Ortiz
Cc: monstr, adrian.fiergolski, sjg, ibai.erkiaga-elorza,
t.karthik.reddy, u-boot, ricardo
On 13/10/21, Jorge Ramirez-Ortiz wrote:
> Output the secure boot configuration to the console.
Hi, Michal
was there any reason for not merging this patch?
thanks
Jorge
>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
> ---
>
> v2:
> Michal review 12 Aug 2021
> print information on SPL and UBOOT
> improve the print command
> add macros to mask the status
>
> arch/arm/mach-zynqmp/include/mach/hardware.h | 6 +++++-
> board/xilinx/zynqmp/zynqmp.c | 14 ++++++++++++++
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
> index eebf38551c..c6b1464a9f 100644
> --- a/arch/arm/mach-zynqmp/include/mach/hardware.h
> +++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
> @@ -141,8 +141,12 @@ struct apu_regs {
> #define ZYNQMP_SILICON_VER_MASK 0xF
> #define ZYNQMP_SILICON_VER_SHIFT 0
>
> +#define ZYNQMP_CSU_STATUS_AUTHENTICATED BIT(0)
> +#define ZYNQMP_CSU_STATUS_ENCRYPTED BIT(1)
> +
> struct csu_regs {
> - u32 reserved0[4];
> + u32 status;
> + u32 reserved0[3];
> u32 multi_boot;
> u32 reserved1[11];
> u32 idcode;
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index 000a7cde8d..3e7ca2e9c6 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -358,6 +358,18 @@ static int multi_boot(void)
> return multiboot;
> }
>
> +static void print_secure_boot(void)
> +{
> + u32 status = 0;
> +
> + if (zynqmp_mmio_read((ulong)&csu_base->status, &status))
> + return;
> +
> + printf("Secure Boot:\t%sauthenticated, %sencrypted\n",
> + status & ZYNQMP_CSU_STATUS_AUTHENTICATED ? "" : "not ",
> + status & ZYNQMP_CSU_STATUS_ENCRYPTED ? "" : "not ");
> +}
> +
> #define PS_SYSMON_ANALOG_BUS_VAL 0x3210
> #define PS_SYSMON_ANALOG_BUS_REG 0xFFA50914
>
> @@ -394,6 +406,8 @@ int board_init(void)
> fpga_add(fpga_xilinx, &zynqmppl);
> #endif
>
> + /* display secure boot information */
> + print_secure_boot();
> if (current_el() == 3)
> printf("Multiboot:\t%d\n", multi_boot());
>
> --
> 2.31.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCHv2] arm64: zynqmp: Print the secure boot status information
2021-10-13 17:04 [PATCHv2] arm64: zynqmp: Print the secure boot status information Jorge Ramirez-Ortiz
2022-02-04 7:47 ` Jorge Ramirez-Ortiz, Foundries
@ 2022-02-04 12:18 ` Michal Simek
1 sibling, 0 replies; 5+ messages in thread
From: Michal Simek @ 2022-02-04 12:18 UTC (permalink / raw)
To: Jorge Ramirez-Ortiz, monstr
Cc: adrian.fiergolski, sjg, ibai.erkiaga-elorza, t.karthik.reddy,
u-boot, ricardo
On 10/13/21 19:04, Jorge Ramirez-Ortiz wrote:
> Output the secure boot configuration to the console.
>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
> ---
>
> v2:
> Michal review 12 Aug 2021
> print information on SPL and UBOOT
> improve the print command
> add macros to mask the status
>
> arch/arm/mach-zynqmp/include/mach/hardware.h | 6 +++++-
> board/xilinx/zynqmp/zynqmp.c | 14 ++++++++++++++
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-zynqmp/include/mach/hardware.h b/arch/arm/mach-zynqmp/include/mach/hardware.h
> index eebf38551c..c6b1464a9f 100644
> --- a/arch/arm/mach-zynqmp/include/mach/hardware.h
> +++ b/arch/arm/mach-zynqmp/include/mach/hardware.h
> @@ -141,8 +141,12 @@ struct apu_regs {
> #define ZYNQMP_SILICON_VER_MASK 0xF
> #define ZYNQMP_SILICON_VER_SHIFT 0
>
> +#define ZYNQMP_CSU_STATUS_AUTHENTICATED BIT(0)
> +#define ZYNQMP_CSU_STATUS_ENCRYPTED BIT(1)
> +
> struct csu_regs {
> - u32 reserved0[4];
> + u32 status;
> + u32 reserved0[3];
> u32 multi_boot;
> u32 reserved1[11];
> u32 idcode;
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index 000a7cde8d..3e7ca2e9c6 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -358,6 +358,18 @@ static int multi_boot(void)
> return multiboot;
> }
>
> +static void print_secure_boot(void)
> +{
> + u32 status = 0;
> +
> + if (zynqmp_mmio_read((ulong)&csu_base->status, &status))
> + return;
> +
> + printf("Secure Boot:\t%sauthenticated, %sencrypted\n",
> + status & ZYNQMP_CSU_STATUS_AUTHENTICATED ? "" : "not ",
> + status & ZYNQMP_CSU_STATUS_ENCRYPTED ? "" : "not ");
> +}
> +
> #define PS_SYSMON_ANALOG_BUS_VAL 0x3210
> #define PS_SYSMON_ANALOG_BUS_REG 0xFFA50914
>
> @@ -394,6 +406,8 @@ int board_init(void)
> fpga_add(fpga_xilinx, &zynqmppl);
> #endif
>
> + /* display secure boot information */
> + print_secure_boot();
> if (current_el() == 3)
> printf("Multiboot:\t%d\n", multi_boot());
>
Applied.
M
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCHv2] arm64: zynqmp: Print the secure boot status information
2022-02-04 7:47 ` Jorge Ramirez-Ortiz, Foundries
@ 2022-02-04 12:19 ` Michal Simek
2022-02-04 22:15 ` Jorge Ramirez-Ortiz, Foundries
0 siblings, 1 reply; 5+ messages in thread
From: Michal Simek @ 2022-02-04 12:19 UTC (permalink / raw)
To: Jorge Ramirez-Ortiz, Foundries
Cc: Adrian Fiergolski, Simon Glass, Ibai Erkiaga, T Karthik Reddy,
U-Boot, Ricardo Salveti
Hi,
pá 4. 2. 2022 v 8:47 odesílatel Jorge Ramirez-Ortiz, Foundries
<jorge@foundries.io> napsal:
>
> On 13/10/21, Jorge Ramirez-Ortiz wrote:
> > Output the secure boot configuration to the console.
>
>
> Hi, Michal
> was there any reason for not merging this patch?
thanks for the reminder. I just didn't see it.
Thanks,
Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCHv2] arm64: zynqmp: Print the secure boot status information
2022-02-04 12:19 ` Michal Simek
@ 2022-02-04 22:15 ` Jorge Ramirez-Ortiz, Foundries
0 siblings, 0 replies; 5+ messages in thread
From: Jorge Ramirez-Ortiz, Foundries @ 2022-02-04 22:15 UTC (permalink / raw)
To: Michal Simek
Cc: Jorge Ramirez-Ortiz, Foundries, Adrian Fiergolski, Simon Glass,
Ibai Erkiaga, T Karthik Reddy, U-Boot, Ricardo Salveti
On 04/02/22, Michal Simek wrote:
> Hi,
>
> pá 4. 2. 2022 v 8:47 odesílatel Jorge Ramirez-Ortiz, Foundries
> <jorge@foundries.io> napsal:
> >
> > On 13/10/21, Jorge Ramirez-Ortiz wrote:
> > > Output the secure boot configuration to the console.
> >
> >
> > Hi, Michal
> > was there any reason for not merging this patch?
>
> thanks for the reminder. I just didn't see it.
awesome. thanks!
>
> Thanks,
> Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-02-04 22:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 17:04 [PATCHv2] arm64: zynqmp: Print the secure boot status information Jorge Ramirez-Ortiz
2022-02-04 7:47 ` Jorge Ramirez-Ortiz, Foundries
2022-02-04 12:19 ` Michal Simek
2022-02-04 22:15 ` Jorge Ramirez-Ortiz, Foundries
2022-02-04 12:18 ` Michal Simek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.