Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
mce_amd.h File Reference
#include <linux/notifier.h>
#include <asm/mce.h>

Go to the source code of this file.

Data Structures

struct  amd_decoder_ops
 

Macros

#define EC(x)   ((x) & 0xffff)
 
#define XEC(x, mask)   (((x) >> 16) & mask)
 
#define LOW_SYNDROME(x)   (((x) >> 15) & 0xff)
 
#define HIGH_SYNDROME(x)   (((x) >> 24) & 0xff)
 
#define TLB_ERROR(x)   (((x) & 0xFFF0) == 0x0010)
 
#define MEM_ERROR(x)   (((x) & 0xFF00) == 0x0100)
 
#define BUS_ERROR(x)   (((x) & 0xF800) == 0x0800)
 
#define TT(x)   (((x) >> 2) & 0x3)
 
#define TT_MSG(x)   tt_msgs[TT(x)]
 
#define II(x)   (((x) >> 2) & 0x3)
 
#define II_MSG(x)   ii_msgs[II(x)]
 
#define LL(x)   ((x) & 0x3)
 
#define LL_MSG(x)   ll_msgs[LL(x)]
 
#define TO(x)   (((x) >> 8) & 0x1)
 
#define TO_MSG(x)   to_msgs[TO(x)]
 
#define PP(x)   (((x) >> 9) & 0x3)
 
#define PP_MSG(x)   pp_msgs[PP(x)]
 
#define R4(x)   (((x) >> 4) & 0xf)
 
#define R4_MSG(x)   ((R4(x) < 9) ? rrrr_msgs[R4(x)] : "Wrong R4!")
 
#define NBSH_ERR_CPU_VAL   BIT(24)
 

Enumerations

enum  tt_ids { TT_INSTR = 0, TT_DATA, TT_GEN, TT_RESV }
 
enum  ll_ids { LL_RESV = 0, LL_L1, LL_L2, LL_LG }
 
enum  ii_ids { II_MEM = 0, II_RESV, II_IO, II_GEN }
 
enum  rrrr_ids {
  R4_GEN = 0, R4_RD, R4_WR, R4_DRD,
  R4_DWR, R4_IRD, R4_PREF, R4_EVICT,
  R4_SNOOP
}
 

Functions

void amd_report_gart_errors (bool)
 
void amd_register_ecc_decoder (void(*f)(int, struct mce *))
 
void amd_unregister_ecc_decoder (void(*f)(int, struct mce *))
 
void amd_decode_nb_mce (struct mce *)
 
int amd_decode_mce (struct notifier_block *nb, unsigned long val, void *data)
 

Variables

const char *const tt_msgs []
 
const char *const ll_msgs []
 
const char *const rrrr_msgs []
 
const char *const pp_msgs []
 
const char *const to_msgs []
 
const char *const ii_msgs []
 

Macro Definition Documentation

#define BUS_ERROR (   x)    (((x) & 0xF800) == 0x0800)

Definition at line 16 of file mce_amd.h.

#define EC (   x)    ((x) & 0xffff)

Definition at line 8 of file mce_amd.h.

#define HIGH_SYNDROME (   x)    (((x) >> 24) & 0xff)

Definition at line 12 of file mce_amd.h.

#define II (   x)    (((x) >> 2) & 0x3)

Definition at line 20 of file mce_amd.h.

#define II_MSG (   x)    ii_msgs[II(x)]

Definition at line 21 of file mce_amd.h.

#define LL (   x)    ((x) & 0x3)

Definition at line 22 of file mce_amd.h.

#define LL_MSG (   x)    ll_msgs[LL(x)]

Definition at line 23 of file mce_amd.h.

#define LOW_SYNDROME (   x)    (((x) >> 15) & 0xff)

Definition at line 11 of file mce_amd.h.

#define MEM_ERROR (   x)    (((x) & 0xFF00) == 0x0100)

Definition at line 15 of file mce_amd.h.

#define NBSH_ERR_CPU_VAL   BIT(24)

Definition at line 35 of file mce_amd.h.

#define PP (   x)    (((x) >> 9) & 0x3)

Definition at line 26 of file mce_amd.h.

#define PP_MSG (   x)    pp_msgs[PP(x)]

Definition at line 27 of file mce_amd.h.

#define R4 (   x)    (((x) >> 4) & 0xf)

Definition at line 29 of file mce_amd.h.

#define R4_MSG (   x)    ((R4(x) < 9) ? rrrr_msgs[R4(x)] : "Wrong R4!")

Definition at line 30 of file mce_amd.h.

#define TLB_ERROR (   x)    (((x) & 0xFFF0) == 0x0010)

Definition at line 14 of file mce_amd.h.

#define TO (   x)    (((x) >> 8) & 0x1)

Definition at line 24 of file mce_amd.h.

#define TO_MSG (   x)    to_msgs[TO(x)]

Definition at line 25 of file mce_amd.h.

#define TT (   x)    (((x) >> 2) & 0x3)

Definition at line 18 of file mce_amd.h.

#define TT_MSG (   x)    tt_msgs[TT(x)]

Definition at line 19 of file mce_amd.h.

#define XEC (   x,
  mask 
)    (((x) >> 16) & mask)

Definition at line 9 of file mce_amd.h.

Enumeration Type Documentation

enum ii_ids
Enumerator:
II_MEM 
II_RESV 
II_IO 
II_GEN 

Definition at line 51 of file mce_amd.h.

enum ll_ids
Enumerator:
LL_RESV 
LL_L1 
LL_L2 
LL_LG 

Definition at line 44 of file mce_amd.h.

enum rrrr_ids
Enumerator:
R4_GEN 
R4_RD 
R4_WR 
R4_DRD 
R4_DWR 
R4_IRD 
R4_PREF 
R4_EVICT 
R4_SNOOP 

Definition at line 58 of file mce_amd.h.

enum tt_ids
Enumerator:
TT_INSTR 
TT_DATA 
TT_GEN 
TT_RESV 

Definition at line 37 of file mce_amd.h.

Function Documentation

int amd_decode_mce ( struct notifier_block nb,
unsigned long  val,
void data 
)

Definition at line 672 of file mce_amd.c.

void amd_decode_nb_mce ( struct mce )

Definition at line 513 of file mce_amd.c.

void amd_register_ecc_decoder ( void(*)(int, struct mce *)  f)

Definition at line 20 of file mce_amd.c.

void amd_report_gart_errors ( bool  )

Definition at line 14 of file mce_amd.c.

void amd_unregister_ecc_decoder ( void(*)(int, struct mce *)  f)

Definition at line 26 of file mce_amd.c.

Variable Documentation

const char* const ii_msgs[]

Definition at line 64 of file mce_amd.c.

const char* const ll_msgs[]

Definition at line 46 of file mce_amd.c.

const char* const pp_msgs[]

Definition at line 56 of file mce_amd.c.

const char* const rrrr_msgs[]

Definition at line 50 of file mce_amd.c.

const char* const to_msgs[]

Definition at line 60 of file mce_amd.c.

const char* const tt_msgs[]

Definition at line 42 of file mce_amd.c.