--- /dev/null
+/** @file\r
+ Support for EFI PCI specification.\r
+\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+ Module Name: EfiPci.h\r
+\r
+**/\r
+\r
+#ifndef _EFI_PCI_H_\r
+#define _EFI_PCI_H_\r
+\r
+//#include "pci22.h"\r
+//#include "pci23.h"\r
+//#include "pci30.h"\r
+\r
+#pragma pack(push, 1)\r
+\r
+typedef struct {\r
+ UINT8 Register;\r
+ UINT8 Function;\r
+ UINT8 Device;\r
+ UINT8 Bus;\r
+ UINT8 Reserved[4];\r
+} DEFIO_PCI_ADDR;\r
+\r
+#define EFI_ROOT_BRIDGE_LIST 'eprb'\r
+#define EFI_PCI_EXPANSION_ROM_HEADER_EFISIGNATURE 0x0EF1\r
+\r
+typedef struct {\r
+ UINT16 Signature; // 0xaa55\r
+ UINT16 InitializationSize;\r
+ UINT32 EfiSignature; // 0x0EF1\r
+ UINT16 EfiSubsystem;\r
+ UINT16 EfiMachineType;\r
+ UINT16 CompressionType;\r
+ UINT8 Reserved[8];\r
+ UINT16 EfiImageHeaderOffset;\r
+ UINT16 PcirOffset;\r
+} EFI_PCI_EXPANSION_ROM_HEADER;\r
+\r
+typedef union {\r
+ UINT8 *Raw;\r
+ PCI_EXPANSION_ROM_HEADER *Generic;\r
+ EFI_PCI_EXPANSION_ROM_HEADER *Efi;\r
+ EFI_LEGACY_EXPANSION_ROM_HEADER *PcAt;\r
+} EFI_PCI_ROM_HEADER;\r
+\r
+#pragma pack(pop)\r
+\r
+#endif\r
\r
#define PCI_MAX_BAR 0x0006\r
#define PCI_MAX_CONFIG_OFFSET 0x0100\r
-//\r
-// bugbug: this is supported in PCI spec v2.3\r
-//\r
-#define PCI_EXP_MAX_CONFIG_OFFSET 0x1000\r
\r
#define PCI_VENDOR_ID_OFFSET 0x00\r
#define PCI_DEVICE_ID_OFFSET 0x02\r
#define PCI_BRIDGE_SECONDARY_BUS_REGISTER_OFFSET 0x19\r
#define PCI_BRIDGE_SUBORDINATE_BUS_REGISTER_OFFSET 0x1a\r
\r
-typedef struct {\r
- UINT8 Register;\r
- UINT8 Function;\r
- UINT8 Device;\r
- UINT8 Bus;\r
- UINT8 Reserved[4];\r
-} DEFIO_PCI_ADDR;\r
-\r
typedef union {\r
struct {\r
UINT32 Reg : 8;\r
\r
#pragma pack()\r
\r
-#define EFI_ROOT_BRIDGE_LIST 'eprb'\r
#define PCI_EXPANSION_ROM_HEADER_SIGNATURE 0xaa55\r
-#define EFI_PCI_EXPANSION_ROM_HEADER_EFISIGNATURE 0x0EF1\r
#define PCI_DATA_STRUCTURE_SIGNATURE EFI_SIGNATURE_32 ('P', 'C', 'I', 'R')\r
#define PCI_CODE_TYPE_PCAT_IMAGE 0x00\r
#define PCI_CODE_TYPE_EFI_IMAGE 0x03\r
UINT16 PcirOffset;\r
} PCI_EXPANSION_ROM_HEADER;\r
\r
-typedef struct {\r
- UINT16 Signature; // 0xaa55\r
- UINT16 InitializationSize;\r
- UINT32 EfiSignature; // 0x0EF1\r
- UINT16 EfiSubsystem;\r
- UINT16 EfiMachineType;\r
- UINT16 CompressionType;\r
- UINT8 Reserved[8];\r
- UINT16 EfiImageHeaderOffset;\r
- UINT16 PcirOffset;\r
-} EFI_PCI_EXPANSION_ROM_HEADER;\r
-\r
typedef struct {\r
UINT16 Signature; // 0xaa55\r
UINT8 Size512;\r
UINT16 PcirOffset;\r
} EFI_LEGACY_EXPANSION_ROM_HEADER;\r
\r
-typedef union {\r
- UINT8 *Raw;\r
- PCI_EXPANSION_ROM_HEADER *Generic;\r
- EFI_PCI_EXPANSION_ROM_HEADER *Efi;\r
- EFI_LEGACY_EXPANSION_ROM_HEADER *PcAt;\r
-} EFI_PCI_ROM_HEADER;\r
-\r
typedef struct {\r
UINT32 Signature; // "PCIR"\r
UINT16 VendorId;\r
UINT16 Reserved1;\r
} PCI_DATA_STRUCTURE;\r
\r
-typedef struct {\r
- UINT32 Signature; // "PCIR"\r
- UINT16 VendorId;\r
- UINT16 DeviceId;\r
- UINT16 DeviceListOffset;\r
- UINT16 Length;\r
- UINT8 Revision;\r
- UINT8 ClassCode[3];\r
- UINT16 ImageLength;\r
- UINT16 CodeRevision;\r
- UINT8 CodeType;\r
- UINT8 Indicator;\r
- UINT16 MaxRuntimeImageLength;\r
- UINT16 ConfigUtilityCodeHeaderOffset;\r
- UINT16 DMTFCLPEntryPointOffset;\r
-} PCI_3_0_DATA_STRUCTURE;\r
-\r
//\r
// PCI Capability List IDs and records\r
//\r
#define EFI_PCI_CAPABILITY_ID_MSI 0x05\r
#define EFI_PCI_CAPABILITY_ID_HOTPLUG 0x06\r
#define EFI_PCI_CAPABILITY_ID_PCIX 0x07\r
-//\r
-// bugbug: this ID is defined in PCI spec v2.3\r
-//\r
-#define EFI_PCI_CAPABILITY_ID_PCIEXP 0x10\r
\r
typedef struct {\r
UINT8 CapabilityID;\r
\r
#pragma pack(pop)\r
\r
+//\r
+// NOTE: The following header files are included here for\r
+// compatibility consideration.\r
+//\r
+#include "pci23.h"\r
+#include "pci30.h"\r
+#include "EfiPci.h"\r
+\r
#endif\r
--- /dev/null
+/** @file\r
+ Support for PCI 2.3 standard.\r
+\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+ Module Name: pci23.h\r
+\r
+**/\r
+\r
+#ifndef _PCI23_H\r
+#define _PCI23_H\r
+\r
+//#include "pci22.h"\r
+\r
+#define PCI_EXP_MAX_CONFIG_OFFSET 0x1000\r
+#define EFI_PCI_CAPABILITY_ID_PCIEXP 0x10\r
+\r
+#endif\r
--- /dev/null
+/** @file\r
+ Support for PCI 3.0 standard.\r
+\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+ Module Name: pci30.h\r
+\r
+**/\r
+\r
+#ifndef _PCI30_H\r
+#define _PCI30_H\r
+\r
+//#include "pci23.h"\r
+\r
+#define PCI_CLASS_MASS_STORAGE_SATADPA 0x06\r
+\r
+#pragma pack(push, 1)\r
+\r
+typedef struct {\r
+ UINT32 Signature; // "PCIR"\r
+ UINT16 VendorId;\r
+ UINT16 DeviceId;\r
+ UINT16 DeviceListOffset;\r
+ UINT16 Length;\r
+ UINT8 Revision;\r
+ UINT8 ClassCode[3];\r
+ UINT16 ImageLength;\r
+ UINT16 CodeRevision;\r
+ UINT8 CodeType;\r
+ UINT8 Indicator;\r
+ UINT16 MaxRuntimeImageLength;\r
+ UINT16 ConfigUtilityCodeHeaderOffset;\r
+ UINT16 DMTFCLPEntryPointOffset;\r
+} PCI_3_0_DATA_STRUCTURE;\r
+\r
+#pragma pack(pop)\r
+\r
+#endif\r
--- /dev/null
+/** @file\r
+ Support for EFI PCI specification.\r
+\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+ Module Name: EfiPci.h\r
+\r
+**/\r
+\r
+#ifndef _EFI_PCI_H_\r
+#define _EFI_PCI_H_\r
+\r
+//#include "pci22.h"\r
+//#include "pci23.h"\r
+//#include "pci30.h"\r
+\r
+#pragma pack(push, 1)\r
+\r
+typedef struct {\r
+ UINT8 Register;\r
+ UINT8 Function;\r
+ UINT8 Device;\r
+ UINT8 Bus;\r
+ UINT8 Reserved[4];\r
+} DEFIO_PCI_ADDR;\r
+\r
+#define EFI_ROOT_BRIDGE_LIST 'eprb'\r
+#define EFI_PCI_EXPANSION_ROM_HEADER_EFISIGNATURE 0x0EF1\r
+\r
+typedef struct {\r
+ UINT16 Signature; // 0xaa55\r
+ UINT16 InitializationSize;\r
+ UINT32 EfiSignature; // 0x0EF1\r
+ UINT16 EfiSubsystem;\r
+ UINT16 EfiMachineType;\r
+ UINT16 CompressionType;\r
+ UINT8 Reserved[8];\r
+ UINT16 EfiImageHeaderOffset;\r
+ UINT16 PcirOffset;\r
+} EFI_PCI_EXPANSION_ROM_HEADER;\r
+\r
+typedef union {\r
+ UINT8 *Raw;\r
+ PCI_EXPANSION_ROM_HEADER *Generic;\r
+ EFI_PCI_EXPANSION_ROM_HEADER *Efi;\r
+ EFI_LEGACY_EXPANSION_ROM_HEADER *PcAt;\r
+} EFI_PCI_ROM_HEADER;\r
+\r
+#pragma pack(pop)\r
+\r
+#endif\r
\r
#define PCI_MAX_BAR 0x0006\r
#define PCI_MAX_CONFIG_OFFSET 0x0100\r
-//\r
-// bugbug: this is supported in PCI spec v2.3\r
-//\r
-#define PCI_EXP_MAX_CONFIG_OFFSET 0x1000\r
\r
#define PCI_VENDOR_ID_OFFSET 0x00\r
#define PCI_DEVICE_ID_OFFSET 0x02\r
#define PCI_BRIDGE_SECONDARY_BUS_REGISTER_OFFSET 0x19\r
#define PCI_BRIDGE_SUBORDINATE_BUS_REGISTER_OFFSET 0x1a\r
\r
-typedef struct {\r
- UINT8 Register;\r
- UINT8 Function;\r
- UINT8 Device;\r
- UINT8 Bus;\r
- UINT8 Reserved[4];\r
-} DEFIO_PCI_ADDR;\r
-\r
typedef union {\r
struct {\r
UINT32 Reg : 8;\r
\r
#pragma pack()\r
\r
-#define EFI_ROOT_BRIDGE_LIST 'eprb'\r
#define PCI_EXPANSION_ROM_HEADER_SIGNATURE 0xaa55\r
-#define EFI_PCI_EXPANSION_ROM_HEADER_EFISIGNATURE 0x0EF1\r
#define PCI_DATA_STRUCTURE_SIGNATURE EFI_SIGNATURE_32 ('P', 'C', 'I', 'R')\r
#define PCI_CODE_TYPE_PCAT_IMAGE 0x00\r
#define PCI_CODE_TYPE_EFI_IMAGE 0x03\r
UINT16 PcirOffset;\r
} PCI_EXPANSION_ROM_HEADER;\r
\r
-typedef struct {\r
- UINT16 Signature; // 0xaa55\r
- UINT16 InitializationSize;\r
- UINT32 EfiSignature; // 0x0EF1\r
- UINT16 EfiSubsystem;\r
- UINT16 EfiMachineType;\r
- UINT16 CompressionType;\r
- UINT8 Reserved[8];\r
- UINT16 EfiImageHeaderOffset;\r
- UINT16 PcirOffset;\r
-} EFI_PCI_EXPANSION_ROM_HEADER;\r
-\r
typedef struct {\r
UINT16 Signature; // 0xaa55\r
UINT8 Size512;\r
UINT8 InitEntryPoint[3];\r
- UINT8 Reserved[0x12]; \r
+ UINT8 Reserved[0x12];\r
UINT16 PcirOffset;\r
} EFI_LEGACY_EXPANSION_ROM_HEADER;\r
\r
-typedef union {\r
- UINT8 *Raw;\r
- PCI_EXPANSION_ROM_HEADER *Generic;\r
- EFI_PCI_EXPANSION_ROM_HEADER *Efi;\r
- EFI_LEGACY_EXPANSION_ROM_HEADER *PcAt;\r
-} EFI_PCI_ROM_HEADER;\r
-\r
typedef struct {\r
UINT32 Signature; // "PCIR"\r
UINT16 VendorId;\r
#define EFI_PCI_CAPABILITY_ID_MSI 0x05\r
#define EFI_PCI_CAPABILITY_ID_HOTPLUG 0x06\r
#define EFI_PCI_CAPABILITY_ID_PCIX 0x07\r
-//\r
-// bugbug: this ID is defined in PCI spec v2.3\r
-//\r
-#define EFI_PCI_CAPABILITY_ID_PCIEXP 0x10\r
\r
typedef struct {\r
UINT8 CapabilityID;\r
\r
#pragma pack(pop)\r
\r
+//\r
+// NOTE: The following header files are included here for\r
+// compatibility consideration.\r
+//\r
+#include "pci23.h"\r
+#include "pci30.h"\r
+#include "EfiPci.h"\r
+\r
#endif\r
--- /dev/null
+/** @file\r
+ Support for PCI 2.3 standard.\r
+\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+ Module Name: pci23.h\r
+\r
+**/\r
+\r
+#ifndef _PCI23_H\r
+#define _PCI23_H\r
+\r
+//#include "pci22.h"\r
+\r
+#define PCI_EXP_MAX_CONFIG_OFFSET 0x1000\r
+#define EFI_PCI_CAPABILITY_ID_PCIEXP 0x10\r
+\r
+#endif\r
--- /dev/null
+/** @file\r
+ Support for PCI 3.0 standard.\r
+\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+ Module Name: pci30.h\r
+\r
+**/\r
+\r
+#ifndef _PCI30_H\r
+#define _PCI30_H\r
+\r
+//#include "pci23.h"\r
+\r
+#define PCI_CLASS_MASS_STORAGE_SATADPA 0x06\r
+\r
+#pragma pack(push, 1)\r
+\r
+typedef struct {\r
+ UINT32 Signature; // "PCIR"\r
+ UINT16 VendorId;\r
+ UINT16 DeviceId;\r
+ UINT16 DeviceListOffset;\r
+ UINT16 Length;\r
+ UINT8 Revision;\r
+ UINT8 ClassCode[3];\r
+ UINT16 ImageLength;\r
+ UINT16 CodeRevision;\r
+ UINT8 CodeType;\r
+ UINT8 Indicator;\r
+ UINT16 MaxRuntimeImageLength;\r
+ UINT16 ConfigUtilityCodeHeaderOffset;\r
+ UINT16 DMTFCLPEntryPointOffset;\r
+} PCI_3_0_DATA_STRUCTURE;\r
+\r
+#pragma pack(pop)\r
+\r
+#endif\r