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 10 #ifndef PPC_FDT_H 11 #define PPC_FDT_H 12 13 #include "qemu/error-report.h" 14 #include "target/ppc/cpu-qom.h" 15 16 #define _FDT(exp) \ 17 do { \ 18 int ret = (exp); \ 19 if (ret < 0) { \ 20 error_report("error creating device tree: %s: %s", \ 21 #exp, fdt_strerror(ret)); \ 22 exit(1); \ 23 } \ 24 } while (0) 25 26 size_t ppc_create_page_sizes_prop(CPUPPCState *env, uint32_t *prop, 27 size_t maxsize); 28 29 #endif /* PPC_FDT_H */ 30