efi_dt_fixup.h 917 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * EFI_DT_FIXUP_PROTOCOL
  4. *
  5. * Copyright (c) 2020 Heinrich Schuchardt
  6. */
  7. #include <efi_api.h>
  8. #define EFI_DT_FIXUP_PROTOCOL_REVISION 0x00010000
  9. /* Add nodes and update properties */
  10. #define EFI_DT_APPLY_FIXUPS 0x00000001
  11. /*
  12. * Reserve memory according to the /reserved-memory node
  13. * and the memory reservation block
  14. */
  15. #define EFI_DT_RESERVE_MEMORY 0x00000002
  16. /* Install the device-tree as configuration table */
  17. #define EFI_DT_INSTALL_TABLE 0x00000004
  18. #define EFI_DT_ALL (EFI_DT_APPLY_FIXUPS | \
  19. EFI_DT_RESERVE_MEMORY | \
  20. EFI_DT_INSTALL_TABLE)
  21. struct efi_dt_fixup_protocol {
  22. u64 revision;
  23. efi_status_t (EFIAPI *fixup) (struct efi_dt_fixup_protocol *this,
  24. void *dtb,
  25. efi_uintn_t *buffer_size,
  26. u32 flags);
  27. };
  28. extern struct efi_dt_fixup_protocol efi_dt_fixup_prot;
  29. extern const efi_guid_t efi_guid_dt_fixup_protocol;