fdt.h 1022 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * QEMU PowerPC helper routines for the device tree.
  3. *
  4. * Copyright (C) 2016 IBM Corp.
  5. *
  6. * This code is licensed under the GPL version 2 or later. See the
  7. * COPYING file in the top-level directory.
  8. */
  9. #ifndef PPC_FDT_H
  10. #define PPC_FDT_H
  11. #include "qemu/error-report.h"
  12. #include "target/ppc/cpu-qom.h"
  13. #define _FDT(exp) \
  14. do { \
  15. int _ret = (exp); \
  16. if (_ret < 0) { \
  17. error_report("error creating device tree: %s: %s", \
  18. #exp, fdt_strerror(_ret)); \
  19. exit(1); \
  20. } \
  21. } while (0)
  22. size_t ppc_create_page_sizes_prop(PowerPCCPU *cpu, uint32_t *prop,
  23. size_t maxsize);
  24. #endif /* PPC_FDT_H */