2016-07-25 22:24:41 +08:00
|
|
|
/*
|
|
|
|
* QEMU PowerPC helper routines for the device tree.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016 IBM Corp.
|
|
|
|
*
|
|
|
|
* This code is licensed under the GPL version 2 or later. See the
|
|
|
|
* COPYING file in the top-level directory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PPC_FDT_H
|
|
|
|
#define PPC_FDT_H
|
|
|
|
|
2016-08-03 01:38:00 +08:00
|
|
|
#include "qemu/error-report.h"
|
2016-10-11 14:56:52 +08:00
|
|
|
#include "target/ppc/cpu-qom.h"
|
2016-08-03 01:38:01 +08:00
|
|
|
|
2016-08-03 01:38:00 +08:00
|
|
|
#define _FDT(exp) \
|
|
|
|
do { \
|
2016-07-25 22:24:41 +08:00
|
|
|
int ret = (exp); \
|
|
|
|
if (ret < 0) { \
|
2016-08-03 01:38:00 +08:00
|
|
|
error_report("error creating device tree: %s: %s", \
|
2016-07-25 22:24:41 +08:00
|
|
|
#exp, fdt_strerror(ret)); \
|
|
|
|
exit(1); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2016-08-03 01:38:01 +08:00
|
|
|
size_t ppc_create_page_sizes_prop(CPUPPCState *env, uint32_t *prop,
|
|
|
|
size_t maxsize);
|
|
|
|
|
2016-07-25 22:24:41 +08:00
|
|
|
#endif /* PPC_FDT_H */
|