History | View | Annotate | Download (7.5 kB)
device_tree: Add support for reading device tree properties
Add support for reading device tree properties (both genericand single-cell ones) to QEMU's convenience wrapper layer.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
dt: make setprop argument static
Whatever we pass in to qemu_devtree_setprop to put into the device treewill not get modified by that function, so it can easily be declared const.
Signed-off-by: Alexander Graf <agraf@suse.de>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
dt: Add global option to set phandle start offset
If anyone outside of QEMU wants to mess with a QEMU generated device tree,he needs to know which range phandles are valid in. So let's expose amachine option that an external program can use to set the start allocate...
Revert "dt: temporarily disable subtree creation failure check"
This reverts commit "dt: temporarily disable subtree creationfailure check" which was meant as a temporary solution to keepexternal and dynamic device tree construction intact.
Now that we switched to fully dynamic dt construction, it's no...
dt: add helper for phandle references
Phandles are the fancy device tree name for "pointer to another node".To create a phandle property, we most likely want to reference to thenode we're pointing to by its path. So create a helper that allowsus to do so....
dt: temporarily disable subtree creation failure check
Usually we want to know when creating a subtree fails. However, whileintroducing this patch set we have to modify the device tree and sometimes have the code to create a subtree in both the binary tree and...
dt: add helper for phandle enumeration
This patch adds a helper to search for a node's phandle by its path. Thisis especially useful when the phandle is part of an array, not just a singlecell in which case qemu_devtree_setprop_phandle would be the easy choice....
dt: add helper for empty dt creation
We want to get rid of the concept of loading an external device tree and insteadgenerate our own. However, to do this we need to also create a device treetemplate programatically.
This patch adds a helper to create an empty device tree in memory....
dt: add helper for phandle allocation
Phandle references work by having 2 pieces:
- a "phandle" 1-cell property in the device tree node - a reference to the same value in a property we want to point to the other node
To generate the 1-cell property, we need an allocation mechanism that...
dt: add helper for 64bit cell adds
Some times in the device tree, we find an array of 2 u32 cells thatreally are a single u64 value. This patch adds a helper to make thecreation of these easy.
dt: allow add_subnode to create root subnodes
Our subnode creation helper can't handle creation of root subnodes,like "/memory". Fix this by allowing the parent node to be an emptystring, indicating the root node.
Signed-off-by: Alexander Graf <agraf@suse.de>...
device_tree: Fix potential memory leak
cppcheck error report:
device_tree.c:156: error: Memory leak: dupname
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
device tree: give dt more size
We currently load a device tree blob and then just take its size x2 toaccount for modifications we do inside. While this is nice and great,it fails when we have a small device tree as blob and lots of nodes addedin machine init code....
device tree: add add_subnode command
We want to be able to create subnodes in our device tree, so export it throughthe qemu device tree abstraction framework.
Signed-off-by: Alexander Graf <agraf@suse.de>
device tree: dont fail operations
When we screw up and issue an FDT command that doesn't work, we really need toknow immediately and usually can't continue to create the machine. To make surewe don't need to add error checking in all device tree modification code users,...
device tree: add nop_node
We have a qemu internal abstraction layer on FDT. While I'm not fully convincedwe need it at all, it's missing the nop_node functionality that we now needon e500. So let's add it and think about the general future of that API later....
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Remove unused sysemu.h include directives
Remove unused sysemu.h include directives to speed up buildwith the following patches.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Allow qemu_devtree_setprop() to take arbitrary values
Currently qemu_devtree_setprop() expects the new property value to begiven as a uint32_t *. While property values consisting of u32s arecommon, in general they can have any bytestring value.
Therefore, this patch alters the function to take a void * instead,...
Fix device tree compile broken by ca20cf32ab3d945155141ef737f5d08ebb373e1d
Remove unused variable
Signed-off-by: Paul Brook <paul@codesourcery.com>
Wean device tree code off phys_ram_base.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7068 c046a42c-6fe2-441c-8c8c-71466251a162
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
Implement device tree support needed for Bamboo emulation
To implement the -kernel, -initrd, and -append options, 4xx board emulationmust load the guest kernel as if firmware had loaded it. Where u-boot would bethe firmware, we must load the flat device tree into memory and set key fields...