Lawrence Tang | 580423f | 2022-08-24 09:37:53 +0100 | [diff] [blame] | 1 | #ifndef CPER_SECTION_H |
| 2 | #define CPER_SECTION_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 | 580423f | 2022-08-24 09:37:53 +0100 | [diff] [blame] | 8 | #include <json.h> |
| 9 | #include <stdio.h> |
| 10 | #include <stdlib.h> |
| 11 | #include "../edk/Cper.h" |
| 12 | |
| 13 | //Definition structure for a single CPER section type. |
| 14 | typedef struct { |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 15 | EFI_GUID *Guid; |
| 16 | const char *ReadableName; |
| 17 | json_object *(*ToIR)(void *); |
| 18 | void (*ToCPER)(json_object *, FILE *); |
Lawrence Tang | 580423f | 2022-08-24 09:37:53 +0100 | [diff] [blame] | 19 | } CPER_SECTION_DEFINITION; |
| 20 | |
| 21 | extern CPER_SECTION_DEFINITION section_definitions[]; |
| 22 | extern const size_t section_definitions_len; |
| 23 | |
Karthik Rajagopalan | 255bd81 | 2024-09-06 14:36:34 -0700 | [diff] [blame] | 24 | #ifdef __cplusplus |
| 25 | } |
| 26 | #endif |
| 27 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 28 | #endif |