From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCVkj-00014U-F5 for qemu-devel@nongnu.org; Wed, 30 Jul 2014 11:25:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCVkd-0004Lj-9q for qemu-devel@nongnu.org; Wed, 30 Jul 2014 11:25:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCVkd-0004LO-25 for qemu-devel@nongnu.org; Wed, 30 Jul 2014 11:25:11 -0400 Date: Wed, 30 Jul 2014 17:25:25 +0200 From: "Michael S. Tsirkin" Message-ID: <20140730152525.GF26313@redhat.com> References: <1406631139-6754-1-git-send-email-stefanb@us.ibm.com> <20140730132027.GA26025@redhat.com> <53D9071C.3010702@linux.vnet.ibm.com> <20140730150728.GA26313@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v2] Add ACPI tables for TPM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: lersek@redhat.com, qemu-devel@nongnu.org, Stefan Berger On Wed, Jul 30, 2014 at 11:13:07AM -0400, Stefan Berger wrote: > "Michael S. Tsirkin" wrote on 07/30/2014 11:07:28 AM: > > > > > >If you need bios to allocate this memory, then we will > > > >need a new allocation type for this, add it to linker > > > >in bios and qemu. > > > > > > Why does the BIOS 'need' to allocate it? Why can it not just use the memory > > > that QEMU allocates? Obviously I am using the 'pointer relocation' feature > > > of the BIOS to bend the pointer in the TCPA table to this log area. > > > > You tell me - your patches make BIOS allocate it. > > No, the BIOS does not allocate it, it merely relocates the pointer. Yes it does :) You pushed the log as part of the table_data which bios allocates memory for, and reads from QEMU. > One example here: > > fadt->firmware_ctrl = cpu_to_le32(facs); > /* FACS address to be filled by Guest linker */ > bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE, > ACPI_BUILD_TABLE_FILE, > table_data, &fadt->firmware_ctrl, > sizeof fadt->firmware_ctrl); > > similar example here: > > log_area_start_address = table_data->len + sizeof(*tcpa); > > [...] > tcpa->log_area_start_address = cpu_to_le64(log_area_start_address); > > /* LASA address to be filled by Guest linker */ > bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE, > ACPI_BUILD_TABLE_FILE, > table_data, &tcpa->log_area_start_address, > sizeof(tcpa->log_area_start_address)); > > > > Stefan It relocates it to within the table that it allocated.