blob: f79df74f3db6863c822de535d218401fd486ed24 [file] [log] [blame]
#ifndef CPER_SECTION_PCI_DEV_H
#define CPER_SECTION_PCI_DEV_H
#include "json.h"
#include "../edk/Cper.h"
#define PCI_DEV_ERROR_VALID_BITFIELD_NAMES (const char*[]) {"errorStatusValid", "idInfoValid", "memoryNumberValid", \
"ioNumberValid", "registerDataPairsValid"}
///
/// PCI/PCI-X Device Error Section
///
typedef struct {
UINT64 VendorId : 16;
UINT64 DeviceId : 16;
UINT64 ClassCode : 24;
UINT64 FunctionNumber : 8;
UINT64 DeviceNumber : 8;
UINT64 BusNumber : 8;
UINT64 SegmentNumber : 8;
UINT64 Reserved : 40;
} EFI_PCI_PCIX_DEVICE_ID_INFO;
typedef struct {
UINT64 ValidFields;
EFI_GENERIC_ERROR_STATUS ErrorStatus;
EFI_PCI_PCIX_DEVICE_ID_INFO IdInfo;
UINT32 MemoryNumber;
UINT32 IoNumber;
} EFI_PCI_PCIX_DEVICE_ERROR_DATA;
json_object* cper_section_pci_dev_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
#endif