![]() |
xilskey
Vitis Drivers API Documentation
|
.
MODIFICATION HISTORY:
Ver Who Date Changes
1.01a hk 09/18/13 First release 3.00 vns 31/07/15 Removed redundant code to initialise timer. 5.00 vns 09/01/16 Added BBRAM programming functionality for Ultrascale 6.0 vns 07/28/16 Added configuration counting feature and Obfuscated key programming and calculation of ECC for 28 bits of control word. 6.6 vns 06/06/18 Added doxygen tags 6.7 psl 03/20/19 Added BBRAM key write support for SSIT devices. arc 04/04/19 Fixed CPP warnings. psl 04/15/19 Moved XilSKey_Bbram_JTAGServerInit function from examples to library. 6.8 psl 05/21/19 Added check for SystemInitDone, to initialize jtag server only once to solve stack corruption issue. vns 08/29/19 Initialized Status variables 6.9 vns 03/18/20 Fixed Armcc compilation errors 7.2 am 07/13/21 Fixed doxygen warnings
Macros | |
| #define | XSK_BBRAM_CTRL_ECC_MASK (0x003F) |
| Error detection mask. More... | |
| #define | XSK_BBRAM_CTRL_RSRVD_MASK (0x0440) |
| Reserved bits. More... | |
| #define | XSK_BBRAM_CTRL_BLACK_KEY_MASK (0x0300) |
| BLACK key mask. More... | |
| #define | XSK_BBRAM_CTRL_BLACK_KEY_SHIFT (8) |
| BLACK key shift. More... | |
| #define | XSK_BBRAM_CTRL_MODE_MASK (0x3000) |
| DPA mode mask. More... | |
| #define | XSK_BBRAM_CTRL_MODE_SHIFT (12) |
| DPA mode shift. More... | |
| #define | XSK_BBRAM_CTRL_DPA_PROTECT_MASK (0xC000) |
| DPA Protection mask. More... | |
| #define | XSK_BBRAM_CTRL_DPA_PROTECT_SHIFT (14) |
| DPA protection shift. More... | |
| #define | XSK_BBRAM_CTRL_RD_DPA_COUNT_MASK (0x00FF0000) |
| Redundant DPA count mask. More... | |
| #define | XSK_BBRAM_CTRL_RD_DPA_COUNT_SHIFT (16) |
| Redundant DPA count shift. More... | |
| #define | XSK_BBRAM_CTRL_DPA_COUNT_MASK (0xFF000000) |
| DPA count mask. More... | |
| #define | XSK_BBRAM_CTRL_DPA_COUNT_SHIFT (24) |
| DPA count shift. More... | |
| #define | XSK_BBRAM_CTRL_DEFAULT_VAL (0x1) |
| Enable value. More... | |
| #define | XSK_BBRAM_CTRL_ENABLE_VAL (0x2) |
| Value for default state. More... | |
DEF masks for BBRAM | |
| #define | XSK_BBRAM_P0_MASK 0X36AD555 |
| < DEF masks for calculating ECC of 28 bit 0f a control word More... | |
| #define | XSK_BBRAM_P1_MASK 0X2D9B333 |
| #define | XSK_BBRAM_P2_MASK 0X1C78F0F |
| #define | XSK_BBRAM_P3_MASK 0X03F80FF |
| #define | XSK_BBRAM_P4_MASK 0X0007FFF |
Functions | |
| int | JtagServerInitBbram (XilSKey_Bbram *InstancePtr) |
| JTAG Server Initialization routine for Bbram. More... | |
| int | Bbram_Init (void) |
| BBRAM Algorithm - Initialization. More... | |
| int | Bbram_ProgramKey (XilSKey_Bbram *InstancePtr) |
| BBRAM Algorithm - Program key. More... | |
| int | Bbram_VerifyKey (XilSKey_Bbram *InstancePtr) |
| BBRAM Algorithm - Verify key. More... | |
| void | Bbram_DeInit (void) |
| De-initialization. More... | |
| u32 | XilSKey_RowCrcCalculation (u32 PrevCRC, u32 Data, u32 Addr) |
| Calculates CRC value for each row of AES key. More... | |
| int | XilSKey_Bbram_JTAGServerInit (XilSKey_Bbram *InstancePtr) |
| This function initializes JTAG server. More... | |
| int | XilSKey_Bbram_Program (XilSKey_Bbram *InstancePtr) |
| This function implements the BBRAM algorithm for programming and verifying key. More... | |
Variables | |
| XilSKey_JtagSlr | XilSKeyJtag |
| JTAG Tap Instance. More... | |
| #define XSK_BBRAM_CTRL_BLACK_KEY_MASK (0x0300) |
BLACK key mask.
| #define XSK_BBRAM_CTRL_BLACK_KEY_SHIFT (8) |
BLACK key shift.
| #define XSK_BBRAM_CTRL_DEFAULT_VAL (0x1) |
Enable value.
| #define XSK_BBRAM_CTRL_DPA_COUNT_MASK (0xFF000000) |
DPA count mask.
| #define XSK_BBRAM_CTRL_DPA_COUNT_SHIFT (24) |
DPA count shift.
| #define XSK_BBRAM_CTRL_DPA_PROTECT_MASK (0xC000) |
DPA Protection mask.
| #define XSK_BBRAM_CTRL_DPA_PROTECT_SHIFT (14) |
DPA protection shift.
| #define XSK_BBRAM_CTRL_ECC_MASK (0x003F) |
Error detection mask.
| #define XSK_BBRAM_CTRL_ENABLE_VAL (0x2) |
Value for default state.
| #define XSK_BBRAM_CTRL_MODE_MASK (0x3000) |
DPA mode mask.
| #define XSK_BBRAM_CTRL_MODE_SHIFT (12) |
DPA mode shift.
| #define XSK_BBRAM_CTRL_RD_DPA_COUNT_MASK (0x00FF0000) |
Redundant DPA count mask.
| #define XSK_BBRAM_CTRL_RD_DPA_COUNT_SHIFT (16) |
Redundant DPA count shift.
| #define XSK_BBRAM_CTRL_RSRVD_MASK (0x0440) |
Reserved bits.
| #define XSK_BBRAM_P0_MASK 0X36AD555 |
< DEF masks for calculating ECC of 28 bit 0f a control word
| void Bbram_DeInit | ( | void | ) |
De-initialization.
De-initialization.
References calcInstr(), jtag_navigate(), jtag_setPreAndPostPads(), jtag_shift(), and XilSKeyJtag.
| int Bbram_Init | ( | void | ) |
BBRAM Algorithm - Initialization.
BBRAM Algorithm - Initialization.
- XST_FAILURE - In case of failure - XST_SUCCESS - In case of Success
References calcInstr(), jtag_navigate(), jtag_setPreAndPostPads(), jtag_shift(), XilSKey_Efuse_IsTimerExpired(), XilSKey_Efuse_SetTimeOut(), and XilSKeyJtag.
| int Bbram_ProgramKey | ( | XilSKey_Bbram * | InstancePtr | ) |
BBRAM Algorithm - Program key.
BBRAM Algorithm - Program key.
| InstancePtr | - instance pointer |
- XST_FAILURE - In case of failure - XST_SUCCESS - In case of Success
References calcInstr(), jtag_navigate(), jtag_setPreAndPostPads(), jtag_shift(), setPin(), and XilSKeyJtag.
| int Bbram_VerifyKey | ( | XilSKey_Bbram * | InstancePtr | ) |
BBRAM Algorithm - Verify key.
BBRAM Algorithm - Verify key.
Program and verify key have to be done together; These API's cannot be used independently.
| InstancePtr | - instance pointer |
- XST_FAILURE - In case of failure - XST_SUCCESS - In case of Success
References calcInstr(), jtag_navigate(), jtag_setPreAndPostPads(), jtag_shift(), setPin(), and XilSKeyJtag.
| int JtagServerInitBbram | ( | XilSKey_Bbram * | InstancePtr | ) |
JTAG Server Initialization routine for Bbram.
JTAG Server Initialization routine for Bbram.
| InstancePtr | - instance pointer |
- XST_FAILURE - In case of failure - XST_SUCCESS - In case of Success
References js_init_zynq(), js_printf, JtagInitGpio(), JtagValidateMioPins(), and XilSKeyJtag.
| u32 XilSKey_RowCrcCalculation | ( | u32 | PrevCRC, |
| u32 | Data, | ||
| u32 | Addr | ||
| ) |
Calculates CRC value for each row of AES key.
| PrevCRC | holds the prev row's CRC. |
| Data | holds the present row's key. |
| Addr | stores the current row number. |
Referenced by XilSKey_CrcCalculation(), and XilSkey_CrcCalculation_AesKey().
| XilSKey_JtagSlr XilSKeyJtag |
JTAG Tap Instance.
Referenced by Bbram_Close_Ultra(), Bbram_DeInit(), Bbram_Init(), Bbram_ProgramKey(), Bbram_VerifyKey(), calcInstr(), Jtag_Read_Sysmon(), JtagAES_Check_Ultrascale(), JtagRead(), JtagRead_Status_Ultrascale(), JtagRead_Ultrascale(), JtagServerInit(), JtagServerInitBbram(), JtagWrite(), and JtagWrite_Ultrascale().