efi_dt_fixup.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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_GUID \
  9. EFI_GUID(0xe617d64c, 0xfe08, 0x46da, 0xf4, 0xdc, \
  10. 0xbb, 0xd5, 0x87, 0x0c, 0x73, 0x00)
  11. #define EFI_DT_FIXUP_PROTOCOL_REVISION 0x00010000
  12. /* Add nodes and update properties */
  13. #define EFI_DT_APPLY_FIXUPS 0x00000001
  14. /*
  15. * Reserve memory according to the /reserved-memory node
  16. * and the memory reservation block
  17. */
  18. #define EFI_DT_RESERVE_MEMORY 0x00000002
  19. /* Install the device-tree as configuration table */
  20. #define EFI_DT_INSTALL_TABLE 0x00000004
  21. #define EFI_DT_ALL (EFI_DT_APPLY_FIXUPS | \
  22. EFI_DT_RESERVE_MEMORY | \
  23. EFI_DT_INSTALL_TABLE)
  24. struct efi_dt_fixup_protocol {
  25. u64 revision;
  26. efi_status_t (EFIAPI *fixup) (struct efi_dt_fixup_protocol *this,
  27. void *dtb,
  28. efi_uintn_t *buffer_size,
  29. u32 flags);
  30. };
  31. extern struct efi_dt_fixup_protocol efi_dt_fixup_prot;
  32. extern const efi_guid_t efi_guid_dt_fixup_protocol;