blob: 28b4d03bfd6e8a004d0594adbfec8b07ee2be7a4 [file] [log] [blame]
David Gibsonab870ca2005-06-23 15:45:13 +10001#ifndef _FLAT_DT_H_
2#define _FLAT_DT_H_
3
4
5#define OF_DT_HEADER 0xd00dfeed /* 4: version, 4: total size */
6
7#define OF_DT_BEGIN_NODE 0x1 /* Start node: full name */
8#define OF_DT_END_NODE 0x2 /* End node */
9#define OF_DT_PROP 0x3 /* Property: name off,
10 size, content */
11#define OF_DT_END 0x9
12
13struct boot_param_header {
14 uint32_t magic; /* magic word OF_DT_HEADER */
15 uint32_t totalsize; /* total size of DT block */
16 uint32_t off_dt_struct; /* offset to structure */
17 uint32_t off_dt_strings; /* offset to strings */
18 uint32_t off_mem_rsvmap; /* offset to memory reserve map */
19 uint32_t version; /* format version */
20 uint32_t last_comp_version; /* last compatible version */
21
22 /* version 2 fields below */
23 uint32_t boot_cpuid_phys; /* Which physical CPU id we're
24 booting on */
25 /* version 3 fields below */
26 uint32_t size_dt_strings; /* size of the strings block */
27};
28
29#define BPH_V1_SIZE (7*sizeof(uint32_t))
30#define BPH_V2_SIZE (BPH_V1_SIZE + sizeof(uint32_t))
31#define BPH_V3_SIZE (BPH_V2_SIZE + sizeof(uint32_t))
32
33struct reserve_entry {
34 uint64_t address;
35 uint64_t size;
36};
37
38struct flat_dt_property {
39 uint32_t nameoff;
40 uint32_t len;
41 char data[0];
42};
43
44#endif /* _FLAT_DT_H_ */