Lawrence Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 1 | #ifndef CPER_SECTION_IPF_H |
| 2 | #define CPER_SECTION_IPF_H |
| 3 | |
| 4 | #include "json.h" |
| 5 | #include "../edk/Cper.h" |
| 6 | |
Lawrence Tang | e18aaee | 2022-07-07 09:01:30 +0100 | [diff] [blame] | 7 | #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 Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 12 | /// |
| 13 | /// IPF Error Record Section |
| 14 | /// Defined as according to B.2.3 of the ItaniumTM Processor Family System Abstraction Layer (SAL) Specification. |
| 15 | /// |
| 16 | typedef 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 | |
| 30 | typedef struct { |
| 31 | EPI_IPF_ERROR_VALID_BITS ValidBits; |
| 32 | UINT64 ProcErrorMap; |
| 33 | UINT64 ProcStateParameter; |
| 34 | UINT64 ProcCrLid; |
| 35 | } EFI_IPF_ERROR_INFO_HEADER; |
| 36 | |
| 37 | typedef struct { |
| 38 | UINT64 ValidBits; |
| 39 | UINT64 ModCheckInfo; |
| 40 | UINT64 ModTargetId; |
Lawrence Tang | 6c461e9 | 2022-07-07 15:25:49 +0100 | [diff] [blame] | 41 | UINT64 ModRequestorId; //NOTE: The Intel Itanium specification contains a typo which makes the order |
| 42 | UINT64 ModResponderId; // of these two fields undefined. This is a best guess and could be wrong. |
Lawrence Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 43 | UINT64 ModPreciseIp; |
| 44 | } EFI_IPF_MOD_ERROR_INFO; |
| 45 | |
| 46 | typedef struct { |
| 47 | UINT8 CpuIdInfo[40]; |
| 48 | UINT8 Reserved1[8]; |
Lawrence Tang | e18aaee | 2022-07-07 09:01:30 +0100 | [diff] [blame] | 49 | } EFI_IPF_CPU_INFO; |
| 50 | |
| 51 | typedef struct { |
Lawrence Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 52 | UINT64 ValidBits; |
| 53 | UINT8 MinimalSaveStateInfo[1024]; |
Lawrence Tang | e18aaee | 2022-07-07 09:01:30 +0100 | [diff] [blame] | 54 | 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 Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 60 | |
| 61 | json_object* cper_section_ipf_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor); |
| 62 | |
| 63 | #endif |