04-22-2019 11:08 AM - edited 04-22-2019 11:16 AM
I have an application where I would like to access the PS DNA registers in the eFuse area of a ZCU102 board (Running UltraScale+) The only way I see that really supports this is the use of the xilskey library on top of the baremetal library. I am trying to do this in Linux using an image built with PetaLinux 2018.3.
I see how to build the libmetal library under PetaLinux. Unfortunately, I do not see anything that builds the xilskey library that performs the necessary register access so I can get the DNA information.
Is this supported in 2018.3?
Do I need to manually port the xilskey library into PetaLinux?
05-07-2019 05:16 AM
Also very interested in hearing the answer to these questions.
Can someone from Xilinx bring clarity?
05-08-2019 05:08 AM
Also interested here ... I want to be able to program/verify eFuses from Linux, running in user space. Xilskey lib appears coupled to "stand alone" fsbl driven operation. Therefore clean port to linux is not working out for me.
05-14-2019 10:55 PM
Stumbled upon this when I was looking through the wiki:
This ought to give you access to the registers needed to read PS DNA from Linux.
05-15-2019 10:25 AM
After insuring that the PMU FW has EFUSE access enabled:
diff --git a/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h b/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h index de45e52..1ffc3a7 100644 --- a/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h +++ b/lib/sw_apps/zynqmp_pmufw/src/xpfw_config.h @@ -123,7 +123,7 @@ #define ENABLE_SAFETY_VAL (0U) #define ENABLE_FPGA_LOAD_VAL (1U) #define ENABLE_SECURE_VAL (1U) -#define ENABLE_EFUSE_ACCESS (0U) +#define ENABLE_EFUSE_ACCESS (1U) #define XPU_INTR_DEBUG_PRINT_ENABLE_VAL (0U) #define PM_LOG_LEVEL_VAL (0U)
and insuring that the NVMEM is enabled for ZynqMP in the kernel. (Device drivers -->NVMEM Support --->Xilinx ZYNQMP SoC nvmem firmware support)
I was able to access the PS DNA with the command:
dd if=/sys/bus/nvmem/devices/zynqmp-nvmem0/nvmem of=/tmp/dna.bin bs=12 count=1 skip=1
Kernel land has some access as well. See kernel documentation:
(I have not figured out the particulars yet but it's a start.)