]>
Commit | Line | Data |
---|---|---|
79964ac8 | 1 | /** @file\r |
2 | This file declares EFI PCI Hot Plug Init Protocol\r | |
3 | \r | |
4 | Copyright (c) 2007, Intel Corporation\r | |
5 | All rights reserved. This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | Module Name: PciHotPlugInit.h\r | |
14 | \r | |
15 | @par Revision Reference:\r | |
16 | This protocol is defined in Framework of EFI Hot Plug Pci Initialization Protocol Spec\r | |
17 | Version 0.9\r | |
18 | \r | |
19 | **/\r | |
20 | \r | |
21 | #ifndef _EFI_PCI_HOT_PLUG_INIT_H_\r | |
22 | #define _EFI_PCI_HOT_PLUG_INIT_H_\r | |
23 | \r | |
b80fbe85 | 24 | #include <PiDxe.h>\r |
25 | \r | |
79964ac8 | 26 | //\r |
27 | // Global ID for the PCI Hot Plug Protocol\r | |
28 | //\r | |
29 | #define EFI_PCI_HOT_PLUG_INIT_PROTOCOL_GUID \\r | |
30 | { 0xaa0e8bc1, 0xdabc, 0x46b0, {0xa8, 0x44, 0x37, 0xb8, 0x16, 0x9b, 0x2b, 0xea } }\r | |
31 | \r | |
32 | \r | |
33 | typedef struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL EFI_PCI_HOT_PLUG_INIT_PROTOCOL;\r | |
34 | \r | |
35 | #define EFI_HPC_STATE_INITIALIZED 0x01\r | |
36 | #define EFI_HPC_STATE_ENABLED 0x02\r | |
37 | \r | |
38 | typedef UINT16 EFI_HPC_STATE;\r | |
39 | \r | |
40 | \r | |
41 | typedef struct{\r | |
42 | EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath;\r | |
43 | EFI_DEVICE_PATH_PROTOCOL *HpbDevicePath;\r | |
44 | } EFI_HPC_LOCATION;\r | |
45 | \r | |
46 | \r | |
47 | typedef enum{\r | |
48 | EfiPaddingPciBus,\r | |
49 | EfiPaddingPciRootBridge\r | |
50 | } EFI_HPC_PADDING_ATTRIBUTES;\r | |
51 | \r | |
52 | /**\r | |
53 | Returns a list of root Hot Plug Controllers (HPCs) that require initialization\r | |
54 | during the boot process.\r | |
55 | \r | |
56 | @param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.\r | |
57 | @param HpcCount The number of root HPCs that were returned.\r | |
58 | @param HpcList The list of root HPCs. HpcCount defines the number of\r | |
59 | elements in this list.\r | |
60 | \r | |
61 | @retval EFI_SUCCESS HpcList was returned.\r | |
62 | @retval EFI_OUT_OF_RESOURCES HpcList was not returned due to insufficient resources.\r | |
63 | @retval EFI_INVALID_PARAMETER HpcCount is NULL or HpcList is NULL.\r | |
64 | \r | |
65 | **/\r | |
66 | typedef\r | |
67 | EFI_STATUS\r | |
68 | (EFIAPI *EFI_GET_ROOT_HPC_LIST) (\r | |
69 | IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL *This,\r | |
70 | OUT UINTN *HpcCount,\r | |
71 | OUT EFI_HPC_LOCATION **HpcList\r | |
72 | );\r | |
73 | \r | |
74 | /**\r | |
75 | Initializes one root Hot Plug Controller (HPC). This process may causes\r | |
76 | initialization of its subordinate buses.\r | |
77 | \r | |
78 | @param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.\r | |
79 | @param HpcDevicePath The device path to the HPC that is being initialized.\r | |
80 | @param HpcPciAddress The address of the HPC function on the PCI bus.\r | |
81 | @param Event The event that should be signaled when the HPC initialization\r | |
82 | is complete.\r | |
83 | @param HpcState The state of the HPC hardware.\r | |
84 | \r | |
85 | @retval EFI_SUCCESS If Event is NULL, the specific HPC was successfully\r | |
86 | initialized. If Event is not NULL, Event will be signaled at a later time\r | |
87 | when initialization is complete.\r | |
88 | @retval EFI_UNSUPPORTED This instance of EFI_PCI_HOT_PLUG_INIT_PROTOCOL\r | |
89 | does not support the specified HPC.\r | |
90 | @retval EFI_OUT_OF_RESOURCES Initialization failed due to insufficient\r | |
91 | resources.\r | |
92 | @retval EFI_INVALID_PARAMETER HpcState is NULL.\r | |
93 | \r | |
94 | **/\r | |
95 | typedef\r | |
96 | EFI_STATUS\r | |
97 | (EFIAPI *EFI_INITIALIZE_ROOT_HPC) (\r | |
98 | IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL *This,\r | |
99 | IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,\r | |
100 | IN UINT64 HpcPciAddress,\r | |
101 | IN EFI_EVENT Event, OPTIONAL\r | |
102 | OUT EFI_HPC_STATE *HpcState\r | |
103 | );\r | |
104 | \r | |
105 | /**\r | |
106 | Returns the resource padding that is required by the PCI bus that is controlled\r | |
107 | by the specified Hot Plug Controller (HPC).\r | |
108 | \r | |
109 | @param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.\r | |
110 | @param HpcDevicePath The device path to the HPC.\r | |
111 | @param HpcPciAddress The address of the HPC function on the PCI bus.\r | |
112 | @param HpcState The state of the HPC hardware.\r | |
113 | @param Padding The amount of resource padding that is required by the\r | |
114 | PCI bus under the control of the specified HPC.\r | |
115 | @param Attributes Describes how padding is accounted for. The padding\r | |
116 | is returned in the form of ACPI 2.0 resource descriptors.\r | |
117 | \r | |
118 | @retval EFI_SUCCESS The resource padding was successfully returned.\r | |
119 | @retval EFI_UNSUPPORTED This instance of the EFI_PCI_HOT_PLUG_INIT_PROTOCOL\r | |
120 | does not support the specified HPC.\r | |
121 | @retval EFI_NOT_READY This function was called before HPC initialization is complete.\r | |
122 | @retval EFI_INVALID_PARAMETER HpcState or Padding or Attributes is NULL.\r | |
123 | @retval EFI_OUT_OF_RESOURCES ACPI 2.0 resource descriptors for Padding\r | |
124 | cannot be allocated due to insufficient resources.\r | |
125 | \r | |
126 | **/\r | |
127 | typedef\r | |
128 | EFI_STATUS\r | |
129 | (EFIAPI *EFI_GET_PCI_HOT_PLUG_PADDING) (\r | |
130 | IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL *This,\r | |
131 | IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,\r | |
132 | IN UINT64 HpcPciAddress,\r | |
133 | OUT EFI_HPC_STATE *HpcState,\r | |
134 | OUT VOID **Padding,\r | |
135 | OUT EFI_HPC_PADDING_ATTRIBUTES *Attributes\r | |
136 | );\r | |
137 | \r | |
138 | \r | |
139 | //\r | |
140 | // Prototypes for the PCI Hot Plug Init Protocol\r | |
141 | //\r | |
142 | \r | |
143 | /**\r | |
144 | @par Protocol Description:\r | |
145 | This protocol provides the necessary functionality to initialize the\r | |
146 | Hot Plug Controllers (HPCs) and the buses that they control. This protocol\r | |
147 | also provides information regarding resource padding.\r | |
148 | \r | |
149 | @param GetRootHpcList\r | |
150 | Returns a list of root HPCs and the buses that they control.\r | |
151 | \r | |
152 | @param InitializeRootHpc\r | |
153 | Initializes the specified root HPC.\r | |
154 | \r | |
155 | @param GetResourcePadding\r | |
156 | Returns the resource padding that is required by the HPC.\r | |
157 | \r | |
158 | **/\r | |
159 | struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL {\r | |
160 | EFI_GET_ROOT_HPC_LIST GetRootHpcList;\r | |
161 | EFI_INITIALIZE_ROOT_HPC InitializeRootHpc;\r | |
162 | EFI_GET_PCI_HOT_PLUG_PADDING GetResourcePadding;\r | |
163 | };\r | |
164 | \r | |
165 | extern EFI_GUID gEfiPciHotPlugInitProtocolGuid;\r | |
166 | \r | |
167 | #endif\r |