From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWdHZ-00032O-No for qemu-devel@nongnu.org; Mon, 09 Feb 2009 16:03:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWdHX-000323-Uz for qemu-devel@nongnu.org; Mon, 09 Feb 2009 16:03:08 -0500 Received: from [199.232.76.173] (port=60047 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWdHX-00031x-Kw for qemu-devel@nongnu.org; Mon, 09 Feb 2009 16:03:07 -0500 Received: from mx2.redhat.com ([66.187.237.31]:58637) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWdHW-00038U-UV for qemu-devel@nongnu.org; Mon, 09 Feb 2009 16:03:07 -0500 Date: Mon, 9 Feb 2009 23:00:27 +0200 From: Gleb Natapov Message-ID: <20090209210027.GA13234@redhat.com> References: <20090209143017.GG28969@redhat.com> <336692845B5F4E10A22861C218D4EEBF@FSCPC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <336692845B5F4E10A22861C218D4EEBF@FSCPC> Subject: [Qemu-devel] Re: [Bochs-developers] [PATCH] Read additional ACPI tables from a VM Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sebastian Herbszt Cc: bochs-developers@lists.sourceforge.net, qemu-devel@nongnu.org On Mon, Feb 09, 2009 at 09:41:07PM +0100, Sebastian Herbszt wrote: > Gleb Natapov wrote: > > Just a quick review. > >> diff --git a/bios/rombios32.c b/bios/rombios32.c >> index f6ce225..29fd40a 100644 >> --- a/bios/rombios32.c >> +++ b/bios/rombios32.c >> @@ -455,6 +455,8 @@ unsigned long bios_table_end_addr; >> #define QEMU_CFG_SIGNATURE 0x00 >> #define QEMU_CFG_ID 0x01 >> #define QEMU_CFG_UUID 0x02 >> +#define FW_CFG_ARCH_LOCAL 0x8000 >> +#define FW_CFG_ACPI_TABLES (FW_CFG_ARCH_LOCAL + 0) > > No more QEMU_CFG prefix? Or is this different? > It is not. I'll change it to QEMU_CFG. >> + >> +static int acpi_load_table(int i, uint32_t addr, uint16_t *len) >> +{ >> + qemu_cfg_read((uint8_t*)len, sizeof(*len)); >> + >> + if (!*len) >> + return -1; >> + >> + qemu_cfg_read((uint8_t*)addr, *len); >> + return 0; >> +} >> #endif >> >> void init_smp_msrs(void) > > Can you please diff against bochs cvs? > Will do. This patch was initially intended to go to qemu patch series so I did it against patched bios source. And unpatched bochs bios does not boot linux with qemu. IRQ routing problem or something. >> + rsdt->table_offset_entry[i+4] = cpu_to_le32(addr); >> + addr += len; >> + } >> +#endif >> + >> + /* RSDT */ >> + memset(rsdt, 0, sizeof(*rsdt)); > > This overwrites the "rsdt->table_offset_entry[i+4] = cpu_to_le32(addr);" assignment from above? No since sizeof(*rstd) is less then that. But I'll move memset up, it will be less confusing. -- Gleb.