efi_driver.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 <efi_loader.h>
  10. /*
  11. * Operations supported by an EFI driver with respect to the EFI uclass
  12. *
  13. * @protocol The GUID of the protocol which is consumed by the
  14. * driver. This GUID is used by the EFI uclass in the
  15. * supports() and start() methods of the
  16. * EFI_DRIVER_BINDING_PROTOCOL.
  17. * @child_protocol Protocol supported by the child handles generated by
  18. * the EFI driver.
  19. * @bind Function called by the EFI uclass to attach the
  20. * driver to EFI driver to a handle.
  21. */
  22. struct efi_driver_ops {
  23. const efi_guid_t *protocol;
  24. const efi_guid_t *child_protocol;
  25. int (*bind)(efi_handle_t handle, void *interface);
  26. };
  27. /*
  28. * This structure adds internal fields to the driver binding protocol.
  29. */
  30. struct efi_driver_binding_extended_protocol {
  31. struct efi_driver_binding_protocol bp;
  32. const struct efi_driver_ops *ops;
  33. };
  34. #endif /* _EFI_DRIVER_H */