]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Framework/Protocol/PciPlatform/PciPlatform.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Protocol / PciPlatform / PciPlatform.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13 PciPlatform.h\r
14\r
15Abstract:\r
16 This file declares PlatfromOpRom protocols.\r
17\r
18--*/\r
19\r
20#ifndef _PCI_PLATFORM_H_\r
21#define _PCI_PLATFORM_H_\r
22\r
23\r
24#include "Tiano.h"\r
25#include "TianoTypes.h"\r
26\r
27#include EFI_PROTOCOL_DEFINITION (PciHostBridgeResourceAllocation)\r
28#include EFI_PROTOCOL_DEFINITION (PciRootBridgeIo)\r
29\r
30//\r
31// Protocol for GUID.\r
32//\r
33\r
34#define EFI_PCI_PLATFORM_PROTOCOL_GUID \\r
7ccf38a3 35{ 0x7d75280, 0x27d4, 0x4d69, {0x90, 0xd0, 0x56, 0x43, 0xe2, 0x38, 0xb3, 0x41}}\r
3eb9473e 36\r
37\r
38EFI_FORWARD_DECLARATION (EFI_PCI_PLATFORM_PROTOCOL);\r
39\r
40typedef UINT32 EFI_PCI_PLATFORM_POLICY;\r
41\r
42 \r
43#define EFI_RESERVE_NONE_IO_ALIAS 0x0000\r
44#define EFI_RESERVE_ISA_IO_ALIAS 0x0001\r
45#define EFI_RESERVE_ISA_IO_NO_ALIAS 0x0002\r
46#define EFI_RESERVE_VGA_IO_ALIAS 0x0004\r
47#define EFI_RESERVE_VGA_IO_NO_ALIAS 0x0008\r
48\r
49\r
50typedef enum {\r
51 ChipsetEntry,\r
52 ChipsetExit,\r
53 MaximumChipsetPhase\r
54} EFI_PCI_CHIPSET_EXECUTION_PHASE;\r
55\r
56\r
57typedef\r
58EFI_STATUS\r
59(EFIAPI * EFI_PCI_PLATFORM_PHASE_NOTIFY) (\r
60 IN EFI_PCI_PLATFORM_PROTOCOL *This,\r
61 IN EFI_HANDLE HostBridge,\r
62 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE Phase,\r
63 IN EFI_PCI_CHIPSET_EXECUTION_PHASE ChipsetPhase \r
64)\r
65/*++\r
66\r
67 Routine Description:\r
68 The PlatformNotify() function can be used to notify the platform driver so that \r
69 it can perform platform-specific actions. No specific actions are required. \r
70 Eight notification points are defined at this time. More synchronization points \r
71 may be added as required in the future. The PCI bus driver calls the platform driver \r
72 twice for every Phase-once before the PCI Host Bridge Resource Allocation Protocol \r
73 driver is notified, and once after the PCI Host Bridge Resource Allocation Protocol \r
74 driver has been notified. \r
75 This member function may not perform any error checking on the input parameters. It \r
76 also does not return any error codes. If this member function detects any error condition, \r
77 it needs to handle those errors on its own because there is no way to surface any \r
78 errors to the caller.\r
79 \r
80 Arguments:\r
81 This - Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance. \r
82 HostBridge - The handle of the host bridge controller. \r
83 Phase - The phase of the PCI bus enumeration.\r
84 ChipsetPhase - Defines the execution phase of the PCI chipset driver. \r
85 \r
86 Returns:\r
87 EFI_SUCCESS - The function completed successfully.\r
88 \r
89--*/\r
90;\r
91\r
92\r
93typedef\r
94EFI_STATUS\r
95(EFIAPI * EFI_PCI_PLATFORM_PREPROCESS_CONTROLLER) (\r
96 IN EFI_PCI_PLATFORM_PROTOCOL *This,\r
97 IN EFI_HANDLE HostBridge,\r
98 IN EFI_HANDLE RootBridge,\r
99 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS PciAddress,\r
100 IN EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE Phase,\r
101 IN EFI_PCI_CHIPSET_EXECUTION_PHASE ChipsetPhase\r
102)\r
103/*++\r
104\r
105 Routine Description:\r
106 The PlatformPrepController() function can be used to notify the platform driver so that \r
107 it can perform platform-specific actions. No specific actions are required. \r
108 Several notification points are defined at this time. More synchronization points may be \r
109 added as required in the future. The PCI bus driver calls the platform driver twice for \r
110 every PCI controller-once before the PCI Host Bridge Resource Allocation Protocol driver \r
111 is notified, and once after the PCI Host Bridge Resource Allocation Protocol driver has \r
112 been notified. \r
113 This member function may not perform any error checking on the input parameters. It also \r
114 does not return any error codes. If this member function detects any error condition, it \r
115 needs to handle those errors on its own because there is no way to surface any errors to \r
116 the caller. \r
117 \r
118 Arguments:\r
119 This - Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance. \r
120 HostBridge - The associated PCI host bridge handle. \r
121 RootBridge - The associated PCI root bridge handle.\r
122 PciAddress - The address of the PCI device on the PCI bus. \r
123 Phase - The phase of the PCI controller enumeration. \r
124 ChipsetPhase - Defines the execution phase of the PCI chipset driver. \r
125 \r
126 Returns:\r
127 EFI_SUCCESS - The function completed successfully.\r
128 \r
129--*/\r
130;\r
131\r
132\r
133typedef\r
134EFI_STATUS\r
135(EFIAPI * EFI_PCI_PLATFORM_GET_PLATFORM_POLICY) (\r
136 IN EFI_PCI_PLATFORM_PROTOCOL *This,\r
137 OUT EFI_PCI_PLATFORM_POLICY *PciPolicy\r
138)\r
139/*++\r
140\r
141 Routine Description:\r
142 The GetPlatformPolicy() function retrieves the platform policy regarding PCI \r
143 enumeration. The PCI bus driver and the PCI Host Bridge Resource Allocation Protocol \r
144 driver can call this member function to retrieve the policy.\r
145 \r
146 Arguments:\r
147 This - Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance.\r
148 PciPolicy - The platform policy with respect to VGA and ISA aliasing. \r
149 \r
150 Returns:\r
151 EFI_SUCCESS - The function completed successfully.\r
152 EFI_INVALID_PARAMETER - PciPolicy is NULL.\r
153 \r
154--*/\r
155;\r
156\r
157\r
158typedef\r
159EFI_STATUS\r
160(EFIAPI *EFI_PCI_PLATFORM_GET_PCI_ROM) ( \r
161 IN EFI_PCI_PLATFORM_PROTOCOL *This,\r
162 IN EFI_HANDLE PciHandle,\r
163 OUT VOID **RomImage,\r
164 OUT UINTN *RomSize \r
165)\r
166/*++\r
167\r
168 Routine Description:\r
169 The GetPciRom() function gets the PCI device's option ROM from a platform-specific location. \r
170 The option ROM will be loaded into memory. This member function is used to return an image \r
171 that is packaged as a PCI 2.2 option ROM. The image may contain both legacy and EFI option \r
172 ROMs. See the EFI 1.10 Specification for details. This member function can be used to return \r
173 option ROM images for embedded controllers. Option ROMs for embedded controllers are typically \r
174 stored in platform-specific storage, and this member function can retrieve it from that storage \r
175 and return it to the PCI bus driver. The PCI bus driver will call this member function before \r
176 scanning the ROM that is attached to any controller, which allows a platform to specify a ROM \r
177 image that is different from the ROM image on a PCI card.\r
178\r
179 Arguments:\r
180 This - Pointer to the EFI_PCI_PLATFORM_PROTOCOL instance.\r
181 PciHandle - The handle of the PCI device. \r
182 RomImage - If the call succeeds, the pointer to the pointer to the option ROM image. \r
183 Otherwise, this field is undefined. The memory for RomImage is allocated \r
184 by EFI_PCI_PLATFORM_PROTOCOL.GetPciRom() using the EFI Boot Service AllocatePool(). \r
185 It is the caller's responsibility to free the memory using the EFI Boot Service \r
186 FreePool(), when the caller is done with the option ROM.\r
187 RomSize - If the call succeeds, a pointer to the size of the option ROM size. Otherwise, \r
188 this field is undefined.\r
189 \r
190 Returns:\r
191 EFI_SUCCESS - The option ROM was available for this device and loaded into memory.\r
192 EFI_NOT_FOUND - No option ROM was available for this device.\r
193 EFI_OUT_OF_RESOURCES - No memory was available to load the option ROM.\r
194 EFI_DEVICE_ERROR - An error occurred in getting the option ROM.\r
195 \r
196--*/\r
197;\r
198\r
199\r
5d46191d 200struct _EFI_PCI_PLATFORM_PROTOCOL {\r
3eb9473e 201 EFI_PCI_PLATFORM_PHASE_NOTIFY PhaseNotify;\r
202 EFI_PCI_PLATFORM_PREPROCESS_CONTROLLER PlatformPrepController;\r
203 EFI_PCI_PLATFORM_GET_PLATFORM_POLICY GetPlatformPolicy;\r
204 EFI_PCI_PLATFORM_GET_PCI_ROM GetPciRom;\r
5d46191d 205};\r
3eb9473e 206\r
207extern EFI_GUID gEfiPciPlatformProtocolGuid;\r
208\r
209\r
210\r
211#endif\r