blob: 8083ff02e2258281e39cf5fba0653206f03852bc [file] [log] [blame]
Lawrence Tangcc0f5f32022-07-06 17:17:26 +01001#ifndef CPER_SECTION_IPF_H
2#define CPER_SECTION_IPF_H
3
4#include "json.h"
5#include "../edk/Cper.h"
6
7///
8/// IPF Error Record Section
9/// Defined as according to B.2.3 of the ItaniumTM Processor Family System Abstraction Layer (SAL) Specification.
10///
11typedef struct {
12 UINT64 ProcErrorMapValid : 1;
13 UINT64 ProcStateParameterValid : 1;
14 UINT64 ProcCrLidValid : 1;
15 UINT64 PsiStaticStructValid : 1;
16 UINT64 CacheCheckNum : 4;
17 UINT64 TlbCheckNum : 4;
18 UINT64 BusCheckNum : 4;
19 UINT64 RegFileCheckNum : 4;
20 UINT64 MsCheckNum : 4;
21 UINT64 CpuIdInfoValid : 1;
22 UINT64 Reserved : 39;
23} EPI_IPF_ERROR_VALID_BITS;
24
25typedef struct {
26 EPI_IPF_ERROR_VALID_BITS ValidBits;
27 UINT64 ProcErrorMap;
28 UINT64 ProcStateParameter;
29 UINT64 ProcCrLid;
30} EFI_IPF_ERROR_INFO_HEADER;
31
32typedef struct {
33 UINT64 ValidBits;
34 UINT64 ModCheckInfo;
35 UINT64 ModTargetId;
36 UINT64 ModRequestorId;
37 UINT64 ModResponderId;
38 UINT64 ModPreciseIp;
39} EFI_IPF_MOD_ERROR_INFO;
40
41typedef struct {
42 UINT8 CpuIdInfo[40];
43 UINT8 Reserved1[8];
44 UINT64 ValidBits;
45 UINT8 MinimalSaveStateInfo[1024];
46 UINT8 Brs[64];
47 UINT8 Crs[1024];
48 UINT8 Rrs[64];
49 UINT8 Frs[2048];
50} EFI_IPF_ERROR_INFO_FOOTER;
51
52json_object* cper_section_ipf_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
53
54#endif