blob: 9e265dbd852e93e5dc37a78a3f0d18845322af4a [file] [log] [blame]
Lawrence Tangcc0f5f32022-07-06 17:17:26 +01001#ifndef CPER_SECTION_IPF_H
2#define CPER_SECTION_IPF_H
3
Karthik Rajagopalan255bd812024-09-06 14:36:34 -07004#ifdef __cplusplus
5extern "C" {
6#endif
7
Lawrence Tang5202bbb2022-08-12 14:54:36 +01008#include <json.h>
Lawrence Tangcc0f5f32022-07-06 17:17:26 +01009#include "../edk/Cper.h"
10
John Chungf8fc7052024-05-03 20:05:29 +080011#define IPF_MOD_ERROR_VALID_BITFIELD_NAMES \
12 (const char *[]) \
13 { \
14 "checkInfoValid", "requestorIdentifierValid", \
15 "responderIdentifierValid", "targetIdentifierValid", \
16 "preciseIPValid" \
17 }
18#define IPF_PSI_STATIC_INFO_VALID_BITFIELD_NAMES \
19 (const char *[]) \
20 { \
21 "minstateValid", "brValid", "crValid", "arValid", "rrValid", \
22 "frValid" \
23 }
Lawrence Tange18aaee2022-07-07 09:01:30 +010024
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010025///
26/// IPF Error Record Section
27/// Defined as according to B.2.3 of the ItaniumTM Processor Family System Abstraction Layer (SAL) Specification.
28///
29typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080030 UINT64 ProcErrorMapValid : 1;
31 UINT64 ProcStateParameterValid : 1;
32 UINT64 ProcCrLidValid : 1;
33 UINT64 PsiStaticStructValid : 1;
34 UINT64 CacheCheckNum : 4;
35 UINT64 TlbCheckNum : 4;
36 UINT64 BusCheckNum : 4;
37 UINT64 RegFileCheckNum : 4;
38 UINT64 MsCheckNum : 4;
39 UINT64 CpuIdInfoValid : 1;
40 UINT64 Reserved : 39;
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010041} EPI_IPF_ERROR_VALID_BITS;
42
43typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080044 EPI_IPF_ERROR_VALID_BITS ValidBits;
45 UINT64 ProcErrorMap;
46 UINT64 ProcStateParameter;
47 UINT64 ProcCrLid;
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010048} EFI_IPF_ERROR_INFO_HEADER;
49
50typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080051 UINT64 ValidBits;
52 UINT64 ModCheckInfo;
53 UINT64 ModTargetId;
54 UINT64 ModRequestorId; //NOTE: The Intel Itanium specification contains a typo which makes the order
55 UINT64 ModResponderId; // of these two fields undefined. This is a best guess and could be wrong.
56 UINT64 ModPreciseIp;
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010057} EFI_IPF_MOD_ERROR_INFO;
58
59typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080060 UINT8 CpuIdInfo[40];
61 UINT8 Reserved1[8];
Lawrence Tange18aaee2022-07-07 09:01:30 +010062} EFI_IPF_CPU_INFO;
63
64typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080065 UINT64 ValidBits;
66 UINT8 MinimalSaveStateInfo[1024];
67 UINT64 Brs[8];
68 UINT64 Crs[128];
69 UINT64 Ars[128];
70 UINT64 Rrs[8];
71 UINT64 Frs[256];
Lawrence Tange18aaee2022-07-07 09:01:30 +010072} EFI_IPF_PSI_STATIC;
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010073
John Chungf8fc7052024-05-03 20:05:29 +080074json_object *cper_section_ipf_to_ir(void *section);
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010075
Karthik Rajagopalan255bd812024-09-06 14:36:34 -070076#ifdef __cplusplus
77}
78#endif
79
John Chungf8fc7052024-05-03 20:05:29 +080080#endif