]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/PciExpress40.h: DVSEC definition missing
authorJaveed, Ashraf <ashraf.javeed@intel.com>
Tue, 17 Mar 2020 08:04:13 +0000 (16:04 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 19 Mar 2020 00:48:02 +0000 (00:48 +0000)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2598

All registers definition of DVSEC are defined as per the PCI Express Base
Specification 4.0 chapter 7.9.6.

Signed-off-by: Ashraf Javeed <ashraf.javeed@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/IndustryStandard/PciExpress40.h

index 9d9b2725467136569bc9231b8dae13d8ad81f3bd..0564d728618aa8b562e3a18ef02e06b2aa5760aa 100644 (file)
@@ -4,6 +4,7 @@ Support for the PCI Express 4.0 standard.
 This header file may not define all structures.  Please extend as required.\r
 \r
 Copyright (c) 2018, American Megatrends, Inc. All rights reserved.<BR>\r
+Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -78,6 +79,33 @@ typedef struct {
 } PCI_EXPRESS_EXTENDED_CAPABILITIES_PHYSICAL_LAYER_16_0;\r
 ///@}\r
 \r
+/// The Designated Vendor Specific Capability definitions\r
+/// Based on section 7.9.6 of PCI Express Base Specification 4.0.\r
+///@{\r
+typedef union {\r
+  struct {\r
+    UINT32 DvsecVendorId                                        : 16; //bit 0..15\r
+    UINT32 DvsecRevision                                        : 4;  //bit 16..19\r
+    UINT32 DvsecLength                                          : 12; //bit 20..31\r
+  }Bits;\r
+  UINT32                                                        Uint32;\r
+}PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1;\r
+\r
+typedef union {\r
+  struct {\r
+    UINT16 DvsecId                                              : 16; //bit 0..15\r
+  }Bits;\r
+  UINT16                                                        Uint16;\r
+}PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2;\r
+\r
+typedef struct {\r
+  PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER                      Header;\r
+  PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1               DesignatedVendorSpecificHeader1;\r
+  PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2               DesignatedVendorSpecificHeader2;\r
+  UINT8                                                         DesignatedVendorSpecific[1];\r
+}PCI_EXPRESS_EXTENDED_CAPABILITIES_DESIGNATED_VENDOR_SPECIFIC;\r
+///@}\r
+\r
 #pragma pack()\r
 \r
 #endif\r