]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
acpi-build: simplify rsdp management for legacy
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 17 Feb 2015 09:40:30 +0000 (10:40 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 26 Feb 2015 11:42:20 +0000 (12:42 +0100)
commitafaa2e4bc4e17360307cb86fbb1d5d350ae22961
treea31c02a0706a5e15249f8f9bed95b1019578212a
parent384fb32ea7984ed6e5fdcea0bbc3d5b01238806b
acpi-build: simplify rsdp management for legacy

For legacy machine types, rsdp is not in RAM, so we need a copy of rsdp
for fw cfg. We previously used g_array_free with false parameter,
but this seems to confuse people.
This also wastes a bit of memory as the buffer is unused for new
machine types.

Let's just use plain g_memdup, and free original memory together with
the array.

TODO: rationalize tcpalog memory management, and get rid of the mfre
parameter.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
hw/i386/acpi-build.c