From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWnb1-0007Db-7L for qemu-devel@nongnu.org; Sun, 06 Apr 2014 09:58:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WWnat-0007cr-Lq for qemu-devel@nongnu.org; Sun, 06 Apr 2014 09:58:51 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:58413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWnat-0007c5-E1 for qemu-devel@nongnu.org; Sun, 06 Apr 2014 09:58:43 -0400 Message-ID: <53415D89.2010203@msgid.tls.msk.ru> Date: Sun, 06 Apr 2014 17:58:33 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1396777751-10995-1-git-send-email-mjt@msgid.tls.msk.ru> <20140406105335.GB8485@redhat.com> <534135BE.3070003@msgid.tls.msk.ru> <20140406122507.GA8995@redhat.com> In-Reply-To: <20140406122507.GA8995@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] copy OEM ACPI parameters from SLIC table to RSDT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org 06.04.2014 16:25, Michael S. Tsirkin wrote: [] >>>> Windows7 requires that OEM ID in RSDT matches those in SLIC to >>>> consider SLIC to be valid. >>> >>> Which fields need to match which, exactly? >> >> As can be seen in the patch itself, that's 2 fields - oem_id [4] > > Surely oem_id[6]? Yes you're right. >> and oem_table_id[8], in SLIC and RSDT. This is enough for win7 >> at least. All 14 bytes in this place are needed. Omitting any of those 3 (actually that's 3 not 2) fields -- oem_id[6], oem_table_id[4] and oem_table_sig[4] makes windows 7 activation void. I'm sorry I missed this question initially: >>>> + if (memcmp(sig, "RSDT", 4) == 0 && slic_table_offset) { >>>> + /* for win7: OEM info in RSDT and SLIC should be the same */ >>>> + AcpiTableHeader *s = (AcpiTableHeader *)(acpi_tables + slic_table_offset); >>>> + memcpy(h->oem_id, s->oem_id, 6 + 4 + 4); >>> >>> >>> what does 6 + 4 +4 mean? >>> I see: >>> uint8_t oem_id [6]; /* OEM identification */ \ >>> uint8_t oem_table_id [8]; /* OEM table identification */ \ >>> uint32_t oem_revision; /* OEM revision number */ \ In some specs I found oem_table_id[8] is represented by 2 4-byte fields. >>> Do table id have to match? It seems a bit wrong to have two tables >>> with the same id. Yes it should match, whole oem_table_id[8] plus oem_id[6] itself. I don't know what exactly those identifications mean, but without any of those 14 bytes windows activation does not work. oem_revision can be anything, it is not part of the equation. It is easy to verify by playing with the memcpy() above -- this is actually how I found the minimal amount of bytes which should match initially. Thanks, /mjt