54 Status =
gBS->OpenProtocol (
58 This->DriverBindingHandle,
60 EFI_OPEN_PROTOCOL_BY_DRIVER
62 if (!EFI_ERROR (Status)) {
66 This->DriverBindingHandle,
71 if (EFI_ERROR (Status)) {
75 Status =
gBS->OpenProtocol (
77 &gEfiDevicePathProtocolGuid,
79 This->DriverBindingHandle,
81 EFI_OPEN_PROTOCOL_BY_DRIVER
83 if (!EFI_ERROR (Status)) {
86 &gEfiDevicePathProtocolGuid,
87 This->DriverBindingHandle,
96 ISA_BUS_CHILD_PRIVATE_DATA_SIGNATURE,
131 Private = ISA_BUS_PRIVATE_DATA_FROM_THIS (This);
135 return EFI_OUT_OF_RESOURCES;
138 Status =
gBS->InstallMultipleProtocolInterfaces (
146 if (EFI_ERROR (Status)) {
151 return gBS->OpenProtocol (
157 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
191 Private = ISA_BUS_PRIVATE_DATA_FROM_THIS (This);
193 Status =
gBS->OpenProtocol (
199 EFI_OPEN_PROTOCOL_GET_PROTOCOL
201 if (EFI_ERROR (Status)) {
205 ASSERT (
Child->Signature == ISA_BUS_CHILD_PRIVATE_DATA_SIGNATURE);
207 if (
Child->InDestroying) {
212 Status =
gBS->CloseProtocol (
219 if (!EFI_ERROR (Status)) {
220 Status =
gBS->UninstallMultipleProtocolInterfaces (
228 if (EFI_ERROR (Status)) {
235 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
240 if (EFI_ERROR (Status)) {
250 ISA_BUS_PRIVATE_DATA_SIGNATURE,
294 Status =
gBS->OpenProtocol (
297 (VOID **)&mIsaBusPrivateTemplate.
IsaHc,
298 This->DriverBindingHandle,
300 EFI_OPEN_PROTOCOL_BY_DRIVER
302 if (EFI_ERROR (Status)) {
306 Status =
gBS->OpenProtocol (
308 &gEfiDevicePathProtocolGuid,
309 (VOID **)&DevicePath,
310 This->DriverBindingHandle,
312 EFI_OPEN_PROTOCOL_BY_DRIVER
314 if (EFI_ERROR (Status)) {
318 This->DriverBindingHandle,
324 Private =
AllocateCopyPool (
sizeof (mIsaBusPrivateTemplate), &mIsaBusPrivateTemplate);
325 ASSERT (Private !=
NULL);
329 Status =
gBS->InstallMultipleProtocolInterfaces (
331 &gEfiIsaHcServiceBindingProtocolGuid,
332 &Private->ServiceBinding,
368 BOOLEAN AllChildrenStopped;
370 Status =
gBS->OpenProtocol (
372 &gEfiIsaHcServiceBindingProtocolGuid,
373 (VOID **)&ServiceBinding,
374 This->DriverBindingHandle,
376 EFI_OPEN_PROTOCOL_GET_PROTOCOL
378 if (EFI_ERROR (Status)) {
382 Private = ISA_BUS_PRIVATE_DATA_FROM_THIS (ServiceBinding);
384 if (NumberOfChildren == 0) {
385 Status =
gBS->UninstallMultipleProtocolInterfaces (
387 &gEfiIsaHcServiceBindingProtocolGuid,
388 &Private->ServiceBinding,
391 if (!EFI_ERROR (Status)) {
394 &gEfiDevicePathProtocolGuid,
395 This->DriverBindingHandle,
401 This->DriverBindingHandle,
410 AllChildrenStopped =
TRUE;
411 for (Index = 0; Index < NumberOfChildren; Index++) {
412 Status = ServiceBinding->DestroyChild (ServiceBinding, ChildHandleBuffer[Index]);
413 if (EFI_ERROR (Status)) {
414 AllChildrenStopped =
FALSE;
418 return AllChildrenStopped ?
EFI_SUCCESS : EFI_DEVICE_ERROR;
454 &gIsaBusDriverBinding,
456 &gIsaBusComponentName,
457 &gIsaBusComponentName2
NODE Child(IN NODE LoopVar6, IN UINT8 LoopVar5)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EFI_STATUS EFIAPI IsaBusCreateChild(IN EFI_SERVICE_BINDING_PROTOCOL *This, IN OUT EFI_HANDLE *ChildHandle)
EFI_STATUS EFIAPI IsaBusDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI IsaBusDestroyChild(IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle)
EFI_STATUS EFIAPI IsaBusDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI InitializeIsaBus(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI IsaBusDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
#define ASSERT_EFI_ERROR(StatusParameter)
EFI_GUID gEfiIsaHcProtocolGuid
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_HANDLE DriverBindingHandle
EFI_ISA_HC_PROTOCOL * IsaHc
ISA HC protocol produced by the ISA Host Controller driver.
EFI_HANDLE IsaHcHandle
ISA HC handle created by the ISA Host Controller driver.