125 Status =
gBS->OpenProtocol (
127 &gEfiPciIoProtocolGuid,
129 This->DriverBindingHandle,
131 EFI_OPEN_PROTOCOL_BY_DRIVER
133 if (EFI_ERROR (Status)) {
141 Status = PciIo->Pci.
Read (
144 PCI_CLASSCODE_OFFSET + 2,
148 if (EFI_ERROR (Status)) {
152 Status = PciIo->Pci.
Read (
155 PCI_CLASSCODE_OFFSET + 1,
159 if (EFI_ERROR (Status)) {
166 if ((PciClass != PCI_CLASS_MASS_STORAGE) || (PciSubClass != PCI_CLASS_MASS_STORAGE_IDE)) {
167 Status = EFI_UNSUPPORTED;
173 &gEfiPciIoProtocolGuid,
174 This->DriverBindingHandle,
208 Status =
gBS->OpenProtocol (
210 &gEfiPciIoProtocolGuid,
212 This->DriverBindingHandle,
214 EFI_OPEN_PROTOCOL_BY_DRIVER
224 if (EFI_ERROR (Status)) {
231 return gBS->InstallMultipleProtocolInterfaces (
233 &gEfiIdeControllerInitProtocolGuid,
265 Status =
gBS->OpenProtocol (
267 &gEfiIdeControllerInitProtocolGuid,
268 (VOID **)&IdeControllerInit,
269 This->DriverBindingHandle,
271 EFI_OPEN_PROTOCOL_GET_PROTOCOL
273 if (EFI_ERROR (Status)) {
274 return EFI_UNSUPPORTED;
281 return EFI_UNSUPPORTED;
287 Status =
gBS->UninstallMultipleProtocolInterfaces (
289 &gEfiIdeControllerInitProtocolGuid,
293 if (EFI_ERROR (Status)) {
300 return gBS->CloseProtocol (
302 &gEfiPciIoProtocolGuid,
303 This->DriverBindingHandle,
353 OUT BOOLEAN *Enabled,
354 OUT UINT8 *MaxDevices
367 return EFI_INVALID_PARAMETER;
572 return EFI_INVALID_PARAMETER;
576 if (*SupportedModes ==
NULL) {
577 return EFI_OUT_OF_RESOURCES;
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EFI_STATUS EFIAPI InitializeIdeControllerDriver(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI IdeInitNotifyPhase(IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This, IN EFI_IDE_CONTROLLER_ENUM_PHASE Phase, IN UINT8 Channel)
EFI_STATUS EFIAPI IdeControllerSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_IDE_CONTROLLER_INIT_PROTOCOL gEfiIdeControllerInit
EFI_ATA_COLLECTIVE_MODE gEfiAtaCollectiveModeTemplate
EFI_STATUS EFIAPI IdeInitSubmitData(IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This, IN UINT8 Channel, IN UINT8 Device, IN EFI_IDENTIFY_DATA *IdentifyData)
EFI_STATUS EFIAPI IdeInitSetTiming(IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This, IN UINT8 Channel, IN UINT8 Device, IN EFI_ATA_COLLECTIVE_MODE *Modes)
EFI_STATUS EFIAPI IdeControllerStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_DRIVER_BINDING_PROTOCOL gIdeControllerDriverBinding
EFI_STATUS EFIAPI IdeControllerStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI IdeInitGetChannelInfo(IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This, IN UINT8 Channel, OUT BOOLEAN *Enabled, OUT UINT8 *MaxDevices)
EFI_STATUS EFIAPI IdeInitDisqualifyMode(IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This, IN UINT8 Channel, IN UINT8 Device, IN EFI_ATA_COLLECTIVE_MODE *BadModes)
EFI_STATUS EFIAPI IdeInitCalculateMode(IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This, IN UINT8 Channel, IN UINT8 Device, OUT EFI_ATA_COLLECTIVE_MODE **SupportedModes)
#define ICH_IDE_MAX_DEVICES
#define ICH_IDE_MAX_CHANNEL
EFI_IDE_CONTROLLER_ENUM_PHASE
#define ASSERT_EFI_ERROR(StatusParameter)
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gIdeControllerComponentName2
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gIdeControllerComponentName
EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2(IN CONST EFI_HANDLE ImageHandle, IN CONST EFI_SYSTEM_TABLE *SystemTable, IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN EFI_HANDLE DriverBindingHandle, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL)
EFI_PCI_IO_PROTOCOL_CONFIG Read