From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mz7eM-0000Js-Qt for mharc-grub-devel@gnu.org; Sat, 17 Oct 2009 07:40:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mz7eH-0000IN-QW for grub-devel@gnu.org; Sat, 17 Oct 2009 07:40:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mz7eD-0000Gz-Pc for grub-devel@gnu.org; Sat, 17 Oct 2009 07:40:37 -0400 Received: from [199.232.76.173] (port=45367 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mz7eD-0000Gw-Lx for grub-devel@gnu.org; Sat, 17 Oct 2009 07:40:33 -0400 Received: from mail-fx0-f228.google.com ([209.85.220.228]:48638) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mz7eD-0007Xs-DU for grub-devel@gnu.org; Sat, 17 Oct 2009 07:40:33 -0400 Received: by fxm28 with SMTP id 28so3355569fxm.42 for ; Sat, 17 Oct 2009 04:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=uakHnED0N4Ffr/dgcItwXU/DjRj7Zjdtr18K4+4Etsg=; b=F3zOwsojjJPoIfoZQlSgzE59N7/p7ZfGXm8sNPVecY9YbWSaGWjbu//lGastackWja YRDiPM9L3iSOFOynY0c9KimMyoWBqL4iFjmQu76JjfHgRkjnAeksTaxo3C9VIWYY85P/ 4jq3NfFQlmP3+7jzuTM+yFireTXKZTPQ0je5o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=R07CbaLnjBAT7xUqB9UO2gBBaqyZ+tpaS0PUraO38CfImv2YghPmsa8WQp4MQKD4CA iGATs9GX/ma/QY0hbRsCaw1tEjk6Qka2NL8EYaQgKMPuhgXYUNSk6+x7Ta21eK5ZvHTX Sig3DqgccuAMC4oX9CrlGJCVpKzp8AL7iP8U0= Received: by 10.204.34.5 with SMTP id j5mr2373310bkd.5.1255779630358; Sat, 17 Oct 2009 04:40:30 -0700 (PDT) Received: from debian.bg45.phnet (50-157.203-62.cust.bluewin.ch [62.203.157.50]) by mx.google.com with ESMTPS id 15sm344366bwz.4.2009.10.17.04.40.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 17 Oct 2009 04:40:29 -0700 (PDT) Message-ID: <4AD9AD2B.8000604@gmail.com> Date: Sat, 17 Oct 2009 13:40:27 +0200 From: Vladimir 'phcoder' Serbinenko User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: The development of GRUB 2 References: <20091017111852.GA30854@thorin> In-Reply-To: <20091017111852.GA30854@thorin> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Colin Watson Subject: Re: [2637] 2009-10-16 Colin Watson X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2009 11:40:38 -0000 Robert Millan wrote: > On Fri, Oct 16, 2009 at 03:38:44PM +0000, Colin Watson wrote: > >> Revision: 2637 >> http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2637 >> Author: cjwatson >> Date: 2009-10-16 15:38:42 +0000 (Fri, 16 Oct 2009) >> Log Message: >> ----------- >> 2009-10-16 Colin Watson >> >> * configure.ac (TARGET_CFLAGS): Add -mno-mmx -mno-sse -mno-sse2 >> -mno-3dnow on x86 architectures. Some toolchains enable these >> features by default, but they rely on registers that aren't enabled >> in GRUB. Thanks to Vladimir Serbinenko for the suggestion. >> > > Would it be preferable to enable those registers instead? > > They are disabled for following simple reason: imagine an OS which isn't aware of those registers. Then if user simultaneously launches two applications which use those registers then they won't be preserved accross context switches leading to bugs. I don't know if there is a way to disable these registers again after enabling them. I don't think grub2 will benefit a lot because of mmx/sse/sse2/3dnow because we don't use floating point arithmetics. If I remember correctly sse has some commands for operations on parallel operations on integers but the only place I see where benefit could be considerable is decompression and decryption. If it's proven that decompressing/decrypting with SSE makes it considerably faster then enabling SSE would be a good thing. Anyhow for now we can just disable MMX/SSE/SSE2/3dnow and when someone implements handling those registers he can enable them again On FreeBSD kernel itself is compiled without MMX, SSE, SSE2 and 3dnow to avoid to have to handle them on kernel threads switches. -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git