Heinrich Schuchardt | 94686f6 | 2020-12-13 10:30:24 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * EFI_DT_FIXUP_PROTOCOL |
| 4 | * |
| 5 | * Copyright (c) 2020 Heinrich Schuchardt |
| 6 | */ |
| 7 | |
| 8 | #include <efi_api.h> |
| 9 | |
| 10 | #define EFI_DT_FIXUP_PROTOCOL_GUID \ |
| 11 | EFI_GUID(0xe617d64c, 0xfe08, 0x46da, 0xf4, 0xdc, \ |
| 12 | 0xbb, 0xd5, 0x87, 0x0c, 0x73, 0x00) |
| 13 | |
| 14 | #define EFI_DT_FIXUP_PROTOCOL_REVISION 0x00010000 |
| 15 | |
| 16 | /* Add nodes and update properties */ |
| 17 | #define EFI_DT_APPLY_FIXUPS 0x00000001 |
| 18 | /* |
| 19 | * Reserve memory according to the /reserved-memory node |
| 20 | * and the memory reservation block |
| 21 | */ |
| 22 | #define EFI_DT_RESERVE_MEMORY 0x00000002 |
| 23 | /* Install the device-tree as configuration table */ |
| 24 | #define EFI_DT_INSTALL_TABLE 0x00000004 |
| 25 | |
| 26 | #define EFI_DT_ALL (EFI_DT_APPLY_FIXUPS | \ |
| 27 | EFI_DT_RESERVE_MEMORY | \ |
| 28 | EFI_DT_INSTALL_TABLE) |
| 29 | |
| 30 | struct efi_dt_fixup_protocol { |
| 31 | u64 revision; |
| 32 | efi_status_t (EFIAPI *fixup) (struct efi_dt_fixup_protocol *this, |
| 33 | void *dtb, |
| 34 | efi_uintn_t *buffer_size, |
| 35 | u32 flags); |
| 36 | }; |
| 37 | |
| 38 | extern struct efi_dt_fixup_protocol efi_dt_fixup_prot; |
| 39 | extern const efi_guid_t efi_guid_dt_fixup_protocol; |