diff options
author | Jorge Ramirez-Ortiz <jorge@foundries.io> | 2021-10-13 19:04:47 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2022-02-04 13:16:45 +0100 |
commit | 25a91f300578d5905029d5f44799ef71a755ff02 (patch) | |
tree | d4f7d56391f8b56047fbe5b8226e8b5dbf793eeb /board | |
parent | 19fdc166f78a68bec60ca13b0c71a739fb4d0a73 (diff) | |
download | u-boot-25a91f300578d5905029d5f44799ef71a755ff02.tar.gz |
arm64: zynqmp: Print the secure boot status information
Output the secure boot configuration to the console.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Link: https://lore.kernel.org/r/20211013170447.10414-1-jorge@foundries.io
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 2b5239ccb47..242e143cbfd 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -373,6 +373,18 @@ static void restore_jtag(void) } #endif +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 @@ -413,6 +425,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()); |