UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer tscbailey
Observer
324 Views
Registered: ‎11-19-2018

Xilskey Library in PetaLinux 2018.3 to Access PS DNA registers

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? 

 

Regards, 

Doug Bailey 

 

0 Kudos
5 Replies
Visitor ttyler777
Visitor
277 Views
Registered: ‎03-05-2019

Re: Xilskey Library in PetaLinux 2018.3 to Access PS DNA registers

I am looking for the answer to this aswell.

0 Kudos
Observer niklaslindskog
Observer
238 Views
Registered: ‎10-08-2018

Re: Xilskey Library in PetaLinux 2018.3 to Access PS DNA registers

Also very interested in hearing the answer to these questions.

Can someone from Xilinx bring clarity?

0 Kudos
Observer rrx
Observer
224 Views
Registered: ‎04-03-2018

Re: Xilskey Library in PetaLinux 2018.3 to Access PS DNA registers

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.

0 Kudos
Highlighted
Observer niklaslindskog
Observer
207 Views
Registered: ‎10-08-2018

Re: Xilskey Library in PetaLinux 2018.3 to Access PS DNA registers

Stumbled upon this when I was looking through the wiki:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841682/Solution+ZynqMP+SoC+revision+read+mechanism

This ought to give you access to the registers needed to read PS DNA from Linux.

Observer tscbailey
Observer
194 Views
Registered: ‎11-19-2018

Re: Xilskey Library in PetaLinux 2018.3 to Access PS DNA registers

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:

Documentation/devicetree/bindings/nvmem/zynqmp_nvmem.txt

Documentation/devicetree/bindings/nvmem/nvmem.txt

(I have not figured out the particulars yet but it's a start.)