qemu-devel
[Top][All Lists]
Advanced

[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: Shannon Zhao
Subject: Re: [Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP table
Date: Tue, 27 Jan 2015 17:36:29 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

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.
So this code shouldn't execute. When all tables are generated OK, we could 
enable CONFIG_ACPI.


Thanks,
Shannon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]