device_tree: allow offsets for cell properties

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
device_tree: return Error* from prop getters

Rather than exit(1) on fail return an Error*. Clients can then handle errors as
they wish.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
device_tree: allow property getters to inherit

If the inherit flag is set, and the specified property is not found, then search
the parents for it as well.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
device_tree: get_prop(): memdup returned properties

getprop currently return a pointer into the device tree itself. These pointers
will be corrupted if the device tree is written to in anyway. To make getprop()
safe, duplicate the property so that the value doesnt change over the lifetime
of the returned pointer.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
qemu-coroutine: Add simple work queue support

Add a function co_queue_enter_next() which will immediately transfer
control to the coroutine at the head of a co queue. This can be used for
implementing simple work queues where the manager of a co-queue only
needs to enter queued routines one at a time.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
device_tree: Extended interface for fdt_generic

Extended the wrapper interface (around libfdt) for device tree. Node Property
getters have been added (qemu_devtree_getprop*) as well as helpers to search/
navigate the nodes of a FDT blob.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
fdt_generic: First revision

First revision of fdt generic infrastructure. These modules allow
for fdt generic machine models, which create machines to match a device
tree specification.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
pflash_cfi01: Added fdt generic platform support

Added fdt generic platform support. Note that this does not add the fdt init
handler to the table of registered models as this needs to be handled in a
platform dependent way (due to target endianness issues). Fdt generic machine
models are required to register this device should it be supported.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
microblaze_generic_fdt: first revision

First revision of fdt generic platform for xilinx microblaze platforms.
Adds machine model "microblaze-fdt" which can be used along with the --hw-dtb
option to lauch dts driven machine models for microblaze platforms.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
serial: added fdt generic platform support

fdt generic platform support for 16550 uarts.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
arch_init.c: Improve '-soundhw help' for non-HAS_AUDIO_CHOICE archs

For architectures which don't set HAS_AUDIO_CHOICE, improve the
'-soundhw help' message so that it doesn't simply print an empty
list, implying no sound support at all.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: malc <av1474@comtv.ru>
xilinx_timer: Removed comma in device name

Fixes an error in a61e4b07a30c062260d2d01771773f14820d1eb7

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
xilinx_timer: Send dbg msgs to stderr not stdout

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
xilinx_timer: Fixed "frequency" prop name

The "frequency" qdev prop matches the "clock-frequency" property in Xilinx EDK.
Renamed "frequency" -> "clock-frequency" accordingly.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
xilinx.h: Error check when setting links

Assert that the ethernet and dma controller are sucessfully linked to their
peers.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
xilinx: fix names of ethernet and dma links.

These names were incorrect. Fixed to match to actual link names

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
xilinx_timer: Fix a compile error if debug enabled

There was a missing include of qemu-log and a variable name in a printf was out
of date.

Signed-off-by: Chris Wulff <crwulff@gmail.com>
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
tcg/i386: allow constants in load/store ops

On x86, it is possible to move a constant value to memory. Add code to
handle a constant argument to load/store ops.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg: mark set_label with TCG_OPF_BB_END flag

set_label is effectively the end of a basic block, as no optimization
can be made accross it. It was treated as such in the liveness analysis
code, but as a special case.

Mark it with TCG_OPF_BB_END flag so that this information can be used
by other parts of the TCG code, and remove the special case in the liveness
analysis code.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
revert "TCG: fix copy propagation"

Given the copy propagation breakage on 32-bit hosts has been fixed
commit e31b0a7c050711884ad570fe73df806520953618 can be reverted.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>