summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbdul Lateef Attar <abdul-lateef.attar@hpe.com>2016-09-09 23:31:35 -0700
committerJaben Carsey <jaben.carsey@intel.com>2016-09-08 09:27:40 -0700
commit1b3be4a12e7dd7504b502fb58929efec967b7fbf (patch)
tree9c4f98308f724b081b4ef3f63689c6aeba5c586a
parente51a677dea1b4ec3536e32b590b165dbcd30a87d (diff)
downloadedk2-1b3be4a12e7dd7504b502fb58929efec967b7fbf.tar.gz
edk2-1b3be4a12e7dd7504b502fb58929efec967b7fbf.tar.bz2
edk2-1b3be4a12e7dd7504b502fb58929efec967b7fbf.zip
ShellPkg: pci -i -_e to print next capability
According to PCI spec the next AER capability is relative to the beginning of PCI configuration space. Hence substract the base offset to get the next capability. "-_e" option is changed from TypeFlag to TypeValue, so that user can specify individual AER capability to print. e.g. pci 00 00 01 -i -_e <capability-id> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Abdul Lateef Attar <abdul-lateef.attar@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
index 337495e168..664c22bd82 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
@@ -2370,7 +2370,7 @@ PCI_CONFIG_SPACE *mConfigSpace = NULL;
STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
{L"-s", TypeValue},
{L"-i", TypeFlag},
- {L"-_e", TypeFlag},
+ {L"-_e", TypeValue},
{NULL, TypeMax}
};
@@ -5914,7 +5914,7 @@ PciExplainPciExpress (
// Advance to the next item if it exists
//
if (ExtHdr->NextCapabilityOffset != 0) {
- ExtHdr = (PCI_EXP_EXT_HDR*)((UINT8*)ExRegBuffer + ExtHdr->NextCapabilityOffset);
+ ExtHdr = (PCI_EXP_EXT_HDR*)((UINT8*)ExRegBuffer + ExtHdr->NextCapabilityOffset - EFI_PCIE_CAPABILITY_BASE_OFFSET);
} else {
break;
}