2016-07-25 16:24:41 +02: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-02 19:38:00 +02:00
|
|
|
#include "qemu/error-report.h"
|
2016-10-11 08:56:52 +02:00
|
|
|
#include "target/ppc/cpu-qom.h"
|
2016-08-02 19:38:01 +02:00
|
|
|
|
2016-08-02 19:38:00 +02:00
|
|
|
#define _FDT(exp) \
|
|
|
|
do { \
|
2023-09-18 16:58:43 +02:00
|
|
|
int _ret = (exp); \
|
|
|
|
if (_ret < 0) { \
|
|
|
|
error_report("error creating device tree: %s: %s", \
|
|
|
|
#exp, fdt_strerror(_ret)); \
|
2016-07-25 16:24:41 +02:00
|
|
|
exit(1); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2018-03-22 06:18:40 +01:00
|
|
|
size_t ppc_create_page_sizes_prop(PowerPCCPU *cpu, uint32_t *prop,
|
2016-08-02 19:38:01 +02:00
|
|
|
size_t maxsize);
|
|
|
|
|
2016-07-25 16:24:41 +02:00
|
|
|
#endif /* PPC_FDT_H */
|