From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFzzY-00087X-4O for qemu-devel@nongnu.org; Tue, 27 Jan 2015 01:51:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFzzT-00011W-HU for qemu-devel@nongnu.org; Tue, 27 Jan 2015 01:51:16 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:53360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFzzS-0000zS-RV for qemu-devel@nongnu.org; Tue, 27 Jan 2015 01:51:11 -0500 Message-ID: <54C73532.5020401@huawei.com> Date: Tue, 27 Jan 2015 14:50:26 +0800 From: Shannon Zhao MIME-Version: 1.0 References: <1422091280-14532-1-git-send-email-zhaoshenglong@huawei.com> <1422091280-14532-4-git-send-email-zhaoshenglong@huawei.com> <20150126112235.79e4124a@nial.brq.redhat.com> In-Reply-To: <20150126112235.79e4124a@nial.brq.redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 03/11] hw/arm/virt-acpi-build: Generate RSDP table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: peter.maydell@linaro.org, hangaohuai@huawei.com, mst@redhat.com, a.spyridakis@virtualopensystems.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, peter.huangpeng@huawei.com, hanjun.guo@linaro.org, wanghaibin.wang@huawei.com, pbonzini@redhat.com, lersek@redhat.com, christoffer.dall@linaro.org On 2015/1/26 18:22, Igor Mammedov wrote: > On Sat, 24 Jan 2015 17:21:12 +0800 > Shannon Zhao wrote: > >> > RSDP points to XSDT which in turn points to other tables. >> > >> > Signed-off-by: Shannon Zhao >> > --- >> > 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 > Thanks for pointing this out. Will fix it. Thanks, Shannon