From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Hp7Ij-0001Pw-LR for mharc-grub-devel@gnu.org; Fri, 18 May 2007 14:35:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hp7Ih-0001Pi-Af for grub-devel@gnu.org; Fri, 18 May 2007 14:35:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hp7Ig-0001PT-4n for grub-devel@gnu.org; Fri, 18 May 2007 14:35:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hp7Ig-0001PQ-2G for grub-devel@gnu.org; Fri, 18 May 2007 14:35:38 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hp7If-0002X7-M1 for grub-devel@gnu.org; Fri, 18 May 2007 14:35:37 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 340AF3D021C8C for ; Sat, 19 May 2007 00:40:35 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id F2D753D021C8A for ; Sat, 19 May 2007 00:40:34 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Fri, 18 May 2007 20:35:35 +0200 User-Agent: KMail/1.9.4 References: <20070518155009.GC16167@aragorn> In-Reply-To: <20070518155009.GC16167@aragorn> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705182035.35955.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.17.2 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) Subject: Re: CPUID module 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: Fri, 18 May 2007 18:35:39 -0000 On Friday 18 May 2007 17:50, Robert Millan wrote: > Here's a patch to implement cpuid.mod. Great. > This module checks for CPU features > (currently only the long_mode flag, but more could be added if needed) > using cpuid. The idea behind this is that grub.cfg scripts can use it to > decide wether a 64-bit or 32-bit Linux image should be boot (e.g. like > Debian multiarch CDs do). I haven't investigated what the syntax for that > hack would be, although I assume it's possible. Personally, I think it would be cleaner to just return true or false (like test) rather than setting an environment variable. For instance: if cpuid --long-mode; then ...; else ...; fi > Cpuid detection code has been borrowed from gcc and is FSF-copyrighted. > > I'm not sure where would the file go. I noticed that other utility modules > (e.g. hello/hello.c) add themselves in the top dir, so I suppose > i386/cpuid.c would be ok? > > Or perhaps we could have an "util" dir for modules? No. Please use commands/i386/. "util" is strictly for utilities for an host operating system. Okuji