1 #include "amd64_edac.h"
3 #define EDAC_DCT_ATTR_SHOW(reg) \
4 static ssize_t amd64_##reg##_show(struct mem_ctl_info *mci, char *data) \
6 struct amd64_pvt *pvt = mci->pvt_info; \
7 return sprintf(data, "0x%016llx\n", (u64)pvt->reg); \
10 EDAC_DCT_ATTR_SHOW(dhar
);
11 EDAC_DCT_ATTR_SHOW(dbam0
);
12 EDAC_DCT_ATTR_SHOW(top_mem
);
13 EDAC_DCT_ATTR_SHOW(top_mem2
);
15 static ssize_t
amd64_hole_show(struct mem_ctl_info
*mci
, char *data
)
21 amd64_get_dram_hole_info(mci
, &hole_base
, &hole_offset
, &hole_size
);
23 return sprintf(data
, "%llx %llx %llx\n", hole_base
, hole_offset
,
28 * update NUM_DBG_ATTRS in case you add new members
30 struct mcidev_sysfs_attribute amd64_dbg_attrs
[] = {
37 .show
= amd64_dhar_show
,
45 .show
= amd64_dbam0_show
,
53 .show
= amd64_top_mem_show
,
61 .show
= amd64_top_mem2_show
,
69 .show
= amd64_hole_show
,