2 * libfdt - Flat Device Tree manipulation
3 * Copyright (C) 2006 David Gibson, IBM Corporation.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation; either version 2.1 of
8 * the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 uint32_t magic; /* magic word FDT_MAGIC */
27 uint32_t totalsize; /* total size of DT block */
28 uint32_t off_dt_struct; /* offset to structure */
29 uint32_t off_dt_strings; /* offset to strings */
30 uint32_t off_mem_rsvmap; /* offset to memory reserve map */
31 uint32_t version; /* format version */
32 uint32_t last_comp_version; /* last compatible version */
34 /* version 2 fields below */
35 uint32_t boot_cpuid_phys; /* Which physical CPU id we're
37 /* version 3 fields below */
38 uint32_t size_dt_strings; /* size of the strings block */
40 /* version 17 fields below */
41 uint32_t size_dt_struct; /* size of the structure block */
44 struct fdt_reserve_entry {
49 struct fdt_node_header {
61 #endif /* !__ASSEMBLY */
63 #define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
64 #define FDT_TAGSIZE sizeof(uint32_t)
66 #define FDT_BEGIN_NODE 0x1 /* Start node: full name */
67 #define FDT_END_NODE 0x2 /* End node */
68 #define FDT_PROP 0x3 /* Property: name off,
70 #define FDT_NOP 0x4 /* nop */
73 #define FDT_V1_SIZE (7*sizeof(uint32_t))
74 #define FDT_V2_SIZE (FDT_V1_SIZE + sizeof(uint32_t))
75 #define FDT_V3_SIZE (FDT_V2_SIZE + sizeof(uint32_t))
76 #define FDT_V16_SIZE FDT_V3_SIZE
77 #define FDT_V17_SIZE (FDT_V16_SIZE + sizeof(uint32_t))