]> git.proxmox.com Git - mirror_qemu.git/commit
device_tree.c: Terminate the empty reservemap in create_device_tree()
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 22 Nov 2013 17:17:09 +0000 (17:17 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 10 Dec 2013 13:28:30 +0000 (13:28 +0000)
commitef6de70ea811d66ebb6b9b6046e304f588e754bb
treee81104037874f82750875b669247b6efabdedbd2
parent72b0cd35ad3e216a1db7f6a08a2ff65bb577c119
device_tree.c: Terminate the empty reservemap in create_device_tree()

Device trees created with create_device_tree() may not have any
entries in their reservemap, because the FDT API requires that the
reservemap is completed before any FDT nodes are added, and
create_device_tree() itself creates a node.  However we were not
calling fdt_finish_reservemap(), which meant that there was no
terminator in the reservemap list and whatever happened to be at the
start of the FDT data section would end up being interpreted as
reservemap entries.  Avoid this by calling fdt_finish_reservemap()
to add the terminator.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1385140638-10444-3-git-send-email-peter.maydell@linaro.org
device_tree.c