98 L
"Mass Storage Controller",
103 L
"Network Controller",
108 L
"Display Controller",
113 L
"Multimedia Device",
118 L
"Memory Controller",
128 L
"Simple Communications Controllers",
133 L
"Base System Peripherals",
153 L
"Serial Bus Controllers",
158 L
"Wireless Controllers",
163 L
"Intelligent IO Controllers",
168 L
"Satellite Communications Controllers",
173 L
"Encryption/Decryption Controllers",
178 L
"Data Acquisition & Signal Processing Controllers",
183 L
"Processing Accelerators",
188 L
"Non-Essential Instrumentation",
193 L
"Device does not fit in any defined classes",
222 L
"All devices other than VGA",
227 L
"VGA-compatible devices",
250 L
"Floppy disk controller",
265 L
"ATA controller with ADMA interface",
270 L
"Serial ATA controller",
275 L
"Serial Attached SCSI (SAS) controller ",
280 L
"Non-volatile memory subsystem",
285 L
"Universal Flash Storage (UFS) controller ",
290 L
"Other mass storage controller",
303 L
"Ethernet controller",
308 L
"Token ring controller",
328 L
"WorldFip controller",
333 L
"PICMG 2.14 Multi Computing",
338 L
"InfiniBand controller",
343 L
"Other network controller",
356 L
"VGA/8514 controller",
371 L
"Other display controller",
394 L
"Computer Telephony device",
399 L
"Mixed mode device",
404 L
"Other multimedia device",
417 L
"RAM memory controller",
422 L
"Flash memory controller",
427 L
"Other memory controller",
455 L
"PCI/Micro Channel bridge",
465 L
"PCI/PCMCIA bridge",
485 L
"Semi-transparent PCI-to-PCI bridge",
490 L
"InfiniBand-to-PCI host bridge",
495 L
"Advanced Switching to PCI host bridge",
500 L
"Other bridge type",
513 L
"Serial controller",
523 L
"Multiport serial controller",
533 L
"GPIB (IEEE 488.1/2) controller",
543 L
"Other communication device",
576 L
"Generic PCI Hot-Plug controller",
581 L
"SD Host controller",
591 L
"Root Complex Event Collector",
596 L
"Other system peripheral",
609 L
"Keyboard controller",
624 L
"Scanner controller",
629 L
"Gameport controller",
634 L
"Other input controller",
647 L
"Generic docking station",
652 L
"Other type of docking station",
738 L
"System Management Bus",
753 L
"SERCOS Interface Standard (IEC 61491)",
776 L
"iRDA compatible controller",
801 L
"Ethernet (802.11a - 5 GHz)",
806 L
"Ethernet (802.11b - 2.4 GHz)",
811 L
"Other type of wireless controller",
857 L
"Other satellite communication controller",
870 L
"Network & computing Encrypt/Decrypt",
875 L
"Entertainment Encrypt/Decrypt",
880 L
"Other Encrypt/Decrypt",
898 L
"Performance Counters",
903 L
"Communications synchronization plus time and frequency test/measurement ",
913 L
"Other DAQ & SP controllers",
926 L
"Processing Accelerator",
939 L
"Non-Essential Instrumentation Function",
960 L
"SCSI storage device SOP using PQI",
965 L
"SCSI controller SOP using PQI",
970 L
"SCSI storage device and controller SOP using PQI",
975 L
"SCSI storage device SOP using NVMe",
1013 L
"OM-primary, OM-secondary",
1018 L
"PI-primary, OM-secondary",
1023 L
"OM/PI-primary, OM-secondary",
1033 L
"OM-primary, PI-secondary",
1038 L
"PI-primary, PI-secondary",
1043 L
"OM/PI-primary, PI-secondary",
1053 L
"OM-primary, OM/PI-secondary",
1058 L
"PI-primary, OM/PI-secondary",
1063 L
"OM/PI-primary, OM/PI-secondary",
1073 L
"Master, OM-primary",
1078 L
"Master, PI-primary",
1083 L
"Master, OM/PI-primary",
1088 L
"Master, OM-secondary",
1093 L
"Master, OM-primary, OM-secondary",
1098 L
"Master, PI-primary, OM-secondary",
1103 L
"Master, OM/PI-primary, OM-secondary",
1108 L
"Master, OM-secondary",
1113 L
"Master, OM-primary, PI-secondary",
1118 L
"Master, PI-primary, PI-secondary",
1123 L
"Master, OM/PI-primary, PI-secondary",
1128 L
"Master, OM-secondary",
1133 L
"Master, OM-primary, OM/PI-secondary",
1138 L
"Master, PI-primary, OM/PI-secondary",
1143 L
"Master, OM/PI-primary, OM/PI-secondary",
1161 L
"Continuous operation",
1184 L
"Serial Storage Bus",
1279 L
"Subtractive decode",
1292 L
"Primary PCI bus side facing the system host processor",
1297 L
"Secondary PCI bus side facing the system host processor",
1315 L
"ASI-SIG Defined Portal",
1328 L
"Generic XT-compatible",
1333 L
"16450-compatible",
1338 L
"16550-compatible",
1343 L
"16650-compatible",
1348 L
"16750-compatible",
1353 L
"16850-compatible",
1358 L
"16950-compatible",
1381 L
"ECP 1.X-compliant",
1391 L
"IEEE 1284 target (not a controller)",
1409 L
"Hayes-compatible 16450",
1414 L
"Hayes-compatible 16550",
1419 L
"Hayes-compatible 16650",
1424 L
"Hayes-compatible 16750",
1457 L
"IO(x) APIC interrupt controller",
1562 L
"Using 1394 OpenHCI spec",
1595 L
"No specific programming interface",
1600 L
"(Not Host Controller)",
1618 L
"Keyboard Controller Style",
1636 L
"Consumer IR controller",
1641 L
"UWB Radio controller",
1654 L
"Message FIFO at offset 40h",
1685 IN UINT32 ClassCode,
1696 ClassStrings->BaseClass = L
"UNDEFINED";
1697 ClassStrings->SubClass = L
"UNDEFINED";
1698 ClassStrings->PIFClass = L
"UNDEFINED";
1700 CurrentClass = gClassStringList;
1701 Code = (UINT8)(ClassCode >> 16);
1710 while (Code != CurrentClass[Index].Code) {
1711 if (
NULL == CurrentClass[Index].DescText) {
1723 ClassStrings->BaseClass = CurrentClass[Index].DescText;
1724 if (
NULL == CurrentClass[Index].LowerLevelClass) {
1731 CurrentClass = CurrentClass[Index].LowerLevelClass;
1732 Code = (UINT8)(ClassCode >> 8);
1741 while (Code != CurrentClass[Index].Code) {
1742 if (
NULL == CurrentClass[Index].DescText) {
1755 ClassStrings->SubClass = CurrentClass[Index].DescText;
1756 if (
NULL == CurrentClass[Index].LowerLevelClass) {
1763 CurrentClass = CurrentClass[Index].LowerLevelClass;
1764 Code = (UINT8)ClassCode;
1773 while (Code != CurrentClass[Index].Code) {
1774 if (
NULL == CurrentClass[Index].DescText) {
1784 ClassStrings->PIFClass = CurrentClass[Index].DescText;
1797 IN UINT8 *ClassCodePtr,
1798 IN BOOLEAN IncludePIF
1805 ClassCode |= (UINT32)ClassCodePtr[0];
1806 ClassCode |= (UINT32)(ClassCodePtr[1] << 8);
1807 ClassCode |= (UINT32)(ClassCodePtr[2] << 16);
1822 ClassStrings.BaseClass,
1823 ClassStrings.SubClass,
1824 ClassStrings.PIFClass
1834 ClassStrings.BaseClass,
1835 ClassStrings.SubClass
2001 IN BOOLEAN MainStatus,
2002 IN PCI_HEADER_TYPE HeaderType
2027 IN UINT16 *BridgeControl,
2028 IN PCI_HEADER_TYPE HeaderType
2042 IN UINT8 CapabilityId
2056 IN UINT8 *ExtendedConfigSpace,
2058 IN CONST UINT16 ExtendedCapability
2225} PCIE_CAPREG_FIELD_WIDTH;
2228 PcieExplainTypeCommon,
2229 PcieExplainTypeDevice,
2230 PcieExplainTypeLink,
2231 PcieExplainTypeSlot,
2232 PcieExplainTypeRoot,
2239 PCIE_CAPREG_FIELD_WIDTH Width;
2240 PCIE_EXPLAIN_FUNCTION Func;
2241 PCIE_EXPLAIN_TYPE Type;
2250 PcieExplainTypeCommon
2257 PcieExplainTypeCommon
2264 PcieExplainTypeCommon
2271 PcieExplainTypeDevice
2278 PcieExplainTypeDevice
2285 PcieExplainTypeDevice
2353 (PCIE_CAPREG_FIELD_WIDTH)0,
2370CHAR16 *DevicePortTypeTable[] = {
2371 L
"PCI Express Endpoint",
2372 L
"Legacy PCI Express Endpoint",
2375 L
"Root Port of PCI Express Root Complex",
2376 L
"Upstream Port of PCI Express Switch",
2377 L
"Downstream Port of PCI Express Switch",
2378 L
"PCI Express to PCI/PCI-X Bridge",
2379 L
"PCI/PCI-X to PCI Express Bridge",
2380 L
"Root Complex Integrated Endpoint",
2381 L
"Root Complex Event Collector"
2384CHAR16 *L0sLatencyStrTable[] = {
2386 L
"64ns to less than 128ns",
2387 L
"128ns to less than 256ns",
2388 L
"256ns to less than 512ns",
2389 L
"512ns to less than 1us",
2390 L
"1us to less than 2us",
2395CHAR16 *L1LatencyStrTable[] = {
2397 L
"1us to less than 2us",
2398 L
"2us to less than 4us",
2399 L
"4us to less than 8us",
2400 L
"8us to less than 16us",
2401 L
"16us to less than 32us",
2406CHAR16 *ASPMCtrlStrTable[] = {
2408 L
"L0s Entry Enabled",
2409 L
"L1 Entry Enabled",
2410 L
"L0s and L1 Entry Enabled"
2413CHAR16 *SlotPwrLmtScaleTable[] = {
2420CHAR16 *IndicatorTable[] = {
2452 BOOLEAN ExplainData;
2456 UINTN HandleBufSize;
2464 CHAR16 *ProblemParam;
2468 UINT16 ExtendedCapability;
2469 UINT8 PcieCapabilityPtr;
2470 UINT8 *ExtendedConfigSpace;
2471 UINTN ExtendedConfigSize;
2493 if (EFI_ERROR (Status)) {
2494 if ((Status == EFI_VOLUME_CORRUPTED) && (ProblemParam !=
NULL)) {
2533 if (HandleBuf ==
NULL) {
2539 Status =
gBS->LocateHandle (
2541 &gEfiPciRootBridgeIoProtocolGuid,
2547 if (Status == EFI_BUFFER_TOO_SMALL) {
2549 if (HandleBuf ==
NULL) {
2555 Status =
gBS->LocateHandle (
2557 &gEfiPciRootBridgeIoProtocolGuid,
2564 if (EFI_ERROR (Status)) {
2570 HandleCount = HandleBufSize /
sizeof (
EFI_HANDLE);
2584 if ((ScreenSize & 1) == 1) {
2594 for (Index = 0; Index < HandleCount; Index++) {
2600 if (EFI_ERROR (Status)) {
2614 if (EFI_ERROR (Status)) {
2624 for (Bus = MinBus; Bus <= MaxBus; Bus++) {
2628 for (Device = 0; Device <= PCI_MAX_DEVICE; Device++) {
2632 for (Func = 0; Func <= PCI_MAX_FUNC; Func++) {
2638 Address = EFI_PCI_ADDRESS (Bus, Device, Func, 0);
2654 if ((PciHeader.VendorId == 0xffff) && (Func == 0)) {
2658 if (PciHeader.VendorId != 0xffff) {
2668 sizeof (PciHeader) /
sizeof (UINT32),
2677 gShellDebug1HiiHandle,
2690 gShellDebug1HiiHandle,
2693 PciHeader.ClassCode[0]
2697 if ((ScreenCount >= ScreenSize) && (ScreenSize != 0)) {
2709 if ((Func == 0) && ((PciHeader.HeaderType & HEADER_TYPE_MULTI_FUNCTION) == 0x00)) {
2722 if (Descriptors ==
NULL) {
2732 ExplainData =
FALSE;
2737 ExtendedCapability = 0xFFFF;
2748 Segment = (UINT16)RetVal;
2766 Bus = (UINT16)RetVal;
2773 if (Bus > PCI_MAX_BUS) {
2786 Device = (UINT16)RetVal;
2793 if (Device > PCI_MAX_DEVICE) {
2806 Func = (UINT16)RetVal;
2813 if (Func > PCI_MAX_FUNC) {
2826 ExtendedCapability = (UINT16)RetVal;
2846 if (EFI_ERROR (Status)) {
2852 gShellDebug1HiiHandle,
2861 Address = EFI_PCI_ADDRESS (Bus, Device, Func, 0);
2862 Status = IoDev->Pci.
Read (
2866 sizeof (ConfigSpace),
2870 if (EFI_ERROR (Status)) {
2876 mConfigSpace = &ConfigSpace;
2882 gShellDebug1HiiHandle,
2896 SizeOfHeader =
sizeof (ConfigSpace.Common) +
sizeof (ConfigSpace.NonCommon);
2898 DumpHex (2, 0, SizeOfHeader, &ConfigSpace);
2907 sizeof (ConfigSpace) - SizeOfHeader,
2911 ExtendedConfigSpace =
NULL;
2912 ExtendedConfigSize = 0;
2914 if (PcieCapabilityPtr != 0) {
2915 ExtendedConfigSize = 0x1000 - EFI_PCIE_CAPABILITY_BASE_OFFSET;
2916 ExtendedConfigSpace =
AllocatePool (ExtendedConfigSize);
2917 if (ExtendedConfigSpace !=
NULL) {
2918 Status = IoDev->Pci.
Read (
2921 EFI_PCI_ADDRESS (Bus, Device, Func, EFI_PCIE_CAPABILITY_BASE_OFFSET),
2922 ExtendedConfigSize /
sizeof (UINT32),
2925 if (EFI_ERROR (Status)) {
2926 SHELL_FREE_NON_NULL (ExtendedConfigSpace);
2935 ShellPrintEx (-1, -1, L
"\r\n%HStart dumping PCIex extended configuration space (0x100 - 0xFFF).%N\r\n\r\n");
2939 EFI_PCIE_CAPABILITY_BASE_OFFSET,
2953 ExtendedConfigSpace,
2962 if (HandleBuf !=
NULL) {
2966 if (Package !=
NULL) {
2970 mConfigSpace =
NULL;
3009 for (Index = 0; Index < HandleCount; Index++) {
3011 if (EFI_ERROR (Status)) {
3019 if ((Descriptors ==
NULL) && (Segment == (*IoDev)->SegmentNumber)) {
3023 if ((*IoDev)->SegmentNumber != Segment) {
3029 if (EFI_ERROR (Status)) {
3037 if ((MinBus <= Bus) && (MaxBus >= Bus)) {
3043 return EFI_NOT_FOUND;
3068 Status =
gBS->HandleProtocol (
3070 &gEfiPciRootBridgeIoProtocolGuid,
3074 if (EFI_ERROR (Status)) {
3081 Status = (*IoDev)->Configuration (*IoDev, (VOID **)Descriptors);
3082 if (Status == EFI_UNSUPPORTED) {
3083 *Descriptors =
NULL;
3117 if ((*Descriptors) ==
NULL) {
3119 *MaxBus = PCI_MAX_BUS;
3130 while ((*Descriptors)->Desc != ACPI_END_TAG_DESCRIPTOR) {
3131 if ((*Descriptors)->ResType == ACPI_ADDRESS_SPACE_TYPE_BUS) {
3132 *MinBus = (UINT16)(*Descriptors)->AddrRangeMin;
3133 *MaxBus = (UINT16)(*Descriptors)->AddrRangeMax;
3141 if ((*Descriptors)->Desc == ACPI_END_TAG_DESCRIPTOR) {
3165 PCI_HEADER_TYPE HeaderType;
3167 Common = &(ConfigSpace->Common);
3179 gShellDebug1HiiHandle,
3180 INDEX_OF (&(Common->VendorId)),
3182 INDEX_OF (&(Common->DeviceId)),
3205 gShellDebug1HiiHandle,
3206 INDEX_OF (&(Common->RevisionID)),
3214 if ((Common->BIST & BIT7) != 0) {
3228 gShellDebug1HiiHandle,
3229 INDEX_OF (&(Common->CacheLineSize)),
3230 Common->CacheLineSize
3241 gShellDebug1HiiHandle,
3242 INDEX_OF (&(Common->LatencyTimer)),
3243 Common->LatencyTimer
3254 gShellDebug1HiiHandle,
3255 INDEX_OF (&(Common->HeaderType)),
3259 if ((Common->HeaderType & BIT7) != 0) {
3265 HeaderType = (PCI_HEADER_TYPE)(UINT8)(Common->HeaderType & 0x7f);
3266 switch (HeaderType) {
3275 case PciCardBusBridge:
3281 HeaderType = PciUndefined;
3321 BarCount =
sizeof (Device->Bar) /
sizeof (Device->Bar[0]);
3322 for (Index = 0; Index < BarCount; Index++) {
3323 if (Device->Bar[Index] == 0) {
3330 ShellPrintEx (-1, -1, L
" --------------------------------------------------------------------------");
3334 &(Device->Bar[Index]),
3335 &(mConfigSpace->Common.Command),
3341 if (EFI_ERROR (Status)) {
3349 ShellPrintEx (-1, -1, L
"\r\n --------------------------------------------------------------------------");
3355 if ((Device->ExpansionRomBar & BIT0) == 0) {
3363 gShellDebug1HiiHandle,
3364 INDEX_OF (&(Device->ExpansionRomBar)),
3365 Device->ExpansionRomBar
3377 gShellDebug1HiiHandle,
3378 INDEX_OF (&(Device->CISPtr)),
3390 gShellDebug1HiiHandle,
3391 INDEX_OF (&(Device->SubsystemVendorID)),
3392 Device->SubsystemVendorID
3400 gShellDebug1HiiHandle,
3401 INDEX_OF (&(Device->SubsystemID)),
3413 gShellDebug1HiiHandle,
3414 INDEX_OF (&(Device->CapabilityPtr)),
3415 Device->CapabilityPtr
3426 gShellDebug1HiiHandle,
3427 INDEX_OF (&(Device->InterruptLine)),
3428 Device->InterruptLine
3436 gShellDebug1HiiHandle,
3437 INDEX_OF (&(Device->InterruptPin)),
3438 Device->InterruptPin
3449 gShellDebug1HiiHandle,
3450 INDEX_OF (&(Device->MinGnt)),
3459 gShellDebug1HiiHandle,
3460 INDEX_OF (&(Device->MaxLat)),
3497 BarCount =
sizeof (Bridge->Bar) /
sizeof (Bridge->Bar[0]);
3499 for (Index = 0; Index < BarCount; Index++) {
3500 if (Bridge->Bar[Index] == 0) {
3507 ShellPrintEx (-1, -1, L
" --------------------------------------------------------------------------");
3511 &(Bridge->Bar[Index]),
3512 &(mConfigSpace->Common.Command),
3518 if (EFI_ERROR (Status)) {
3526 ShellPrintEx (-1, -1, L
"\r\n --------------------------------------------------------------------------");
3532 if ((Bridge->ExpansionRomBAR & BIT0) == 0) {
3540 gShellDebug1HiiHandle,
3541 INDEX_OF (&(Bridge->ExpansionRomBAR)),
3542 Bridge->ExpansionRomBAR
3554 gShellDebug1HiiHandle,
3555 INDEX_OF (&(Bridge->PrimaryBus)),
3556 INDEX_OF (&(Bridge->SecondaryBus)),
3557 INDEX_OF (&(Bridge->SubordinateBus))
3560 ShellPrintEx (-1, -1, L
" ------------------------------------------------------\r\n");
3574 gShellDebug1HiiHandle,
3575 INDEX_OF (&(Bridge->SecondaryLatencyTimer)),
3576 Bridge->SecondaryLatencyTimer
3590 ShellPrintEx (-1, -1, L
"----------------------------------------------------------------------\r\n");
3595 IoAddress32 = (Bridge->IoBaseUpper16 << 16 | Bridge->IoBase << 8);
3596 IoAddress32 &= 0xfffff000;
3602 gShellDebug1HiiHandle,
3603 INDEX_OF (&(Bridge->IoBase)),
3607 IoAddress32 = (Bridge->IoLimitUpper16 << 16 | Bridge->IoLimit << 8);
3608 IoAddress32 |= 0x00000fff;
3619 gShellDebug1HiiHandle,
3620 INDEX_OF (&(Bridge->MemoryBase)),
3621 (Bridge->MemoryBase << 16) & 0xfff00000
3629 gShellDebug1HiiHandle,
3630 (Bridge->MemoryLimit << 16) | 0x000fffff
3641 gShellDebug1HiiHandle,
3642 INDEX_OF (&(Bridge->PrefetchableMemoryBase)),
3643 Bridge->PrefetchableBaseUpper32,
3644 (Bridge->PrefetchableMemoryBase << 16) & 0xfff00000
3652 gShellDebug1HiiHandle,
3653 Bridge->PrefetchableLimitUpper32,
3654 (Bridge->PrefetchableMemoryLimit << 16) | 0x000fffff
3665 gShellDebug1HiiHandle,
3666 INDEX_OF (&(Bridge->CapabilityPtr)),
3667 Bridge->CapabilityPtr
3683 gShellDebug1HiiHandle,
3684 INDEX_OF (&(Bridge->InterruptLine)),
3685 Bridge->InterruptLine
3693 gShellDebug1HiiHandle,
3694 INDEX_OF (&(Bridge->InterruptPin)),
3695 Bridge->InterruptPin
3741 if ((*Bar & BIT0) == 0) {
3747 if (((*Bar & BIT1) == 0) && ((*Bar & BIT2) == 0)) {
3751 }
else if (((*Bar & BIT1) == 0) && ((*Bar & BIT2) != 0)) {
3753 CopyMem (&Bar64, Bar,
sizeof (UINT64));
3768 if ((*Bar & BIT3) == 0) {
3792 OldCommand = *Command;
3793 NewCommand = (UINT16)(OldCommand & 0xfffc);
3794 RegAddress = Address | INDEX_OF (Command);
3795 IoDev->Pci.Write (IoDev, EfiPciWidthUint16, RegAddress, 1, &NewCommand);
3797 RegAddress = Address | INDEX_OF (Bar);
3804 NewBar32 = 0xffffffff;
3806 IoDev->Pci.Write (IoDev, EfiPciWidthUint32, RegAddress, 1, &NewBar32);
3807 IoDev->Pci.Read (IoDev, EfiPciWidthUint32, RegAddress, 1, &NewBar32);
3808 IoDev->Pci.Write (IoDev, EfiPciWidthUint32, RegAddress, 1, &OldBar32);
3811 NewBar32 = NewBar32 & 0xfffffff0;
3812 NewBar32 = (~NewBar32) + 1;
3814 NewBar32 = NewBar32 & 0xfffffffc;
3815 NewBar32 = (~NewBar32) + 1;
3816 NewBar32 = NewBar32 & 0x0000ffff;
3820 CopyMem (&OldBar64, Bar,
sizeof (UINT64));
3821 NewBar64 = 0xffffffffffffffffULL;
3823 IoDev->Pci.Write (IoDev, EfiPciWidthUint32, RegAddress, 2, &NewBar64);
3824 IoDev->Pci.Read (IoDev, EfiPciWidthUint32, RegAddress, 2, &NewBar64);
3825 IoDev->Pci.Write (IoDev, EfiPciWidthUint32, RegAddress, 2, &OldBar64);
3828 NewBar64 = NewBar64 & 0xfffffffffffffff0ULL;
3829 NewBar64 = (~NewBar64) + 1;
3831 NewBar64 = NewBar64 & 0xfffffffffffffffcULL;
3832 NewBar64 = (~NewBar64) + 1;
3833 NewBar64 = NewBar64 & 0x000000000000ffff;
3840 RegAddress = Address | INDEX_OF (Command);
3841 IoDev->Pci.Write (IoDev, EfiPciWidthUint16, RegAddress, 1, &OldCommand);
3856 gShellDebug1HiiHandle,
3857 (UINT32)
RShiftU64 ((NewBar64 + (Bar64 & 0xfffffffffffffff0ULL) - 1), 32)
3893 gShellDebug1HiiHandle,
3894 INDEX_OF (&(CardBus->CardBusSocketReg)),
3895 CardBus->CardBusSocketReg
3912 gShellDebug1HiiHandle,
3913 INDEX_OF (&(CardBus->PciBusNumber)),
3914 INDEX_OF (&(CardBus->CardBusBusNumber)),
3915 INDEX_OF (&(CardBus->SubordinateBusNumber))
3918 ShellPrintEx (-1, -1, L
" ------------------------------------------------------\r\n");
3932 gShellDebug1HiiHandle,
3933 INDEX_OF (&(CardBus->CardBusLatencyTimer)),
3934 CardBus->CardBusLatencyTimer
3941 ShellPrintEx (-1, -1, L
"----------------------------------------------------------------------\r\n");
3948 gShellDebug1HiiHandle,
3949 INDEX_OF (&(CardBus->MemoryBase0)),
3950 CardBus->BridgeControl & BIT8 ? L
" Prefetchable" : L
"Non-Prefetchable",
3951 CardBus->MemoryBase0 & 0xfffff000,
3952 CardBus->MemoryLimit0 | 0x00000fff
3960 gShellDebug1HiiHandle,
3961 INDEX_OF (&(CardBus->MemoryBase1)),
3962 CardBus->BridgeControl & BIT9 ? L
" Prefetchable" : L
"Non-Prefetchable",
3963 CardBus->MemoryBase1 & 0xfffff000,
3964 CardBus->MemoryLimit1 | 0x00000fff
3967 Io32Bit = (BOOLEAN)(CardBus->IoBase0 & BIT0);
3973 gShellDebug1HiiHandle,
3974 INDEX_OF (&(CardBus->IoBase0)),
3975 Io32Bit ? L
" 32 bit" : L
" 16 bit",
3976 CardBus->IoBase0 & (Io32Bit ? 0xfffffffc : 0x0000fffc),
3977 (CardBus->IoLimit0 & (Io32Bit ? 0xffffffff : 0x0000ffff)) | 0x00000003
3980 Io32Bit = (BOOLEAN)(CardBus->IoBase1 & BIT0);
3986 gShellDebug1HiiHandle,
3987 INDEX_OF (&(CardBus->IoBase1)),
3988 Io32Bit ? L
" 32 bit" : L
" 16 bit",
3989 CardBus->IoBase1 & (Io32Bit ? 0xfffffffc : 0x0000fffc),
3990 (CardBus->IoLimit1 & (Io32Bit ? 0xffffffff : 0x0000ffff)) | 0x00000003
4001 gShellDebug1HiiHandle,
4002 INDEX_OF (&(CardBus->InterruptLine)),
4003 CardBus->InterruptLine,
4004 INDEX_OF (&(CardBus->InterruptPin)),
4005 CardBus->InterruptPin
4025 gShellDebug1HiiHandle,
4026 INDEX_OF (&(CardBusData->SubVendorId)),
4027 CardBusData->SubVendorId,
4028 INDEX_OF (&(CardBusData->SubSystemId)),
4029 CardBusData->SubSystemId
4037 gShellDebug1HiiHandle,
4038 INDEX_OF (&(CardBusData->LegacyBase)),
4039 CardBusData->LegacyBase
4059 IN BOOLEAN MainStatus,
4060 IN PCI_HEADER_TYPE HeaderType
4074 if (HeaderType == PciCardBusBridge) {
4087 if (((*Status & BIT9) == 0) && ((*Status & BIT10) == 0)) {
4089 }
else if (((*Status & BIT9) != 0) && ((*Status & BIT10) == 0)) {
4091 }
else if (((*Status & BIT9) == 0) && ((*Status & BIT10) != 0)) {
4102 gShellDebug1HiiHandle,
4103 (*Status & BIT11) != 0
4111 gShellDebug1HiiHandle,
4112 (*Status & BIT12) != 0
4120 gShellDebug1HiiHandle,
4121 (*Status & BIT13) != 0
4130 gShellDebug1HiiHandle,
4131 (*Status & BIT14) != 0
4139 gShellDebug1HiiHandle,
4140 (*Status & BIT14) != 0
4149 gShellDebug1HiiHandle,
4150 (*Status & BIT15) != 0
4181 gShellDebug1HiiHandle,
4182 (*Command & BIT0) != 0
4190 gShellDebug1HiiHandle,
4191 (*Command & BIT1) != 0
4199 gShellDebug1HiiHandle,
4200 (*Command & BIT2) != 0
4208 gShellDebug1HiiHandle,
4209 (*Command & BIT3) != 0
4217 gShellDebug1HiiHandle,
4218 (*Command & BIT4) != 0
4226 gShellDebug1HiiHandle,
4227 (*Command & BIT5) != 0
4235 gShellDebug1HiiHandle,
4236 (*Command & BIT6) != 0
4244 gShellDebug1HiiHandle,
4245 (*Command & BIT7) != 0
4253 gShellDebug1HiiHandle,
4254 (*Command & BIT8) != 0
4262 gShellDebug1HiiHandle,
4263 (*Command & BIT9) != 0
4279 IN UINT16 *BridgeControl,
4280 IN PCI_HEADER_TYPE HeaderType
4288 gShellDebug1HiiHandle,
4289 INDEX_OF (BridgeControl),
4298 gShellDebug1HiiHandle,
4299 (*BridgeControl & BIT0) != 0
4306 gShellDebug1HiiHandle,
4307 (*BridgeControl & BIT1) != 0
4314 gShellDebug1HiiHandle,
4315 (*BridgeControl & BIT2) != 0
4322 gShellDebug1HiiHandle,
4323 (*BridgeControl & BIT3) != 0
4330 gShellDebug1HiiHandle,
4331 (*BridgeControl & BIT5) != 0
4338 if (HeaderType == PciP2pBridge) {
4344 gShellDebug1HiiHandle,
4345 (*BridgeControl & BIT6) != 0
4352 gShellDebug1HiiHandle,
4353 (*BridgeControl & BIT7) != 0
4360 gShellDebug1HiiHandle,
4361 (*BridgeControl & BIT8) != 0 ? L
"2^10" : L
"2^15"
4368 gShellDebug1HiiHandle,
4369 (*BridgeControl & BIT9) != 0 ? L
"2^10" : L
"2^15"
4376 gShellDebug1HiiHandle,
4377 (*BridgeControl & BIT10) != 0
4384 gShellDebug1HiiHandle,
4385 (*BridgeControl & BIT11) != 0
4393 gShellDebug1HiiHandle,
4394 (*BridgeControl & BIT6) != 0
4401 gShellDebug1HiiHandle,
4402 (*BridgeControl & BIT7) != 0
4409 gShellDebug1HiiHandle,
4410 (*BridgeControl & BIT10) != 0
4429 IN UINT8 CapabilityId
4432 UINT8 CapabilityPtr;
4442 switch ((PCI_HEADER_TYPE)(ConfigSpace->Common.HeaderType & 0x7f)) {
4444 CapabilityPtr = ConfigSpace->NonCommon.Device.CapabilityPtr;
4447 CapabilityPtr = ConfigSpace->NonCommon.Bridge.CapabilityPtr;
4449 case PciCardBusBridge:
4450 CapabilityPtr = ConfigSpace->NonCommon.CardBus.Cap_Ptr;
4456 while ((CapabilityPtr >= 0x40) && ((CapabilityPtr & 0x03) == 0x00)) {
4458 if (CapabilityEntry->CapabilityID == CapabilityId) {
4459 return CapabilityPtr;
4466 if (CapabilityPtr == CapabilityEntry->NextItemPtr) {
4470 CapabilityPtr = CapabilityEntry->NextItemPtr;
4488 CHAR16 *DevicePortType;
4493 L
" Capability Version(3:0): %E0x%04x%N\r\n",
4494 PciExpressCap->Capability.Bits.Version
4496 if (PciExpressCap->Capability.Bits.DevicePortType <
ARRAY_SIZE (DevicePortTypeTable)) {
4497 DevicePortType = DevicePortTypeTable[PciExpressCap->Capability.Bits.DevicePortType];
4499 DevicePortType = L
"Unknown Type";
4505 L
" Device/PortType(7:4): %E%s%N\r\n",
4513 if ((PciExpressCap->Capability.Bits.DevicePortType == PCIE_DEVICE_PORT_TYPE_ROOT_PORT) ||
4514 (PciExpressCap->Capability.Bits.DevicePortType == PCIE_DEVICE_PORT_TYPE_DOWNSTREAM_PORT))
4519 L
" Slot Implemented(8): %E%d%N\r\n",
4520 PciExpressCap->Capability.Bits.SlotImplemented
4527 L
" Interrupt Message Number(13:9): %E0x%05x%N\r\n",
4528 PciExpressCap->Capability.Bits.InterruptMessageNumber
4545 UINT8 DevicePortType;
4549 DevicePortType = (UINT8)PciExpressCap->Capability.Bits.DevicePortType;
4550 ShellPrintEx (-1, -1, L
" Max_Payload_Size Supported(2:0): ");
4551 if (PciExpressCap->DeviceCapability.Bits.MaxPayloadSize < 6) {
4552 ShellPrintEx (-1, -1, L
"%E%d bytes%N\r\n", 1 << (PciExpressCap->DeviceCapability.Bits.MaxPayloadSize + 7));
4560 L
" Phantom Functions Supported(4:3): %E%d%N\r\n",
4561 PciExpressCap->DeviceCapability.Bits.PhantomFunctions
4566 L
" Extended Tag Field Supported(5): %E%d-bit Tag field supported%N\r\n",
4567 PciExpressCap->DeviceCapability.Bits.ExtendedTagField ? 8 : 5
4572 if (IS_PCIE_ENDPOINT (DevicePortType)) {
4573 L0sLatency = (UINT8)PciExpressCap->DeviceCapability.Bits.EndpointL0sAcceptableLatency;
4574 L1Latency = (UINT8)PciExpressCap->DeviceCapability.Bits.EndpointL1AcceptableLatency;
4575 ShellPrintEx (-1, -1, L
" Endpoint L0s Acceptable Latency(8:6): ");
4576 if (L0sLatency < 4) {
4577 ShellPrintEx (-1, -1, L
"%EMaximum of %d ns%N\r\n", 1 << (L0sLatency + 6));
4579 if (L0sLatency < 7) {
4580 ShellPrintEx (-1, -1, L
"%EMaximum of %d us%N\r\n", 1 << (L0sLatency - 3));
4586 ShellPrintEx (-1, -1, L
" Endpoint L1 Acceptable Latency(11:9): ");
4587 if (L1Latency < 7) {
4588 ShellPrintEx (-1, -1, L
"%EMaximum of %d us%N\r\n", 1 << (L1Latency + 1));
4597 L
" Role-based Error Reporting(15): %E%d%N\r\n",
4598 PciExpressCap->DeviceCapability.Bits.RoleBasedErrorReporting
4605 if (DevicePortType == PCIE_DEVICE_PORT_TYPE_UPSTREAM_PORT) {
4609 L
" Captured Slot Power Limit Value(25:18): %E0x%02x%N\r\n",
4610 PciExpressCap->DeviceCapability.Bits.CapturedSlotPowerLimitValue
4615 L
" Captured Slot Power Limit Scale(27:26): %E%s%N\r\n",
4616 SlotPwrLmtScaleTable[PciExpressCap->DeviceCapability.Bits.CapturedSlotPowerLimitScale]
4623 if (IS_PCIE_ENDPOINT (DevicePortType)) {
4627 L
" Function Level Reset Capability(28): %E%d%N\r\n",
4628 PciExpressCap->DeviceCapability.Bits.FunctionLevelReset
4650 L
" Correctable Error Reporting Enable(0): %E%d%N\r\n",
4651 PciExpressCap->DeviceControl.Bits.CorrectableError
4656 L
" Non-Fatal Error Reporting Enable(1): %E%d%N\r\n",
4657 PciExpressCap->DeviceControl.Bits.NonFatalError
4662 L
" Fatal Error Reporting Enable(2): %E%d%N\r\n",
4663 PciExpressCap->DeviceControl.Bits.FatalError
4668 L
" Unsupported Request Reporting Enable(3): %E%d%N\r\n",
4669 PciExpressCap->DeviceControl.Bits.UnsupportedRequest
4674 L
" Enable Relaxed Ordering(4): %E%d%N\r\n",
4675 PciExpressCap->DeviceControl.Bits.RelaxedOrdering
4678 if (PciExpressCap->DeviceControl.Bits.MaxPayloadSize < 6) {
4679 ShellPrintEx (-1, -1, L
"%E%d bytes%N\r\n", 1 << (PciExpressCap->DeviceControl.Bits.MaxPayloadSize + 7));
4687 L
" Extended Tag Field Enable(8): %E%d%N\r\n",
4688 PciExpressCap->DeviceControl.Bits.ExtendedTagField
4693 L
" Phantom Functions Enable(9): %E%d%N\r\n",
4694 PciExpressCap->DeviceControl.Bits.PhantomFunctions
4699 L
" Auxiliary (AUX) Power PM Enable(10): %E%d%N\r\n",
4700 PciExpressCap->DeviceControl.Bits.AuxPower
4705 L
" Enable No Snoop(11): %E%d%N\r\n",
4706 PciExpressCap->DeviceControl.Bits.NoSnoop
4708 ShellPrintEx (-1, -1, L
" Max_Read_Request_Size(14:12): ");
4709 if (PciExpressCap->DeviceControl.Bits.MaxReadRequestSize < 6) {
4710 ShellPrintEx (-1, -1, L
"%E%d bytes%N\r\n", 1 << (PciExpressCap->DeviceControl.Bits.MaxReadRequestSize + 7));
4718 if (PciExpressCap->Capability.Bits.DevicePortType == PCIE_DEVICE_PORT_TYPE_PCIE_TO_PCI_BRIDGE) {
4722 L
" Bridge Configuration Retry Enable(15): %E%d%N\r\n",
4723 PciExpressCap->DeviceControl.Bits.BridgeConfigurationRetryOrFunctionLevelReset
4745 L
" Correctable Error Detected(0): %E%d%N\r\n",
4746 PciExpressCap->DeviceStatus.Bits.CorrectableError
4751 L
" Non-Fatal Error Detected(1): %E%d%N\r\n",
4752 PciExpressCap->DeviceStatus.Bits.NonFatalError
4757 L
" Fatal Error Detected(2): %E%d%N\r\n",
4758 PciExpressCap->DeviceStatus.Bits.FatalError
4763 L
" Unsupported Request Detected(3): %E%d%N\r\n",
4764 PciExpressCap->DeviceStatus.Bits.UnsupportedRequest
4769 L
" AUX Power Detected(4): %E%d%N\r\n",
4770 PciExpressCap->DeviceStatus.Bits.AuxPower
4775 L
" Transactions Pending(5): %E%d%N\r\n",
4776 PciExpressCap->DeviceStatus.Bits.TransactionsPending
4793 CHAR16 *MaxLinkSpeed;
4796 switch (PciExpressCap->LinkCapability.Bits.MaxLinkSpeed) {
4798 MaxLinkSpeed = L
"2.5 GT/s";
4801 MaxLinkSpeed = L
"5.0 GT/s";
4804 MaxLinkSpeed = L
"8.0 GT/s";
4807 MaxLinkSpeed = L
"16.0 GT/s";
4810 MaxLinkSpeed = L
"32.0 GT/s";
4813 MaxLinkSpeed = L
"64.0 GT/s";
4816 MaxLinkSpeed = L
"Reserved";
4823 L
" Maximum Link Speed(3:0): %E%s%N\r\n",
4829 L
" Maximum Link Width(9:4): %Ex%d%N\r\n",
4830 PciExpressCap->LinkCapability.Bits.MaxLinkWidth
4832 switch (PciExpressCap->LinkCapability.Bits.Aspm) {
4843 AspmValue = L
"L0s and L1";
4846 AspmValue = L
"Reserved";
4853 L
" Active State Power Management Support(11:10): %E%s Supported%N\r\n",
4859 L
" L0s Exit Latency(14:12): %E%s%N\r\n",
4860 L0sLatencyStrTable[PciExpressCap->LinkCapability.Bits.L0sExitLatency]
4865 L
" L1 Exit Latency(17:15): %E%s%N\r\n",
4866 L1LatencyStrTable[PciExpressCap->LinkCapability.Bits.L1ExitLatency]
4871 L
" Clock Power Management(18): %E%d%N\r\n",
4872 PciExpressCap->LinkCapability.Bits.ClockPowerManagement
4877 L
" Surprise Down Error Reporting Capable(19): %E%d%N\r\n",
4878 PciExpressCap->LinkCapability.Bits.SurpriseDownError
4883 L
" Data Link Layer Link Active Reporting Capable(20): %E%d%N\r\n",
4884 PciExpressCap->LinkCapability.Bits.DataLinkLayerLinkActive
4889 L
" Link Bandwidth Notification Capability(21): %E%d%N\r\n",
4890 PciExpressCap->LinkCapability.Bits.LinkBandwidthNotification
4895 L
" Port Number(31:24): %E0x%02x%N\r\n",
4896 PciExpressCap->LinkCapability.Bits.PortNumber
4913 UINT8 DevicePortType;
4915 DevicePortType = (UINT8)PciExpressCap->Capability.Bits.DevicePortType;
4919 L
" Active State Power Management Control(1:0): %E%s%N\r\n",
4920 ASPMCtrlStrTable[PciExpressCap->LinkControl.Bits.AspmControl]
4925 if (!IS_PCIE_SWITCH (DevicePortType)) {
4929 L
" Read Completion Boundary (RCB)(3): %E%d byte%N\r\n",
4930 1 << (PciExpressCap->LinkControl.Bits.ReadCompletionBoundary + 6)
4940 if (!IS_PCIE_ENDPOINT (DevicePortType) &&
4941 (DevicePortType != PCIE_DEVICE_PORT_TYPE_UPSTREAM_PORT) &&
4942 (DevicePortType != PCIE_DEVICE_PORT_TYPE_PCIE_TO_PCI_BRIDGE))
4947 L
" Link Disable(4): %E%d%N\r\n",
4948 PciExpressCap->LinkControl.Bits.LinkDisable
4955 L
" Common Clock Configuration(6): %E%d%N\r\n",
4956 PciExpressCap->LinkControl.Bits.CommonClockConfiguration
4961 L
" Extended Synch(7): %E%d%N\r\n",
4962 PciExpressCap->LinkControl.Bits.ExtendedSynch
4967 L
" Enable Clock Power Management(8): %E%d%N\r\n",
4968 PciExpressCap->LinkControl.Bits.ClockPowerManagement
4973 L
" Hardware Autonomous Width Disable(9): %E%d%N\r\n",
4974 PciExpressCap->LinkControl.Bits.HardwareAutonomousWidthDisable
4979 L
" Link Bandwidth Management Interrupt Enable(10): %E%d%N\r\n",
4980 PciExpressCap->LinkControl.Bits.LinkBandwidthManagementInterrupt
4985 L
" Link Autonomous Bandwidth Interrupt Enable(11): %E%d%N\r\n",
4986 PciExpressCap->LinkControl.Bits.LinkAutonomousBandwidthInterrupt
5003 CHAR16 *CurLinkSpeed;
5005 switch (PciExpressCap->LinkStatus.Bits.CurrentLinkSpeed) {
5007 CurLinkSpeed = L
"2.5 GT/s";
5010 CurLinkSpeed = L
"5.0 GT/s";
5013 CurLinkSpeed = L
"8.0 GT/s";
5016 CurLinkSpeed = L
"16.0 GT/s";
5019 CurLinkSpeed = L
"32.0 GT/s";
5022 CurLinkSpeed = L
"64.0 GT/s";
5025 CurLinkSpeed = L
"Reserved";
5032 L
" Current Link Speed(3:0): %E%s%N\r\n",
5038 L
" Negotiated Link Width(9:4): %Ex%d%N\r\n",
5039 PciExpressCap->LinkStatus.Bits.NegotiatedLinkWidth
5044 L
" Link Training(11): %E%d%N\r\n",
5045 PciExpressCap->LinkStatus.Bits.LinkTraining
5050 L
" Slot Clock Configuration(12): %E%d%N\r\n",
5051 PciExpressCap->LinkStatus.Bits.SlotClockConfiguration
5056 L
" Data Link Layer Link Active(13): %E%d%N\r\n",
5057 PciExpressCap->LinkStatus.Bits.DataLinkLayerLinkActive
5062 L
" Link Bandwidth Management Status(14): %E%d%N\r\n",
5063 PciExpressCap->LinkStatus.Bits.LinkBandwidthManagement
5068 L
" Link Autonomous Bandwidth Status(15): %E%d%N\r\n",
5069 PciExpressCap->LinkStatus.Bits.LinkAutonomousBandwidth
5089 L
" Attention Button Present(0): %E%d%N\r\n",
5090 PciExpressCap->SlotCapability.Bits.AttentionButton
5095 L
" Power Controller Present(1): %E%d%N\r\n",
5096 PciExpressCap->SlotCapability.Bits.PowerController
5101 L
" MRL Sensor Present(2): %E%d%N\r\n",
5102 PciExpressCap->SlotCapability.Bits.MrlSensor
5107 L
" Attention Indicator Present(3): %E%d%N\r\n",
5108 PciExpressCap->SlotCapability.Bits.AttentionIndicator
5113 L
" Power Indicator Present(4): %E%d%N\r\n",
5114 PciExpressCap->SlotCapability.Bits.PowerIndicator
5119 L
" Hot-Plug Surprise(5): %E%d%N\r\n",
5120 PciExpressCap->SlotCapability.Bits.HotPlugSurprise
5125 L
" Hot-Plug Capable(6): %E%d%N\r\n",
5126 PciExpressCap->SlotCapability.Bits.HotPlugCapable
5131 L
" Slot Power Limit Value(14:7): %E0x%02x%N\r\n",
5132 PciExpressCap->SlotCapability.Bits.SlotPowerLimitValue
5137 L
" Slot Power Limit Scale(16:15): %E%s%N\r\n",
5138 SlotPwrLmtScaleTable[PciExpressCap->SlotCapability.Bits.SlotPowerLimitScale]
5143 L
" Electromechanical Interlock Present(17): %E%d%N\r\n",
5144 PciExpressCap->SlotCapability.Bits.ElectromechanicalInterlock
5149 L
" No Command Completed Support(18): %E%d%N\r\n",
5150 PciExpressCap->SlotCapability.Bits.NoCommandCompleted
5155 L
" Physical Slot Number(31:19): %E%d%N\r\n",
5156 PciExpressCap->SlotCapability.Bits.PhysicalSlotNumber
5177 L
" Attention Button Pressed Enable(0): %E%d%N\r\n",
5178 PciExpressCap->SlotControl.Bits.AttentionButtonPressed
5183 L
" Power Fault Detected Enable(1): %E%d%N\r\n",
5184 PciExpressCap->SlotControl.Bits.PowerFaultDetected
5189 L
" MRL Sensor Changed Enable(2): %E%d%N\r\n",
5190 PciExpressCap->SlotControl.Bits.MrlSensorChanged
5195 L
" Presence Detect Changed Enable(3): %E%d%N\r\n",
5196 PciExpressCap->SlotControl.Bits.PresenceDetectChanged
5201 L
" Command Completed Interrupt Enable(4): %E%d%N\r\n",
5202 PciExpressCap->SlotControl.Bits.CommandCompletedInterrupt
5207 L
" Hot-Plug Interrupt Enable(5): %E%d%N\r\n",
5208 PciExpressCap->SlotControl.Bits.HotPlugInterrupt
5213 L
" Attention Indicator Control(7:6): %E%s%N\r\n",
5215 PciExpressCap->SlotControl.Bits.AttentionIndicator]
5220 L
" Power Indicator Control(9:8): %E%s%N\r\n",
5221 IndicatorTable[PciExpressCap->SlotControl.Bits.PowerIndicator]
5223 ShellPrintEx (-1, -1, L
" Power Controller Control(10): %EPower ");
5225 PciExpressCap->SlotControl.Bits.PowerController)
5235 L
" Electromechanical Interlock Control(11): %E%d%N\r\n",
5236 PciExpressCap->SlotControl.Bits.ElectromechanicalInterlock
5241 L
" Data Link Layer State Changed Enable(12): %E%d%N\r\n",
5242 PciExpressCap->SlotControl.Bits.DataLinkLayerStateChanged
5262 L
" Attention Button Pressed(0): %E%d%N\r\n",
5263 PciExpressCap->SlotStatus.Bits.AttentionButtonPressed
5268 L
" Power Fault Detected(1): %E%d%N\r\n",
5269 PciExpressCap->SlotStatus.Bits.PowerFaultDetected
5274 L
" MRL Sensor Changed(2): %E%d%N\r\n",
5275 PciExpressCap->SlotStatus.Bits.MrlSensorChanged
5280 L
" Presence Detect Changed(3): %E%d%N\r\n",
5281 PciExpressCap->SlotStatus.Bits.PresenceDetectChanged
5286 L
" Command Completed(4): %E%d%N\r\n",
5287 PciExpressCap->SlotStatus.Bits.CommandCompleted
5289 ShellPrintEx (-1, -1, L
" MRL Sensor State(5): %EMRL ");
5291 PciExpressCap->SlotStatus.Bits.MrlSensor)
5300 PciExpressCap->SlotStatus.Bits.PresenceDetect)
5302 ShellPrintEx (-1, -1, L
"%ECard Present in slot%N\r\n");
5307 ShellPrintEx (-1, -1, L
" Electromechanical Interlock Status(7): %EElectromechanical Interlock ");
5309 PciExpressCap->SlotStatus.Bits.ElectromechanicalInterlock)
5319 L
" Data Link Layer State Changed(8): %E%d%N\r\n",
5320 PciExpressCap->SlotStatus.Bits.DataLinkLayerStateChanged
5340 L
" System Error on Correctable Error Enable(0): %E%d%N\r\n",
5341 PciExpressCap->RootControl.Bits.SystemErrorOnCorrectableError
5346 L
" System Error on Non-Fatal Error Enable(1): %E%d%N\r\n",
5347 PciExpressCap->RootControl.Bits.SystemErrorOnNonFatalError
5352 L
" System Error on Fatal Error Enable(2): %E%d%N\r\n",
5353 PciExpressCap->RootControl.Bits.SystemErrorOnFatalError
5358 L
" PME Interrupt Enable(3): %E%d%N\r\n",
5359 PciExpressCap->RootControl.Bits.PmeInterrupt
5364 L
" CRS Software Visibility Enable(4): %E%d%N\r\n",
5365 PciExpressCap->RootControl.Bits.CrsSoftwareVisibility
5386 L
" CRS Software Visibility(0): %E%d%N\r\n",
5387 PciExpressCap->RootCapability.Bits.CrsSoftwareVisibility
5408 L
" PME Requester ID(15:0): %E0x%04x%N\r\n",
5409 PciExpressCap->RootStatus.Bits.PmeRequesterId
5414 L
" PME Status(16): %E%d%N\r\n",
5415 PciExpressCap->RootStatus.Bits.PmeStatus
5420 L
" PME Pending(17): %E%d%N\r\n",
5421 PciExpressCap->RootStatus.Bits.PmePending
5434 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5435 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5447 gShellDebug1HiiHandle,
5448 Header->RootComplexLinkCapabilities,
5449 Header->RootComplexLinkControl,
5450 Header->RootComplexLinkStatus
5454 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5456 (VOID *)(HeaderAddress)
5469 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5470 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5482 gShellDebug1HiiHandle,
5485 Header->PowerBudgetCapability
5489 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5491 (VOID *)(HeaderAddress)
5504 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5505 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5520 gShellDebug1HiiHandle,
5521 Header->AcsCapability,
5524 if (PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_CONTROL (Header)) {
5525 VectorSize = PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_VECTOR_SIZE (Header);
5526 if (VectorSize == 0) {
5530 for (LoopCounter = 0; LoopCounter * 8 < VectorSize; LoopCounter++) {
5536 gShellDebug1HiiHandle,
5538 Header->EgressControlVectorArray[LoopCounter]
5545 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5547 (VOID *)(HeaderAddress)
5560 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5561 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5573 gShellDebug1HiiHandle,
5574 Header->MaxSnoopLatency,
5575 Header->MaxNoSnoopLatency
5579 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5581 (VOID *)(HeaderAddress)
5594 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5595 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5607 gShellDebug1HiiHandle,
5608 Header->SerialNumber
5612 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5614 (VOID *)(HeaderAddress)
5627 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5628 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5640 gShellDebug1HiiHandle,
5643 Header->RcrbCapabilities,
5648 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5650 (VOID *)(HeaderAddress)
5663 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5664 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5676 gShellDebug1HiiHandle,
5677 Header->VendorSpecificHeader
5681 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5682 PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_GET_SIZE (Header),
5683 (VOID *)(HeaderAddress)
5696 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5697 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5709 gShellDebug1HiiHandle,
5710 Header->AssociationBitmap
5714 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5716 (VOID *)(HeaderAddress)
5729 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5730 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5742 gShellDebug1HiiHandle,
5743 Header->AriCapability,
5748 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5750 (VOID *)(HeaderAddress)
5763 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5764 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5777 gShellDebug1HiiHandle,
5778 Header->DpaCapability,
5779 Header->DpaLatencyIndicator,
5783 for (LinkCount = 0; LinkCount < PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_GET_SUBSTATE_MAX (Header) + (UINT32)1; LinkCount++) {
5789 gShellDebug1HiiHandle,
5791 Header->DpaPowerAllocationArray[LinkCount]
5797 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5799 (VOID *)(HeaderAddress)
5812 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5813 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5826 gShellDebug1HiiHandle,
5827 Header->ElementSelfDescription
5830 for (LinkCount = 0; LinkCount < PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_GET_LINK_COUNT (Header); LinkCount++) {
5836 gShellDebug1HiiHandle,
5838 Header->LinkEntry[LinkCount]
5844 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5846 (VOID *)(HeaderAddress)
5859 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5860 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5872 gShellDebug1HiiHandle,
5873 Header->UncorrectableErrorStatus,
5874 Header->UncorrectableErrorMask,
5875 Header->UncorrectableErrorSeverity,
5876 Header->CorrectableErrorStatus,
5877 Header->CorrectableErrorMask,
5878 Header->AdvancedErrorCapabilitiesAndControl,
5879 Header->HeaderLog[0],
5880 Header->HeaderLog[1],
5881 Header->HeaderLog[2],
5882 Header->HeaderLog[3],
5883 Header->RootErrorCommand,
5884 Header->RootErrorStatus,
5885 Header->ErrorSourceIdentification,
5886 Header->CorrectableErrorSourceIdentification,
5887 Header->TlpPrefixLog[0],
5888 Header->TlpPrefixLog[1],
5889 Header->TlpPrefixLog[2],
5890 Header->TlpPrefixLog[3]
5894 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5896 (VOID *)(HeaderAddress)
5910 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5911 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress,
5924 gShellDebug1HiiHandle,
5925 Header->MultiCastCapability,
5926 Header->MulticastControl,
5927 Header->McBaseAddress,
5928 Header->McReceiveAddress,
5930 Header->McBlockUntranslated,
5931 Header->McOverlayBar
5936 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5938 (VOID *)(HeaderAddress)
5952 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
5953 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
5967 gShellDebug1HiiHandle,
5968 Header->ExtendedVcCount,
5969 Header->PortVcCapability1,
5970 Header->PortVcCapability2,
5971 Header->VcArbTableOffset,
5972 Header->PortVcControl,
5973 Header->PortVcStatus
5975 for (ItemCount = 0; ItemCount < Header->ExtendedVcCount; ItemCount++) {
5976 CapabilityItem = &Header->Capability[ItemCount];
5982 gShellDebug1HiiHandle,
5984 CapabilityItem->VcResourceCapability,
5985 CapabilityItem->PortArbTableOffset,
5986 CapabilityItem->VcResourceControl,
5987 CapabilityItem->VcResourceStatus
5993 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
5996 (VOID *)(HeaderAddress)
6010 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
6011 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
6019 for (ItemCount = 0; ItemCount < (UINT32)GET_NUMBER_RESIZABLE_BARS (Header); ItemCount++) {
6025 gShellDebug1HiiHandle,
6027 Header->Capability[ItemCount].ResizableBarCapability.Uint32,
6028 Header->Capability[ItemCount].ResizableBarControl.Uint32
6034 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
6036 (VOID *)(HeaderAddress)
6050 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
6051 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress
6063 gShellDebug1HiiHandle,
6064 Header->TphRequesterCapability,
6065 Header->TphRequesterControl
6069 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)Header->TphStTable - (UINT8 *)HeadersBaseAddress),
6070 GET_TPH_TABLE_SIZE (Header),
6071 (VOID *)Header->TphStTable
6076 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
6078 (VOID *)(HeaderAddress)
6093 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
6094 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress,
6107 gShellDebug1HiiHandle,
6108 Header->LinkControl3.Uint32,
6109 Header->LaneErrorStatus
6113 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)Header->EqualizationControl - (UINT8 *)HeadersBaseAddress),
6115 (VOID *)Header->EqualizationControl
6120 EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8 *)HeaderAddress - (UINT8 *)HeadersBaseAddress),
6123 (VOID *)(HeaderAddress)
6138 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress,
6139 IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
6143 switch (HeaderAddress->CapabilityId) {
6144 case PCI_EXPRESS_EXTENDED_CAPABILITY_ADVANCED_ERROR_REPORTING_ID:
6146 case PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_CONTROL_ID:
6148 case PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_ID:
6150 case PCI_EXPRESS_EXTENDED_CAPABILITY_SERIAL_NUMBER_ID:
6152 case PCI_EXPRESS_EXTENDED_CAPABILITY_POWER_BUDGETING_ID:
6154 case PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_ID:
6156 case PCI_EXPRESS_EXTENDED_CAPABILITY_LATENCE_TOLERANCE_REPORTING_ID:
6158 case PCI_EXPRESS_EXTENDED_CAPABILITY_ARI_CAPABILITY_ID:
6160 case PCI_EXPRESS_EXTENDED_CAPABILITY_RCRB_HEADER_ID:
6162 case PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_ID:
6164 case PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_ID:
6166 case PCI_EXPRESS_EXTENDED_CAPABILITY_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_ID:
6168 case PCI_EXPRESS_EXTENDED_CAPABILITY_VIRTUAL_CHANNEL_ID:
6169 case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTI_FUNCTION_VIRTUAL_CHANNEL_ID:
6171 case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_ID:
6176 case PCI_EXPRESS_EXTENDED_CAPABILITY_RESIZABLE_BAR_ID:
6178 case PCI_EXPRESS_EXTENDED_CAPABILITY_TPH_ID:
6180 case PCI_EXPRESS_EXTENDED_CAPABILITY_SECONDARY_PCIE_ID:
6186 L
"Unknown PCIe extended capability ID (%04xh). No interpretation available.\r\n",
6187 HeaderAddress->CapabilityId
6204 IN UINT8 *ExtendedConfigSpace,
6206 IN CONST UINT16 ExtendedCapability
6209 UINT8 DevicePortType;
6213 PCI_EXP_EXT_HDR *ExtHdr;
6215 DevicePortType = (UINT8)PciExpressCap->Capability.Bits.DevicePortType;
6217 ShellPrintEx (-1, -1, L
"\r\nPci Express device capability structure:\r\n");
6219 for (Index = 0; PcieExplainList[Index].Type < PcieExplainTypeMax; Index++) {
6224 RegAddr = (UINT8 *)PciExpressCap + PcieExplainList[Index].Offset;
6225 switch (PcieExplainList[Index].Width) {
6226 case FieldWidthUINT8:
6227 RegValue = *(UINT8 *)RegAddr;
6229 case FieldWidthUINT16:
6230 RegValue = *(UINT16 *)RegAddr;
6232 case FieldWidthUINT32:
6233 RegValue = *(UINT32 *)RegAddr;
6244 PcieExplainList[Index].Token,
6245 gShellDebug1HiiHandle,
6246 PcieExplainList[Index].Offset,
6249 if (PcieExplainList[Index].Func ==
NULL) {
6253 switch (PcieExplainList[Index].Type) {
6254 case PcieExplainTypeLink:
6260 if ((DevicePortType == PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX_INTEGRATED_ENDPOINT) ||
6261 (DevicePortType == PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX_EVENT_COLLECTOR))
6267 case PcieExplainTypeSlot:
6274 if (((DevicePortType != PCIE_DEVICE_PORT_TYPE_ROOT_PORT) &&
6275 (DevicePortType != PCIE_DEVICE_PORT_TYPE_DOWNSTREAM_PORT)) ||
6276 !PciExpressCap->Capability.Bits.SlotImplemented)
6282 case PcieExplainTypeRoot:
6287 if (DevicePortType != PCIE_DEVICE_PORT_TYPE_ROOT_PORT) {
6296 PcieExplainList[Index].Func (PciExpressCap);
6299 ExtHdr = (PCI_EXP_EXT_HDR *)ExtendedConfigSpace;
6300 while (ExtHdr->CapabilityId != 0 && ExtHdr->CapabilityVersion != 0 && ExtHdr->CapabilityId != 0xFFFF) {
6304 if ((ExtendedCapability == 0xFFFF) || (ExtendedCapability == ExtHdr->CapabilityId)) {
6314 if ((ExtHdr->NextCapabilityOffset != 0) &&
6315 (ExtHdr->NextCapabilityOffset <= (UINT32)(ExtendedConfigSize + EFI_PCIE_CAPABILITY_BASE_OFFSET - sizeof (PCI_EXP_EXT_HDR))))
6317 ExtHdr = (PCI_EXP_EXT_HDR *)(ExtendedConfigSpace + ExtHdr->NextCapabilityOffset - EFI_PCIE_CAPABILITY_BASE_OFFSET);
PACKED struct @89 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ReallocatePool(IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define ARRAY_SIZE(Array)
#define ASSERT_EFI_ERROR(StatusParameter)
@ SHELL_INVALID_PARAMETER
#define EFI_PCI_STATUS_CAPABILITY
0x0010
#define EFI_PCI_CAPABILITY_ID_PCIEXP
EFI_STATUS PrintInterpretedExtendedCompatibilityLinkDeclaration(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PrintInterpretedExtendedCompatibilityLatencyToleranceReporting(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PrintInterpretedExtendedCompatibilityECEA(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PrintInterpretedExtendedCompatibilityMulticast(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress, IN CONST PCI_CAPABILITY_PCIEXP *PciExpressCapPtr)
UINT8 LocatePciCapability(IN PCI_CONFIG_SPACE *ConfigSpace, IN UINT8 CapabilityId)
EFI_STATUS PrintInterpretedExtendedCompatibilityRcrb(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PrintPciExtendedCapabilityDetails(IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress, IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_CAPABILITY_PCIEXP *PciExpressCapPtr)
EFI_STATUS ExplainPcieRootCap(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
VOID PciGetClassStrings(IN UINT32 ClassCode, IN OUT PCI_CLASS_STRINGS *ClassStrings)
EFI_STATUS ExplainPcieDeviceCap(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS PciFindProtocolInterface(IN EFI_HANDLE *HandleBuf, IN UINTN HandleCount, IN UINT16 Segment, IN UINT16 Bus, OUT EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL **IoDev)
EFI_STATUS ExplainPcieLinkStatus(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS PciExplainBridgeData(IN PCI_BRIDGE_CONTROL_REGISTER *Bridge, IN UINT64 Address, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoDev)
EFI_STATUS ExplainPcieSlotStatus(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS PciExplainStatus(IN UINT16 *Status, IN BOOLEAN MainStatus, IN PCI_HEADER_TYPE HeaderType)
SHELL_STATUS EFIAPI ShellCommandRunPci(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS ExplainPcieSlotControl(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS ExplainPcieRootStatus(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
VOID PciPrintClassCode(IN UINT8 *ClassCodePtr, IN BOOLEAN IncludePIF)
EFI_STATUS ExplainPcieDeviceControl(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS PrintInterpretedExtendedCompatibilityAcs(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PciGetNextBusRange(IN OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR **Descriptors, OUT UINT16 *MinBus, OUT UINT16 *MaxBus, OUT BOOLEAN *IsEnd)
EFI_STATUS PciExplainDeviceData(IN PCI_DEVICE_HEADER_TYPE_REGION *Device, IN UINT64 Address, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoDev)
EFI_STATUS PciExplainBar(IN UINT32 *Bar, IN UINT16 *Command, IN UINT64 Address, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoDev, IN OUT UINTN *Index)
EFI_STATUS ExplainPcieRootControl(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS PrintInterpretedExtendedCompatibilityVendorSpecific(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PrintInterpretedExtendedCompatibilitySecondary(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress, IN CONST PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS PciExplainCardBusData(IN PCI_CARDBUS_CONTROL_REGISTER *CardBus, IN UINT64 Address, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoDev)
EFI_STATUS PrintInterpretedExtendedCompatibilityVirtualChannel(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PrintInterpretedExtendedCompatibilityDynamicPowerAllocation(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS ExplainPcieDeviceStatus(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS PrintInterpretedExtendedCompatibilityPowerBudgeting(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
VOID PciExplainPci(IN PCI_CONFIG_SPACE *ConfigSpace, IN UINT64 Address, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoDev)
EFI_STATUS PrintInterpretedExtendedCompatibilityLinkControl(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
VOID PciExplainPciExpress(IN PCI_CAPABILITY_PCIEXP *PciExpressCap, IN UINT8 *ExtendedConfigSpace, IN UINTN ExtendedConfigSize, IN CONST UINT16 ExtendedCapability)
EFI_STATUS PciExplainCommand(IN UINT16 *Command)
EFI_STATUS PrintInterpretedExtendedCompatibilitySerialNumber(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PciExplainBridgeControl(IN UINT16 *BridgeControl, IN PCI_HEADER_TYPE HeaderType)
EFI_STATUS ExplainPcieLinkControl(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS ExplainPcieLinkCap(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS PrintInterpretedExtendedCompatibilityAri(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PrintInterpretedExtendedCompatibilityAer(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PrintInterpretedExtendedCompatibilityResizeableBar(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PrintInterpretedExtendedCompatibilityTph(IN CONST PCI_EXP_EXT_HDR *HeaderAddress, IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress)
EFI_STATUS PciGetProtocolAndResource(IN EFI_HANDLE Handle, OUT EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL **IoDev, OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR **Descriptors)
EFI_STATUS ExplainPcieSlotCap(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
EFI_STATUS ExplainPcieCapReg(IN PCI_CAPABILITY_PCIEXP *PciExpressCap)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
EFI_STATUS EFIAPI CommandInit(VOID)
VOID EFIAPI DumpHex(IN UINTN Indent, IN UINTN Offset, IN UINTN DataSize, IN VOID *UserData)
CONST CHAR16 *EFIAPI ShellCommandLineGetValue(IN CONST LIST_ENTRY *CheckPackage, IN CHAR16 *KeyString)
BOOLEAN EFIAPI ShellGetExecutionBreakFlag(VOID)
#define ShellCommandLineParse(CheckList, CheckPackage, ProblemParam, AutoPageBreak)
Make it easy to upgrade from older versions of the shell library.
EFI_STATUS EFIAPI ShellPrintHiiEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR8 *Language OPTIONAL, IN CONST EFI_STRING_ID HiiFormatStringId, IN CONST EFI_HII_HANDLE HiiFormatHandle,...)
BOOLEAN EFIAPI ShellCommandLineGetFlag(IN CONST LIST_ENTRY *CONST CheckPackage, IN CONST CHAR16 *CONST KeyString)
@ TypeValue
A flag that has some data following it with a space (IE "-a 1").
@ TypeFlag
A flag that is present or not present only (IE "-a").
VOID EFIAPI ShellCommandLineFreeVarList(IN LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellInitialize(VOID)
EFI_STATUS EFIAPI ShellPrintEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR16 *Format,...)
CONST CHAR16 *EFIAPI ShellCommandLineGetRawValue(IN CONST LIST_ENTRY *CONST CheckPackage, IN UINTN Position)
UINTN EFIAPI ShellCommandLineGetCount(IN CONST LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellConvertStringToUint64(IN CONST CHAR16 *String, OUT UINT64 *Value, IN CONST BOOLEAN ForceHex, IN CONST BOOLEAN StopAtSpace)
EFI_SIMPLE_TEXT_OUTPUT_MODE * Mode
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut