efi_driver.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * EFI application loader
  4. *
  5. * Copyright (c) 2017 Heinrich Schuchardt
  6. */
  7. #ifndef _EFI_DRIVER_H
  8. #define _EFI_DRIVER_H 1
  9. #include <common.h>
  10. #include <dm.h>
  11. #include <efi_loader.h>
  12. /*
  13. * Operations supported by an EFI driver with respect to the EFI uclass
  14. *
  15. * @protocol The GUID of the protocol which is consumed by the
  16. * driver. This GUID is used by the EFI uclass in the
  17. * supports() and start() methods of the
  18. * EFI_DRIVER_BINDING_PROTOCOL.
  19. * @child_protocol Protocol supported by the child handles generated by
  20. * the EFI driver.
  21. * @bind Function called by the EFI uclass to attach the
  22. * driver to EFI driver to a handle.
  23. */
  24. struct efi_driver_ops {
  25. const efi_guid_t *protocol;
  26. const efi_guid_t *child_protocol;
  27. int (*bind)(efi_handle_t handle, void *interface);
  28. };
  29. /*
  30. * This structure adds internal fields to the driver binding protocol.
  31. */
  32. struct efi_driver_binding_extended_protocol {
  33. struct efi_driver_binding_protocol bp;
  34. const struct efi_driver_ops *ops;
  35. };
  36. #endif /* _EFI_DRIVER_H */