lib/sw_services/xilnvm/examples/xilnvm_efuse_versal_client_example.c
static int XilNvm_EfuseShowPufSecCtrlBits(void)
{
	int Status = XST_FAILURE;
	XNvm_EfusePufSecCtrlBits *PufSecCtrlBits =
		(XNvm_EfusePufSecCtrlBits *)CacheAlignedArr;

	Xil_DCacheInvalidateRange((UINTPTR)&CacheAlignedArr,
		sizeof(CacheAlignedArr));

	Status = XNvm_EfuseReadSecCtrlBits((UINTPTR)PufSecCtrlBits);
	if (Status != XST_SUCCESS) {
		goto END;
	}

	Xil_DCacheInvalidateRange((UINTPTR)&CacheAlignedArr,
		sizeof(CacheAlignedArr));

	xil_printf("\r\nPuf Control eFuses:\n\r");

	if (PufSecCtrlBits->PufSynLk == TRUE) {
		xil_printf("Programming Puf Syndrome data is disabled\n\r");
	}
	else {
		xil_printf("Programming Puf Syndrome data is enabled\n\r");
	}
	if(PufSecCtrlBits->PufDis == TRUE) {
		xil_printf("Puf is disabled\n\r");
	}
	else {
		xil_printf("Puf is enabled\n\r");
	}
	if (PufSecCtrlBits->PufRegenDis == TRUE) {
		xil_printf("Puf on demand regeneration is disabled\n\r");
	}
	else {
		xil_printf("Puf on demand regeneration is enabled\n\r");
	}
	if (PufSecCtrlBits->PufHdInvalid == TRUE) {
		xil_printf("Puf Helper data stored in efuse is not valid\n\r");
	}
	else {
		xil_printf("Puf Helper data stored in efuse is valid\n\r");
	}
	if (PufSecCtrlBits->PufTest2Dis == TRUE) {
		xil_printf("Puf test 2 is disabled\n\r");
	}
	else {
		xil_printf("Puf test 2 is enabled\n\r");
	}
	Status = XST_SUCCESS;
END:
	return Status;
}
/****************************************************************************/
/**
 * This API reads Puf control bits from efuse cache and displays here.
 *
 * @return
 * 		- XST_SUCCESS - If read is successful
 * 		- ErrorCode - On failure
 *
 ******************************************************************************/
This API reads Puf control bits from efuse cache and displays here.
@return
- XST_SUCCESS - If read is successful
- ErrorCode - On failure
This API reads Puf control bits from efuse cache and displays here . @return - XST_SUCCESS - If read is successful - ErrorCode - On failure
static int XilNvm_EfuseShowPufSecCtrlBits(void)
{
	int Status = XST_FAILURE;
	XNvm_EfusePufSecCtrlBits *PufSecCtrlBits =
		(XNvm_EfusePufSecCtrlBits *)CacheAlignedArr;
	Xil_DCacheInvalidateRange((UINTPTR)&CacheAlignedArr,
		sizeof(CacheAlignedArr));
	Status = XNvm_EfuseReadSecCtrlBits((UINTPTR)PufSecCtrlBits);
	if (Status != XST_SUCCESS) {
		goto END;
	}
	Xil_DCacheInvalidateRange((UINTPTR)&CacheAlignedArr,
		sizeof(CacheAlignedArr));
	xil_printf("\r\nPuf Control eFuses:\n\r");
	if (PufSecCtrlBits->PufSynLk == TRUE) {
		xil_printf("Programming Puf Syndrome data is disabled\n\r");
	}
	else {
		xil_printf("Programming Puf Syndrome data is enabled\n\r");
	}
	if(PufSecCtrlBits->PufDis == TRUE) {
		xil_printf("Puf is disabled\n\r");
	}
	else {
		xil_printf("Puf is enabled\n\r");
	}
	if (PufSecCtrlBits->PufRegenDis == TRUE) {
		xil_printf("Puf on demand regeneration is disabled\n\r");
	}
	else {
		xil_printf("Puf on demand regeneration is enabled\n\r");
	}
	if (PufSecCtrlBits->PufHdInvalid == TRUE) {
		xil_printf("Puf Helper data stored in efuse is not valid\n\r");
	}
	else {
		xil_printf("Puf Helper data stored in efuse is valid\n\r");
	}
	if (PufSecCtrlBits->PufTest2Dis == TRUE) {
		xil_printf("Puf test 2 is disabled\n\r");
	}
	else {
		xil_printf("Puf test 2 is enabled\n\r");
	}
	Status = XST_SUCCESS;
END:
	return Status;
}
static int XilNvm_EfuseShowPufSecCtrlBits ( void ) { int Status = XST_FAILURE ; XNvm_EfusePufSecCtrlBits * PufSecCtrlBits = ( XNvm_EfusePufSecCtrlBits * ) CacheAlignedArr ; Xil_DCacheInvalidateRange ( ( UINTPTR ) & CacheAlignedArr , sizeof ( CacheAlignedArr ) ) ; Status = XNvm_EfuseReadSecCtrlBits ( ( UINTPTR ) PufSecCtrlBits ) ; if ( Status != XST_SUCCESS ) { goto END ; } Xil_DCacheInvalidateRange ( ( UINTPTR ) & CacheAlignedArr , sizeof ( CacheAlignedArr ) ) ; xil_printf ( " \r \n \n \r " ) ; if ( PufSecCtrlBits -> PufSynLk == TRUE ) { xil_printf ( " \n \r " ) ; } else { xil_printf ( " \n \r " ) ; } if ( PufSecCtrlBits -> PufDis == TRUE ) { xil_printf ( " \n \r " ) ; } else { xil_printf ( " \n \r " ) ; } if ( PufSecCtrlBits -> PufRegenDis == TRUE ) { xil_printf ( " \n \r " ) ; } else { xil_printf ( " \n \r " ) ; } if ( PufSecCtrlBits -> PufHdInvalid == TRUE ) { xil_printf ( " \n \r " ) ; } else { xil_printf ( " \n \r " ) ; } if ( PufSecCtrlBits -> PufTest2Dis == TRUE ) { xil_printf ( " \n \r " ) ; } else { xil_printf ( " \n \r " ) ; } Status = XST_SUCCESS ; END : return Status ; }
This API reads Puf control bits from efuse cache and displays here.
This API reads Puf control bits from efuse cache and displays here .