mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
acpi: Move setters/getters of oem fields to X86MachineState
The code that sets/gets oem fields is duplicated in both PC and MICROVM variants. This commit moves it to X86MachineState so that all x86 variants can use it and duplication is removed. Signed-off-by: Marian Postevca <posteuca@mutex.one> Message-Id: <20210221001737.24499-2-posteuca@mutex.one> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
50337286b7
commit
d07b22863b
8 changed files with 100 additions and 169 deletions
|
@ -149,7 +149,7 @@ build_dsdt_microvm(GArray *table_data, BIOSLinker *linker,
|
|||
g_array_append_vals(table_data, dsdt->buf->data, dsdt->buf->len);
|
||||
build_header(linker, table_data,
|
||||
(void *)(table_data->data + table_data->len - dsdt->buf->len),
|
||||
"DSDT", dsdt->buf->len, 2, mms->oem_id, mms->oem_table_id);
|
||||
"DSDT", dsdt->buf->len, 2, x86ms->oem_id, x86ms->oem_table_id);
|
||||
free_aml_allocator();
|
||||
}
|
||||
|
||||
|
@ -201,24 +201,24 @@ static void acpi_build_microvm(AcpiBuildTables *tables,
|
|||
pmfadt.dsdt_tbl_offset = &dsdt;
|
||||
pmfadt.xdsdt_tbl_offset = &dsdt;
|
||||
acpi_add_table(table_offsets, tables_blob);
|
||||
build_fadt(tables_blob, tables->linker, &pmfadt, mms->oem_id,
|
||||
mms->oem_table_id);
|
||||
build_fadt(tables_blob, tables->linker, &pmfadt, x86ms->oem_id,
|
||||
x86ms->oem_table_id);
|
||||
|
||||
acpi_add_table(table_offsets, tables_blob);
|
||||
acpi_build_madt(tables_blob, tables->linker, X86_MACHINE(machine),
|
||||
ACPI_DEVICE_IF(x86ms->acpi_dev), mms->oem_id,
|
||||
mms->oem_table_id);
|
||||
ACPI_DEVICE_IF(x86ms->acpi_dev), x86ms->oem_id,
|
||||
x86ms->oem_table_id);
|
||||
|
||||
xsdt = tables_blob->len;
|
||||
build_xsdt(tables_blob, tables->linker, table_offsets, mms->oem_id,
|
||||
mms->oem_table_id);
|
||||
build_xsdt(tables_blob, tables->linker, table_offsets, x86ms->oem_id,
|
||||
x86ms->oem_table_id);
|
||||
|
||||
/* RSDP is in FSEG memory, so allocate it separately */
|
||||
{
|
||||
AcpiRsdpData rsdp_data = {
|
||||
/* ACPI 2.0: 5.2.4.3 RSDP Structure */
|
||||
.revision = 2, /* xsdt needs v2 */
|
||||
.oem_id = mms->oem_id,
|
||||
.oem_id = x86ms->oem_id,
|
||||
.xsdt_tbl_offset = &xsdt,
|
||||
.rsdt_tbl_offset = NULL,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue