2 This driver implements EFI_PCI_HOT_PLUG_INIT_PROTOCOL, providing the PCI bus
3 driver with resource padding information, for PCIe hotplug purposes.
5 Copyright (C) 2016, Red Hat, Inc.
7 This program and the accompanying materials are licensed and made available
8 under the terms and conditions of the BSD License which accompanies this
9 distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
13 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include <IndustryStandard/Acpi10.h>
17 #include <IndustryStandard/QemuPciBridgeCapabilities.h>
19 #include <Library/BaseLib.h>
20 #include <Library/BaseMemoryLib.h>
21 #include <Library/DebugLib.h>
22 #include <Library/DevicePathLib.h>
23 #include <Library/MemoryAllocationLib.h>
24 #include <Library/PciLib.h>
25 #include <Library/UefiBootServicesTableLib.h>
27 #include <Protocol/PciHotPlugInit.h>
28 #include <Protocol/PciRootBridgeIo.h>
31 // The protocol interface this driver produces.
33 // Refer to 12.6 "PCI Hot Plug PCI Initialization Protocol" in the Platform
34 // Init 1.4a Spec, Volume 5.
36 STATIC EFI_PCI_HOT_PLUG_INIT_PROTOCOL mPciHotPlugInit
;
40 // Resource padding template for the GetResourcePadding() protocol member
43 // Refer to Table 8 "ACPI 2.0 & 3.0 QWORD Address Space Descriptor Usage" in
44 // the Platform Init 1.4a Spec, Volume 5.
46 // This structure is interpreted by the ApplyResourcePadding() function in the
47 // edk2 PCI Bus UEFI_DRIVER.
49 // We can request padding for at most four resource types, each of which is
50 // optional, independently of the others:
53 // (c) non-prefetchable MMIO space (32-bit only),
54 // (d) prefetchable MMIO space (either 32-bit or 64-bit, never both).
58 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR Padding
[4];
59 EFI_ACPI_END_TAG_DESCRIPTOR EndDesc
;
65 Initialize a RESOURCE_PADDING object.
67 @param[out] ResourcePadding The caller-allocated RESOURCE_PADDING object to
72 InitializeResourcePadding (
73 OUT RESOURCE_PADDING
*ResourcePadding
78 ZeroMem (ResourcePadding
, sizeof *ResourcePadding
);
81 // Fill in the Padding fields that don't vary across resource types.
83 for (Index
= 0; Index
< ARRAY_SIZE (ResourcePadding
->Padding
); ++Index
) {
84 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
*Descriptor
;
86 Descriptor
= ResourcePadding
->Padding
+ Index
;
87 Descriptor
->Desc
= ACPI_ADDRESS_SPACE_DESCRIPTOR
;
88 Descriptor
->Len
= (UINT16
)(
89 sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
) -
91 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
,
98 // Fill in the End Tag.
100 ResourcePadding
->EndDesc
.Desc
= ACPI_END_TAG_DESCRIPTOR
;
105 Set up a descriptor entry for reserving IO space.
107 @param[in,out] Descriptor The descriptor to configure. The caller shall have
108 initialized Descriptor earlier, with
109 InitializeResourcePadding().
111 @param[in] SizeExponent The size and natural alignment of the reservation
112 are determined by raising two to this power.
117 IN OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
*Descriptor
,
118 IN UINTN SizeExponent
121 Descriptor
->ResType
= ACPI_ADDRESS_SPACE_TYPE_IO
;
122 Descriptor
->AddrLen
= LShiftU64 (1, SizeExponent
);
123 Descriptor
->AddrRangeMax
= Descriptor
->AddrLen
- 1;
128 Set up a descriptor entry for reserving MMIO space.
130 @param[in,out] Descriptor The descriptor to configure. The caller shall
131 have initialized Descriptor earlier, with
132 InitializeResourcePadding().
134 @param[in] Prefetchable TRUE if the descriptor should reserve
135 prefetchable MMIO space. Pass FALSE for
136 reserving non-prefetchable MMIO space.
138 @param[in] ThirtyTwoBitOnly TRUE if the reservation should be limited to
139 32-bit address space. FALSE if the reservation
140 can be satisfied from 64-bit address space.
141 ThirtyTwoBitOnly is ignored if Prefetchable is
142 FALSE; in that case ThirtyTwoBitOnly is always
145 @param[in] SizeExponent The size and natural alignment of the
146 reservation are determined by raising two to
152 IN OUT EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
*Descriptor
,
153 IN BOOLEAN Prefetchable
,
154 IN BOOLEAN ThirtyTwoBitOnly
,
155 IN UINTN SizeExponent
158 Descriptor
->ResType
= ACPI_ADDRESS_SPACE_TYPE_MEM
;
160 Descriptor
->SpecificFlag
=
161 EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE
;
162 Descriptor
->AddrSpaceGranularity
= ThirtyTwoBitOnly
? 32 : 64;
164 Descriptor
->SpecificFlag
=
165 EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE
;
166 Descriptor
->AddrSpaceGranularity
= 32;
168 Descriptor
->AddrLen
= LShiftU64 (1, SizeExponent
);
169 Descriptor
->AddrRangeMax
= Descriptor
->AddrLen
- 1;
174 Round up a positive 32-bit value to the next whole power of two, and return
175 the bit position of the highest bit set in the result. Equivalent to
178 @param[in] Operand The 32-bit operand to evaluate.
180 @retval -1 Operand is zero.
182 @retval -1 Operand is positive, not a whole power of two, and rounding it
183 up to the next power of two does not fit into 32 bits.
185 @retval 0..31 Otherwise, return ceil(log2(Value)).
189 HighBitSetRoundUp32 (
195 HighBit
= HighBitSet32 (Operand
);
202 if ((Operand
& (Operand
- 1)) != 0) {
204 // Operand is not a whole power of two.
208 return (HighBit
< 32) ? HighBit
: -1;
213 Round up a positive 64-bit value to the next whole power of two, and return
214 the bit position of the highest bit set in the result. Equivalent to
217 @param[in] Operand The 64-bit operand to evaluate.
219 @retval -1 Operand is zero.
221 @retval -1 Operand is positive, not a whole power of two, and rounding it
222 up to the next power of two does not fit into 64 bits.
224 @retval 0..63 Otherwise, return ceil(log2(Value)).
228 HighBitSetRoundUp64 (
234 HighBit
= HighBitSet64 (Operand
);
241 if ((Operand
& (Operand
- 1)) != 0) {
243 // Operand is not a whole power of two.
247 return (HighBit
< 64) ? HighBit
: -1;
252 Read a slice from conventional PCI config space at the given offset, then
255 @param[in] PciAddress The address of the PCI Device -- Bus, Device, Function
256 -- in UEFI (not PciLib) encoding.
258 @param[in,out] Offset On input, the offset in conventional PCI config space
259 to start reading from. On output, the offset of the
260 first byte that was not read.
262 @param[in] Size The number of bytes to read.
264 @param[out] Buffer On output, the bytes read from PCI config space are
265 stored in this object.
270 IN CONST EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS
*PciAddress
,
271 IN OUT UINT8
*Offset
,
280 PciAddress
->Function
,
291 Convenience wrapper macro for ReadConfigSpace().
293 Given the following conditions:
295 - HeaderField is the first field in the structure pointed-to by Struct,
297 - Struct->HeaderField has been populated from the conventional PCI config
298 space of the PCI device identified by PciAddress,
300 - *Offset points one past HeaderField in the conventional PCI config space of
301 the PCI device identified by PciAddress,
303 populate the rest of *Struct from conventional PCI config space, starting at
304 *Offset. Finally, increment *Offset so that it point one past *Struct.
306 @param[in] PciAddress The address of the PCI Device -- Bus, Device, Function
307 -- in UEFI (not PciLib) encoding. Type: pointer to
308 CONST EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS.
310 @param[in,out] Offset On input, the offset in conventional PCI config space
311 to start reading from; one past Struct->HeaderField.
312 On output, the offset of the first byte that was not
313 read; one past *Struct. Type: pointer to UINT8.
315 @param[out] Struct The structure to complete. Type: pointer to structure
318 @param[in] HeaderField The name of the first field in *Struct, after which
319 *Struct should be populated. Type: structure member
322 #define COMPLETE_CONFIG_SPACE_STRUCT(PciAddress, Offset, Struct, HeaderField) \
326 (UINT8)(sizeof *(Struct) - sizeof ((Struct)->HeaderField)), \
327 &((Struct)->HeaderField) + 1 \
332 Look up the QEMU-specific Resource Reservation capability in the conventional
333 config space of a Hotplug Controller (that is, PCI Bridge).
335 This function performs as few config space reads as possible.
337 @param[in] HpcPciAddress The address of the PCI Bridge -- Bus, Device,
338 Function -- in UEFI (not PciLib) encoding.
340 @param[out] ReservationHint The caller-allocated capability structure to
341 populate from the PCI Bridge's config space.
343 @retval EFI_SUCCESS The capability has been found, ReservationHint has
346 @retval EFI_NOT_FOUND The capability is missing. The contents of
347 ReservationHint are now indeterminate.
351 QueryReservationHint (
352 IN CONST EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS
*HpcPciAddress
,
353 OUT QEMU_PCI_BRIDGE_CAPABILITY_RESOURCE_RESERVATION
*ReservationHint
362 // Check the vendor identifier.
364 PciVendorId
= PciRead16 (
367 HpcPciAddress
->Device
,
368 HpcPciAddress
->Function
,
372 if (PciVendorId
!= QEMU_PCI_BRIDGE_VENDOR_ID_REDHAT
) {
373 return EFI_NOT_FOUND
;
377 // Check the Capabilities List bit in the PCI Status Register.
379 PciStatus
= PciRead16 (
382 HpcPciAddress
->Device
,
383 HpcPciAddress
->Function
,
384 PCI_PRIMARY_STATUS_OFFSET
387 if ((PciStatus
& EFI_PCI_STATUS_CAPABILITY
) == 0) {
388 return EFI_NOT_FOUND
;
392 // Fetch the start of the Capabilities List.
394 PciCapPtr
= PciRead8 (
397 HpcPciAddress
->Device
,
398 HpcPciAddress
->Function
,
399 PCI_CAPBILITY_POINTER_OFFSET
404 // Scan the Capabilities List until we find the terminator element, or the
405 // Resource Reservation capability.
407 for (Offset
= PciCapPtr
& 0xFC;
409 Offset
= ReservationHint
->BridgeHdr
.VendorHdr
.Hdr
.NextItemPtr
& 0xFC) {
413 // Check if the Resource Reservation capability would fit into config space
416 EnoughRoom
= (BOOLEAN
)(
417 Offset
<= PCI_MAX_CONFIG_OFFSET
- sizeof *ReservationHint
421 // Read the standard capability header so we can check the capability ID
422 // (if necessary) and advance to the next capability.
427 (UINT8
)sizeof ReservationHint
->BridgeHdr
.VendorHdr
.Hdr
,
428 &ReservationHint
->BridgeHdr
.VendorHdr
.Hdr
431 (ReservationHint
->BridgeHdr
.VendorHdr
.Hdr
.CapabilityID
!=
432 EFI_PCI_CAPABILITY_ID_VENDOR
)) {
437 // Read the rest of the vendor capability header so we can check the
438 // capability length.
440 COMPLETE_CONFIG_SPACE_STRUCT (
443 &ReservationHint
->BridgeHdr
.VendorHdr
,
446 if (ReservationHint
->BridgeHdr
.VendorHdr
.Length
!=
447 sizeof *ReservationHint
) {
452 // Read the rest of the QEMU bridge capability header so we can check the
455 COMPLETE_CONFIG_SPACE_STRUCT (
458 &ReservationHint
->BridgeHdr
,
461 if (ReservationHint
->BridgeHdr
.Type
!=
462 QEMU_PCI_BRIDGE_CAPABILITY_TYPE_RESOURCE_RESERVATION
) {
467 // Read the body of the reservation hint.
469 COMPLETE_CONFIG_SPACE_STRUCT (
478 return EFI_NOT_FOUND
;
483 Returns a list of root Hot Plug Controllers (HPCs) that require
484 initialization during the boot process.
486 This procedure returns a list of root HPCs. The PCI bus driver must
487 initialize these controllers during the boot process. The PCI bus driver may
488 or may not be able to detect these HPCs. If the platform includes a
489 PCI-to-CardBus bridge, it can be included in this list if it requires
490 initialization. The HpcList must be self consistent. An HPC cannot control
491 any of its parent buses. Only one HPC can control a PCI bus. Because this
492 list includes only root HPCs, no HPC in the list can be a child of another
493 HPC. This policy must be enforced by the EFI_PCI_HOT_PLUG_INIT_PROTOCOL.
494 The PCI bus driver may not check for such invalid conditions. The callee
495 allocates the buffer HpcList
497 @param[in] This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL
499 @param[out] HpcCount The number of root HPCs that were returned.
500 @param[out] HpcList The list of root HPCs. HpcCount defines the number of
501 elements in this list.
503 @retval EFI_SUCCESS HpcList was returned.
504 @retval EFI_OUT_OF_RESOURCES HpcList was not returned due to insufficient
506 @retval EFI_INVALID_PARAMETER HpcCount is NULL or HpcList is NULL.
512 IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL
*This
,
514 OUT EFI_HPC_LOCATION
**HpcList
517 if (HpcCount
== NULL
|| HpcList
== NULL
) {
518 return EFI_INVALID_PARAMETER
;
522 // There are no top-level (i.e., un-enumerable) hot-plug controllers in QEMU
523 // that would require special initialization.
532 Initializes one root Hot Plug Controller (HPC). This process may causes
533 initialization of its subordinate buses.
535 This function initializes the specified HPC. At the end of initialization,
536 the hot-plug slots or sockets (controlled by this HPC) are powered and are
537 connected to the bus. All the necessary registers in the HPC are set up. For
538 a Standard (PCI) Hot Plug Controller (SHPC), the registers that must be set
539 up are defined in the PCI Standard Hot Plug Controller and Subsystem
542 @param[in] This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL
544 @param[in] HpcDevicePath The device path to the HPC that is being
546 @param[in] HpcPciAddress The address of the HPC function on the PCI bus.
547 @param[in] Event The event that should be signaled when the HPC
548 initialization is complete. Set to NULL if the
549 caller wants to wait until the entire
550 initialization process is complete.
551 @param[out] HpcState The state of the HPC hardware. The state is
552 EFI_HPC_STATE_INITIALIZED or
553 EFI_HPC_STATE_ENABLED.
555 @retval EFI_SUCCESS If Event is NULL, the specific HPC was
556 successfully initialized. If Event is not
557 NULL, Event will be signaled at a later time
558 when initialization is complete.
559 @retval EFI_UNSUPPORTED This instance of
560 EFI_PCI_HOT_PLUG_INIT_PROTOCOL does not
561 support the specified HPC.
562 @retval EFI_OUT_OF_RESOURCES Initialization failed due to insufficient
564 @retval EFI_INVALID_PARAMETER HpcState is NULL.
570 IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL
*This
,
571 IN EFI_DEVICE_PATH_PROTOCOL
*HpcDevicePath
,
572 IN UINT64 HpcPciAddress
,
573 IN EFI_EVENT Event
, OPTIONAL
574 OUT EFI_HPC_STATE
*HpcState
578 // This function should never be called, due to the information returned by
583 if (HpcState
== NULL
) {
584 return EFI_INVALID_PARAMETER
;
586 return EFI_UNSUPPORTED
;
591 Returns the resource padding that is required by the PCI bus that is
592 controlled by the specified Hot Plug Controller (HPC).
594 This function returns the resource padding that is required by the PCI bus
595 that is controlled by the specified HPC. This member function is called for
596 all the root HPCs and nonroot HPCs that are detected by the PCI bus
597 enumerator. This function will be called before PCI resource allocation is
598 completed. This function must be called after all the root HPCs, with the
599 possible exception of a PCI-to-CardBus bridge, have completed
602 @param[in] This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL
604 @param[in] HpcDevicePath The device path to the HPC.
605 @param[in] HpcPciAddress The address of the HPC function on the PCI bus.
606 @param[in] HpcState The state of the HPC hardware.
607 @param[out] Padding The amount of resource padding that is required
608 by the PCI bus under the control of the specified
610 @param[out] Attributes Describes how padding is accounted for. The
611 padding is returned in the form of ACPI 2.0
612 resource descriptors.
614 @retval EFI_SUCCESS The resource padding was successfully
616 @retval EFI_UNSUPPORTED This instance of the
617 EFI_PCI_HOT_PLUG_INIT_PROTOCOL does not
618 support the specified HPC.
619 @retval EFI_NOT_READY This function was called before HPC
620 initialization is complete.
621 @retval EFI_INVALID_PARAMETER HpcState or Padding or Attributes is NULL.
622 @retval EFI_OUT_OF_RESOURCES ACPI 2.0 resource descriptors for Padding
623 cannot be allocated due to insufficient
630 IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL
*This
,
631 IN EFI_DEVICE_PATH_PROTOCOL
*HpcDevicePath
,
632 IN UINT64 HpcPciAddress
,
633 OUT EFI_HPC_STATE
*HpcState
,
635 OUT EFI_HPC_PADDING_ATTRIBUTES
*Attributes
638 EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS
*Address
;
641 RESOURCE_PADDING ReservationRequest
;
642 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
*FirstResource
;
643 EFI_STATUS ReservationHintStatus
;
644 QEMU_PCI_BRIDGE_CAPABILITY_RESOURCE_RESERVATION ReservationHint
;
646 Address
= (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS
*)&HpcPciAddress
;
649 CHAR16
*DevicePathString
;
651 DevicePathString
= ConvertDevicePathToText (HpcDevicePath
, FALSE
, FALSE
);
653 DEBUG ((EFI_D_VERBOSE
, "%a: Address=%02x:%02x.%x DevicePath=%s\n",
654 __FUNCTION__
, Address
->Bus
, Address
->Device
, Address
->Function
,
655 (DevicePathString
== NULL
) ? L
"<unavailable>" : DevicePathString
));
657 if (DevicePathString
!= NULL
) {
658 FreePool (DevicePathString
);
662 if (HpcState
== NULL
|| Padding
== NULL
|| Attributes
== NULL
) {
663 return EFI_INVALID_PARAMETER
;
670 // Init ReservationRequest, and point FirstResource one past the last
671 // descriptor entry. We're going to build the entries backwards from
672 // ReservationRequest.EndDesc.
674 InitializeResourcePadding (&ReservationRequest
);
675 FirstResource
= ReservationRequest
.Padding
+
676 ARRAY_SIZE (ReservationRequest
.Padding
);
679 // Try to get the QEMU-specific Resource Reservation capability.
681 ReservationHintStatus
= QueryReservationHint (Address
, &ReservationHint
);
682 if (!EFI_ERROR (ReservationHintStatus
)) {
687 "%a: BusNumbers=0x%x Io=0x%Lx NonPrefetchable32BitMmio=0x%x\n"
688 "%a: Prefetchable32BitMmio=0x%x Prefetchable64BitMmio=0x%Lx\n",
690 ReservationHint
.BusNumbers
,
692 ReservationHint
.NonPrefetchable32BitMmio
,
694 ReservationHint
.Prefetchable32BitMmio
,
695 ReservationHint
.Prefetchable64BitMmio
699 // (a) Reserve bus numbers.
701 switch (ReservationHint
.BusNumbers
) {
704 // No reservation needed.
709 // Firmware default (unspecified). Treat it as "no reservation needed".
714 // Request the specified amount.
717 FirstResource
->ResType
= ACPI_ADDRESS_SPACE_TYPE_BUS
;
718 FirstResource
->AddrLen
= ReservationHint
.BusNumbers
;
723 // (b) Reserve IO space.
725 switch (ReservationHint
.Io
) {
728 // No reservation needed, disable our built-in.
734 // Firmware default (unspecified). Stick with our built-in.
739 // Round the specified amount up to the next power of two. If rounding is
740 // successful, reserve the rounded value. Fall back to the default
743 HighBit
= HighBitSetRoundUp64 (ReservationHint
.Io
);
745 SetIoPadding (--FirstResource
, (UINTN
)HighBit
);
752 // (c) Reserve non-prefetchable MMIO space (32-bit only).
754 switch (ReservationHint
.NonPrefetchable32BitMmio
) {
757 // No reservation needed, disable our built-in.
763 // Firmware default (unspecified). Stick with our built-in.
768 // Round the specified amount up to the next power of two. If rounding is
769 // successful, reserve the rounded value. Fall back to the default
772 HighBit
= HighBitSetRoundUp32 (ReservationHint
.NonPrefetchable32BitMmio
);
774 SetMmioPadding (--FirstResource
, FALSE
, TRUE
, (UINTN
)HighBit
);
781 // (d) Reserve prefetchable MMIO space (either 32-bit or 64-bit, never
784 // For either space, we treat 0 as "no reservation needed", and the maximum
785 // value as "firmware default". The latter is unspecified, and we interpret
788 // Otherwise, round the specified amount up to the next power of two. If
789 // rounding is successful, reserve the rounded value. Do not reserve
790 // prefetchable MMIO space otherwise.
792 if (ReservationHint
.Prefetchable32BitMmio
> 0 &&
793 ReservationHint
.Prefetchable32BitMmio
< MAX_UINT32
) {
794 HighBit
= HighBitSetRoundUp32 (ReservationHint
.Prefetchable32BitMmio
);
796 SetMmioPadding (--FirstResource
, TRUE
, TRUE
, (UINTN
)HighBit
);
798 } else if (ReservationHint
.Prefetchable64BitMmio
> 0 &&
799 ReservationHint
.Prefetchable64BitMmio
< MAX_UINT64
) {
800 HighBit
= HighBitSetRoundUp64 (ReservationHint
.Prefetchable64BitMmio
);
802 SetMmioPadding (--FirstResource
, TRUE
, FALSE
, (UINTN
)HighBit
);
811 SetIoPadding (--FirstResource
, (UINTN
)HighBitSetRoundUp64 (512));
822 (UINTN
)HighBitSetRoundUp32 (SIZE_2MB
)
827 // Output a copy of ReservationRequest from the lowest-address populated
828 // entry until the end of the structure (including
829 // ReservationRequest.EndDesc). If no reservations are necessary, we'll only
830 // output the End Tag.
832 *Padding
= AllocateCopyPool (
833 (UINT8
*)(&ReservationRequest
+ 1) - (UINT8
*)FirstResource
,
836 if (*Padding
== NULL
) {
837 return EFI_OUT_OF_RESOURCES
;
841 // Resource padding is required.
843 *HpcState
= EFI_HPC_STATE_INITIALIZED
| EFI_HPC_STATE_ENABLED
;
846 // The padding should be applied at PCI bus level, and considered by upstream
847 // bridges, recursively.
849 *Attributes
= EfiPaddingPciBus
;
855 Entry point for this driver.
857 @param[in] ImageHandle Image handle of this driver.
858 @param[in] SystemTable Pointer to SystemTable.
860 @retval EFI_SUCESS Driver has loaded successfully.
861 @return Error codes from lower level functions.
867 IN EFI_HANDLE ImageHandle
,
868 IN EFI_SYSTEM_TABLE
*SystemTable
873 mPciHotPlugInit
.GetRootHpcList
= GetRootHpcList
;
874 mPciHotPlugInit
.InitializeRootHpc
= InitializeRootHpc
;
875 mPciHotPlugInit
.GetResourcePadding
= GetResourcePadding
;
876 Status
= gBS
->InstallMultipleProtocolInterfaces (&ImageHandle
,
877 &gEfiPciHotPlugInitProtocolGuid
, &mPciHotPlugInit
, NULL
);