1 #ifndef CPER_SECTION_CXL_COMPONENT_H
2 #define CPER_SECTION_CXL_COMPONENT_H
3 
4 #include "json.h"
5 #include "../edk/Cper.h"
6 
7 #define CXL_COMPONENT_ERROR_VALID_BITFIELD_NAMES (const char*[]) {"deviceIDValid", "deviceSerialValid", \
8     "cxlComponentEventLogValid"}
9 
10 ///
11 /// CXL Generic Component Error Section
12 ///
13 typedef struct {
14   UINT64 VendorId : 16;
15   UINT64 DeviceId : 16;
16   UINT64 FunctionNumber : 8;
17   UINT64 DeviceNumber : 8;
18   UINT64 BusNumber : 8;
19   UINT64 SegmentNumber : 16;
20   UINT64 Resv1 : 3;
21   UINT64 SlotNumber : 13;
22   UINT64 Resv2 : 8;
23 } EFI_CXL_DEVICE_ID_INFO;
24 
25 typedef struct {
26     UINT32 Length;
27     UINT64 ValidBits;
28     EFI_CXL_DEVICE_ID_INFO DeviceId;
29     UINT64 DeviceSerial;
30 } EFI_CXL_COMPONENT_EVENT_HEADER;
31 
32 json_object* cper_section_cxl_component_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
33 
34 #endif