xref: /haiku/src/system/boot/platform/efi/dtb.h (revision 97f11716bfaa0f385eb0e28a52bf56a5023b9e99)
1569564c0SAlexander von Gluck IV /*
2569564c0SAlexander von Gluck IV  * Copyright 2019-2020, Haiku, Inc. All rights reserved.
3569564c0SAlexander von Gluck IV  * Distributed under the terms of the MIT License.
4569564c0SAlexander von Gluck IV  */
5569564c0SAlexander von Gluck IV #ifndef DTB_H
6569564c0SAlexander von Gluck IV #define DTB_H
7569564c0SAlexander von Gluck IV 
8569564c0SAlexander von Gluck IV #ifndef _ASSEMBLER
9569564c0SAlexander von Gluck IV 
10569564c0SAlexander von Gluck IV #include "efi_platform.h"
11569564c0SAlexander von Gluck IV 
12569564c0SAlexander von Gluck IV #include <util/FixedWidthPointer.h>
13569564c0SAlexander von Gluck IV 
14569564c0SAlexander von Gluck IV 
15569564c0SAlexander von Gluck IV extern void dtb_init();
16cd9b0eedSHan Pengfei extern void dtb_set_kernel_args();
17569564c0SAlexander von Gluck IV 
189d65dbf1SDavid Karoly bool dtb_get_reg(const void* fdt, int node, size_t idx, addr_range& range);
19*fe2b6d77SDavid Karoly uint32 dtb_get_interrupt(const void* fdt, int node);
20023a3602SDavid Karoly bool dtb_has_fdt_string(const char* prop, int size, const char* pattern);
21023a3602SDavid Karoly 
22569564c0SAlexander von Gluck IV 
23569564c0SAlexander von Gluck IV #endif /* !_ASSEMBLER */
24569564c0SAlexander von Gluck IV 
25569564c0SAlexander von Gluck IV #endif /* DTB_H */
26