blob: fa93950196b369650d5d919f106840056c4dbd60 [file] [log] [blame]
Lawrence Tangd7e8ca32022-07-07 10:25:53 +01001#ifndef CPER_SECTION_CXL_COMPONENT_H
2#define CPER_SECTION_CXL_COMPONENT_H
3
4#include "json.h"
5#include "../edk/Cper.h"
6
Lawrence Tang27217392022-07-07 11:55:39 +01007#define CXL_COMPONENT_ERROR_VALID_BITFIELD_NAMES (const char*[]) {"deviceIDValid", "deviceSerialValid", \
8 "cxlComponentEventLogValid"}
9
Lawrence Tangd7e8ca32022-07-07 10:25:53 +010010///
11/// CXL Generic Component Error Section
12///
13typedef 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
25typedef struct {
26 UINT32 Length;
27 UINT64 ValidBits;
28 EFI_CXL_DEVICE_ID_INFO DeviceId;
29 UINT64 DeviceSerial;
30} EFI_CXL_COMPONENT_EVENT_HEADER;
31
Lawrence Tangd7e8ca32022-07-07 10:25:53 +010032json_object* cper_section_cxl_component_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
33
34#endif