Error Detection And Correction (EDAC)¶
API Reference¶
- group edac
Enums
Functions
-
static inline int edac_inject_set_param1(const struct device *dev, uint64_t value)¶
Set injection parameter param1.
Set first error injection parameter value.
- Parameters
dev
: Pointer to the device structurevalue
: First injection parameter
- Return Value
-ENOSYS
: if the optional interface is not implemented0
: on success, other error code otherwise
-
static inline int edac_inject_get_param1(const struct device *dev, uint64_t *value)¶
Get injection parameter param1.
Get first error injection parameter value.
- Parameters
dev
: Pointer to the device structurevalue
: Pointer to the first injection parameter
- Return Value
-ENOSYS
: if the optional interface is not implemented0
: on success, error code otherwise
-
static inline int edac_inject_set_param2(const struct device *dev, uint64_t value)¶
Set injection parameter param2.
Set second error injection parameter value.
- Parameters
dev
: Pointer to the device structurevalue
: Second injection parameter
- Return Value
-ENOSYS
: if the optional interface is not implemented0
: on success, error code otherwise
-
static inline int edac_inject_get_param2(const struct device *dev, uint64_t *value)¶
Get injection parameter param2.
- Parameters
dev
: Pointer to the device structurevalue
: Pointer to the second injection parameter
- Return Value
-ENOSYS
: if the optional interface is not implemented0
: on success, error code otherwise
-
static inline int edac_inject_set_error_type(const struct device *dev, uint32_t error_type)¶
Set error type value.
Set the value of error type to be injected
- Parameters
dev
: Pointer to the device structureerror_type
: Error type value
- Return Value
-ENOSYS
: if the optional interface is not implemented0
: on success, error code otherwise
-
static inline int edac_inject_get_error_type(const struct device *dev, uint32_t *error_type)¶
Get error type value.
Get the value of error type to be injected
- Parameters
dev
: Pointer to the device structureerror_type
: Pointer to error type value
- Return Value
-ENOSYS
: if the optional interface is not implemented0
: on success, error code otherwise
-
static inline int edac_inject_error_trigger(const struct device *dev)¶
Set injection control.
Trigger error injection.
- Parameters
dev
: Pointer to the device structure
- Return Value
-ENOSYS
: if the optional interface is not implemented0
: on success, error code otherwise
-
static inline int edac_ecc_error_log_get(const struct device *dev, uint64_t *value)¶
Get ECC Error Log.
Read value of ECC Error Log.
- Parameters
dev
: Pointer to the device structurevalue
: Pointer to the ECC Error Log value
- Return Value
0
: on success, error code otherwise-ENOSYS
: if the mandatory interface is not implemented
-
static inline int 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
- Return Value
0
: on success, error code otherwise-ENOSYS
: if the mandatory interface is not implemented
-
static inline int edac_parity_error_log_get(const struct device *dev, uint64_t *value)¶
Get Parity Error Log.
Read value of Parity Error Log.
- Parameters
dev
: Pointer to the device structurevalue
: Pointer to the parity Error Log value
- Return Value
0
: on success, error code otherwise-ENOSYS
: if the mandatory interface is not implemented
-
static inline int 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
- Return Value
0
: on success, error code otherwise-ENOSYS
: if the mandatory interface is not implemented
-
static inline int edac_errors_cor_get(const struct device *dev)¶
Get number of correctable errors.
- Parameters
dev
: Pointer to the device structure
- Return Value
num
: Number of correctable errors-ENOSYS
: if the mandatory interface is not implemented
-
static inline int edac_errors_uc_get(const struct device *dev)¶
Get number of uncorrectable errors.
- Parameters
dev
: Pointer to the device structure
- Return Value
num
: Number of uncorrectable errors-ENOSYS
: if the mandatory interface is not implemented
-
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 callbackcb
: Callback function pointer
- Return Value
0
: on success, error code otherwise-ENOSYS
: if the mandatory interface is not implemented
-
struct edac_driver_api¶
- #include <edac.h>
EDAC driver API.
This is the mandatory API any EDAC driver needs to expose.
-
static inline int edac_inject_set_param1(const struct device *dev, uint64_t value)¶