From owner-freebsd-current@FreeBSD.ORG Sat Jun 19 15:00:49 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AC4C16A4CE for ; Sat, 19 Jun 2004 15:00:49 +0000 (GMT) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 469D343D2F for ; Sat, 19 Jun 2004 15:00:48 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (8.12.11/8.12.11) with ESMTP id i5JF09Xu004164 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 19 Jun 2004 17:00:09 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.12.11/8.12.5/Submit) id i5JF07wX004162; Sat, 19 Jun 2004 17:00:07 +0200 (CEST) Date: Sat, 19 Jun 2004 17:00:07 +0200 From: Divacky Roman To: Bruce Evans Message-ID: <20040619150007.GA3387@stud.fit.vutbr.cz> References: <20040618104954.GA63085@stud.fit.vutbr.cz> <20040619171345.R3813@gamplex.bde.org> <20040619112840.GC94870@stud.fit.vutbr.cz> <20040619230557.H1028@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040619230557.H1028@gamplex.bde.org> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: current@freebsd.org Subject: Re: strange message appearing in a fresh current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2004 15:00:49 -0000 so what should I do to get rid off the bug? I dont understand what are you trying to tell me... thnx :) On Sat, Jun 19, 2004 at 11:17:54PM +1000, Bruce Evans wrote: > On Sat, 19 Jun 2004, Divacky Roman wrote: > > > > > built for i686 cpu (amd duron) with -O -pipe > > > > > > Hmm. Don't Durons have FXSR? (I686_CPU or CPU_ENABLE_SSE) and not > > > CPU_DISABLE_SSE together with a CPU that supports FXSR should give > > > a configuration that is not affected by the bug. > > > > Origin = "AuthenticAMD" Id = 0x631 Stepping = 1 > > Features=0x183f9ff > > AMD Features=0xc0440000 > > > > I just set > > cpu I686_CPU > > > > no CPU_* at all. And the bug is there... > > Ah. It needs SSE in the cpuid too, and your Duron doesn't have it. I > think Athlons got SSE starting with the XP. > > The configuration of this is confusing. From i386/initcpu.c: > > % #if !defined(CPU_ENABLE_SSE) && defined(I686_CPU) > % #define CPU_ENABLE_SSE > % #endif > % #if defined(CPU_DISABLE_SSE) > % #undef CPU_ENABLE_SSE > % #endif > > So I686_CPU gives CPU_ENABLE_SSE unless you use CPU_DISABLE_SSE. > > % /* > % * Initialize CR4 (Control register 4) to enable SSE instructions. > % */ > % void > % enable_sse(void) > % { > % #if defined(CPU_ENABLE_SSE) > % if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { > % load_cr4(rcr4() | CR4_FXSR | CR4_XMM); > % cpu_fxsr = hw_instruction_sse = 1; > % } > % #endif > % } > > Here CPUID_XMM is a confusing alias for CPUID_SSE (the identifcation message > only prints "SSE"). So to get cpu_fxsr, you need CPU_ENABLE_SSE or > I686_CPU && !CPU_DISABLE_SSE in the FreeBSD config, and SSE and FXSR in > the hardware. > > % } else if (strcmp(cpu_vendor, "AuthenticAMD") == 0) { > % #if defined(I686_CPU) && defined(CPU_ATHLON_SSE_HACK) > % /* > % * Sometimes the BIOS doesn't enable SSE instructions. > % * According to AMD document 20734, the mobile > % * Duron, the (mobile) Athlon 4 and the Athlon MP > % * support SSE. These correspond to cpu_id 0x66X > % * or 0x67X. > % */ > % if ((cpu_feature & CPUID_XMM) == 0 && > % ((cpu_id & ~0xf) == 0x660 || > % (cpu_id & ~0xf) == 0x670 || > % (cpu_id & ~0xf) == 0x680)) { > % u_int regs[4]; > % wrmsr(0xC0010015, rdmsr(0xC0010015) & ~0x08000); > % do_cpuid(1, regs); > % cpu_feature = regs[3]; > % } > % #endif > > And for broken BIOSes, CPU_ATHLON_SSE_HACK is also needed to get SSE. > > Bruce