Patrick Rudolph | 7ee05ed | 2018-04-26 09:35:13 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Google Inc. |
| 3 | * Copyright 2018-present Facebook, Inc. |
| 4 | * |
| 5 | * Taken from depthcharge: src/base/device_tree.h |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; either version 2 of |
| 10 | * the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but without any warranty; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | */ |
| 17 | |
| 18 | struct fdt_header { |
| 19 | uint32_t magic; |
| 20 | uint32_t totalsize; |
| 21 | uint32_t structure_offset; |
| 22 | uint32_t strings_offset; |
| 23 | uint32_t reserve_map_offset; |
| 24 | |
| 25 | uint32_t version; |
| 26 | uint32_t last_compatible_version; |
| 27 | |
| 28 | uint32_t boot_cpuid_phys; |
| 29 | |
| 30 | uint32_t strings_size; |
| 31 | uint32_t structure_size; |
| 32 | }; |
| 33 | |
| 34 | #define FDT_HEADER_MAGIC 0xd00dfeed |