flatdevtree.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * This program is free software; you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License as published by
  4. * the Free Software Foundation; either version 2 of the License, or
  5. * (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software
  14. * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  15. */
  16. #ifndef FLATDEVTREE_H
  17. #define FLATDEVTREE_H
  18. #include "types.h"
  19. /* Definitions used by the flattened device tree */
  20. #define OF_DT_HEADER 0xd00dfeed /* marker */
  21. #define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
  22. #define OF_DT_END_NODE 0x2 /* End node */
  23. #define OF_DT_PROP 0x3 /* Property: name off, size, content */
  24. #define OF_DT_NOP 0x4 /* nop */
  25. #define OF_DT_END 0x9
  26. #define OF_DT_VERSION 0x10
  27. struct boot_param_header {
  28. u32 magic; /* magic word OF_DT_HEADER */
  29. u32 totalsize; /* total size of DT block */
  30. u32 off_dt_struct; /* offset to structure */
  31. u32 off_dt_strings; /* offset to strings */
  32. u32 off_mem_rsvmap; /* offset to memory reserve map */
  33. u32 version; /* format version */
  34. u32 last_comp_version; /* last compatible version */
  35. /* version 2 fields below */
  36. u32 boot_cpuid_phys; /* Physical CPU id we're booting on */
  37. /* version 3 fields below */
  38. u32 dt_strings_size; /* size of the DT strings block */
  39. };
  40. #endif /* FLATDEVTREE_H */