MOS Source Code
Loading...
Searching...
No Matches
fdt.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) */
2
#ifndef FDT_H
3
#define FDT_H
4
/*
5
* libfdt - Flat Device Tree manipulation
6
* Copyright (C) 2006 David Gibson, IBM Corporation.
7
* Copyright 2012 Kim Phillips, Freescale Semiconductor.
8
*/
9
10
#ifndef __ASSEMBLY__
11
12
struct
fdt_header
{
13
fdt32_t
magic
;
/* magic word FDT_MAGIC */
14
fdt32_t
totalsize
;
/* total size of DT block */
15
fdt32_t
off_dt_struct
;
/* offset to structure */
16
fdt32_t
off_dt_strings
;
/* offset to strings */
17
fdt32_t
off_mem_rsvmap
;
/* offset to memory reserve map */
18
fdt32_t
version
;
/* format version */
19
fdt32_t
last_comp_version
;
/* last compatible version */
20
21
/* version 2 fields below */
22
fdt32_t
boot_cpuid_phys
;
/* Which physical CPU id we're
23
booting on */
24
/* version 3 fields below */
25
fdt32_t
size_dt_strings
;
/* size of the strings block */
26
27
/* version 17 fields below */
28
fdt32_t
size_dt_struct
;
/* size of the structure block */
29
};
30
31
struct
fdt_reserve_entry
{
32
fdt64_t
address
;
33
fdt64_t
size
;
34
};
35
36
MOS_WARNING_PUSH
37
MOS_WARNING_DISABLE
(
"-Wpedantic"
)
38
struct
fdt_node_header
{
39
fdt32_t
tag
;
40
char
name
[];
41
};
42
43
struct
fdt_property
{
44
fdt32_t
tag
;
45
fdt32_t
len
;
46
fdt32_t
nameoff
;
47
char
data
[];
48
};
49
MOS_WARNING_POP
50
51
#endif
/* !__ASSEMBLY */
52
53
#define FDT_MAGIC 0xd00dfeed
/* 4: version, 4: total size */
54
#define FDT_TAGSIZE sizeof(fdt32_t)
55
56
#define FDT_BEGIN_NODE 0x1
/* Start node: full name */
57
#define FDT_END_NODE 0x2
/* End node */
58
#define FDT_PROP 0x3
/* Property: name off,
59
size, content */
60
#define FDT_NOP 0x4
/* nop */
61
#define FDT_END 0x9
62
63
#define FDT_V1_SIZE (7*sizeof(fdt32_t))
64
#define FDT_V2_SIZE (FDT_V1_SIZE + sizeof(fdt32_t))
65
#define FDT_V3_SIZE (FDT_V2_SIZE + sizeof(fdt32_t))
66
#define FDT_V16_SIZE FDT_V3_SIZE
67
#define FDT_V17_SIZE (FDT_V16_SIZE + sizeof(fdt32_t))
68
69
#endif
/* FDT_H */
fdt32_t
uint32_t fdt32_t
Definition
libfdt_env.h:26
fdt64_t
uint64_t fdt64_t
Definition
libfdt_env.h:27
MOS_WARNING_PUSH
#define MOS_WARNING_PUSH
Definition
mos_global.h:69
MOS_WARNING_DISABLE
#define MOS_WARNING_DISABLE(text)
Definition
mos_global.h:71
MOS_WARNING_POP
#define MOS_WARNING_POP
Definition
mos_global.h:70
name
const char * name
Definition
slab.c:31
fdt_header
Definition
fdt.h:12
fdt_header::size_dt_strings
fdt32_t size_dt_strings
Definition
fdt.h:25
fdt_header::off_mem_rsvmap
fdt32_t off_mem_rsvmap
Definition
fdt.h:17
fdt_header::off_dt_struct
fdt32_t off_dt_struct
Definition
fdt.h:15
fdt_header::size_dt_struct
fdt32_t size_dt_struct
Definition
fdt.h:28
fdt_header::off_dt_strings
fdt32_t off_dt_strings
Definition
fdt.h:16
fdt_header::magic
fdt32_t magic
Definition
fdt.h:13
fdt_header::totalsize
fdt32_t totalsize
Definition
fdt.h:14
fdt_header::version
fdt32_t version
Definition
fdt.h:18
fdt_header::boot_cpuid_phys
fdt32_t boot_cpuid_phys
Definition
fdt.h:22
fdt_header::last_comp_version
fdt32_t last_comp_version
Definition
fdt.h:19
fdt_node_header
Definition
fdt.h:38
fdt_node_header::tag
fdt32_t tag
Definition
fdt.h:39
fdt_property
Definition
fdt.h:43
fdt_property::nameoff
fdt32_t nameoff
Definition
fdt.h:46
fdt_property::tag
fdt32_t tag
Definition
fdt.h:44
fdt_property::data
char data[]
Definition
fdt.h:47
fdt_property::len
fdt32_t len
Definition
fdt.h:45
fdt_reserve_entry
Definition
fdt.h:31
fdt_reserve_entry::address
fdt64_t address
Definition
fdt.h:32
fdt_reserve_entry::size
fdt64_t size
Definition
fdt.h:33
libs
libfdt++
libfdt
fdt.h
Generated on Sun Sep 1 2024 18:22:52 for MOS Source Code by
1.12.0