From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNUNv-00076j-O4 for qemu-devel@nongnu.org; Mon, 28 Jul 2008 11:11:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNUNu-00075W-0O for qemu-devel@nongnu.org; Mon, 28 Jul 2008 11:11:39 -0400 Received: from [199.232.76.173] (port=47153 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNUNt-00075L-Rq for qemu-devel@nongnu.org; Mon, 28 Jul 2008 11:11:37 -0400 Received: from mx1.redhat.com ([66.187.233.31]:38777) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KNUNs-0003cr-W6 for qemu-devel@nongnu.org; Mon, 28 Jul 2008 11:11:37 -0400 Message-ID: <488DE142.1060100@redhat.com> Date: Mon, 28 Jul 2008 17:09:54 +0200 From: Chris Lalancette MIME-Version: 1.0 References: <488DC8B2.1070009@redhat.com> <20080728141515.GJ3196@minantech.com> <488DD98D.5010907@codemonkey.ws> <488DDA93.4070702@redhat.com> <488DDF8B.8020103@codemonkey.ws> In-Reply-To: <488DDF8B.8020103@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/3]: Add UUID command-line option Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Gleb Natapov , qemu-devel@nongnu.org Anthony Liguori wrote: >> Hm, but that's basically what this does, in combination with the Bochs BIOS. >> Once the Bochs BIOS reaches the rombios32 code, it makes the calls into the >> device model VMware backdoor to get the UUID. Assuming this all succeeds, the >> Bochs BIOS then plumbs it into the SMBIOS tables. >> > > Are there patches for the Bochs BIOS to do this? Why wouldn't it just > use CMOS to get at the UUID? Yeah, there's a uuid_probe() function that's already been merged into the Bochs BIOS, and subsequently to most of the downstream projects (including KVM). void uuid_probe(void) { #ifdef BX_QEMU uint32_t eax, ebx, ecx, edx; // check if backdoor port exists asm volatile ("outl %%eax, %%dx" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (0x564d5868), "c" (0xa), "d" (0x5658)); if (ebx == 0x564d5868) { uint32_t *uuid_ptr = (uint32_t *)bios_uuid; // get uuid asm volatile ("outl %%eax, %%dx" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (0x564d5868), "c" (0x13), "d" (0x5658)); uuid_ptr[0] = eax; uuid_ptr[1] = ebx; uuid_ptr[2] = ecx; uuid_ptr[3] = edx; } else #endif { // UUID not set memset(bios_uuid, 0, 16); } } Later on in the rombios32 code the bios_uuid[] is used to build up the SMBIOS tables. Chris Lalancette