Error Detection And Correction (EDAC) API

API Reference

group edac

Defines

EDAC_ERROR_TYPE_DRAM_COR

Correctable error type.

EDAC_ERROR_TYPE_DRAM_UC

Uncorrectable error type.

Functions

static inline uint64_t edac_ecc_error_log_get(const struct device *dev)

Get ECC Error Log.

Read value of ECC Error Log

Parameters
  • dev – Pointer to the device structure

Returns

ECC Error Log value

static inline void edac_ecc_error_log_clear(const struct device *dev)

Clear ECC Error Log.

Clear value of ECC Error Log

Parameters
  • dev – Pointer to the device structure

static inline uint64_t edac_parity_error_log_get(const struct device *dev)

Get Parity Error Log.

Read value of Parity Error Log

Parameters
  • dev – Pointer to the device structure

Returns

Parity Error Log value

static inline void edac_parity_error_log_clear(const struct device *dev)

Clear Parity Error Log.

Clear value of Parity Error Log

Parameters
  • dev – Pointer to the device structure

static inline unsigned int edac_errors_cor_get(const struct device *dev)

Get number of correctable errors.

Parameters
  • dev – Pointer to the device structure

Returns

Number of correctable errors

static inline unsigned int edac_errors_uc_get(const struct device *dev)

Get number of uncorrectable errors.

Parameters
  • dev – Pointer to the device structure

Returns

Number of uncorrectable errors

static inline int edac_notify_callback_set(const struct device *dev, edac_notify_callback_f cb)

Register callback function for memory error exception

This callback runs in interrupt context

Parameters
  • dev – EDAC driver device to install callback

  • cb – Callback function pointer

Returns

0 Success, nonzero if an error occurred

struct edac_driver_api
#include <edac.h>

EDAC driver API.

This is the mandatory API any EDAC driver needs to expose.