[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 4/7] hw/acpi: export default ACPI headers usi
From: |
Laszlo Ersek |
Subject: |
Re: [Qemu-devel] [PATCH v4 4/7] hw/acpi: export default ACPI headers using the type just introduced |
Date: |
Fri, 26 Apr 2013 11:53:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
On 04/25/13 20:49, Anthony Liguori wrote:
> Laszlo Ersek <address@hidden> writes:
>
>> This enables reuse when preparing per-table fw_cfg blobs later.
>>
>> Signed-off-by: Laszlo Ersek <address@hidden>
>> Acked-by: Michael S. Tsirkin <address@hidden>
>> ---
>> include/hw/acpi/acpi.h | 2 ++
>> hw/acpi/core.c | 39 ++++++++++++++++++++++++---------------
>> 2 files changed, 26 insertions(+), 15 deletions(-)
>>
>> diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
>> index 0e26f63..bc7e107 100644
>> --- a/include/hw/acpi/acpi.h
>> +++ b/include/hw/acpi/acpi.h
>> @@ -178,4 +178,6 @@ typedef struct acpi_table_std_header {
>> char asl_compiler_id[4]; /* ASL compiler vendor ID */
>> uint32_t asl_compiler_revision; /* ASL compiler revision number */
>> } QEMU_PACKED AcpiTableStdHdr;
>> +
>> +extern const AcpiTableStdHdr acpi_dfl_hdr;
>
> Can we do this without using a global variable? I assume this gets
> memcpy()'d or referenced as a pointer later on or something like that?
> Can we make a function that does that?
The data itself is reused between acpi_table_install() -- ie. the
-acpitable switch -- and acpi_table_fill_hdr(), to be added in 7/7. The
latter uses it in a structure assignment.
I can make a function ("acpi_table_fill_dfl_hdr()") that takes a target
buffer and a size, checks the size, and if it fits, copies the default
header into it.
Thanks
Laszlo
- [Qemu-devel] [PATCH v4 3/7] hw/acpi: extract standard table headers as a standalone structure, (continued)
- [Qemu-devel] [PATCH v4 3/7] hw/acpi: extract standard table headers as a standalone structure, Laszlo Ersek, 2013/04/18
- [Qemu-devel] [PATCH v4 1/7] refer to FWCfgState explicitly, Laszlo Ersek, 2013/04/18
- [Qemu-devel] [PATCH v4 2/7] acpi_table_install(): fix funcparam formatting in leading comment, Laszlo Ersek, 2013/04/18
- [Qemu-devel] [PATCH v4 4/7] hw/acpi: export default ACPI headers using the type just introduced, Laszlo Ersek, 2013/04/18
- [Qemu-devel] [PATCH v4 5/7] hw/acpi: export acpi_checksum(), Laszlo Ersek, 2013/04/18
- [Qemu-devel] [PATCH v4 6/7] hw/i386/pc.c: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/apic.h, Laszlo Ersek, 2013/04/18
- [Qemu-devel] [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients, Laszlo Ersek, 2013/04/18
- Re: [Qemu-devel] [PATCH v4 7/7] hw/i386: build ACPI MADT (APIC) for fw_cfg clients, Anthony Liguori, 2013/04/25