From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMmkY-0006cO-W3 for qemu-devel@nongnu.org; Wed, 18 May 2011 15:49:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMmkX-0000Qf-PJ for qemu-devel@nongnu.org; Wed, 18 May 2011 15:49:42 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:52894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMmkX-0000Q2-HK for qemu-devel@nongnu.org; Wed, 18 May 2011 15:49:41 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e31.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p4IJXCj6025203 for ; Wed, 18 May 2011 13:33:12 -0600 Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id p4IJnRRI144452 for ; Wed, 18 May 2011 13:49:30 -0600 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4IJsXkk025946 for ; Wed, 18 May 2011 13:54:34 -0600 Message-ID: <4DD422C5.6090107@linux.vnet.ibm.com> Date: Wed, 18 May 2011 15:49:25 -0400 From: Stefan Berger MIME-Version: 1.0 References: <20110412133234.861465124@linux.vnet.ibm.com> <20110412133250.471022795@linux.vnet.ibm.com> In-Reply-To: <20110412133250.471022795@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V4 2/8] Provide ACPI SSDT table for TPM device + S3 resume support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: seabios@seabios.org, qemu-devel@nongnu.org On 04/12/2011 09:32 AM, Stefan Berger wrote: > + > +static u32 add_tpm_device(void **tpm_addr, void **tcpa_addr) > +{ > + struct tcpa_descriptor_rev2 *tcpa; > + > + *tpm_addr = NULL; > + *tcpa_addr = NULL; > + > + if (has_working_tpm()) { > + u32 laml = 64 * 1024; Kevin, the above line prepares 64 kb to be allocated for an ACPI table. It works fine if booting a VM from an image. However, when passing the kernel, initrd and command line parameters to Qemu directly (-kernel, -append, ..), the 64kb above seem to be too much -- I see errors in the Linux kernel's dmesg when Linux tries to access the ACPI tables. Lowering the above to 48kb (happens to) makes it work. I am wondering whether something is copying into the ACPI area or what else may be the reason - do you know? > + *tpm_addr = malloc_high(sizeof(AmlCode_TPM)); > + > + tcpa = malloc_high(sizeof(*tcpa) + laml); > + if (!tcpa || !*tpm_addr) { > + warn_noalloc(); > + return 1; > + } Regards, Stefan