drivers/gpu/drm/amd/ras/rascore/ras.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/ras/rascore/ras.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/ras/rascore/ras.h- Extension
.h- Size
- 11845 bytes
- Lines
- 402
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
ras_sys.hras_umc.hras_aca.hras_eeprom.hras_core_status.hras_process.hras_gfx.hras_cmd.hras_nbio.hras_mp1.hras_psp.hras_log_ring.hras_eeprom_fw.h
Detected Declarations
struct ras_core_contextstruct ras_bank_eccstruct ras_umcstruct ras_acastruct ras_processstruct ras_nbiostruct ras_log_ringstruct ras_pspstruct ras_mp1_sys_funcstruct ras_eeprom_sys_funcstruct ras_nbio_sys_funcstruct ras_timestruct device_system_infostruct ras_psp_sys_funcstruct ras_sys_funcstruct ras_ecc_countstruct ras_bank_eccstruct ras_bank_ecc_nodestruct ras_aca_configstruct ras_mp1_configstruct ras_nbio_configstruct ras_psp_configstruct ras_umc_configstruct ras_eeprom_configstruct ras_core_configstruct ras_core_contextenum ras_gpu_health_statusenum ras_core_fw_feature_flagsenum ras_block_idenum ras_ecc_err_typeenum ras_err_typeenum ras_seqno_typeenum ras_seqno_fifoenum ras_notify_eventenum ras_gpu_statusenum ras_fw_eeprom_cmdenum gpu_mem_type
Annotated Snippet
struct ras_mp1_sys_func {
int (*mp1_get_valid_bank_count)(struct ras_core_context *ras_core,
u32 msg, u32 *count);
int (*mp1_dump_valid_bank)(struct ras_core_context *ras_core,
u32 msg, u32 idx, u32 reg_idx, u64 *val);
int (*mp1_send_eeprom_msg)(struct ras_core_context *ras_core,
enum ras_fw_eeprom_cmd index, uint32_t param, uint32_t *read_arg);
int (*mp1_get_ras_enabled_mask)(struct ras_core_context *ras_core,
uint64_t *enabled_mask);
};
struct ras_eeprom_sys_func {
int (*eeprom_i2c_xfer)(struct ras_core_context *ras_core,
u32 eeprom_addr, u8 *eeprom_buf, u32 buf_size, bool read);
int (*update_eeprom_i2c_config)(struct ras_core_context *ras_core);
};
struct ras_nbio_sys_func {
int (*set_ras_controller_irq_state)(struct ras_core_context *ras_core,
bool state);
int (*set_ras_err_event_athub_irq_state)(struct ras_core_context *ras_core,
bool state);
};
struct ras_time {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
long tm_year;
};
struct device_system_info {
uint32_t device_id;
uint32_t vendor_id;
uint32_t socket_id;
};
enum gpu_mem_type {
GPU_MEM_TYPE_DEFAULT,
GPU_MEM_TYPE_RAS_PSP_RING,
GPU_MEM_TYPE_RAS_PSP_CMD,
GPU_MEM_TYPE_RAS_PSP_FENCE,
GPU_MEM_TYPE_RAS_TA_FW,
GPU_MEM_TYPE_RAS_TA_CMD,
};
struct ras_psp_sys_func {
int (*get_ras_psp_system_status)(struct ras_core_context *ras_core,
struct ras_psp_sys_status *status);
int (*get_ras_ta_init_param)(struct ras_core_context *ras_core,
struct ras_ta_init_param *ras_ta_param);
};
struct ras_sys_func {
int (*gpu_reset_lock)(struct ras_core_context *ras_core,
bool down, bool try);
int (*check_gpu_status)(struct ras_core_context *ras_core,
uint32_t *status);
int (*gen_seqno)(struct ras_core_context *ras_core,
enum ras_seqno_type seqno_type, uint64_t *seqno);
int (*async_handle_ras_event)(struct ras_core_context *ras_core, void *data);
int (*ras_notifier)(struct ras_core_context *ras_core,
enum ras_notify_event event_id, void *data);
u64 (*get_utc_second_timestamp)(struct ras_core_context *ras_core);
int (*get_device_system_info)(struct ras_core_context *ras_core,
struct device_system_info *dev_info);
bool (*detect_ras_interrupt)(struct ras_core_context *ras_core);
int (*get_gpu_mem)(struct ras_core_context *ras_core,
enum gpu_mem_type mem_type, struct gpu_mem_block *gpu_mem);
int (*put_gpu_mem)(struct ras_core_context *ras_core,
enum gpu_mem_type mem_type, struct gpu_mem_block *gpu_mem);
};
struct ras_ecc_count {
uint64_t new_ce_count;
uint64_t total_ce_count;
uint64_t new_ue_count;
uint64_t total_ue_count;
uint64_t new_de_count;
uint64_t total_de_count;
};
struct ras_bank_ecc {
uint32_t nps;
uint64_t seq_no;
uint64_t status;
uint64_t ipid;
uint64_t addr;
Annotation
- Immediate include surface: `ras_sys.h`, `ras_umc.h`, `ras_aca.h`, `ras_eeprom.h`, `ras_core_status.h`, `ras_process.h`, `ras_gfx.h`, `ras_cmd.h`.
- Detected declarations: `struct ras_core_context`, `struct ras_bank_ecc`, `struct ras_umc`, `struct ras_aca`, `struct ras_process`, `struct ras_nbio`, `struct ras_log_ring`, `struct ras_psp`, `struct ras_mp1_sys_func`, `struct ras_eeprom_sys_func`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.