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