Lawrence Tang | 67cbed6 | 2022-07-18 16:44:51 +0100 | [diff] [blame] | 1 | #ifndef GEN_SECTIONS_H |
| 2 | #define GEN_SECTIONS_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 | 67cbed6 | 2022-07-18 16:44:51 +0100 | [diff] [blame] | 8 | #include <stdlib.h> |
Lawrence Tang | 8f97745 | 2022-08-24 14:55:07 +0100 | [diff] [blame] | 9 | #include "../../edk/Cper.h" |
Lawrence Tang | 67cbed6 | 2022-07-18 16:44:51 +0100 | [diff] [blame] | 10 | |
Lawrence Tang | 8f97745 | 2022-08-24 14:55:07 +0100 | [diff] [blame] | 11 | //Section generator function predefinitions. |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 12 | size_t generate_section_generic(void **location); |
| 13 | size_t generate_section_ia32x64(void **location); |
| 14 | size_t generate_section_arm(void **location); |
| 15 | size_t generate_section_memory(void **location); |
| 16 | size_t generate_section_memory2(void **location); |
| 17 | size_t generate_section_pcie(void **location); |
| 18 | size_t generate_section_pci_bus(void **location); |
| 19 | size_t generate_section_pci_dev(void **location); |
| 20 | size_t generate_section_firmware(void **location); |
| 21 | size_t generate_section_dmar_generic(void **location); |
| 22 | size_t generate_section_dmar_vtd(void **location); |
| 23 | size_t generate_section_dmar_iommu(void **location); |
| 24 | size_t generate_section_ccix_per(void **location); |
| 25 | size_t generate_section_cxl_protocol(void **location); |
| 26 | size_t generate_section_cxl_component(void **location); |
Karthik Rajagopalan | 683e055 | 2024-03-07 12:30:43 -0800 | [diff] [blame] | 27 | size_t generate_section_nvidia(void **location); |
Dung Cao | 04f5771 | 2024-08-29 08:03:59 +0000 | [diff] [blame^] | 28 | size_t generate_section_ampere(void **location); |
Lawrence Tang | 67cbed6 | 2022-07-18 16:44:51 +0100 | [diff] [blame] | 29 | |
Lawrence Tang | 8f97745 | 2022-08-24 14:55:07 +0100 | [diff] [blame] | 30 | //Definition structure for a single CPER section generator. |
| 31 | typedef struct { |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 32 | EFI_GUID *Guid; |
| 33 | const char *ShortName; |
| 34 | size_t (*Generate)(void **); |
Lawrence Tang | 8f97745 | 2022-08-24 14:55:07 +0100 | [diff] [blame] | 35 | } CPER_GENERATOR_DEFINITION; |
| 36 | |
| 37 | extern CPER_GENERATOR_DEFINITION generator_definitions[]; |
| 38 | extern const size_t generator_definitions_len; |
| 39 | |
Karthik Rajagopalan | 255bd81 | 2024-09-06 14:36:34 -0700 | [diff] [blame] | 40 | #ifdef __cplusplus |
| 41 | } |
| 42 | #endif |
| 43 | |
John Chung | f8fc705 | 2024-05-03 20:05:29 +0800 | [diff] [blame] | 44 | #endif |