1 /* Copyright (C) 2016 Intel Corporation
2 Decode Intel Denverton specific machine check errors.
3
4 mcelog is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License as published by the Free Software Foundation; version
7 2.
8
9 mcelog is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
13
14 You should find a copy of v2 of the GNU General Public License somewhere
15 on your Linux system; if not, write to the Free Software Foundation,
16 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18 Author: Tony Luck
19 */
20
21 #include "mcelog.h"
22 #include "bitfield.h"
23 #include "denverton.h"
24 #include "memdb.h"
25
26 /* See IA32 SDM Vol3B Table 16-33 */
27
28 static struct field mc_bits[] = {
29 SBITFIELD(16, "Cmd/Addr parity"),
30 SBITFIELD(17, "Corrected Demand/Patrol Scrub Error"),
31 SBITFIELD(18, "Uncorrected patrol scrub error"),
32 SBITFIELD(19, "Uncorrected demand read error"),
33 SBITFIELD(20, "WDB read ECC"),
34 {}
35 };
36
denverton_decode_model(int cputype,int bank,u64 status,u64 misc)37 void denverton_decode_model(int cputype, int bank, u64 status, u64 misc)
38 {
39 switch (bank) {
40 case 6: case 7:
41 Wprintf("MemCtrl: ");
42 decode_bitfield(status, mc_bits);
43 break;
44 }
45 }
46