Skip to content

[rdc] Add RDC_FI_AFID field decoding AFID + severity from the CPER ring#7728

Closed
brichang wants to merge 1 commit into
ROCm:developfrom
brichang:feature/rdc-afid-field
Closed

[rdc] Add RDC_FI_AFID field decoding AFID + severity from the CPER ring#7728
brichang wants to merge 1 commit into
ROCm:developfrom
brichang:feature/rdc-afid-field

Conversation

@brichang

Copy link
Copy Markdown

Summary

Adds a new RDC field RDC_FI_AFID (id 680, label AFID) that surfaces the AMD Field ID(s) and severity of the GPU's RAS CPER records as a regular RDC field.

  • get_afid() reads CPER records straight from the driver via amdsmi_get_gpu_cper_entries() and decodes the AFID(s) of each record with amdsmi_get_afids_from_cper().
  • The value is a STRING of comma-separated <afid>:<severity> pairs, where severity is one of FATAL / CORRECTED / UNCORRECTED, or N/A when the ring has no matching records.
  • Registered in rdc_field.data (name/label/validity) and in RdcSmiLib's telemetry field list, so it works like any other field (e.g. rdci dmon -e AFID).

Motivation:

  • Users can read AFIDs through RDC without first configuring a CPER dump folder via amd-smi ras --cper --folder ....
  • Only the AFID number and severity are reported (no service-action-guide text), to keep the field minimal.

Test plan

  • Built and installed RDC on a ROCm 7.2.4 host with 8x AMD Instinct MI355X (gfx942/CDNA4) GPUs.
  • rdci dmon -l lists 680 RDC_FI_AFID : Decoded AFID(s) and severity from CPER.
  • rdci dmon -i 0 -e 680 returned 24:CORRECTED,...,25:FATAL,..., matching amd-smi ras --cper output for the same GPU.
  • Injected a correctable UMC error via amdgpuras; new CPER records appeared in the driver ring and the AFID field immediately reflected the new 24:CORRECTED entries.

Note: reading the CPER ring requires debugfs (/sys/kernel/debug/dri/<n>/amdgpu_ring_cper) to be accessible to the process; otherwise the field returns N/A.

Signed-off-by: Brian Chang brichang@amd.com

Made with Cursor

Add a new RDC field RDC_FI_AFID that reads CPER records directly from the
driver via amdsmi_get_gpu_cper_entries() and decodes the AMD Field ID(s)
with amdsmi_get_afids_from_cper(). The field is reported as a STRING of
comma-separated <afid>:<severity> pairs (severity one of FATAL / CORRECTED /
UNCORRECTED), or N/A when the ring is empty.

This lets users read AFIDs as a normal RDC field (rdci dmon -e AFID) without
first configuring a CPER dump folder via amd-smi, and intentionally omits the
service-action-guide text so only the AFID number and severity are surfaced.

Signed-off-by: Brian Chang <brichang@amd.com>
@dmitrii-galantsev

Copy link
Copy Markdown
Contributor

superseded by #8527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants