[edk2] [PATCH v2] 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Abdul Lateef Attar <abdul-lateef.at...@hpe.com> Reviewed-by: Jaben Carsey <jaben.car...@intel.com> --- ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c index 337495e..664c22b 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; } -- 2.7.4 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] 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. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Abdul Lateef Attar <abdul-lateef.at...@hpe.com> --- ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c index 337495e..664c22b 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; } -- 2.7.4 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] ShellPkg: Fix pci command for '_e' option
ShellPkg: Fix pci command for '_e' option Processing of '_e' argument was missing. Added fix, to process the '_e' option for printing additional AER information. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Abdul Lateef Attar <abdul-lateef.at...@hpe.com> --- ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c index 4a8a97b..337495e 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c @@ -2370,6 +2370,7 @@ PCI_CONFIG_SPACE *mConfigSpace = NULL; STATIC CONST SHELL_PARAM_ITEM ParamList[] = { {L"-s", TypeValue}, {L"-i", TypeFlag}, + {L"-_e", TypeFlag}, {NULL, TypeMax} }; -- 1.9.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel