1// Copyright 2016 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#pragma once
6
7#include <efi/types.h>
8#include <efi/protocol/device-path.h>
9
10#define EFI_DRIVER_BINDING_PROTOCOL_GUID \
11    {0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0x0c, 0x09, 0x26, 0x1e, 0x9f, 0x71}}
12extern efi_guid DriverBindingProtocol;
13
14typedef struct efi_driver_binding_protocol {
15    efi_status (*Supported) (struct efi_driver_binding_protocol* self,
16                             efi_handle controller_handle,
17                             efi_device_path_protocol* remaining_path) EFIAPI;
18
19    efi_status (*Start) (struct efi_driver_binding_protocol* self,
20                         efi_handle controller_handle,
21                         efi_device_path_protocol* remaining_path) EFIAPI;
22
23    efi_status (*Stop) (struct efi_driver_binding_protocol* self,
24                        efi_handle controller_handle,
25                        size_t num_children, efi_handle* child_handle_buf) EFIAPI;
26
27    uint32_t Version;
28    efi_handle ImageHandle;
29    efi_handle DriverBindingHandle;
30} efi_driver_binding_protocol;
31