summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2017-01-25 15:18:13 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2017-02-10 16:52:00 +0800
commit35a461cb502877670062560e1edd231aeb35f738 (patch)
tree84194395b49e728d9e2d40d828f1c2629c9cfedc /MdePkg
parenta419fd0d2934b640fdd2381b2706aded7bdfb5ca (diff)
downloadedk2-35a461cb502877670062560e1edd231aeb35f738.tar.gz
edk2-35a461cb502877670062560e1edd231aeb35f738.tar.bz2
edk2-35a461cb502877670062560e1edd231aeb35f738.zip
MdePkg/Pci22.h: Deprecate out-of-Spec IncompatiblePciDevice macros
DEVICE_ID_NOCARE is defined as 0xFFFF but Spec says (UINT64) -1 should be used to match any VendorId/DeviceId/RevisionId/ SubsystemVendorId/SubsystemDeviceId. PCI_BAR_OLD_ALIGN/PCI_BAR_EVEN_ALIGN/PCI_BAR_SQUAD_ALIGN/ PCI_BAR_DQUAD_ALIGN are defined but Spec doesn't have such definitions. PCI_BAR_ALL is defined as 0xFF but Spec says (UINT64)-1 should be used to match all BARs. PCI_ACPI_UNUSED and PCI_BAR_NOCHANGE are defined as 0 which compliant with Spec but the name is too general and causes confusing. IncompatiblePciDeviceSupport could directly use 0. All of the above macros are marked as deprecated. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Cc: Jeff Fan <jeff.fan@intel.com>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/IndustryStandard/Pci22.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/MdePkg/Include/IndustryStandard/Pci22.h b/MdePkg/Include/IndustryStandard/Pci22.h
index 4cf8389c69..07718dce92 100644
--- a/MdePkg/Include/IndustryStandard/Pci22.h
+++ b/MdePkg/Include/IndustryStandard/Pci22.h
@@ -7,7 +7,7 @@
PC Card Standard, 8.0
PCI Power Management Interface Specifiction, Revision 1.2
- Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2014 - 2015, Hewlett-Packard Development Company, L.P.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -780,14 +780,24 @@ typedef struct {
///
} EFI_PCI_CAPABILITY_HOTPLUG;
-#define DEVICE_ID_NOCARE 0xFFFF
+///
+/// Below macros (till PCI_BAR_NOCHANGE) were used by EfiIncompatiblePciDeviceSupport Protocol.
+///
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
+///
+/// [ATTENTION] These macros are deprecated because they don't match Spec or not defined in Spec.
+///
+#define DEVICE_ID_NOCARE 0xFFFF ///< Deprecated. Value doesn't match Spec.
+#define PCI_BAR_OLD_ALIGN 0xFFFFFFFFFFFFFFFFULL ///< Deprecated. Value isn't defined in Spec.
+#define PCI_BAR_EVEN_ALIGN 0xFFFFFFFFFFFFFFFEULL ///< Deprecated. Value isn't defined in Spec.
+#define PCI_BAR_SQUAD_ALIGN 0xFFFFFFFFFFFFFFFDULL ///< Deprecated. Value isn't defined in Spec.
+#define PCI_BAR_DQUAD_ALIGN 0xFFFFFFFFFFFFFFFCULL ///< Deprecated. Value isn't defined in Spec.
+#define PCI_BAR_ALL 0xFF ///< Deprecated. Value doesn't match Spec.
+#define PCI_ACPI_UNUSED 0 ///< Deprecated. Macro name is too general.
+#define PCI_BAR_NOCHANGE 0 ///< Deprecated. Macro name is too general.
-#define PCI_ACPI_UNUSED 0
-#define PCI_BAR_NOCHANGE 0
-#define PCI_BAR_OLD_ALIGN 0xFFFFFFFFFFFFFFFFULL
-#define PCI_BAR_EVEN_ALIGN 0xFFFFFFFFFFFFFFFEULL
-#define PCI_BAR_SQUAD_ALIGN 0xFFFFFFFFFFFFFFFDULL
-#define PCI_BAR_DQUAD_ALIGN 0xFFFFFFFFFFFFFFFCULL
+#endif
#define PCI_BAR_IDX0 0x00
#define PCI_BAR_IDX1 0x01
@@ -795,7 +805,6 @@ typedef struct {
#define PCI_BAR_IDX3 0x03
#define PCI_BAR_IDX4 0x04
#define PCI_BAR_IDX5 0x05
-#define PCI_BAR_ALL 0xFF
///
/// EFI PCI Option ROM definitions