2 This file declares EFI PCI Hot Plug Init Protocol
3 This protocol provides the necessary functionality to initialize the Hot Plug Controllers (HPCs) and
4 the buses that they control. This protocol also provides information regarding resource padding.
6 Copyright (c) 2007, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this 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,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 Module Name: PciHotPlugInit.h
17 @par Revision Reference:
18 This protocol is defined in Framework of EFI Hot Plug Pci Initialization Protocol Spec
23 #ifndef _EFI_PCI_HOT_PLUG_INIT_H_
24 #define _EFI_PCI_HOT_PLUG_INIT_H_
29 // Global ID for the PCI Hot Plug Protocol
31 #define EFI_PCI_HOT_PLUG_INIT_PROTOCOL_GUID \
32 { 0xaa0e8bc1, 0xdabc, 0x46b0, {0xa8, 0x44, 0x37, 0xb8, 0x16, 0x9b, 0x2b, 0xea } }
35 typedef struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL EFI_PCI_HOT_PLUG_INIT_PROTOCOL
;
37 #define EFI_HPC_STATE_INITIALIZED 0x01
38 #define EFI_HPC_STATE_ENABLED 0x02
40 typedef UINT16 EFI_HPC_STATE
;
44 EFI_DEVICE_PATH_PROTOCOL
*HpcDevicePath
;
45 EFI_DEVICE_PATH_PROTOCOL
*HpbDevicePath
;
51 EfiPaddingPciRootBridge
52 } EFI_HPC_PADDING_ATTRIBUTES
;
55 Returns a list of root Hot Plug Controllers (HPCs) that require initialization
56 during the boot process.
58 @param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.
59 @param HpcCount The number of root HPCs that were returned.
60 @param HpcList The list of root HPCs. HpcCount defines the number of
61 elements in this list.
63 @retval EFI_SUCCESS HpcList was returned.
64 @retval EFI_OUT_OF_RESOURCES HpcList was not returned due to insufficient resources.
65 @retval EFI_INVALID_PARAMETER HpcCount is NULL or HpcList is NULL.
70 (EFIAPI
*EFI_GET_ROOT_HPC_LIST
)(
71 IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL
*This
,
73 OUT EFI_HPC_LOCATION
**HpcList
77 Initializes one root Hot Plug Controller (HPC). This process may causes
78 initialization of its subordinate buses.
80 @param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.
81 @param HpcDevicePath The device path to the HPC that is being initialized.
82 @param HpcPciAddress The address of the HPC function on the PCI bus.
83 @param Event The event that should be signaled when the HPC initialization
85 @param HpcState The state of the HPC hardware.
87 @retval EFI_SUCCESS If Event is NULL, the specific HPC was successfully
88 initialized. If Event is not NULL, Event will be signaled at a later time
89 when initialization is complete.
90 @retval EFI_UNSUPPORTED This instance of EFI_PCI_HOT_PLUG_INIT_PROTOCOL
91 does not support the specified HPC.
92 @retval EFI_OUT_OF_RESOURCES Initialization failed due to insufficient
94 @retval EFI_INVALID_PARAMETER HpcState is NULL.
99 (EFIAPI
*EFI_INITIALIZE_ROOT_HPC
)(
100 IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL
*This
,
101 IN EFI_DEVICE_PATH_PROTOCOL
*HpcDevicePath
,
102 IN UINT64 HpcPciAddress
,
103 IN EFI_EVENT Event
, OPTIONAL
104 OUT EFI_HPC_STATE
*HpcState
108 Returns the resource padding that is required by the PCI bus that is controlled
109 by the specified Hot Plug Controller (HPC).
111 @param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.
112 @param HpcDevicePath The device path to the HPC.
113 @param HpcPciAddress The address of the HPC function on the PCI bus.
114 @param HpcState The state of the HPC hardware.
115 @param Padding The amount of resource padding that is required by the
116 PCI bus under the control of the specified HPC.
117 @param Attributes Describes how padding is accounted for. The padding
118 is returned in the form of ACPI 2.0 resource descriptors.
120 @retval EFI_SUCCESS The resource padding was successfully returned.
121 @retval EFI_UNSUPPORTED This instance of the EFI_PCI_HOT_PLUG_INIT_PROTOCOL
122 does not support the specified HPC.
123 @retval EFI_NOT_READY This function was called before HPC initialization is complete.
124 @retval EFI_INVALID_PARAMETER HpcState or Padding or Attributes is NULL.
125 @retval EFI_OUT_OF_RESOURCES ACPI 2.0 resource descriptors for Padding
126 cannot be allocated due to insufficient resources.
131 (EFIAPI
*EFI_GET_PCI_HOT_PLUG_PADDING
)(
132 IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL
*This
,
133 IN EFI_DEVICE_PATH_PROTOCOL
*HpcDevicePath
,
134 IN UINT64 HpcPciAddress
,
135 OUT EFI_HPC_STATE
*HpcState
,
137 OUT EFI_HPC_PADDING_ATTRIBUTES
*Attributes
142 // Prototypes for the PCI Hot Plug Init Protocol
146 @par Protocol Description:
147 This protocol provides the necessary functionality to initialize the
148 Hot Plug Controllers (HPCs) and the buses that they control. This protocol
149 also provides information regarding resource padding.
151 @param GetRootHpcList
152 Returns a list of root HPCs and the buses that they control.
154 @param InitializeRootHpc
155 Initializes the specified root HPC.
157 @param GetResourcePadding
158 Returns the resource padding that is required by the HPC.
161 struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL
{
162 EFI_GET_ROOT_HPC_LIST GetRootHpcList
;
163 EFI_INITIALIZE_ROOT_HPC InitializeRootHpc
;
164 EFI_GET_PCI_HOT_PLUG_PADDING GetResourcePadding
;
167 extern EFI_GUID gEfiPciHotPlugInitProtocolGuid
;