From owner-svn-src-head@freebsd.org Sat Nov 19 16:08:41 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFCDDC4A395; Sat, 19 Nov 2016 16:08:41 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EEC919CD; Sat, 19 Nov 2016 16:08:41 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAJG8e74039066; Sat, 19 Nov 2016 16:08:40 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAJG8eH6039065; Sat, 19 Nov 2016 16:08:40 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201611191608.uAJG8eH6039065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 19 Nov 2016 16:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308843 - head/sys/boot/i386/libi386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Nov 2016 16:08:41 -0000 Author: tsoome Date: Sat Nov 19 16:08:40 2016 New Revision: 308843 URL: https://svnweb.freebsd.org/changeset/base/308843 Log: loader: smbios version check is not correct The version check for sku and family values is not correct, as this data is valid for version 2.4+, that also includes version 3.0 and above. Reported by: Dan McDonald Reviewed by: allanjude Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D8578 Modified: head/sys/boot/i386/libi386/smbios.c Modified: head/sys/boot/i386/libi386/smbios.c ============================================================================== --- head/sys/boot/i386/libi386/smbios.c Sat Nov 19 16:05:55 2016 (r308842) +++ head/sys/boot/i386/libi386/smbios.c Sat Nov 19 16:08:40 2016 (r308843) @@ -238,7 +238,8 @@ smbios_parse_table(const caddr_t addr) smbios_setenv("smbios.system.serial", addr, 0x07); smbios_setuuid("smbios.system.uuid", addr + 0x08, smbios.ver); #endif - if (smbios.major >= 2 && smbios.minor >= 4) { + if (smbios.major > 2 || + (smbios.major == 2 && smbios.minor >= 4)) { smbios_setenv("smbios.system.sku", addr, 0x19); smbios_setenv("smbios.system.family", addr, 0x1a); }