summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaben Carsey <jaben.carsey@intel.com>2014-01-10 22:30:37 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2014-01-10 22:30:37 +0000
commite1c9edd6b6ea5e78f02e382b254de40cf708d20c (patch)
tree9b7cb9c050e1c112e3bdb40f2854712e7712c966
parent75a5e2ef4e3b3a3c1d25ef0be3621edf541237c3 (diff)
downloadedk2-platforms-e1c9edd6b6ea5e78f02e382b254de40cf708d20c.tar.xz
MdePkg: add missing #defines for decoding PCIe 2.1 extended capability structures
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15096 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Include/IndustryStandard/PciExpress21.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/MdePkg/Include/IndustryStandard/PciExpress21.h b/MdePkg/Include/IndustryStandard/PciExpress21.h
index 3d121a24ae..a9915e032b 100644
--- a/MdePkg/Include/IndustryStandard/PciExpress21.h
+++ b/MdePkg/Include/IndustryStandard/PciExpress21.h
@@ -241,6 +241,8 @@ typedef struct {
PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_ENTRY Capability[1];
} PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR;
+#define GET_NUMBER_RESIZABLE_BARS(x) (((x->Capability[0].ResizableBarControl) & 0xE0) >> 5)
+
#define PCI_EXPRESS_EXTENDED_CAPABILITY_ARI_CAPABILITY_ID 0x000E
#define PCI_EXPRESS_EXTENDED_CAPABILITY_ARI_CAPABILITY_VER1 0x1
@@ -284,4 +286,6 @@ typedef struct {
UINT16 TphStTable[1];
} PCI_EXPRESS_EXTENDED_CAPABILITIES_TPH;
+#define GET_TPH_TABLE_SIZE(x) ((x->TphRequesterCapability & 0x7FF0000)>>16) * sizeof(UINT16)
+
#endif