xilskey
Vitis Drivers API Documentation
xilskey_bbram_example.c File Reference

Overview

xilskey_bbram_example.c

Note
Example illustrates the method of programming the AES key to BBRAM. The user key should be mentioned in xilskey_input.h. BBRAM is a battery backed RAM and there is no restriction on the number of times key can programmed. This algorithm only wokrs when program and verify key are done together and in that order. Procedure:
  1. Create a hardware project using the appropriate design.
  2. Create a BSP.
  3. Create fsbl
  4. Create an application project using bbram example and xilskey_input.h
  5. The 256 bit key to be programmed has to be mentioned
  6. A hardware setup which dedicates four MIO pins for JTAG signals should be used and the MIO pins should be mentioned in xilskey_input.h There should be a method to download this example and have the MIO pins connected to JTAG before running this application.
  7. Run the application which will program and verify the BBRAM key
  8. After programming and veifying the key, power off.
  9. Place a BBRAM key encrypted boot image in one of the boot devices, set the appropriate boot pins and power on.
  10. The bbram example will be run from DDR with the default linker.
  11. To run from OCM, modify the linker to map all sections to ps7_ram_0_S_AXI_BASEADDR instead of ps7_ddr_0_S_AXI_BASEADDR.

MODIFICATION HISTORY:

Ver Who Date Changes


1.01a hk 09/18/13 First release 6.1 vns 10/25/16 Removed ForcePowerCycle and JtagDisable from Zynq BBRAM configuration as they are not actually programming any control bit. 6.7 psl 03/20/19 Added BBRAM jtag server init function. psl 03/15/19 Moved XilSKey_Bbram_JTAGServerInit function from example to library. 6.8 psl 05/21/19 Initialized SystemInitDone ,to indicate XilSKey_Bbram_JTAGServerInit status.

Functions

int XilSKey_Bbram_InitData (XilSKey_Bbram *BbramInstancePtr)
 Function to initialize BBRAM instance. More...
 

Function Documentation

int XilSKey_Bbram_InitData ( XilSKey_Bbram *  BbramInstancePtr)

Function to initialize BBRAM instance.

Parameters
BBRAMinstance pointer
Returns
  - XST_SUCCESS - In case of Success
  - XST_FAILURE - If initialization fails
Note
Parameters
BBRAMinstance pointer
Returns
  • XST_SUCCESS - In case of Success
  • XST_FAILURE - If initialization fails
Note
None.

References XilSKey_Efuse_ConvertStringToHexBE(), XSK_BBRAM_AES_KEY, XSK_BBRAM_MIO_JTAG_MUX_SELECT, XSK_BBRAM_MIO_JTAG_TCK, XSK_BBRAM_MIO_JTAG_TDI, XSK_BBRAM_MIO_JTAG_TDO, and XSK_BBRAM_MIO_JTAG_TMS.

Referenced by main().