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 | |
Karthik Rajagopalan | 255bd81 | 2024-09-06 14:36:34 -0700 | [diff] [blame] | 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
Lawrence Tang | 5202bbb | 2022-08-12 14:54:36 +0100 | [diff] [blame] | 8 | #include <json.h> |
Lawrence Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 9 | #include "../edk/Cper.h" |
| 10 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 11 | #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 Tang | e18aaee | 2022-07-07 09:01:30 +0100 | [diff] [blame] | 24 | |
Lawrence Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 25 | /// |
| 26 | /// IPF Error Record Section |
| 27 | /// Defined as according to B.2.3 of the ItaniumTM Processor Family System Abstraction Layer (SAL) Specification. |
| 28 | /// |
| 29 | typedef struct { |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 30 | 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 Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 41 | } EPI_IPF_ERROR_VALID_BITS; |
| 42 | |
| 43 | typedef struct { |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 44 | EPI_IPF_ERROR_VALID_BITS ValidBits; |
| 45 | UINT64 ProcErrorMap; |
| 46 | UINT64 ProcStateParameter; |
| 47 | UINT64 ProcCrLid; |
Lawrence Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 48 | } EFI_IPF_ERROR_INFO_HEADER; |
| 49 | |
| 50 | typedef struct { |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 51 | 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 Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 57 | } EFI_IPF_MOD_ERROR_INFO; |
| 58 | |
| 59 | typedef struct { |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 60 | UINT8 CpuIdInfo[40]; |
| 61 | UINT8 Reserved1[8]; |
Lawrence Tang | e18aaee | 2022-07-07 09:01:30 +0100 | [diff] [blame] | 62 | } EFI_IPF_CPU_INFO; |
| 63 | |
| 64 | typedef struct { |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 65 | 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 Tang | e18aaee | 2022-07-07 09:01:30 +0100 | [diff] [blame] | 72 | } EFI_IPF_PSI_STATIC; |
Lawrence Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 73 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 74 | json_object *cper_section_ipf_to_ir(void *section); |
Lawrence Tang | cc0f5f3 | 2022-07-06 17:17:26 +0100 | [diff] [blame] | 75 | |
Karthik Rajagopalan | 255bd81 | 2024-09-06 14:36:34 -0700 | [diff] [blame] | 76 | #ifdef __cplusplus |
| 77 | } |
| 78 | #endif |
| 79 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 80 | #endif |