Hard Processor System Remote System Update User Guide: Agilex™ 5 SoCs

ID 852610
Date 4/18/2025
Public
Document Table of Contents

C.4. Macros

The following macros are available to extract the fields from the version field of the rsu_status_info structure (from include/libRSU.h in librsu repository):
/* Macros for extracting RSU version fields */
#define RSU_VERSION_CRT_DCMF_IDX(v)	FIELD_GET(RSU_VERSION_CRT_IDX_MASK, (v))
#define RSU_VERSION_ERROR_SOURCE(v)	FIELD_GET(RSU_VERSION_ERR_MASK, (v))
#define RSU_VERSION_ACMF_VERSION(v)	FIELD_GET(RSU_VERSION_ACMF_MASK, (v))
#define RSU_VERSION_DCMF_VERSION(v)	FIELD_GET(RSU_VERSION_DCMF_MASK, (v))
The following macros are available to extract the fields from the versions returned by the rsu_dcmf_version function (from include/libRSU.h in librsu repository):
/* Macros for extracting DCMF version fields */
#define DCMF_VERSION_MAJOR(v)  FIELD_GET(DCMF_VERSION_MAJOR_MASK, (v))
#define DCMF_VERSION_MINOR(v)  FIELD_GET(DCMF_VERSION_MINOR_MASK, (v))
#define DCMF_VERSION_UPDATE(v) FIELD_GET(DCMF_VERSION_UPDATE_MASK, (v))

These macros are defined in arch/arm/mach-socfpga/include/mach/rsu.h.