blob: cf346efc984d7e9962abd44f07578089e8f544bc [file] [log] [blame]
Lawrence Tangcc0f5f32022-07-06 17:17:26 +01001#ifndef CPER_SECTION_IPF_H
2#define CPER_SECTION_IPF_H
3
Lawrence Tang5202bbb2022-08-12 14:54:36 +01004#include <json.h>
Lawrence Tangcc0f5f32022-07-06 17:17:26 +01005#include "../edk/Cper.h"
6
John Chungf8fc7052024-05-03 20:05:29 +08007#define IPF_MOD_ERROR_VALID_BITFIELD_NAMES \
8 (const char *[]) \
9 { \
10 "checkInfoValid", "requestorIdentifierValid", \
11 "responderIdentifierValid", "targetIdentifierValid", \
12 "preciseIPValid" \
13 }
14#define IPF_PSI_STATIC_INFO_VALID_BITFIELD_NAMES \
15 (const char *[]) \
16 { \
17 "minstateValid", "brValid", "crValid", "arValid", "rrValid", \
18 "frValid" \
19 }
Lawrence Tange18aaee2022-07-07 09:01:30 +010020
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010021///
22/// IPF Error Record Section
23/// Defined as according to B.2.3 of the ItaniumTM Processor Family System Abstraction Layer (SAL) Specification.
24///
25typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080026 UINT64 ProcErrorMapValid : 1;
27 UINT64 ProcStateParameterValid : 1;
28 UINT64 ProcCrLidValid : 1;
29 UINT64 PsiStaticStructValid : 1;
30 UINT64 CacheCheckNum : 4;
31 UINT64 TlbCheckNum : 4;
32 UINT64 BusCheckNum : 4;
33 UINT64 RegFileCheckNum : 4;
34 UINT64 MsCheckNum : 4;
35 UINT64 CpuIdInfoValid : 1;
36 UINT64 Reserved : 39;
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010037} EPI_IPF_ERROR_VALID_BITS;
38
39typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080040 EPI_IPF_ERROR_VALID_BITS ValidBits;
41 UINT64 ProcErrorMap;
42 UINT64 ProcStateParameter;
43 UINT64 ProcCrLid;
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010044} EFI_IPF_ERROR_INFO_HEADER;
45
46typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080047 UINT64 ValidBits;
48 UINT64 ModCheckInfo;
49 UINT64 ModTargetId;
50 UINT64 ModRequestorId; //NOTE: The Intel Itanium specification contains a typo which makes the order
51 UINT64 ModResponderId; // of these two fields undefined. This is a best guess and could be wrong.
52 UINT64 ModPreciseIp;
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010053} EFI_IPF_MOD_ERROR_INFO;
54
55typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080056 UINT8 CpuIdInfo[40];
57 UINT8 Reserved1[8];
Lawrence Tange18aaee2022-07-07 09:01:30 +010058} EFI_IPF_CPU_INFO;
59
60typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080061 UINT64 ValidBits;
62 UINT8 MinimalSaveStateInfo[1024];
63 UINT64 Brs[8];
64 UINT64 Crs[128];
65 UINT64 Ars[128];
66 UINT64 Rrs[8];
67 UINT64 Frs[256];
Lawrence Tange18aaee2022-07-07 09:01:30 +010068} EFI_IPF_PSI_STATIC;
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010069
John Chungf8fc7052024-05-03 20:05:29 +080070json_object *cper_section_ipf_to_ir(void *section);
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010071
John Chungf8fc7052024-05-03 20:05:29 +080072#endif