blob: 2ba4182ee5f39f150bfc8d940fce91b6906f1eb5 [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
Lawrence Tange18aaee2022-07-07 09:01:30 +01007#define IPF_MOD_ERROR_VALID_BITFIELD_NAMES (const char*[]) {"checkInfoValid", "requestorIdentifierValid", \
8 "responderIdentifierValid", "targetIdentifierValid", "preciseIPValid"}
9#define IPF_PSI_STATIC_INFO_VALID_BITFIELD_NAMES (const char*[]) {"minstateValid", "brValid", "crValid", \
10 "arValid", "rrValid", "frValid"}
11
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010012///
13/// IPF Error Record Section
14/// Defined as according to B.2.3 of the ItaniumTM Processor Family System Abstraction Layer (SAL) Specification.
15///
16typedef struct {
17 UINT64 ProcErrorMapValid : 1;
18 UINT64 ProcStateParameterValid : 1;
19 UINT64 ProcCrLidValid : 1;
20 UINT64 PsiStaticStructValid : 1;
21 UINT64 CacheCheckNum : 4;
22 UINT64 TlbCheckNum : 4;
23 UINT64 BusCheckNum : 4;
24 UINT64 RegFileCheckNum : 4;
25 UINT64 MsCheckNum : 4;
26 UINT64 CpuIdInfoValid : 1;
27 UINT64 Reserved : 39;
28} EPI_IPF_ERROR_VALID_BITS;
29
30typedef struct {
31 EPI_IPF_ERROR_VALID_BITS ValidBits;
32 UINT64 ProcErrorMap;
33 UINT64 ProcStateParameter;
34 UINT64 ProcCrLid;
35} EFI_IPF_ERROR_INFO_HEADER;
36
37typedef struct {
38 UINT64 ValidBits;
39 UINT64 ModCheckInfo;
40 UINT64 ModTargetId;
Lawrence Tange18aaee2022-07-07 09:01:30 +010041 UINT64 ModRequestorId; //todo: Which way around are these? Spec has a typo
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010042 UINT64 ModResponderId;
43 UINT64 ModPreciseIp;
44} EFI_IPF_MOD_ERROR_INFO;
45
46typedef struct {
47 UINT8 CpuIdInfo[40];
48 UINT8 Reserved1[8];
Lawrence Tange18aaee2022-07-07 09:01:30 +010049} EFI_IPF_CPU_INFO;
50
51typedef struct {
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010052 UINT64 ValidBits;
53 UINT8 MinimalSaveStateInfo[1024];
Lawrence Tange18aaee2022-07-07 09:01:30 +010054 UINT64 Brs[8];
55 UINT64 Crs[128];
56 UINT64 Ars[128];
57 UINT64 Rrs[8];
58 UINT64 Frs[256];
59} EFI_IPF_PSI_STATIC;
Lawrence Tangcc0f5f32022-07-06 17:17:26 +010060
61json_object* cper_section_ipf_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
62
63#endif