lib/sw_services/xilskey/examples/xilskey_efuseps_zynqmp_example.c
static inline u32 XilSKey_EfusePs_ZynqMp_ReadPufFuses() {
	XilSKey_PufEfuse PufFuse = {0};
	u32 Status = XST_FAILURE;
	u32 Row = 0U;
	u32 XSK_EFUSEPS_PufReadData[XSK_EFUSEPS_PUF_READ_NUM_OF_ROWS];

	/* Read PUF Fuses */
	PufFuse.ReadPufFuse = XSK_EFUSEPS_READ_PUF_FUSE;
	if (PufFuse.ReadPufFuse == TRUE) {
		PufFuse.PufFuseData = XSK_EFUSEPS_PufReadData;
		PufFuse.PufFuseStartRow = XSK_EFUSEPS_PUF_READ_START_ROW;
		PufFuse.PufNumOfFuses = XSK_EFUSEPS_PUF_READ_NUM_OF_ROWS;
		Status = XilSKey_ZynqMp_EfusePs_ReadPufAsUserFuses(&PufFuse);
		if (Status != XST_SUCCESS) {
			xil_printf("Read user fuses from PUF Helper Data failed\n\r");
			goto END;
		}

		for (Row = XSK_EFUSEPS_PUF_READ_START_ROW;
			Row < (XSK_EFUSEPS_PUF_READ_START_ROW +
					XSK_EFUSEPS_PUF_READ_NUM_OF_ROWS); Row++) {
			xil_printf("User_eFuse(PufHd) %d:%08x \n\r",
					Row, XSK_EFUSEPS_PufReadData[Row - XSK_EFUSEPS_PUF_READ_START_ROW]);
		}
	}

	Status = XST_SUCCESS;
END:
	return Status;
}
/****************************************************************************/
/**
*
* This function reads the puf fuses as general purpose data
*
* @return
*		- XST_SUCCESS - In case of Read Success
*		- XST_FAILURE - If read fails
*
*****************************************************************************/
This function reads the puf fuses as general purpose data
This function reads the puf fuses as general purpose data
static inline u32 XilSKey_EfusePs_ZynqMp_ReadPufFuses() {
	XilSKey_PufEfuse PufFuse = {0};
	u32 Status = XST_FAILURE;
	u32 Row = 0U;
	u32 XSK_EFUSEPS_PufReadData[XSK_EFUSEPS_PUF_READ_NUM_OF_ROWS];
	PufFuse.ReadPufFuse = XSK_EFUSEPS_READ_PUF_FUSE;
	if (PufFuse.ReadPufFuse == TRUE) {
		PufFuse.PufFuseData = XSK_EFUSEPS_PufReadData;
		PufFuse.PufFuseStartRow = XSK_EFUSEPS_PUF_READ_START_ROW;
		PufFuse.PufNumOfFuses = XSK_EFUSEPS_PUF_READ_NUM_OF_ROWS;
		Status = XilSKey_ZynqMp_EfusePs_ReadPufAsUserFuses(&PufFuse);
		if (Status != XST_SUCCESS) {
			xil_printf("Read user fuses from PUF Helper Data failed\n\r");
			goto END;
		}
		for (Row = XSK_EFUSEPS_PUF_READ_START_ROW;
			Row < (XSK_EFUSEPS_PUF_READ_START_ROW +
					XSK_EFUSEPS_PUF_READ_NUM_OF_ROWS); Row++) {
			xil_printf("User_eFuse(PufHd) %d:%08x \n\r",
					Row, XSK_EFUSEPS_PufReadData[Row - XSK_EFUSEPS_PUF_READ_START_ROW]);
		}
	}
	Status = XST_SUCCESS;
END:
	return Status;
}
static inline u32 XilSKey_EfusePs_ZynqMp_ReadPufFuses ( ) { XilSKey_PufEfuse PufFuse = { 0 } ; u32 Status = XST_FAILURE ; u32 Row = 0U ; u32 XSK_EFUSEPS_PufReadData [ XSK_EFUSEPS_PUF_READ_NUM_OF_ROWS ] ; PufFuse . ReadPufFuse = XSK_EFUSEPS_READ_PUF_FUSE ; if ( PufFuse . ReadPufFuse == TRUE ) { PufFuse . PufFuseData = XSK_EFUSEPS_PufReadData ; PufFuse . PufFuseStartRow = XSK_EFUSEPS_PUF_READ_START_ROW ; PufFuse . PufNumOfFuses = XSK_EFUSEPS_PUF_READ_NUM_OF_ROWS ; Status = XilSKey_ZynqMp_EfusePs_ReadPufAsUserFuses ( & PufFuse ) ; if ( Status != XST_SUCCESS ) { xil_printf ( " \n \r " ) ; goto END ; } for ( Row = XSK_EFUSEPS_PUF_READ_START_ROW ; Row < ( XSK_EFUSEPS_PUF_READ_START_ROW + XSK_EFUSEPS_PUF_READ_NUM_OF_ROWS ) ; Row ++ ) { xil_printf ( " \n \r " , Row , XSK_EFUSEPS_PufReadData [ Row - XSK_EFUSEPS_PUF_READ_START_ROW ] ) ; } } Status = XST_SUCCESS ; END : return Status ; }
This function reads the puf fuses as general purpose data
This function reads the puf fuses as general purpose data
/* Read PUF Fuses */