2018-05-07 21:02:21 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2018-01-21 18:29:30 +00:00
|
|
|
/*
|
2022-10-04 16:28:24 +00:00
|
|
|
* Internal structures for the EFI driver binding protocol
|
2018-01-21 18:29:30 +00:00
|
|
|
*
|
|
|
|
* Copyright (c) 2017 Heinrich Schuchardt
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _EFI_DRIVER_H
|
|
|
|
#define _EFI_DRIVER_H 1
|
|
|
|
|
|
|
|
#include <efi_loader.h>
|
|
|
|
|
2022-10-04 17:12:59 +00:00
|
|
|
/**
|
|
|
|
* struct efi_driver_binding_extended_protocol - extended driver binding protocol
|
|
|
|
*
|
|
|
|
* This structure adds internal fields to the driver binding protocol.
|
|
|
|
*
|
|
|
|
* @bp: driver binding protocol
|
|
|
|
* @ops: operations supported by the driver
|
|
|
|
*/
|
|
|
|
struct efi_driver_binding_extended_protocol {
|
|
|
|
struct efi_driver_binding_protocol bp;
|
|
|
|
const struct efi_driver_ops *ops;
|
|
|
|
};
|
|
|
|
|
2022-10-04 16:28:24 +00:00
|
|
|
/**
|
|
|
|
* struct efi_driver_ops - operations support by an EFI driver
|
2018-02-12 11:55:28 +00:00
|
|
|
*
|
2022-10-04 16:28:24 +00:00
|
|
|
* @protocol: The GUID of the protocol which is consumed by the
|
2018-02-12 11:55:28 +00:00
|
|
|
* driver. This GUID is used by the EFI uclass in the
|
|
|
|
* supports() and start() methods of the
|
|
|
|
* EFI_DRIVER_BINDING_PROTOCOL.
|
2022-10-04 16:28:24 +00:00
|
|
|
* @child_protocol: Protocol supported by the child handles generated by
|
2018-02-12 11:55:28 +00:00
|
|
|
* the EFI driver.
|
2022-10-05 09:28:47 +00:00
|
|
|
* @init: Function called by the EFI uclass after installing the
|
|
|
|
* driver binding protocol.
|
2022-10-04 16:28:24 +00:00
|
|
|
* @bind: Function called by the EFI uclass to attach the
|
2018-02-12 11:55:28 +00:00
|
|
|
* driver to EFI driver to a handle.
|
|
|
|
*/
|
2018-01-21 18:29:30 +00:00
|
|
|
struct efi_driver_ops {
|
|
|
|
const efi_guid_t *protocol;
|
|
|
|
const efi_guid_t *child_protocol;
|
2022-10-05 09:28:47 +00:00
|
|
|
efi_status_t (*init)(struct efi_driver_binding_extended_protocol *this);
|
2022-10-04 17:12:59 +00:00
|
|
|
efi_status_t (*bind)(struct efi_driver_binding_extended_protocol *this,
|
|
|
|
efi_handle_t handle, void *interface);
|
2018-01-21 18:29:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _EFI_DRIVER_H */
|