[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP table |
Date: |
Tue, 27 Jan 2015 10:42:29 +0100 |
On Tue, 27 Jan 2015 17:36:29 +0800
Shannon Zhao <address@hidden> wrote:
> On 2015/1/26 18:22, Igor Mammedov wrote:
> > On Sat, 24 Jan 2015 17:21:12 +0800
> > Shannon Zhao <address@hidden> wrote:
> >
> >> > RSDP points to XSDT which in turn points to other tables.
> >> >
> >> > Signed-off-by: Shannon Zhao <address@hidden>
> >> > ---
> >> > hw/arm/virt-acpi-build.c | 22 ++++++++++++++++++++++
> >> > 1 files changed, 22 insertions(+), 0 deletions(-)
> >> >
> >> > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> >> > index 4eed0a3..9c3971a 100644
> >> > --- a/hw/arm/virt-acpi-build.c
> >> > +++ b/hw/arm/virt-acpi-build.c
> >> > @@ -86,6 +86,28 @@ static inline void acpi_add_table(GArray
> >> > *table_offsets, GArray *table_data)
> >> > static GArray *
> >> > build_rsdp(GArray *rsdp_table, GArray *linker, uint64_t xsdt)
> >> > {
> >> > + AcpiRsdpDescriptor *rsdp = acpi_data_push(rsdp_table, sizeof *rsdp);
> >> > +
> >> > + bios_linker_loader_alloc(linker, ACPI_BUILD_RSDP_FILE, 16,
> >> > + true /* fseg memory */);
> >> > +
> >> > + memcpy(&rsdp->signature, "RSD PTR ", sizeof(rsdp->signature));
> >> > + memcpy(rsdp->oem_id, ACPI_VIRT_QEMU_STR_6, sizeof(rsdp->oem_id));
> >> > + rsdp->length = cpu_to_le32(sizeof(*rsdp));
> >> > + rsdp->revision = 0x02;
> >> > +
> >> > + /* Point to XSDT */
> >> > + rsdp->xsdt_physical_address = cpu_to_le64(xsdt);
> > RSDP should be created after XSDT so XSDT pointer would be correct,
> > perhaps it's wrong patch ordering
> >
> Hi,
>
> About this I think the patch order is not wrong because at the moment we
> don't enable ACPI.
Yes would work, but it still more clear when tables are created in order
in which they are used not backwards.
> So this code shouldn't execute. When all tables are generated OK, we could
> enable CONFIG_ACPI.
>
>
> Thanks,
> Shannon
>
>