summaryrefslogtreecommitdiffstats
path: root/src/boot/efi/devicetree.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/efi/devicetree.h')
-rw-r--r--src/boot/efi/devicetree.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/boot/efi/devicetree.h b/src/boot/efi/devicetree.h
new file mode 100644
index 0000000..33eaa22
--- /dev/null
+++ b/src/boot/efi/devicetree.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include "efi.h"
+
+struct devicetree_state {
+ EFI_PHYSICAL_ADDRESS addr;
+ size_t pages;
+ void *orig;
+};
+
+EFI_STATUS devicetree_install(struct devicetree_state *state, EFI_FILE *root_dir, char16_t *name);
+EFI_STATUS devicetree_install_from_memory(
+ struct devicetree_state *state, const void *dtb_buffer, size_t dtb_length);
+void devicetree_cleanup(struct devicetree_state *state);