X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FIndustryStandard%2FPciExpress21.h;h=a9915e032bfa3e5a202c638d766956298e642c34;hp=3d121a24aefa3bb5a120827658f18ceb8a1b0987;hb=e1c9edd6b6ea5e78f02e382b254de40cf708d20c;hpb=a1d20250e539b9b7d60d4887db8d5650fd4de2de 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