From owner-svn-src-all@FreeBSD.ORG Tue Dec 23 11:55:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB82E347; Tue, 23 Dec 2014 11:55:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B6C51129F; Tue, 23 Dec 2014 11:55:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBNBtsN2084931; Tue, 23 Dec 2014 11:55:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBNBtstq084929; Tue, 23 Dec 2014 11:55:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201412231155.sBNBtstq084929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Dec 2014 11:55:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r276132 - in stable/10/sys/x86: include x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2014 11:55:54 -0000 Author: kib Date: Tue Dec 23 11:55:53 2014 New Revision: 276132 URL: https://svnweb.freebsd.org/changeset/base/276132 Log: MFC r271197: Add more bits for the XSAVE features from CPUID 0xd, sub-function 1 %eax report. Print the XSAVE features 0xd/1 in the boot banner. Modified: stable/10/sys/x86/include/specialreg.h stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/include/specialreg.h ============================================================================== --- stable/10/sys/x86/include/specialreg.h Tue Dec 23 11:00:51 2014 (r276131) +++ stable/10/sys/x86/include/specialreg.h Tue Dec 23 11:55:53 2014 (r276132) @@ -296,6 +296,9 @@ * CPUID instruction 0xd Processor Extended State Enumeration Sub-leaf 1 */ #define CPUID_EXTSTATE_XSAVEOPT 0x00000001 +#define CPUID_EXTSTATE_XSAVEC 0x00000002 +#define CPUID_EXTSTATE_XINUSE 0x00000004 +#define CPUID_EXTSTATE_XSAVES 0x00000008 /* * AMD extended function 8000_0007h edx info Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Tue Dec 23 11:00:51 2014 (r276131) +++ stable/10/sys/x86/x86/identcpu.c Tue Dec 23 11:55:53 2014 (r276132) @@ -913,6 +913,19 @@ printcpuinfo(void) ); } + if ((cpu_feature2 & CPUID2_XSAVE) != 0) { + cpuid_count(0xd, 0x1, regs); + if (regs[0] != 0) { + printf("\n XSAVE Features=0x%b", + regs[0], + "\020" + "\001XSAVEOPT" + "\002XSAVEC" + "\003XINUSE" + "\004XSAVES"); + } + } + if (via_feature_rng != 0 || via_feature_xcrypt != 0) print_via_padlock_info();