From MAILER-DAEMON Mon May 01 04:02:22 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FaTMM-0003Ue-1K for mharc-grub-devel@gnu.org; Mon, 01 May 2006 04:02:22 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaTMK-0003T9-Lm for grub-devel@gnu.org; Mon, 01 May 2006 04:02:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaTMI-0003Rr-GN for grub-devel@gnu.org; Mon, 01 May 2006 04:02:20 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaTMI-0003Rl-BX for grub-devel@gnu.org; Mon, 01 May 2006 04:02:18 -0400 Received: from [72.21.53.35] (helo=talk.nabble.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FaTQ3-0002hS-S5 for grub-devel@gnu.org; Mon, 01 May 2006 04:06:12 -0400 Received: from localhost ([127.0.0.1] helo=talk.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1FaTMF-0000Ls-HU for grub-devel@gnu.org; Mon, 01 May 2006 01:02:15 -0700 Message-ID: <4171957.post@talk.nabble.com> Date: Mon, 1 May 2006 00:38:49 -0700 (PDT) From: loony636 To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-Sender: loony636@gmail.com X-Nabble-From: loony636 Subject: Changing the default OS 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: Mon, 01 May 2006 08:02:21 -0000 I currently have Grub, and I need to change the default OS that it boots from. At the moment it always boots to Linux, and I need to change it so the default it Windows. I am a complete newbie at this, and wouldn't know a command line if it slapped me in the face. So patronising, easy to follow instructions would be great. -- View this message in context: http://www.nabble.com/Changing-the-default-OS-t1535545.html#a4171957 Sent from the Grub - Dev forum at Nabble.com. From MAILER-DAEMON Mon May 01 12:09:47 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Faay3-0004MX-Ew for mharc-grub-devel@gnu.org; Mon, 01 May 2006 12:09:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Faay1-0004Lc-6m for grub-devel@gnu.org; Mon, 01 May 2006 12:09:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Faaxz-0004Ki-Pg for grub-devel@gnu.org; Mon, 01 May 2006 12:09:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Faaxz-0004Ke-F2 for grub-devel@gnu.org; Mon, 01 May 2006 12:09:43 -0400 Received: from [194.109.24.28] (helo=smtp-vbr8.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fab1p-0003c0-Lv for grub-devel@gnu.org; Mon, 01 May 2006 12:13:41 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr8.xs4all.nl (8.13.6/8.13.6) with ESMTP id k41G9dkc097990 for ; Mon, 1 May 2006 18:09:40 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <4171957.post@talk.nabble.com> From: Marco Gerards Date: Mon, 01 May 2006 18:11:34 +0200 In-Reply-To: <4171957.post@talk.nabble.com> (loony636@gmail.com's message of "Mon, 1 May 2006 00:38:49 -0700 (PDT)") Message-ID: <87psixohc9.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: Changing the default OS 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: Mon, 01 May 2006 16:09:45 -0000 loony636 writes: > I currently have Grub, and I need to change the default OS that it boots > from. At the moment it always boots to Linux, and I need to change it so the > default it Windows. I am a complete newbie at this, and wouldn't know a > command line if it slapped me in the face. So patronising, easy to follow > instructions would be great. This is the wrong list to ask this question; this list is about the development of GRUB 2. -- Marco From MAILER-DAEMON Mon May 01 12:25:51 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FabDb-0005ou-2q for mharc-grub-devel@gnu.org; Mon, 01 May 2006 12:25:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FabDa-0005ok-B1 for grub-devel@gnu.org; Mon, 01 May 2006 12:25:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FabDW-0005lB-Ns for grub-devel@gnu.org; Mon, 01 May 2006 12:25:49 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FabDW-0005kn-FA for grub-devel@gnu.org; Mon, 01 May 2006 12:25:46 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FabHM-0005CB-Vs for grub-devel@gnu.org; Mon, 01 May 2006 12:29:45 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 55D6A3C8D066F for ; Mon, 1 May 2006 19:47:20 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 286253C8D066E for ; Mon, 1 May 2006 19:47:20 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Mon, 1 May 2006 18:25:45 +0200 User-Agent: KMail/1.8.2 References: <4171957.post@talk.nabble.com> <87psixohc9.fsf@xs4all.nl> In-Reply-To: <87psixohc9.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605011825.46024.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.044385, version=0.17.2 Subject: Re: Changing the default OS 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: Mon, 01 May 2006 16:25:50 -0000 On Monday 01 May 2006 18:11, Marco Gerards wrote: > loony636 writes: > > I currently have Grub, and I need to change the default OS that it boots > > from. At the moment it always boots to Linux, and I need to change it so > > the default it Windows. I am a complete newbie at this, and wouldn't know > > a command line if it slapped me in the face. So patronising, easy to > > follow instructions would be great. > > This is the wrong list to ask this question; this list is about the > development of GRUB 2. It's very interesting why people ask questions about GRUB Legacy here again and again, although I have written "Do not use this list for GRUB Legacy" in everywhere. Okuji From MAILER-DAEMON Mon May 01 12:36:38 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FabO2-0005zn-L8 for mharc-grub-devel@gnu.org; Mon, 01 May 2006 12:36:38 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FabO0-0005z3-T6 for grub-devel@gnu.org; Mon, 01 May 2006 12:36:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FabNx-0005xv-VA for grub-devel@gnu.org; Mon, 01 May 2006 12:36:36 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FabNx-0005xp-RG for grub-devel@gnu.org; Mon, 01 May 2006 12:36:33 -0400 Received: from [157.24.2.30] (helo=smtp1.cc.lut.fi) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FabRn-00060B-T6 for grub-devel@gnu.org; Mon, 01 May 2006 12:40:32 -0400 Received: from localhost (smtp1 [127.0.0.1]) by smtp1.cc.lut.fi (Postfix) with ESMTP id 576497053D for ; Mon, 1 May 2006 19:34:12 +0300 (EEST) Received: from smtp1.cc.lut.fi ([127.0.0.1]) by localhost (smtp1.cc.lut.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31960-03 for ; Mon, 1 May 2006 19:34:12 +0300 (EEST) Received: from [192.168.1.100] (lk4-a-4-1.lnet.lut.fi [157.24.102.107]) by smtp1.cc.lut.fi (Postfix) with ESMTP id 0F8757049E for ; Mon, 1 May 2006 19:34:11 +0300 (EEST) Message-ID: <44563892.6050505@nic.fi> Date: Mon, 01 May 2006 19:34:26 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: The development of GRUB 2 References: <4171957.post@talk.nabble.com> <87psixohc9.fsf@xs4all.nl> <200605011825.46024.okuji@enbug.org> In-Reply-To: <200605011825.46024.okuji@enbug.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by lut.fi Subject: Re: Changing the default OS 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: Mon, 01 May 2006 16:36:37 -0000 Yoshinori K. Okuji wrote: > On Monday 01 May 2006 18:11, Marco Gerards wrote: >> loony636 writes: >>> I currently have Grub, and I need to change the default OS that it boots >>> from. At the moment it always boots to Linux, and I need to change it so >>> the default it Windows. I am a complete newbie at this, and wouldn't know >>> a command line if it slapped me in the face. So patronising, easy to >>> follow instructions would be great. >> This is the wrong list to ask this question; this list is about the >> development of GRUB 2. > > It's very interesting why people ask questions about GRUB Legacy here again > and again, although I have written "Do not use this list for GRUB Legacy" in > everywhere. If you look at Nabble's descriptions for GRUB's they don't state what they are for too precisely. And I still think that bug-grub is still misleading for the end users. In my opinion there should be alias help-grub/grub-help or another list. http://www.nabble.com/Grub-f1675.html http://www.nabble.com/Grub---Dev-f551.html http://www.nabble.com/Grub---Bugs-f1676.html From MAILER-DAEMON Mon May 01 12:47:34 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FabYc-00031a-E8 for mharc-grub-devel@gnu.org; Mon, 01 May 2006 12:47:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FabYZ-0002y6-7o for grub-devel@gnu.org; Mon, 01 May 2006 12:47:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FabYX-0002ww-CV for grub-devel@gnu.org; Mon, 01 May 2006 12:47:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FabYW-0002wl-Uj for grub-devel@gnu.org; Mon, 01 May 2006 12:47:28 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FabcN-0006t7-CO for grub-devel@gnu.org; Mon, 01 May 2006 12:51:27 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id D87013C8D066F for ; Mon, 1 May 2006 20:09:02 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id B7BF93C8D066E for ; Mon, 1 May 2006 20:09:02 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Mon, 1 May 2006 18:47:28 +0200 User-Agent: KMail/1.8.2 References: <4171957.post@talk.nabble.com> <200605011825.46024.okuji@enbug.org> <44563892.6050505@nic.fi> In-Reply-To: <44563892.6050505@nic.fi> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200605011847.28320.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.497362, version=0.17.2 Subject: Re: Changing the default OS 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: Mon, 01 May 2006 16:47:31 -0000 On Monday 01 May 2006 18:34, Vesa J=E4=E4skel=E4inen wrote: > If you look at Nabble's descriptions for GRUB's they don't state what > they are for too precisely. And I still think that bug-grub is still > misleading for the end users. In my opinion there should be alias > help-grub/grub-help or another list. help-grub exists for a long time as an alias for bug-grub. This is not=20 advertised at all, though. Okuji From MAILER-DAEMON Mon May 01 14:37:08 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FadGe-0008LG-JM for mharc-grub-devel@gnu.org; Mon, 01 May 2006 14:37:08 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FadGc-0008K7-Qp for grub-devel@gnu.org; Mon, 01 May 2006 14:37:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FadGc-0008Jn-05 for grub-devel@gnu.org; Mon, 01 May 2006 14:37:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FadGb-0008Jk-Pv for grub-devel@gnu.org; Mon, 01 May 2006 14:37:05 -0400 Received: from [66.249.82.198] (helo=xproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FadKT-0007om-Hg for grub-devel@gnu.org; Mon, 01 May 2006 14:41:05 -0400 Received: by xproxy.gmail.com with SMTP id s13so1874259wxc for ; Mon, 01 May 2006 11:37:04 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=es9NmNkn/rWdFn638LelLLlLZj6ullOYyle5/JvHbx7S5qrSGJlxm6wjg9hBxr7fEPRncMOhaWOZUK7q1zWosOl5yhfDIzHlyUYguTd0YXcU85Y3jKF7d77mzYwM2EwHIbQJJtt0P2vP9szhJ6rImpskr4LMJdRPcpwr2nCO5xo= Received: by 10.70.23.18 with SMTP id 18mr354838wxw; Mon, 01 May 2006 11:37:04 -0700 (PDT) Received: from ?10.192.2.148? ( [192.18.45.134]) by mx.gmail.com with ESMTP id i15sm4772269wxd.2006.05.01.11.37.02; Mon, 01 May 2006 11:37:02 -0700 (PDT) Message-ID: <44565558.2030600@gmail.com> Date: Mon, 01 May 2006 11:37:12 -0700 From: Bill Ricker User-Agent: Thunderbird 1.5 (X11/20060113) MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: HELP! CVS problems 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: Mon, 01 May 2006 18:37:07 -0000 I'm trying to sync up my port of grub2 1.93 from 1.91 with the latest bits. cvs is hanging trying to update grub2/video/i386/pc/vbe.c. It hangs in the same place when just trying to check out the entire tree to an empty directory. Output of the later is below. Any help would be greatly appreciated. Note in the grub2/video/i386/pc there is a zero length file .new.vbeblit.c Thanks bill 14-$ cvs -z3 -d:pserver:anonymous@cvs.sv.gnu.org:/cvsroot/grub co grub2 cvs checkout: Updating grub2 U grub2/.cvsignore U grub2/AUTHORS U grub2/COPYING U grub2/ChangeLog U grub2/DISTLIST U grub2/INSTALL U grub2/Makefile.in U grub2/NEWS U grub2/README U grub2/THANKS U grub2/TODO U grub2/aclocal.m4 U grub2/autogen.sh U grub2/config.guess U grub2/config.h.in U grub2/config.sub U grub2/configure U grub2/configure.ac U grub2/gencmdlist.sh U grub2/gendistlist.sh U grub2/genfslist.sh U grub2/geninit.sh U grub2/geninitheader.sh U grub2/genkernsyms.sh.in U grub2/genmk.rb U grub2/genmodsrc.sh U grub2/gensymlist.sh.in U grub2/install-sh U grub2/mkinstalldirs U grub2/stamp-h.in cvs checkout: Updating grub2/boot cvs checkout: Updating grub2/boot/i386 cvs checkout: Updating grub2/boot/i386/pc U grub2/boot/i386/pc/boot.S U grub2/boot/i386/pc/diskboot.S U grub2/boot/i386/pc/pxeboot.S cvs checkout: Updating grub2/boot/powerpc cvs checkout: Updating grub2/boot/powerpc/ieee1275 cvs checkout: Updating grub2/commands U grub2/commands/boot.c U grub2/commands/cat.c U grub2/commands/cmp.c U grub2/commands/configfile.c U grub2/commands/default.c U grub2/commands/help.c U grub2/commands/ls.c U grub2/commands/search.c U grub2/commands/terminal.c U grub2/commands/test.c U grub2/commands/timeout.c U grub2/commands/videotest.c cvs checkout: Updating grub2/commands/i386 cvs checkout: Updating grub2/commands/i386/pc U grub2/commands/i386/pc/halt.c U grub2/commands/i386/pc/play.c U grub2/commands/i386/pc/reboot.c U grub2/commands/i386/pc/vbeinfo.c U grub2/commands/i386/pc/vbetest.c cvs checkout: Updating grub2/commands/ieee1275 U grub2/commands/ieee1275/halt.c U grub2/commands/ieee1275/reboot.c U grub2/commands/ieee1275/suspend.c cvs checkout: Updating grub2/conf U grub2/conf/common.mk U grub2/conf/common.rmk U grub2/conf/i386-efi.mk U grub2/conf/i386-efi.rmk U grub2/conf/i386-pc.mk U grub2/conf/i386-pc.rmk U grub2/conf/powerpc-ieee1275.mk U grub2/conf/powerpc-ieee1275.rmk U grub2/conf/sparc64-ieee1275.mk U grub2/conf/sparc64-ieee1275.rmk cvs checkout: Updating grub2/disk U grub2/disk/loopback.c cvs checkout: Updating grub2/disk/efi U grub2/disk/efi/efidisk.c cvs checkout: Updating grub2/disk/i386 cvs checkout: Updating grub2/disk/i386/pc U grub2/disk/i386/pc/biosdisk.c cvs checkout: Updating grub2/disk/ieee1275 U grub2/disk/ieee1275/ofdisk.c cvs checkout: Updating grub2/disk/powerpc cvs checkout: Updating grub2/disk/powerpc/ieee1275 cvs checkout: Updating grub2/font U grub2/font/manager.c cvs checkout: Updating grub2/fs U grub2/fs/affs.c U grub2/fs/ext2.c U grub2/fs/fat.c U grub2/fs/fshelp.c U grub2/fs/hfs.c U grub2/fs/hfsplus.c U grub2/fs/iso9660.c U grub2/fs/jfs.c U grub2/fs/minix.c U grub2/fs/sfs.c U grub2/fs/ufs.c U grub2/fs/xfs.c cvs checkout: Updating grub2/hello U grub2/hello/hello.c cvs checkout: Updating grub2/include cvs checkout: Updating grub2/include/grub U grub2/include/grub/acorn_filecore.h U grub2/include/grub/arg.h U grub2/include/grub/boot.h U grub2/include/grub/cache.h U grub2/include/grub/device.h U grub2/include/grub/disk.h U grub2/include/grub/dl.h U grub2/include/grub/elf.h U grub2/include/grub/env.h U grub2/include/grub/err.h U grub2/include/grub/file.h U grub2/include/grub/font.h U grub2/include/grub/fs.h U grub2/include/grub/fshelp.h U grub2/include/grub/gzio.h U grub2/include/grub/hfs.h U grub2/include/grub/kernel.h U grub2/include/grub/loader.h U grub2/include/grub/misc.h U grub2/include/grub/mm.h U grub2/include/grub/net.h U grub2/include/grub/normal.h U grub2/include/grub/parser.h U grub2/include/grub/partition.h U grub2/include/grub/pc_partition.h U grub2/include/grub/rescue.h U grub2/include/grub/script.h U grub2/include/grub/setjmp.h U grub2/include/grub/symbol.h U grub2/include/grub/term.h U grub2/include/grub/terminfo.h U grub2/include/grub/tparm.h U grub2/include/grub/types.h U grub2/include/grub/video.h cvs checkout: Updating grub2/include/grub/efi U grub2/include/grub/efi/api.h U grub2/include/grub/efi/chainloader.h U grub2/include/grub/efi/console.h U grub2/include/grub/efi/console_control.h U grub2/include/grub/efi/disk.h U grub2/include/grub/efi/efi.h U grub2/include/grub/efi/pe32.h U grub2/include/grub/efi/time.h cvs checkout: Updating grub2/include/grub/i386 U grub2/include/grub/i386/setjmp.h U grub2/include/grub/i386/types.h cvs checkout: Updating grub2/include/grub/i386/efi U grub2/include/grub/i386/efi/kernel.h U grub2/include/grub/i386/efi/time.h cvs checkout: Updating grub2/include/grub/i386/pc U grub2/include/grub/i386/pc/biosdisk.h U grub2/include/grub/i386/pc/boot.h U grub2/include/grub/i386/pc/chainloader.h U grub2/include/grub/i386/pc/console.h U grub2/include/grub/i386/pc/init.h U grub2/include/grub/i386/pc/kernel.h U grub2/include/grub/i386/pc/linux.h U grub2/include/grub/i386/pc/loader.h U grub2/include/grub/i386/pc/memory.h U grub2/include/grub/i386/pc/multiboot.h U grub2/include/grub/i386/pc/serial.h U grub2/include/grub/i386/pc/time.h U grub2/include/grub/i386/pc/vbe.h U grub2/include/grub/i386/pc/vbeblit.h U grub2/include/grub/i386/pc/vbefill.h U grub2/include/grub/i386/pc/vga.h cvs checkout: Updating grub2/include/grub/i386/pc/util U grub2/include/grub/i386/pc/util/biosdisk.h cvs checkout: Updating grub2/include/grub/ieee1275 U grub2/include/grub/ieee1275/ieee1275.h U grub2/include/grub/ieee1275/ofdisk.h cvs checkout: Updating grub2/include/grub/powerpc U grub2/include/grub/powerpc/libgcc.h U grub2/include/grub/powerpc/setjmp.h U grub2/include/grub/powerpc/types.h cvs checkout: Updating grub2/include/grub/powerpc/ieee1275 U grub2/include/grub/powerpc/ieee1275/biosdisk.h U grub2/include/grub/powerpc/ieee1275/console.h U grub2/include/grub/powerpc/ieee1275/ieee1275.h U grub2/include/grub/powerpc/ieee1275/kernel.h U grub2/include/grub/powerpc/ieee1275/loader.h U grub2/include/grub/powerpc/ieee1275/multiboot.h U grub2/include/grub/powerpc/ieee1275/time.h cvs checkout: Updating grub2/include/grub/powerpc/ieee1275/util U grub2/include/grub/powerpc/ieee1275/util/biosdisk.h cvs checkout: Updating grub2/include/grub/sparc64 U grub2/include/grub/sparc64/libgcc.h U grub2/include/grub/sparc64/setjmp.h U grub2/include/grub/sparc64/types.h cvs checkout: Updating grub2/include/grub/sparc64/ieee1275 U grub2/include/grub/sparc64/ieee1275/console.h U grub2/include/grub/sparc64/ieee1275/ieee1275.h U grub2/include/grub/sparc64/ieee1275/kernel.h U grub2/include/grub/sparc64/ieee1275/time.h cvs checkout: Updating grub2/include/grub/util U grub2/include/grub/util/getroot.h U grub2/include/grub/util/misc.h U grub2/include/grub/util/resolve.h cvs checkout: Updating grub2/io U grub2/io/gzio.c cvs checkout: Updating grub2/kern U grub2/kern/device.c U grub2/kern/disk.c U grub2/kern/dl.c U grub2/kern/env.c U grub2/kern/err.c U grub2/kern/file.c U grub2/kern/fs.c U grub2/kern/loader.c U grub2/kern/main.c U grub2/kern/misc.c U grub2/kern/mm.c U grub2/kern/parser.c U grub2/kern/partition.c U grub2/kern/rescue.c U grub2/kern/term.c cvs checkout: Updating grub2/kern/efi U grub2/kern/efi/efi.c U grub2/kern/efi/init.c U grub2/kern/efi/mm.c cvs checkout: Updating grub2/kern/i386 U grub2/kern/i386/dl.c cvs checkout: Updating grub2/kern/i386/efi U grub2/kern/i386/efi/init.c U grub2/kern/i386/efi/startup.S cvs checkout: Updating grub2/kern/i386/pc U grub2/kern/i386/pc/init.c U grub2/kern/i386/pc/lzo1x.S U grub2/kern/i386/pc/startup.S cvs checkout: Updating grub2/kern/ieee1275 U grub2/kern/ieee1275/ieee1275.c cvs checkout: Updating grub2/kern/powerpc U grub2/kern/powerpc/cache.S U grub2/kern/powerpc/dl.c cvs checkout: Updating grub2/kern/powerpc/ieee1275 U grub2/kern/powerpc/ieee1275/cmain.c U grub2/kern/powerpc/ieee1275/crt0.S U grub2/kern/powerpc/ieee1275/init.c U grub2/kern/powerpc/ieee1275/openfw.c cvs checkout: Updating grub2/kern/sparc64 U grub2/kern/sparc64/cache.S U grub2/kern/sparc64/dl.c cvs checkout: Updating grub2/kern/sparc64/ieee1275 U grub2/kern/sparc64/ieee1275/init.c U grub2/kern/sparc64/ieee1275/openfw.c cvs checkout: Updating grub2/loader cvs checkout: Updating grub2/loader/efi U grub2/loader/efi/chainloader.c U grub2/loader/efi/chainloader_normal.c cvs checkout: Updating grub2/loader/i386 cvs checkout: Updating grub2/loader/i386/pc U grub2/loader/i386/pc/chainloader.c U grub2/loader/i386/pc/chainloader_normal.c U grub2/loader/i386/pc/linux.c U grub2/loader/i386/pc/linux_normal.c U grub2/loader/i386/pc/multiboot.c U grub2/loader/i386/pc/multiboot_normal.c cvs checkout: Updating grub2/loader/powerpc cvs checkout: Updating grub2/loader/powerpc/ieee1275 U grub2/loader/powerpc/ieee1275/linux.c U grub2/loader/powerpc/ieee1275/linux_normal.c cvs checkout: Updating grub2/normal U grub2/normal/arg.c U grub2/normal/cmdline.c U grub2/normal/command.c U grub2/normal/completion.c U grub2/normal/context.c U grub2/normal/execute.c U grub2/normal/function.c U grub2/normal/lexer.c U grub2/normal/main.c U grub2/normal/menu.c U grub2/normal/menu_entry.c U grub2/normal/misc.c U grub2/normal/parser.y U grub2/normal/script.c cvs checkout: Updating grub2/normal/i386 U grub2/normal/i386/setjmp.S cvs checkout: Updating grub2/normal/powerpc U grub2/normal/powerpc/setjmp.S cvs checkout: Updating grub2/normal/sparc64 U grub2/normal/sparc64/setjmp.S cvs checkout: Updating grub2/partmap U grub2/partmap/acorn.c U grub2/partmap/amiga.c U grub2/partmap/apple.c U grub2/partmap/gpt.c U grub2/partmap/pc.c U grub2/partmap/sun.c cvs checkout: Updating grub2/term U grub2/term/gfxterm.c U grub2/term/terminfo.c U grub2/term/tparm.c cvs checkout: Updating grub2/term/efi U grub2/term/efi/console.c cvs checkout: Updating grub2/term/i386 cvs checkout: Updating grub2/term/i386/pc U grub2/term/i386/pc/console.c U grub2/term/i386/pc/serial.c U grub2/term/i386/pc/vesafb.c U grub2/term/i386/pc/vga.c cvs checkout: Updating grub2/term/ieee1275 U grub2/term/ieee1275/ofconsole.c cvs checkout: Updating grub2/term/powerpc cvs checkout: Updating grub2/term/powerpc/ieee1275 cvs checkout: Updating grub2/util U grub2/util/console.c U grub2/util/genmoddep.c U grub2/util/grub-emu.c U grub2/util/misc.c U grub2/util/resolve.c U grub2/util/unifont2pff.rb cvs checkout: Updating grub2/util/i386 cvs checkout: Updating grub2/util/i386/efi U grub2/util/i386/efi/grub-mkimage.c cvs checkout: Updating grub2/util/i386/pc U grub2/util/i386/pc/biosdisk.c U grub2/util/i386/pc/getroot.c U grub2/util/i386/pc/grub-install.in U grub2/util/i386/pc/grub-mkdevicemap.c U grub2/util/i386/pc/grub-mkimage.c U grub2/util/i386/pc/grub-probefs.c U grub2/util/i386/pc/grub-setup.c U grub2/util/i386/pc/misc.c cvs checkout: Updating grub2/util/powerpc cvs checkout: Updating grub2/util/powerpc/ieee1275 U grub2/util/powerpc/ieee1275/grub-install.in U grub2/util/powerpc/ieee1275/grub-mkimage.c U grub2/util/powerpc/ieee1275/misc.c cvs checkout: Updating grub2/video U grub2/video/video.c cvs checkout: Updating grub2/video/i386 cvs checkout: Updating grub2/video/i386/pc U grub2/video/i386/pc/vbe.c From MAILER-DAEMON Mon May 01 14:50:52 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FadTv-0005M0-Su for mharc-grub-devel@gnu.org; Mon, 01 May 2006 14:50:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FadTu-0005Kx-I1 for grub-devel@gnu.org; Mon, 01 May 2006 14:50:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FadTr-0005Hn-1V for grub-devel@gnu.org; Mon, 01 May 2006 14:50:50 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FadTq-0005Hf-SJ for grub-devel@gnu.org; Mon, 01 May 2006 14:50:46 -0400 Received: from [194.109.24.31] (helo=smtp-vbr11.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FadXi-0000TS-Jo for grub-devel@gnu.org; Mon, 01 May 2006 14:54:46 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr11.xs4all.nl (8.13.6/8.13.6) with ESMTP id k41Ioj6s030376 for ; Mon, 1 May 2006 20:50:45 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <44565558.2030600@gmail.com> From: Marco Gerards Date: Mon, 01 May 2006 20:52:39 +0200 In-Reply-To: <44565558.2030600@gmail.com> (Bill Ricker's message of "Mon, 01 May 2006 11:37:12 -0700") Message-ID: <87aca1mvbc.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: HELP! CVS problems 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: Mon, 01 May 2006 18:50:50 -0000 Bill Ricker writes: > I'm trying to sync up my port of grub2 1.93 from 1.91 with the latest > bits. cvs is hanging trying to update grub2/video/i386/pc/vbe.c. It > hangs in the same place when just trying to check out the entire tree > to an empty directory. > Output of the later is below. Any help would be greatly > appreciated. Note in the grub2/video/i386/pc there is a zero length > file .new.vbeblit.c Weird. I just checked out from CVS and it went ok. It even built. ;-) The file you described can not be found here: http://cvs.savannah.gnu.org/viewcvs/grub2/video/i386/pc/?root=grub I expect some file damaged locally at your place. Perhaps you can make a new checkout? -- Marco From MAILER-DAEMON Mon May 01 14:55:32 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FadYS-0003ZN-51 for mharc-grub-devel@gnu.org; Mon, 01 May 2006 14:55:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FadYQ-0003ZI-AA for grub-devel@gnu.org; Mon, 01 May 2006 14:55:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FadYO-0003Z5-JC for grub-devel@gnu.org; Mon, 01 May 2006 14:55:29 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FadYO-0003Z2-HR for grub-devel@gnu.org; Mon, 01 May 2006 14:55:28 -0400 Received: from [194.109.24.26] (helo=smtp-vbr6.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FadcG-0001Br-6A for grub-devel@gnu.org; Mon, 01 May 2006 14:59:28 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr6.xs4all.nl (8.13.6/8.13.6) with ESMTP id k41ItQ7p021320 for ; Mon, 1 May 2006 20:55:27 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <200604251605.k3PG58Ax008963@dell01.dinaserver.com> <4451FFBA.2050203@raulete.net> From: Marco Gerards Date: Mon, 01 May 2006 20:57:21 +0200 In-Reply-To: <4451FFBA.2050203@raulete.net> (adrian15@raulete.net's message of "Fri, 28 Apr 2006 13:42:50 +0200") Message-ID: <8764kpmv3i.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: SOC - SGD based on grub2 - Menu and scripting status 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: Mon, 01 May 2006 18:55:31 -0000 adrian15 writes: >>>5) I need to define "something" (In my grub legacy fork is a menu.lst) >>>that lets me choose the harddisk-partition which I want to work >>>on. Can I make it easily? >> You mean as a variable? That's possible. > > I will explain this point in more detail if you don't mind. Here goes > copy-pasted > 1) the first the "lst" for hard disks and then > 2)the second one the "sh" that makes the "lst" for partitions. > 3) An "lst" for making easier to call the selection of partitions from > inside a function or whatever. > 4) An example of how this menues/selectors are called. (lst) > > I'm not asking you to develop a command for giving me this lst on the > fly adapted to the user pc. You know what I was telling before: If the > users hard disk has only three partitions make an array with only > three values which are the partitions. > > I'm asking you to think about new features that scripting should have > so that the developing of this command is far easy. I was thinking about an iterator function. Perhaps that might be the easiest to use... Please watch CVS closely. I am actively working on scripting, as much as time permits. -- Marco From MAILER-DAEMON Mon May 01 15:18:07 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FaduJ-0008CI-AU for mharc-grub-devel@gnu.org; Mon, 01 May 2006 15:18:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaduH-00089z-Ke for grub-devel@gnu.org; Mon, 01 May 2006 15:18:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaduF-00089n-VB for grub-devel@gnu.org; Mon, 01 May 2006 15:18:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaduF-00089k-Lk for grub-devel@gnu.org; Mon, 01 May 2006 15:18:03 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fady6-0002kf-SS for grub-devel@gnu.org; Mon, 01 May 2006 15:22:04 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id AEBAF3C8D0677 for ; Mon, 1 May 2006 22:39:39 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 9F7F93C8D0676 for ; Mon, 1 May 2006 22:39:38 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: grub-devel@gnu.org Date: Mon, 1 May 2006 21:18:01 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_p7lVEpx5pXsNVRb" Message-Id: <200605012118.01283.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.500003, version=0.17.2 Subject: what must be possible with the future fancy interface 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: Mon, 01 May 2006 19:18:06 -0000 --Boundary-00=_p7lVEpx5pXsNVRb Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline I give a simple example of a possible menu interface here. This example is extremely simple among my ideas, but still requires a lot of new features (so the code as well). I name it "twm-like", because this resembles the twm window manager in good old days. Although this looks complicated, the required features are not that many. - GRUB needs to put a background image. - GRUB needs to put text at arbitrary points. - GRUB needs to manipulate image data (in order to draw a scroll bar and a timeout bar). - GRUB needs to have timer events (in order to animate some pictures and text) Note that the important thing here is that they must be entirely customizable. As drawing this kind of picture takes a lot of time, I hesitate to make more pictures. But I have much more complicated examples in mind; but what's necessary is mostly some manipulation features of image data. Okuji --Boundary-00=_p7lVEpx5pXsNVRb Content-Type: image/png; name="twm-like.png" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="twm-like.png" iVBORw0KGgoAAAANSUhEUgAAAaQAAAEsCAYAAACMr8eAAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA B3RJTUUH1gUBEwcGwK2TXAAAAB10RVh0Q29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVu AAAgAElEQVR42uy9eZDtyVXf+TmZv+XeW7f2qtdvX/r1LrVa6kZqJIwkZECAWDQsAwTWLCY0DsZg YACDPQP0GGOYEeAwmvEIMGYNHAbGAzNYVozYJCwk0ZK6Qa3W635rv/3Vq/1uvy3zzB+/W1V3q6cW /QKI4ZcR3a+q7u/+MvObJ8/Jc/J7MqEqValKVapSlb8BRQw/q97kGC9EeBwZ3P8w8taDUFjsx1ZJ z11GiwILEDWITx7Enpqms7aBdmvowzHTb1/GNgN657pEZ1bpnllFOzHhzYxsaxNvC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fqpaO4hiZKENEnZOH8JSocRX69xCsJch3Ry kuz0xdGdKV1vA0VhgDBtUBOaeO8crcMHcD5neOoMdttSnthE9fpIqI9TlUAwBmUNVAoiha0MXoPe O07V3WDylhvYPn0OVRRIautV1lpau6ah00EGBa67hlOe5MAuzN4J/PkBxb+dYFSECisGA5QGlIkQ pbE2QXKHzGukKuHyDiIBUTJ6QejqzlbUxQZVrDC3H0AtTNLeP0f/7AXC114mHnrCZIuxhTmyi2tU aZvGr/Fr/Bq/xu/1+1m3+QoOT6YU+LqEA6qNUCGRp/2GZUxsEGthc4DrFXgX6v4yLkM2epiNkurs JTaPHaf16+9EK407dQl6gQiFs4AVQitBmzbRQFNWHlO4uoJtVZBUHUIVUeUBtZ2RDoeURhAPEZrs 4hbp3j2UhUO6A3TQ+HKNZN8e8q01osVZojgGpfGV4LVmrNOmGuT47Zxyo48KQppMQhqRXd4evWiU UdZe6lpSyiIqwhyYIHnHAVQK+azF5gkuSSmKnCiKyHa2KQY7hGyn8Wv8Gr/Gr/H7GfhZfB8tDoUQ SFHKELSCJMLOTODygmx1G6VamESjozYmigibA6rNHkH7usmTCGZniFnv43ZP0Tlg8UWEmUqwyZBo JsZNWrJLO3ChQp116MuOSiuUVIQphdk7jkyD2Yxw50allQhUgIghyzeJbpwjdAL+fAbBUJ3cgBe6 iM/JtECnTbw0h52eZPDSecJGDy0WQh0t9NtDiNUPY5oIqAwkRtFGmxQ9M8HcLx1h69gJipPnSO+9 FdctkKxEe4dfX6eyQhwcubjGr/Fr/Bq/xu9n4PefQ9Lthwwn42IAAAAASUVORK5CYII= --Boundary-00=_p7lVEpx5pXsNVRb-- From MAILER-DAEMON Mon May 01 21:24:27 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fajcp-0007Sz-8P for mharc-grub-devel@gnu.org; Mon, 01 May 2006 21:24:27 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fajco-0007SK-03 for grub-devel@gnu.org; Mon, 01 May 2006 21:24:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fajcm-0007Rs-6k for grub-devel@gnu.org; Mon, 01 May 2006 21:24:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fajck-0007Pv-FI; Mon, 01 May 2006 21:24:22 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fajcn-0006iY-AW; Mon, 01 May 2006 21:24:25 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id F045C3C8D068A; Tue, 2 May 2006 04:46:05 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 96A4B3C8D0689; Tue, 2 May 2006 04:46:05 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: grub-devel@gnu.org Date: Tue, 2 May 2006 03:24:21 +0200 User-Agent: KMail/1.8.2 References: <200604221943.35240.okuji@enbug.org> In-Reply-To: <200604221943.35240.okuji@enbug.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605020324.21619.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.500266, version=0.17.2 Cc: bug-grub@gnu.org Subject: Re: Google's Summer of Code 2006 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: Tue, 02 May 2006 01:24:26 -0000 The acceptance of students' applications has began, so I've updated the GRUB's SoC page: http://www.gnu.org/software/grub/grub-soc.html I added an advice for students in this page. If you are interested, have a look, please. Okuji From MAILER-DAEMON Tue May 02 12:29:53 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Faxl2-0005D0-Py for mharc-grub-devel@gnu.org; Tue, 02 May 2006 12:29:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Faxl0-0005Al-Nv for grub-devel@gnu.org; Tue, 02 May 2006 12:29:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Faxkx-000581-QJ for grub-devel@gnu.org; Tue, 02 May 2006 12:29:50 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Faxkx-00057i-IL for grub-devel@gnu.org; Tue, 02 May 2006 12:29:47 -0400 Received: from [200.61.53.195] (helo=mail.corest.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Faxl8-000481-Vc for grub-devel@gnu.org; Tue, 02 May 2006 12:29:59 -0400 Received: from webmail.corest.com (lan-53-196.CORESECURITY.COM [200.61.53.196]) by sin.core-sdi.com (mail system) with ESMTP id A7EFF1A6B08 for ; Tue, 2 May 2006 16:29:44 +0000 (GMT) Message-ID: <4457893F.3030703@corest.com> Date: Tue, 02 May 2006 13:30:55 -0300 From: Gerardo Richarte X-Accept-Language: en-us, en MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: VbE and eltorito questions 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: Tue, 02 May 2006 16:29:51 -0000 Hi, I'm in the process of porting some old "OS" I made to take advantage of GRUB's features. There are 2 things I currently need, for which I have partial solutions. But your master advice would be really wellcome! I need to load a big module (20Megs). This is no problem for GRUB, I can do it currently, but to test everything I'm using vmware and (now) an ISO image with eltorito (using stage2_eltorito from ubuntu's GRUB 0.95). I can also do it with and 0.97 I compiled. I also need to set the video mode before jumping to my kernel. Here's where the main problem comes in. I know I could do it if the multiboot part for this was finished in grub, and I'm willing to implement this support for grub (at least some partial support). This shouldn't be complicated after all the code GRUB already has for VBE support (both in Legacy and grub2). Now, I have two different problems: I can use vbeprobe and testvbe from ubuntu's 0.95. However, if I compile my own grub (either 0.95 with ubuntu's patches or stock 0.97) vbe doesn't really work. I get an empty list of available modes with vbeprobe, and an error message saying that 0xffffff00 is not a valid video mode. I don't know what's causing this. Ignoring this fact, I hacked a new command: setvbe that does what testvbe does, but doesn't exit the video mode nor waits a keypress. This is my first attempt at coding multiboot support for video mode selection. I also tried using GRUB2 for this, and found that I can set the video mode using "terminal vesafb" after doing "set vbe_mode=0x141" for example. This will change the video mode, and then continue with GRUB, letting me boot my "OS" without switching back to the original video mode (exactly what I need). However, I didn't find how to make an ISO image with GRUB2 (allowing me to load a 20MB module, which evidently doesn't feet in a floppy image :-) I have a few questions, any would solve my problem, but some will not let me implement video mode selection for multiboot. How do I do an ISO image with GRUB2? (a la stage2_eltorito)? How do I compile GRUB Legacy with vbe support? (any configuration trick?) How do I debug GRUB Legacy so I can find what the problem with vbe is? Do you think it's worth implementing the multiboot video mode selection for GRUB? thanks a lot gera PS: I read most GRUB's code looking for multiboot video mode selection code, but I couldn't find it. If it's there, please tell me how to use it! PS: When I say multiboot video mode selection I mean what's specified in http://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Header%20graphics%20fields From MAILER-DAEMON Tue May 02 12:29:56 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Faxl5-0005FP-VP for mharc-grub-devel@gnu.org; Tue, 02 May 2006 12:29:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Faxl4-0005EQ-1s for grub-devel@gnu.org; Tue, 02 May 2006 12:29:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Faxl2-0005DE-Sy for grub-devel@gnu.org; Tue, 02 May 2006 12:29:53 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Faxl2-0005D7-Pc for grub-devel@gnu.org; Tue, 02 May 2006 12:29:52 -0400 Received: from [193.144.10.29] (helo=relay1.udl.es) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FaxlE-00048G-7C for grub-devel@gnu.org; Tue, 02 May 2006 12:30:04 -0400 Received: from jupiter.udl.net (jupiter.udl.net [172.16.2.2]) by relay1.udl.es (8.13.6/8.13.4) with ESMTP id k42GTVZk002613 for ; Tue, 2 May 2006 18:29:37 +0200 Received: from [172.16.2.131] (eup34_02 [172.16.2.131]) by jupiter.udl.net (8.11.7p1+Sun/8.11.6) with ESMTP id k42GIjq19487 for ; Tue, 2 May 2006 18:18:50 +0200 (MET DST) Message-ID: <44578666.3060300@raulete.net> Date: Tue, 02 May 2006 18:18:46 +0200 From: adrian15 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: grub-devel@gnu.org References: <200605011855.k41ItvdZ029423@dell01.dinaserver.com> In-Reply-To: <200605011855.k41ItvdZ029423@dell01.dinaserver.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88/1434/Mon May 1 21:51:00 2006 on relay1.udl.es X-Virus-Status: Clean Subject: Re: SOC - SGD based on grub2 - Menu and scripting status 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: Tue, 02 May 2006 16:29:54 -0000 >>>>5) I need to define "something" (In my grub legacy fork is a menu.lst) >>>>that lets me choose the harddisk-partition which I want to work >>>>on. Can I make it easily? >>> > > I was thinking about an iterator function. Perhaps that might be the > easiest to use... Please watch CVS closely. I am actively working on > scripting, as much as time permits. An iterator function among the various partitions of a hard disk... that could be interesting. Unfortunately I can't watch CVS closely so I will wait till you announce it in this list. :) The iterator function should increment a variable for knowing the total amount of partitions on a given hard disk. adrian15 From MAILER-DAEMON Tue May 02 12:29:57 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Faxl7-0005G6-3x for mharc-grub-devel@gnu.org; Tue, 02 May 2006 12:29:57 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Faxl5-0005F5-8Q for grub-devel@gnu.org; Tue, 02 May 2006 12:29:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Faxl2-0005D2-Ma for grub-devel@gnu.org; Tue, 02 May 2006 12:29:54 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Faxl2-0005Cu-GR for grub-devel@gnu.org; Tue, 02 May 2006 12:29:52 -0400 Received: from [193.144.10.29] (helo=relay1.udl.es) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FaxlD-00048F-TU for grub-devel@gnu.org; Tue, 02 May 2006 12:30:04 -0400 Received: from jupiter.udl.net (jupiter.udl.net [172.16.2.2]) by relay1.udl.es (8.13.6/8.13.4) with ESMTP id k42GTVZe002613 for ; Tue, 2 May 2006 18:29:37 +0200 Received: from [172.16.2.131] (eup34_02 [172.16.2.131]) by jupiter.udl.net (8.11.7p1+Sun/8.11.6) with ESMTP id k42GNlq20732 for ; Tue, 2 May 2006 18:23:47 +0200 (MET DST) Message-ID: <44578794.2020409@raulete.net> Date: Tue, 02 May 2006 18:23:48 +0200 From: adrian15 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: grub-devel@gnu.org References: <200605011855.k41ItvdZ029423@dell01.dinaserver.com> In-Reply-To: <200605011855.k41ItvdZ029423@dell01.dinaserver.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88/1434/Mon May 1 21:51:00 2006 on relay1.udl.es X-Virus-Status: Clean Subject: Re: Changing the default OS 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: Tue, 02 May 2006 16:29:55 -0000 > It's very interesting why people ask questions about GRUB Legacy here again > and again, although I have written "Do not use this list for GRUB Legacy" in > everywhere. > > Okuji Is it so difficult to rename mailing-lists ? Rename bug-grub to grub Rename grub-devel to grub2 or grubbeta and you will see how there are some changes. adrian15 From MAILER-DAEMON Tue May 02 13:25:39 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fayd1-0004wX-Ky for mharc-grub-devel@gnu.org; Tue, 02 May 2006 13:25:39 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fayd0-0004vq-LA for grub-devel@gnu.org; Tue, 02 May 2006 13:25:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Faycy-0004u5-LF for grub-devel@gnu.org; Tue, 02 May 2006 13:25:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Faycx-0004tn-Ek for grub-devel@gnu.org; Tue, 02 May 2006 13:25:36 -0400 Received: from [194.109.24.28] (helo=smtp-vbr8.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fayd9-0001XI-L3 for grub-devel@gnu.org; Tue, 02 May 2006 13:25:47 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr8.xs4all.nl (8.13.6/8.13.6) with ESMTP id k42HPSNQ075033 for ; Tue, 2 May 2006 19:25:28 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <200605011855.k41ItvdZ029423@dell01.dinaserver.com> <44578794.2020409@raulete.net> From: Marco Gerards Date: Tue, 02 May 2006 19:27:25 +0200 In-Reply-To: <44578794.2020409@raulete.net> (adrian15@raulete.net's message of "Tue, 02 May 2006 18:23:48 +0200") Message-ID: <87mze0qqv6.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: Changing the default OS 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: Tue, 02 May 2006 17:25:38 -0000 adrian15 writes: >> It's very interesting why people ask questions about GRUB Legacy >> here again and again, although I have written "Do not use this list >> for GRUB Legacy" in everywhere. >> Okuji > > Is it so difficult to rename mailing-lists ? It's besides the point. A development list is not appropriate for non-development stuff, I think that is quite obvious. A lot of projects even don't allow non project members to post on the devel list. -- Marco From MAILER-DAEMON Tue May 02 13:47:29 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fayy8-0007KZ-LW for mharc-grub-devel@gnu.org; Tue, 02 May 2006 13:47:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fayy6-0007KM-FX for grub-devel@gnu.org; Tue, 02 May 2006 13:47:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fayy3-0007JF-Qj for grub-devel@gnu.org; Tue, 02 May 2006 13:47:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fayy3-0007JB-Le for grub-devel@gnu.org; Tue, 02 May 2006 13:47:23 -0400 Received: from [194.109.24.23] (helo=smtp-vbr3.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FayyF-0003Z1-UR for grub-devel@gnu.org; Tue, 02 May 2006 13:47:36 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr3.xs4all.nl (8.13.6/8.13.6) with ESMTP id k42HlL7i017269 for ; Tue, 2 May 2006 19:47:22 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <87bquvmgrm.fsf@xs4all.nl> From: Marco Gerards Date: Tue, 02 May 2006 19:49:19 +0200 In-Reply-To: (Hollis Blanchard's message of "Tue, 25 Apr 2006 19:37:14 -0500") Message-ID: <87irooqpuo.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: [patch] rename "grubof" to "grub" 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: Tue, 02 May 2006 17:47:27 -0000 Hollis Blanchard writes: > On Apr 21, 2006, at 4:15 AM, Marco Gerards wrote: > >> Hollis Blanchard writes: >> >>> This patch renames "grubof", the executable name for PPC and Sparc, to >>> "grub". I'm still not sure what the naming convention should be for >>> the executable output by grub-mkimage; I'm thinking maybe >>> "grub.ppc". It isn't an image ("grub.img"); it's still an ELF file... >> >> Personally I would prefer something like `_grub' so people see there >> is something special about it and just don't use it like that. After >> that the output file can just be called grub if people want that. > > What about "grubkernel" and "grub"? Or "grub.raw" and "grub"? I'd like > to try to stay within 8.3 naming for all files, since people will be > deploying the end result on FAT filesystems. _grub works on fat. We use an underscore for the rescue mode chainloader on the PC as well. Personally I prefer something like this or another obscure name that scares people. :-) -- Marco From MAILER-DAEMON Tue May 02 13:50:31 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Faz15-0000NA-Fm for mharc-grub-devel@gnu.org; Tue, 02 May 2006 13:50:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Faz11-0000MI-N4 for grub-devel@gnu.org; Tue, 02 May 2006 13:50:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Faz0z-0000Km-0d for grub-devel@gnu.org; Tue, 02 May 2006 13:50:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Faz0y-0000Kj-Qo for grub-devel@gnu.org; Tue, 02 May 2006 13:50:24 -0400 Received: from [194.109.24.27] (helo=smtp-vbr7.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Faz0s-0003md-7o; Tue, 02 May 2006 13:50:18 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr7.xs4all.nl (8.13.6/8.13.6) with ESMTP id k42Ho3ii073800; Tue, 2 May 2006 19:50:04 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <20060419175310.GA19052@nubol.oskuro.net> <15bb419c8982646ff2f1e0ad2fd3072a@penguinppc.org> From: Marco Gerards Date: Tue, 02 May 2006 19:52:01 +0200 In-Reply-To: <15bb419c8982646ff2f1e0ad2fd3072a@penguinppc.org> (Hollis Blanchard's message of "Thu, 20 Apr 2006 20:18:01 -0500") Message-ID: <87ejzcqpq6.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Cc: Jordi Mallach Subject: Re: Problems with GRUB2 on PPC 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: Tue, 02 May 2006 17:50:28 -0000 Hollis Blanchard writes: > On Apr 19, 2006, at 12:53 PM, Jordi Mallach wrote: >> >> Hardware: >> Apple PowerBook G4 15" 750Mhz, purchased on January 2005. > > This can't be right. Anyways, the most important question: what sort > of video card is it? > >> OS: Debian unstable and Ubuntu dapper installed. >> >> 1st problem: when creating grub.cfg, I accidentally leftout the ".img" >> suffix from the initrd line. When grub whined about a file not found, I >> tab-completed it, but the changes wouldn't take effect until I manually >> corrected it in grub.cfg after booting with yaboot. > > Marco, do you know if this would have been something broken recently > with the scripting changes? Not that I know of, but there are surely bugs. If you can reproduce something, please tell me. -- Marco From MAILER-DAEMON Tue May 02 15:35:03 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fb0eF-0005fn-7W for mharc-grub-devel@gnu.org; Tue, 02 May 2006 15:35:03 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fb0eD-0005dp-K9 for grub-devel@gnu.org; Tue, 02 May 2006 15:35:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fb0eC-0005ct-1N for grub-devel@gnu.org; Tue, 02 May 2006 15:35:01 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fb0eB-0005cl-OY for grub-devel@gnu.org; Tue, 02 May 2006 15:34:59 -0400 Received: from [66.249.82.204] (helo=xproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fb0eP-0006C4-0f for grub-devel@gnu.org; Tue, 02 May 2006 15:35:13 -0400 Received: by xproxy.gmail.com with SMTP id s13so2074911wxc for ; Tue, 02 May 2006 12:34:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=iTZjb7hDqqtmS3EzLpBvjl5W808B4FaQ0kNdaKozlzhDQjoc6228WPvaakIwk72f0vCBhcmLVmftN56+sevQQd/FSVaO7qBvasZc/sNVbhllFT0m9Thv9WPCrHKe211Zdur4Jr/kqBWbAcUndBsPbNQa9TiRYu4IxVgVwz77nd4= Received: by 10.70.7.7 with SMTP id 7mr214288wxg; Tue, 02 May 2006 12:34:58 -0700 (PDT) Received: by 10.70.21.18 with HTTP; Tue, 2 May 2006 12:34:55 -0700 (PDT) Message-ID: <6b8207c40605021234u7e38e1cdi26fe1345828353d3@mail.gmail.com> Date: Tue, 2 May 2006 12:34:55 -0700 From: "bill ricker" To: "The development of GRUB 2" In-Reply-To: <87aca1mvbc.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_16965_13298261.1146598495902" References: <44565558.2030600@gmail.com> <87aca1mvbc.fsf@xs4all.nl> Subject: Re: HELP! CVS problems 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: Tue, 02 May 2006 19:35:01 -0000 ------=_Part_16965_13298261.1146598495902 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I was using a pre-compiled cvs binary 1.12.13. I used an older binary, 1.11.17 and that worked ok. Thanks. bill On 5/1/06, Marco Gerards wrote: > > Bill Ricker writes: > > > I'm trying to sync up my port of grub2 1.93 from 1.91 with the latest > > bits. cvs is hanging trying to update grub2/video/i386/pc/vbe.c. It > > hangs in the same place when just trying to check out the entire tree > > to an empty directory. > > Output of the later is below. Any help would be greatly > > appreciated. Note in the grub2/video/i386/pc there is a zero length > > file .new.vbeblit.c > > Weird. I just checked out from CVS and it went ok. It even > built. ;-) > > The file you described can not be found here: > http://cvs.savannah.gnu.org/viewcvs/grub2/video/i386/pc/?root=3Dgrub > > I expect some file damaged locally at your place. Perhaps you can > make a new checkout? > > -- > Marco > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > ------=_Part_16965_13298261.1146598495902 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I was using a pre-compiled cvs binary 1.12.13. I used an older binary,
1= .11.17 and that worked ok. Thanks.

bill

On 5/1/06, Marco Gerards <= mgerards@xs4all.nl> wrote:
Bill Ricker < bill.ricker@gmail.com> writes:

> I'm trying to sync up my = port of grub2 1.93 from 1.91 with the latest
> bits. cvs is hanging t= rying to update grub2/video/i386/pc/vbe.c. It
> hangs in the same pla= ce when just trying to check out the entire tree
> to an empty directory.
> Output of the later is below. Any h= elp would be greatly
> appreciated. Note in the grub2/video/i386/pc t= here is a zero length
> file .new.vbeblit.c

Weird.  = I just checked out from CVS and it went ok.  It even
built. ;-)

The file you described can not be found here:
http://cvs.savannah.gnu.org/viewcvs/grub2/video/i386/pc/?root=3Dgrub<= br>
I expect some file damaged locally at your place.  Perhaps yo= u can
make a new checkout?

--
Marco



___________= ____________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

------=_Part_16965_13298261.1146598495902-- From MAILER-DAEMON Wed May 03 19:31:27 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FbQoY-0003hp-Pa for mharc-grub-devel@gnu.org; Wed, 03 May 2006 19:31:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbQoX-0003hS-12 for grub-devel@gnu.org; Wed, 03 May 2006 19:31:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbQoU-0003ee-C2 for grub-devel@gnu.org; Wed, 03 May 2006 19:31:23 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbQoT-0003eC-QJ for grub-devel@gnu.org; Wed, 03 May 2006 19:31:21 -0400 Received: from [212.27.42.28] (helo=smtp2-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FbQox-0000Hu-2A for grub-devel@gnu.org; Wed, 03 May 2006 19:31:51 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp2-g19.free.fr (Postfix) with ESMTP id 3A8EB6D495 for ; Thu, 4 May 2006 01:31:18 +0200 (CEST) From: =?iso-8859-1?Q?Eric_Salom=E9?= To: "'The development of GRUB 2'" Date: Thu, 4 May 2006 01:31:18 +0200 Message-ID: <002101c66f09$ada21ff0$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-Reply-To: Subject: RE : grub-emu state of the art 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: Wed, 03 May 2006 23:31:25 -0000 GRUB 2 Wiki ToDoList : Implement ModuleLoading in grub-emu I worked on that : Architecture i386/pc - Emulation on Linux/Ubuntu grub-emu is loading all current modules, though some won't do anything in emulation mode. The modules .mod are the same as those used for boot time. Little changes in source code, though I had to adapt asm files to passing parameters in stack (I compile without -mregparm=3D3 -mrtd = options as I didn't want to recompile the whole C library with those passing parameters conventions). ... when I be done with grub 2 debugging I'll just have to recompile with these options (if you like them a lot) and it will work just fine (boot time only). ToBeAwardedOf: Don't use gcc 3.3 with grub 2's current source files : compiled code is wrong and subject to unattended results. Runs fine with gcc 4.0. I have still a doubt about gcc 3.4. LeftToDo :=20 - see if every modification is useful, as I tried a few things before I got a good result, and send a diff patch. - I need a "patched" symlist.c to compile with grub-emu (could be generated by a script, but I am too lazy). - let gdb know about dynamically loaded modules ;-), but I guess it won't be the easy part. Best Regards, _________________________________________ Eric Salom=E9 - Paris, France > -----Message d'origine----- > De=A0: Eric Salom=E9 > Envoy=E9=A0: samedi 29 avril 2006 23:00 > =C0=A0: The development of GRUB 2 > Objet=A0: grub-emu state of the art >=20 > Hi, >=20 > I need a working grub-emu to continue the port of a system of my own from > grub to grub 2. >=20 > I am currently working on a i386 pc and had hard time the first days with > the 1.93 delivery : grub-emu would run (on Linux based Ubuntu OS) and come > with a rescue mode prompt, but was not likely to load and init modules > such as "normal.mod" (even by hand). >=20 > Am I doing something wrong or is it the current state of grub-emu ? >=20 > In the latter case, I'd be glad to help a little and see what can be done > to have a fully functional grub-emu. >=20 > Best regards. > _________________________________________ > Eric Salom=E9 - Paris, France From MAILER-DAEMON Thu May 04 05:23:58 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fba3y-0000Wt-9A for mharc-grub-devel@gnu.org; Thu, 04 May 2006 05:23:58 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fba3x-0000Wo-0j for grub-devel@gnu.org; Thu, 04 May 2006 05:23:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fba3v-0000Wb-P9 for grub-devel@gnu.org; Thu, 04 May 2006 05:23:56 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fba3v-0000WY-MB for grub-devel@gnu.org; Thu, 04 May 2006 05:23:55 -0400 Received: from [212.71.128.78] (helo=drak.ucw.cz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fba4V-0006t7-7d for grub-devel@gnu.org; Thu, 04 May 2006 05:24:31 -0400 Received: from drak.ucw.cz (localhost [127.0.0.1]) by drak.ucw.cz (Postfix) with ESMTP id 3D29FAA for ; Thu, 4 May 2006 11:23:53 +0200 (CEST) Received: from 213.192.3.1 (SquirrelMail authenticated user ebik) by drak.ucw.cz with HTTP; Thu, 4 May 2006 11:23:53 +0200 (CEST) Message-ID: <3469.213.192.3.1.1146734633.squirrel@drak.ucw.cz> In-Reply-To: <002101c66f09$ada21ff0$0b00a8c0@yoda> References: <002101c66f09$ada21ff0$0b00a8c0@yoda> Date: Thu, 4 May 2006 11:23:53 +0200 (CEST) From: =?iso-8859-2?Q?Tom=E1=B9_Ebenlendr?= To: "The development of GRUB 2" User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-2 X-Priority: 3 (Normal) Importance: Normal Content-Transfer-Encoding: quoted-printable Subject: Re: RE : grub-emu state of the art 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: Thu, 04 May 2006 09:23:57 -0000 > - let gdb know about dynamically loaded modules ;-), but I guess it > won't be the easy part. That depends how modules are loaded in grub-emu. With standard libdl it couldn't be problem. But I remember a situation when we run gdb on UML(user mode linux) kernel= . When we loaded a kernel module there (using kernel dynamic loader), gdb was able to print adress where it is loaded, and also it was able to load symbol table with given memory offset. But we had to read the address by our eyes and type the offset (exactly same number) to gdb by hand. Later we used expect script to do this. --=20 Tomas 'Ebi' Ebenlendr http://get.to/ebik From MAILER-DAEMON Thu May 04 09:10:45 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FbdbQ-0002YA-Nw for mharc-grub-devel@gnu.org; Thu, 04 May 2006 09:10:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbdbN-0002VE-BA for grub-devel@gnu.org; Thu, 04 May 2006 09:10:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbdbL-0002TZ-1r for grub-devel@gnu.org; Thu, 04 May 2006 09:10:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbdbK-0002TU-TJ for grub-devel@gnu.org; Thu, 04 May 2006 09:10:38 -0400 Received: from [192.116.227.193] (helo=srv2003.bladefusion.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fbdbv-0001no-Sj for grub-devel@gnu.org; Thu, 04 May 2006 09:11:16 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C66F7D.071B64CE" Date: Thu, 4 May 2006 16:17:00 +0300 Message-ID: <63DA313E79D4B947ABC7AE6DDC9CC309040E9E@srv2003.bladefusion.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: GRUB2 netboot development thread-index: AcZvfQavPxSZ9i7pRSCW4sJNvUKP4w== From: "Rudy Attias" To: Subject: GRUB2 netboot development 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: Thu, 04 May 2006 13:10:41 -0000 This is a multi-part message in MIME format. ------_=_NextPart_001_01C66F7D.071B64CE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hey,=20 =20 I'm interested to know, how to add drivers to the new pluggable architecture (grub2_netboot_7.tgz) from etherboot sources?=20 =20 Also wanted to say that you guys do great job with this boot loader! Now it needs to learn to boot from RAID and make coffee and its perfect! =20 Rudy Attias =20 =20 ------_=_NextPart_001_01C66F7D.071B64CE Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hey,

 

I'm interested to know, how to add drivers to = the new pluggable architecture (grub2_netboot_7.tgz) from etherboot sources? =

 

Also wanted to say that you guys do great job = with this boot loader! Now it needs to learn to boot from RAID and make = coffee and  its perfect!

 

Rudy = Attias

 

 

------_=_NextPart_001_01C66F7D.071B64CE-- From MAILER-DAEMON Thu May 04 09:50:48 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FbeEC-0007Ph-77 for mharc-grub-devel@gnu.org; Thu, 04 May 2006 09:50:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbeEA-0007Ma-7A for grub-devel@gnu.org; Thu, 04 May 2006 09:50:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbeE8-0007Ky-Sa for grub-devel@gnu.org; Thu, 04 May 2006 09:50:45 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbeE8-0007Kr-LV for grub-devel@gnu.org; Thu, 04 May 2006 09:50:44 -0400 Received: from [155.198.5.114] (helo=mr4.cc.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FbeEk-0005JU-Gq for grub-devel@gnu.org; Thu, 04 May 2006 09:51:22 -0400 Received: from icexp4.cc.ic.ac.uk ([155.198.3.44] helo=icex.imperial.ac.uk) by mr4.cc.ic.ac.uk with smtp (Exim 4.51) id 1FbeE3-000098-22 for grub-devel@gnu.org; Thu, 04 May 2006 14:50:41 +0100 Received: from [155.198.117.83] ([155.198.117.83]) by icex.imperial.ac.uk with Microsoft SMTPSVC(6.0.3790.1830); Thu, 4 May 2006 14:49:47 +0100 Message-ID: <445A067B.2060602@imperial.ac.uk> Date: Thu, 04 May 2006 14:49:47 +0100 From: vincent guffens User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <63DA313E79D4B947ABC7AE6DDC9CC309040E9E@srv2003.bladefusion.com> In-Reply-To: <63DA313E79D4B947ABC7AE6DDC9CC309040E9E@srv2003.bladefusion.com> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 May 2006 13:49:47.0955 (UTC) FILETIME=[9BA78830:01C66F81] Subject: Re: GRUB2 netboot development 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: Thu, 04 May 2006 13:50:46 -0000 Rudy Attias wrote: > Hey, > > > > I'm interested to know, how to add drivers to the new pluggable > architecture (grub2_netboot_7.tgz) from etherboot sources? > > > > Also wanted to say that you guys do great job with this boot loader! Now > it needs to learn to boot from RAID and make coffee and its perfect! > > > > Rudy Attias > Hi! Adding a driver from etherboot (I used 5.4.1) to this version of grub2 should be easy. Note that I have only tried the ns8390 driver so far so it is likely that the process of addind news drivers requires more manual interventions for the moment. The idea is that it could be made completely automatic but it is not yet done. Also note that according to a previous post, this mechanism which allows importing etherboot drivers will not make it to the official grub2. The netboot support wil be based on pxe and undi instead. Anyway, here are the steps: 1) Copy the drivers files from the driver you want from Etherboot to grub (Look where ns8390.c and ns8390.h are). 2) Edit the c file and add the following code at the begining of the file: /* Added for GRUB support */ #include /* Added for GRUB support */ 3) locate in the c code the structure (probably at the bottom) marked with __pci_driver. It must be called something like NAME_driver. 4) At the end of the c file, add the following code where NAME should be replaced appropriately: /* Added for GRUB support */ grub_ether_declare_probe(NAME); grub_ether_declare_driver_struct(NAME); GRUB_MOD_INIT(NAME) { (void)mod; /* To stop warning. */ grub_ether_fill_driver(NAME); grub_register_pci_driver(&NAME_grub_driver); } GRUB_MOD_FINI(NAME) { grub_unregister_pci_driver(&NAME_grub_driver); } /* Added for GRUB support */ 5) You now have to instruct the building process to compile a module for your new driver. This is done by modifying the file conf/i386-pc.rmk. Do a search for ns8390.mod and notice that it is assigned to a variable called pkgdata_MODULES. Add your module, i.e add NAME.mod to the list of modules assigned to this variable. 6) Do a search for ns8390.mod again and add these lines, changing what needs to be changed # For ns8390.mod ns8390_mod_SOURCES = drivers/net/ns8390.c ns8390_mod_CFLAGS = $(DRIVERS_NET_CFLAGS) $(COMMON_CFLAGS) $(DRIVERS_CFLAGS) ns8390_mod_LDFLAGS = $(COMMON_LDFLAGS) 7) This is it, autoconf && ./configure && make and see how it goes In order to test your news driver, you have to use the modules pci, pci_etherboot, as well as your new module. You can use the command lspci to check if pci support list your card and lspci_driver to see if your driver was added properly. To probe fo your card, use scan_pci_device. If everything goes well, you can then use tx_test to check for the successfull transmission of a test frame. Good luck, let me know how it goes! From MAILER-DAEMON Thu May 04 16:35:15 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FbkXb-0001Ln-DH for mharc-grub-devel@gnu.org; Thu, 04 May 2006 16:35:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbkXY-0001JZ-QR for grub-devel@gnu.org; Thu, 04 May 2006 16:35:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbkXW-0001JN-2b for grub-devel@gnu.org; Thu, 04 May 2006 16:35:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbkXV-0001JK-Tk for grub-devel@gnu.org; Thu, 04 May 2006 16:35:09 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FbkXW-0005Y2-6H for grub-devel@gnu.org; Thu, 04 May 2006 16:35:10 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 5054D3C8FBAA7 for ; Thu, 4 May 2006 23:58:02 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 8C4373C8FBAA6 for ; Thu, 4 May 2006 23:57:49 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: grub-devel@gnu.org Date: Thu, 4 May 2006 22:34:53 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605042234.53201.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.185735, version=0.17.2 Subject: update on the planning 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: Thu, 04 May 2006 20:35:13 -0000 I have updated the planning: http://grub.enbug.org/ReleasePlanning I'm planning to release next version in one month. This time, I myself will do this instead of Marco. As in the plan, I would like to stabilize GRUB 2 at 1.96. This means that we will not introduce any incompatibility after November (from the users' point of view). Currently, I'm going to apply the same policy as GRUB 1.90-1.96, that is, we still accept new features but not incompatible changes. So, if you want to change anything, you must propose (and implement) it before November. Do you agree with this policy? This is just a plan, so I can change it, if you don't like. After 1.96, my plan is not clear yet. Now is too early to discuss this. Okuji From MAILER-DAEMON Thu May 04 18:27:25 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FbmI9-0007ey-09 for mharc-grub-devel@gnu.org; Thu, 04 May 2006 18:27:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbmI6-0007eN-SO for grub-devel@gnu.org; Thu, 04 May 2006 18:27:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbmI1-0007cX-St for grub-devel@gnu.org; Thu, 04 May 2006 18:27:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbmI1-0007cU-NV for grub-devel@gnu.org; Thu, 04 May 2006 18:27:17 -0400 Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FbmI2-0006dT-Nw for grub-devel@gnu.org; Thu, 04 May 2006 18:27:19 -0400 Received: from localhost.localdomain ([213.113.223.151] [213.113.223.151]) by mxfep02.bredband.com with ESMTP id <20060504222716.HDDO29994.mxfep02.bredband.com@localhost.localdomain> for ; Fri, 5 May 2006 00:27:16 +0200 From: Johan Rydberg To: The development of GRUB 2 References: <4407474E.6060708@nic.fi> Date: Fri, 05 May 2006 00:27:38 +0200 In-Reply-To: <4407474E.6060708@nic.fi> (Vesa =?iso-8859-1?Q?J=E4=E4skel=E4?= =?iso-8859-1?Q?inen's?= message of "Thu, 02 Mar 2006 21:28:14 +0200") Message-ID: <8764kla0it.fsf@night.trouble.net> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: New patch for video subsystem... 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: Thu, 04 May 2006 22:27:23 -0000 Vesa J=E4=E4skel=E4inen writes: > Here is the newest modifications to video subsystem. Hi Vesa. What a suitable name :) Sorry for the delay, and lack of earlier comments, but I've been out of the GRUB loop for a while. But I have a few comments on the video subsystem; Correct me if I am wrong here, but what you call "render target" seems to be what other video systems call "surface" or "drawable".=20=20 Why use the concept of a "active" render target? Why not instead let all functions that operate on the active render target take a pointer to a specific render target? Poking through your patch, it seems that there a lot of the following (forgive my pseudo-code) grub_video_set_active_render_target (target); // .. fill it with something .. grub_video_fill_rect (color, 0, 0, width, height); grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY); grub_video_blit_render_target (target, 0, 0, 0, 0, width, height); =20=20=20 I would feel more comfortable with the following workflow: grub_video_fill_rect (target, color, 0, 0, width, height); grub_video_blit_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY, target, 0, 0, 0, 0, width, height); Also, I think it is important the user can get hold of a pointer to the render targets data, and an exact pixel format, to do private rendering. It would be hard to make a perfect gradient using fill_rect. I'm not sure the concept of "viewports" are needed at all; instead let the 'application' (e.g, the terminal) render into a render target, and blit that to the screen at the desired position. To minimize memory, the videport-render target can be a sub-render target of the main render target (ie, they share the same buffer) unless the user wants any fancy stuff like a background picture. Thanks, Johan From MAILER-DAEMON Fri May 05 04:21:01 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FbvYa-00009f-UR for mharc-grub-devel@gnu.org; Fri, 05 May 2006 04:21:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbvYY-00007o-S3 for grub-devel@gnu.org; Fri, 05 May 2006 04:20:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbvYY-00007I-34 for grub-devel@gnu.org; Fri, 05 May 2006 04:20:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbvYX-00007D-Sb for grub-devel@gnu.org; Fri, 05 May 2006 04:20:57 -0400 Received: from [157.24.2.30] (helo=smtp1.cc.lut.fi) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FbvYe-0006ZP-Rv for grub-devel@gnu.org; Fri, 05 May 2006 04:21:05 -0400 Received: from localhost (smtp1 [127.0.0.1]) by smtp1.cc.lut.fi (Postfix) with ESMTP id 3309470B49 for ; Fri, 5 May 2006 11:20:54 +0300 (EEST) Received: from smtp1.cc.lut.fi ([127.0.0.1]) by localhost (smtp1.cc.lut.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12248-06 for ; Fri, 5 May 2006 11:20:53 +0300 (EEST) Received: from [192.168.1.100] (lk4-a-4-1.lnet.lut.fi [157.24.102.107]) by smtp1.cc.lut.fi (Postfix) with ESMTP id D334E70B46 for ; Fri, 5 May 2006 11:20:53 +0300 (EEST) Message-ID: <445B0AED.9090409@nic.fi> Date: Fri, 05 May 2006 11:21:01 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: The development of GRUB 2 References: <4407474E.6060708@nic.fi> <8764kla0it.fsf@night.trouble.net> In-Reply-To: <8764kla0it.fsf@night.trouble.net> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: by lut.fi Content-Transfer-Encoding: quoted-printable Subject: Re: New patch for video subsystem... 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, 05 May 2006 08:20:59 -0000 Johan Rydberg wrote: > Vesa J=E4=E4skel=E4inen writes: >=20 >> Here is the newest modifications to video subsystem. >=20 > Hi Vesa. What a suitable name :) :) > Sorry for the delay, and lack of earlier comments, but I've been out > of the GRUB loop for a while. But I have a few comments on the video > subsystem; >=20 > Correct me if I am wrong here, but what you call "render target" seems > to be what other video systems call "surface" or "drawable". =20 Yes they are called by different names and they have a bit different semantics depending on a place they are used. > Why use the concept of a "active" render target? Why not instead let > all functions that operate on the active render target take a pointer > to a specific render target? Poking through your patch, it seems that > there a lot of the following (forgive my pseudo-code) >=20 > grub_video_set_active_render_target (target); > // .. fill it with something .. > grub_video_fill_rect (color, 0, 0, width, height); >=20 > grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLA= Y); > grub_video_blit_render_target (target, 0, 0, 0, 0, width, height); > =20 > I would feel more comfortable with the following workflow: >=20 > grub_video_fill_rect (target, color, 0, 0, width, height); > grub_video_blit_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY, > target, 0, 0, 0, 0, width, height); Actually that patch is already on CVS :]... so you might find it easier to read from there. But the idea here was to make it easier to make function that operates on different render targets without knowing about it. eg: set_target a call common_func set target b call common_func set target c With your proposal this would require to pass this render target pointer all around and would make video function calls longer. There is also another problem in your proposal. What happens if video driver get's changed and you still have pointers to render targets (or to raw memory)? > Also, I think it is important the user can get hold of a pointer to > the render targets data, and an exact pixel format, to do private > rendering. It would be hard to make a perfect gradient using fill_rect= . That might not be possible on all architectures. That's the reason there is a bitmap support (which I am working on currently). Bitmaps are located on host memory so they can be modified. Render targets can be located on host memory or on video memory depending on arch. If they are located on video memory then there is only need to have video-video blit functionality and some archs might even provide hardware accelerated helper functions. One idea of the render targets are that they hide the real bitmap data format. So one could make a 24 bit RGB picture and then just blit it to render target and underlying video driver would convert it to correct format. This frees API user from thinking all possible formats and can concentrate to make one working implementation. If one needs to modify render target on all platforms there should be support to direct access to memory or ability to read contents of frame buffer to host memory and then write it back or requirement to store data on host memory and then do blit from there to video memory, but that is a bit costy on performance. > I'm not sure the concept of "viewports" are needed at all; instead let > the 'application' (e.g, the terminal) render into a render target, and > blit that to the screen at the desired position. To minimize memory, > the videport-render target can be a sub-render target of the main > render target (ie, they share the same buffer) unless the user wants > any fancy stuff like a background picture. Dropping support for viewports would indeed make driver code a bit simplier. It were originally designed to problems like this: Let's assume you have window on your screen. Then you have scroll bars there so the actual window contents are bigger than what is shown on screen. Now you just set viewport on target render target and it's easy to render new contents and you don't need to worry that it would be rendered out of bounds of target rectangle. And as coordinates are now related to viewport you don't need to take account that. But now that I think, one could just give screen coordinates and size and then use offset to scroll within that area. Now that I have really used the api for gfxterm and working on bitmap support I have noticed that it might be better to handle those operations on one render target and then blit the changed data to visible render target. I am not fond to your sub-render-target idea. You can always use coordinates and offsets to play with it. And the background image or color would most likely to be present. > Thanks, > Johan Thanks for your comments, Vesa J=E4=E4skel=E4inen From MAILER-DAEMON Fri May 05 07:05:58 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fby8D-0007pn-Sm for mharc-grub-devel@gnu.org; Fri, 05 May 2006 07:05:57 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fby8C-0007p9-St for grub-devel@gnu.org; Fri, 05 May 2006 07:05:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fby8C-0007nz-0V for grub-devel@gnu.org; Fri, 05 May 2006 07:05:56 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fby8B-0007nW-IC for grub-devel@gnu.org; Fri, 05 May 2006 07:05:55 -0400 Received: from [195.54.107.70] (helo=mxfep01.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fby8K-0001Mb-4a for grub-devel@gnu.org; Fri, 05 May 2006 07:06:04 -0400 Received: from localhost.localdomain ([213.113.223.151] [213.113.223.151]) by mxfep01.bredband.com with ESMTP id <20060505110554.HZSK16061.mxfep01.bredband.com@localhost.localdomain> for ; Fri, 5 May 2006 13:05:54 +0200 From: Johan Rydberg To: The development of GRUB 2 References: <4407474E.6060708@nic.fi> <8764kla0it.fsf@night.trouble.net> <445B0AED.9090409@nic.fi> Date: Fri, 05 May 2006 13:06:23 +0200 In-Reply-To: <445B0AED.9090409@nic.fi> (Vesa =?iso-8859-1?Q?J=E4=E4skel=E4?= =?iso-8859-1?Q?inen's?= message of "Fri, 05 May 2006 11:21:01 +0300") Message-ID: <871wv8afyo.fsf@night.trouble.net> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: New patch for video subsystem... 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, 05 May 2006 11:05:57 -0000 Vesa J=E4=E4skel=E4inen writes: > But the idea here was to make it easier to make function that operates > on different render targets without knowing about it. eg: > > set_target a > call common_func > set target b > call common_func > set target c > > With your proposal this would require to pass this render target pointer > all around and would make video function calls longer. I do not see a problem with that. The overhead for passing of an extra argument is probably less than the overhead of the function calls (esp since set_active_render_target is an indirect call) > There is also another problem in your proposal. What happens if video > driver get's changed and you still have pointers to render targets (or > to raw memory)? Possibly the same thing as with the current method; I do not see how this would make things different? >> Also, I think it is important the user can get hold of a pointer to >> the render targets data, and an exact pixel format, to do private >> rendering. It would be hard to make a perfect gradient using fill_rect. > > That might not be possible on all architectures. That's the reason there > is a bitmap support (which I am working on currently). Bitmaps are > located on host memory so they can be modified. I'm not sure "bitmap" is a good word here; maybe "image" would be better. > Render targets can be located on host memory or on video memory > depending on arch. If they are located on video memory then there is > only need to have video-video blit functionality and some archs might > even provide hardware accelerated helper functions. If the architecture does not support direct access to the video memory, it just falls back on returning a render target with malloc()ed memory. > One idea of the render targets are that they hide the real bitmap data > format. So one could make a 24 bit RGB picture and then just blit it to > render target and underlying video driver would convert it to correct > format. This frees API user from thinking all possible formats and can > concentrate to make one working implementation. Iter-format blits can of course also be supported if you have direct access to the render target pixel data. > If one needs to modify render target on all platforms there should be > support to direct access to memory or ability to read contents of frame > buffer to host memory and then write it back or requirement to store > data on host memory and then do blit from there to video memory, but > that is a bit costy on performance. I do not see why that should be needed. Have you looked at for example DirectFB's API? Even through their coding style is fucked up, the overall design of the API is quite nice. I'm just afraid that we will see the exact same thing that happened to legacy GRUB; a lot of distribution vendors hack up something of their own. Therefor it is important that we get this right. ~j From MAILER-DAEMON Fri May 05 07:37:06 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FbycM-0007My-1V for mharc-grub-devel@gnu.org; Fri, 05 May 2006 07:37:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbycK-0007M6-7A for grub-devel@gnu.org; Fri, 05 May 2006 07:37:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbycJ-0007Lg-Ix for grub-devel@gnu.org; Fri, 05 May 2006 07:37:03 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbycJ-0007Lb-E6 for grub-devel@gnu.org; Fri, 05 May 2006 07:37:03 -0400 Received: from [194.109.24.25] (helo=smtp-vbr5.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FbycS-0003yR-Ci for grub-devel@gnu.org; Fri, 05 May 2006 07:37:12 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr5.xs4all.nl (8.13.6/8.13.6) with ESMTP id k45Bax3J048956 for ; Fri, 5 May 2006 13:36:59 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <002101c66f09$ada21ff0$0b00a8c0@yoda> From: Marco Gerards Date: Fri, 05 May 2006 13:39:03 +0200 In-Reply-To: <002101c66f09$ada21ff0$0b00a8c0@yoda> (Eric =?iso-8859-1?Q?Sa?= =?iso-8859-1?Q?lom=E9's?= message of "Thu, 4 May 2006 01:31:18 +0200") Message-ID: <87irokn1k8.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: RE : grub-emu state of the art 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, 05 May 2006 11:37:04 -0000 Eric Salom=E9 writes: > GRUB 2 Wiki > ToDoList : Implement ModuleLoading in grub-emu Right, and I even added this item. Sorry, I just misunderstood your previous email. > I worked on that : Architecture i386/pc - Emulation on Linux/Ubuntu > grub-emu is loading all current modules, though some won't do anything > in emulation mode. The modules .mod are the same as those used for boot > time. Nice! > Little changes in source code, though I had to adapt asm files to > passing parameters in stack (I compile without -mregparm=3D3 -mrtd options > as I didn't want to recompile the whole C library with those passing > parameters conventions). It would be nice to get this to work for the regular modules too. In that case we do not need two set of modules. Besides that, it should also work on the PPC, for example. Which is a lot harder. BTW, how did you implement this? I once wrote a hack to do exactly the same by using mmap to allocate executable memory. On the PPC this memory needs to be allocated close to the grub-emu binary because otherwise the relocations would fail. > ... when I be done with grub 2 debugging I'll just have to recompile > with these options (if you like them a lot) and it will work just fine > (boot time only). It's not only that we like them. They make the size of the binaries smaller. And it is a requirement for the assembler code. > ToBeAwardedOf: > Don't use gcc 3.3 with grub 2's current source files : compiled code is > wrong and subject to unattended results. > Runs fine with gcc 4.0. I have still a doubt about gcc 3.4. Wrong in what way? We have some workaround for specific gcc bugs. Although these are sometimes hard to locate, sometimes it might be worth the effort. > LeftToDo :=20 > > - see if every modification is useful, as I tried a few things before I > got a good result, and send a diff patch. Please describe how things work in detail so we can discuss possible issues. > - I need a "patched" symlist.c to compile with grub-emu (could be > generated by a script, but I am too lazy). :-) > - let gdb know about dynamically loaded modules ;-), but I guess it > won't be the easy part. Yeah, I can imagine that. But in case specific modules have to be debugged, we can just compile them in as happens currently. This is what I do now. The big advantage of having module support in grub-emu is as a debugging tool for module loading itself. It will make porting GRUB to another architecture a lot easier. And besides that, debugging will be a lot easier too. Thanks, Marco From MAILER-DAEMON Fri May 05 07:46:18 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FbylG-0002Cr-8p for mharc-grub-devel@gnu.org; Fri, 05 May 2006 07:46:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbylD-0002CF-IH for grub-devel@gnu.org; Fri, 05 May 2006 07:46:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbylB-0002C3-9V for grub-devel@gnu.org; Fri, 05 May 2006 07:46:14 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbylB-0002C0-5i for grub-devel@gnu.org; Fri, 05 May 2006 07:46:13 -0400 Received: from [194.109.24.22] (helo=smtp-vbr2.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FbylK-0004Vg-3J for grub-devel@gnu.org; Fri, 05 May 2006 07:46:22 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr2.xs4all.nl (8.13.6/8.13.6) with ESMTP id k45BkBiu073041 for ; Fri, 5 May 2006 13:46:11 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <200605042234.53201.okuji@enbug.org> From: Marco Gerards Date: Fri, 05 May 2006 13:48:15 +0200 In-Reply-To: <200605042234.53201.okuji@enbug.org> (Yoshinori K. Okuji's message of "Thu, 4 May 2006 22:34:53 +0200") Message-ID: <87ejz8n14w.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: update on the planning 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, 05 May 2006 11:46:16 -0000 "Yoshinori K. Okuji" writes: > As in the plan, I would like to stabilize GRUB 2 at 1.96. This means that we > will not introduce any incompatibility after November (from the users' point > of view). Currently, I'm going to apply the same policy as GRUB 1.90-1.96, > that is, we still accept new features but not incompatible changes. So, if > you want to change anything, you must propose (and implement) it before > November. Eventually this has to happen if we want people to use GRUB 2. So I agree with that. It's to soon for me to determine if November is reasonable or not. But if we want to pick a date, this date is as good as any. At least it is not too soon or late for my feeling. > Do you agree with this policy? This is just a plan, so I can change it, if you > don't like. Sure. > After 1.96, my plan is not clear yet. Now is too early to discuss this. For me it will mean that scripting should be finished soon. At least the rough work and functionality. Same for networking interfaces, the GUI layering splitup and we have to determine before that what should be a command and what should go into a variable. But let's not discuss this right here, right now. I am just telling you I would focus on this so GRUB for the users its perspective will stabilize. So after the networking work, I will focus less on actual feature and more on frameworking and general design issues we talked about earlier. -- Marco From MAILER-DAEMON Fri May 05 12:01:03 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fc2jm-00083o-Ug for mharc-grub-devel@gnu.org; Fri, 05 May 2006 12:01:03 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fc2jl-00082i-5X for grub-devel@gnu.org; Fri, 05 May 2006 12:01:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fc2ji-000806-3c for grub-devel@gnu.org; Fri, 05 May 2006 12:01:00 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fc2jh-0007zN-NH for grub-devel@gnu.org; Fri, 05 May 2006 12:00:57 -0400 Received: from [212.71.128.78] (helo=drak.ucw.cz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fc2js-00025J-VR for grub-devel@gnu.org; Fri, 05 May 2006 12:01:09 -0400 Received: from drak.ucw.cz (localhost [127.0.0.1]) by drak.ucw.cz (Postfix) with ESMTP id 2B6C5F8 for ; Fri, 5 May 2006 18:00:54 +0200 (CEST) Received: from 213.192.3.1 (SquirrelMail authenticated user ebik) by drak.ucw.cz with HTTP; Fri, 5 May 2006 18:00:54 +0200 (CEST) Message-ID: <1634.213.192.3.1.1146844854.squirrel@drak.ucw.cz> In-Reply-To: <87irokn1k8.fsf@xs4all.nl> References: <002101c66f09$ada21ff0$0b00a8c0@yoda> <87irokn1k8.fsf@xs4all.nl> Date: Fri, 5 May 2006 18:00:54 +0200 (CEST) From: =?iso-8859-2?Q?Tom=E1=B9_Ebenlendr?= To: "The development of GRUB 2" User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-2 X-Priority: 3 (Normal) Importance: Normal Content-Transfer-Encoding: quoted-printable Subject: Re: RE : grub-emu state of the art 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, 05 May 2006 16:01:01 -0000 >> Little changes in source code, though I had to adapt asm files to >> passing parameters in stack (I compile without -mregparm=3D3 -mrtd opt= ions >> as I didn't want to recompile the whole C library with those passing >> parameters conventions). > > It would be nice to get this to work for the regular modules too. In > that case we do not need two set of modules. Besides that, it should > also work on the PPC, for example. Which is a lot harder. I tried that a year ago and I failed: There are lots of hooks, and you don't know if passed pointer is pointer to function from module (with -mregparm) or from main binary (w/o -mregparm). The only solution that comes to my mind now is to have all function declaration with -mregparm gcc directives. Then all grub functions will be with -mregparm and all standard library functions without. Other option will be recompiling standard libraries or creating some wrappers for them. But again, we must be careful when manipulating pointers to functions... I was also thinking about throwing the -mregparm stuff away, but other developers here want it. --=20 Tomas 'Ebi' Ebenlendr http://get.to/ebik From MAILER-DAEMON Fri May 05 14:07:31 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fc4iB-00042I-Nr for mharc-grub-devel@gnu.org; Fri, 05 May 2006 14:07:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fc4iA-00041a-3I for grub-devel@gnu.org; Fri, 05 May 2006 14:07:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fc4i7-00041C-KJ for grub-devel@gnu.org; Fri, 05 May 2006 14:07:28 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fc4i7-00040z-GF for grub-devel@gnu.org; Fri, 05 May 2006 14:07:27 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fc4iK-0000C5-AR for grub-devel@gnu.org; Fri, 05 May 2006 14:07:40 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id D7F403C9201BA for ; Fri, 5 May 2006 21:30:47 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 9473A3C9201B9 for ; Fri, 5 May 2006 21:30:47 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Fri, 5 May 2006 20:07:24 +0200 User-Agent: KMail/1.8.2 References: <200605042234.53201.okuji@enbug.org> <87ejz8n14w.fsf@xs4all.nl> In-Reply-To: <87ejz8n14w.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605052007.24183.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.489921, version=0.17.2 Subject: Re: update on the planning 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, 05 May 2006 18:07:30 -0000 Hi Marco, On Friday 05 May 2006 13:48, Marco Gerards wrote: > Eventually this has to happen if we want people to use GRUB 2. So I > agree with that. It's to soon for me to determine if November is > reasonable or not. But if we want to pick a date, this date is as > good as any. At least it is not too soon or late for my feeling. :) > For me it will mean that scripting should be finished soon. At least > the rough work and functionality. Same for networking interfaces, the > GUI layering splitup and we have to determine before that what should > be a command and what should go into a variable. But let's not > discuss this right here, right now. Please do not harass yourself with this. ;) I mean that GRUB 2 should not introduce incompatibility after 1.96 _against GRUB 2_ rather than GRUB Legacy. So as long as you are careful, you can add more features later. In fact, I have added a lot of new features into GRUB Legacy without losing any backward compatibility. Since GRUB 2 has a cleaner design, I expect that this would be even easier. The goal is that the user can start to use GRUB 2 while not scared of a breakage due to incompatible changes. This also eases the documentation significantly. In GRUB Legacy, this way worked very well. I was even surprised that it was not necessary to release a public version at all. :p As you said, it is necessary to make this kind of decision at a point, although it has been fun that we don't have to care about incompatibility for these 3 years. Yet, we still have 6 months in my plan, so you don't have to feel threatened. Okuji From MAILER-DAEMON Fri May 05 14:09:27 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fc4k3-0005ZV-He for mharc-grub-devel@gnu.org; Fri, 05 May 2006 14:09:27 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fc4k2-0005WS-AF for grub-devel@gnu.org; Fri, 05 May 2006 14:09:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fc4k0-0005R5-Bf for grub-devel@gnu.org; Fri, 05 May 2006 14:09:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fc4k0-0005Qo-0O for grub-devel@gnu.org; Fri, 05 May 2006 14:09:24 -0400 Received: from [194.109.24.22] (helo=smtp-vbr2.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fc4kC-0000SW-Ll for grub-devel@gnu.org; Fri, 05 May 2006 14:09:37 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr2.xs4all.nl (8.13.6/8.13.6) with ESMTP id k45I9Mes054891 for ; Fri, 5 May 2006 20:09:22 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <002101c66f09$ada21ff0$0b00a8c0@yoda> <87irokn1k8.fsf@xs4all.nl> <1634.213.192.3.1.1146844854.squirrel@drak.ucw.cz> From: Marco Gerards Date: Fri, 05 May 2006 20:11:27 +0200 In-Reply-To: <1634.213.192.3.1.1146844854.squirrel@drak.ucw.cz> (=?iso-8859-2?Q?Tom=E1=B9?= Ebenlendr's message of "Fri, 5 May 2006 18:00:54 +0200 (CEST)") Message-ID: <87ac9wmje8.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: RE : grub-emu state of the art 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, 05 May 2006 18:09:26 -0000 Tom=E1=B9 Ebenlendr writes: >>> Little changes in source code, though I had to adapt asm files to >>> passing parameters in stack (I compile without -mregparm=3D3 -mrtd opti= ons >>> as I didn't want to recompile the whole C library with those passing >>> parameters conventions). >> >> It would be nice to get this to work for the regular modules too. In >> that case we do not need two set of modules. Besides that, it should >> also work on the PPC, for example. Which is a lot harder. > > I tried that a year ago and I failed: There are lots of hooks, and you > don't know if passed pointer is pointer to function from module > (with -mregparm) or from main binary (w/o -mregparm). > > The only solution that comes to my mind now is to have all function > declaration with -mregparm gcc directives. Then all grub functions > will be with -mregparm and all standard library functions without. > Other option will be recompiling standard libraries or creating some > wrappers for them. But again, we must be careful when manipulating > pointers to functions... Right, which is already being done for the modules. I agree it will be hard to make this work in the right way. It's more important to get modules loading working first, without disturbing anything else. > I was also thinking about throwing the -mregparm stuff away, but other > developers here want it. Right. -- Marco From MAILER-DAEMON Sat May 06 02:44:14 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcGWU-0004Gt-Ca for mharc-grub-devel@gnu.org; Sat, 06 May 2006 02:44:14 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcGWS-0004GC-FO for grub-devel@gnu.org; Sat, 06 May 2006 02:44:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcGWR-0004F6-NY for grub-devel@gnu.org; Sat, 06 May 2006 02:44:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcGWO-0004EA-FK; Sat, 06 May 2006 02:44:08 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcGWi-0002s0-IQ; Sat, 06 May 2006 02:44:28 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id C94D93C9254C7; Sat, 6 May 2006 10:07:40 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 1B1133C9254C6; Sat, 6 May 2006 10:07:40 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: grub-devel@gnu.org Date: Sat, 6 May 2006 08:44:01 +0200 User-Agent: KMail/1.8.2 References: <200604221943.35240.okuji@enbug.org> <200605020324.21619.okuji@enbug.org> In-Reply-To: <200605020324.21619.okuji@enbug.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605060844.02009.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.498641, version=0.17.2 Cc: bug-grub@gnu.org Subject: Re: Google's Summer of Code 2006 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, 06 May 2006 06:44:12 -0000 This is a reminder. The due date is the 8th day. If you would like to submit/update applications, please hurry up. Most applications require some discussion and rewrite, so we have no time to complete applications if you wait too much. Also, please do not hestiate to contact me (or Hollis) privately. Thanks, Okuji From MAILER-DAEMON Sat May 06 09:36:16 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcMxE-0000Lm-6L for mharc-grub-devel@gnu.org; Sat, 06 May 2006 09:36:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcMxB-0000If-CJ for grub-devel@gnu.org; Sat, 06 May 2006 09:36:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcMx7-0000EW-Io for grub-devel@gnu.org; Sat, 06 May 2006 09:36:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcMx7-0000ER-Bv for grub-devel@gnu.org; Sat, 06 May 2006 09:36:09 -0400 Received: from [155.198.117.152] (helo=crumpet.cpn.ee.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FcMxV-0001D2-Fn for grub-devel@gnu.org; Sat, 06 May 2006 09:36:33 -0400 Received: from localhost ([127.0.0.1]) by crumpet.cpn.ee.ic.ac.uk with esmtp (Exim 4.44) id 1FcMx4-00038s-Bd for grub-devel@gnu.org; Sat, 06 May 2006 14:36:06 +0100 Message-ID: <445CA646.7010704@imperial.ac.uk> Date: Sat, 06 May 2006 14:36:06 +0100 From: vincent guffens User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: pci support 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, 06 May 2006 13:36:13 -0000 Hi! I was wondering if there was still an interest in pci support as discussed previously. That is a general interface exported by a module such as struct grub_pci_support { /* My name. */ const char *name; void (*init)(void); void (*fini)(void); void (*adjust) (grub_pci_device_t p); /* Base Address Register helper functions. There are up to 6 BARs PCI_BASE_ADDRESS_{[0-5]} in the configuration space of each device */ unsigned long (*bar_start) (grub_pci_device_t, unsigned int bar); unsigned long (*bar_size) (grub_pci_device_t, unsigned int bar); int (*find_capability) (grub_pci_device_t, int cap); /* Call HOOK with each pci device. */ grub_err_t (*iterate) (int (*hook) (grub_pci_device_t)); /* Fill the pci device structure (romaddr, ioaddr, membase, irq)*/ grub_err_t (*init_pdev) (grub_pci_device_t); /* Low level io functions. */ struct grub_pci_io_support *io; }; which allows multiple implementations such as one for instance from etherboot which I have now. It was written original with the idea of importing the etherboot drivers so I don't know if it would still be usefull. The implementation that I have uses direct pci access which maybe does not fit very well with the idea of using pxe later on as it will require dealing with some bios stuff anyway. It is basically usefull now for the lspci command which could be made to print some nice text just like the Linux lspci command. If so, I can prepare a separated patch for it and prepare the changelog. Cheers, -- Vincent Guffens From MAILER-DAEMON Sat May 06 10:08:34 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcNSU-0007wJ-LN for mharc-grub-devel@gnu.org; Sat, 06 May 2006 10:08:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcNST-0007vi-9V for grub-devel@gnu.org; Sat, 06 May 2006 10:08:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcNSR-0007uj-1R for grub-devel@gnu.org; Sat, 06 May 2006 10:08:32 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcNSQ-0007ua-Qm for grub-devel@gnu.org; Sat, 06 May 2006 10:08:30 -0400 Received: from [157.24.2.30] (helo=smtp1.cc.lut.fi) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcNSp-0003aX-2I for grub-devel@gnu.org; Sat, 06 May 2006 10:08:55 -0400 Received: from localhost (smtp1 [127.0.0.1]) by smtp1.cc.lut.fi (Postfix) with ESMTP id 3A9DB70282 for ; Sat, 6 May 2006 17:08:27 +0300 (EEST) Received: from smtp1.cc.lut.fi ([127.0.0.1]) by localhost (smtp1.cc.lut.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02749-03 for ; Sat, 6 May 2006 17:08:26 +0300 (EEST) Received: from [192.168.1.100] (lk4-a-4-1.lnet.lut.fi [157.24.102.107]) by smtp1.cc.lut.fi (Postfix) with ESMTP id E8BD270092 for ; Sat, 6 May 2006 17:08:26 +0300 (EEST) Message-ID: <445CADE5.7010300@nic.fi> Date: Sat, 06 May 2006 17:08:37 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: The development of GRUB 2 References: <445CA646.7010704@imperial.ac.uk> In-Reply-To: <445CA646.7010704@imperial.ac.uk> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: by lut.fi Content-Transfer-Encoding: quoted-printable Subject: Re: pci support 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, 06 May 2006 14:08:33 -0000 vincent guffens wrote: > Hi! >=20 > I was wondering if there was still an interest in pci support as > discussed previously. That is a general interface exported by a module > such as Yes there is, in example PCI support would be enable usage of more ATA Controllers than legacy ports support. PCI device enumeration could be used to scan for ports to access those other controllers in system. > If so, I can prepare a separated patch for it and prepare the changelog= . >=20 > Cheers, >=20 > -- > Vincent Guffens Please do :). Thanks, Vesa J=E4=E4skel=E4inen From MAILER-DAEMON Sat May 06 10:44:45 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcO1V-0002Gv-00 for mharc-grub-devel@gnu.org; Sat, 06 May 2006 10:44:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcO1S-0002FD-BB for grub-devel@gnu.org; Sat, 06 May 2006 10:44:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcO1Q-0002EB-BR for grub-devel@gnu.org; Sat, 06 May 2006 10:44:41 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcO1Q-0002E1-5N for grub-devel@gnu.org; Sat, 06 May 2006 10:44:40 -0400 Received: from [194.109.24.27] (helo=smtp-vbr7.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcO1o-0005ux-Ch for grub-devel@gnu.org; Sat, 06 May 2006 10:45:04 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr7.xs4all.nl (8.13.6/8.13.6) with ESMTP id k46EiU0v081266 for ; Sat, 6 May 2006 16:44:36 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <445CA646.7010704@imperial.ac.uk> From: Marco Gerards Date: Sat, 06 May 2006 16:46:38 +0200 In-Reply-To: <445CA646.7010704@imperial.ac.uk> (vincent guffens's message of "Sat, 06 May 2006 14:36:06 +0100") Message-ID: <87ejz7b48h.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: pci support 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, 06 May 2006 14:44:43 -0000 vincent guffens writes: Hi Vincent, > I was wondering if there was still an interest in pci support as > discussed previously. That is a general interface exported by a module > such as Yes, that will make it possible to implement all kinds of drivers and make something like lspci possible. Sorry I still didn't start working on the networking stuff as planned. Scripting and other stuff occupies me longer than I originally expected. :) -- Marco From MAILER-DAEMON Sat May 06 11:12:51 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcOSh-0005Uw-IL for mharc-grub-devel@gnu.org; Sat, 06 May 2006 11:12:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcOSg-0005Ur-K9 for grub-devel@gnu.org; Sat, 06 May 2006 11:12:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcOSe-0005U3-IL for grub-devel@gnu.org; Sat, 06 May 2006 11:12:49 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcOSe-0005TO-CP for grub-devel@gnu.org; Sat, 06 May 2006 11:12:48 -0400 Received: from [155.198.117.152] (helo=crumpet.cpn.ee.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FcOT3-0000JU-Fy for grub-devel@gnu.org; Sat, 06 May 2006 11:13:13 -0400 Received: from localhost ([127.0.0.1]) by crumpet.cpn.ee.ic.ac.uk with esmtp (Exim 4.44) id 1FcOSc-0003CI-FM for grub-devel@gnu.org; Sat, 06 May 2006 16:12:46 +0100 Message-ID: <445CBCEE.8050906@imperial.ac.uk> Date: Sat, 06 May 2006 16:12:46 +0100 From: vincent guffens User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <445CA646.7010704@imperial.ac.uk> <87ejz7b48h.fsf@xs4all.nl> In-Reply-To: <87ejz7b48h.fsf@xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: pci support 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, 06 May 2006 15:12:50 -0000 Marco Gerards wrote: > vincent guffens writes: > > Hi Vincent, > > >>I was wondering if there was still an interest in pci support as >>discussed previously. That is a general interface exported by a module >>such as > > > Yes, that will make it possible to implement all kinds of drivers and > make something like lspci possible. > > Sorry I still didn't start working on the networking stuff as planned. > Scripting and other stuff occupies me longer than I originally > expected. :) Sure, no problem! In fact, I was wondering if it would be possible to have a discussion about the overall networking strategy that will be put in place for grub2 (and which is schedulled for the next release !). As I understand, supporting the etherboot drivers is no longer the primary option. As it is out of the question to have its own set of driver, the UNDI driver seems like a good idea. However, UNDI support would constrain significantly the design of the network stack. In particular, it defines a lot of structure such as dhcp header, ipv4 addresses and so on. It also involves interruption while it was assumed previously that the interfaces would be polled. There is also the option of calling etherboot from grub2, which seems quite appealing but I think I don't really quite get that. cheers! From MAILER-DAEMON Sat May 06 12:10:05 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcPM4-0007Xw-RR for mharc-grub-devel@gnu.org; Sat, 06 May 2006 12:10:04 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcPM3-0007Xr-Di for grub-devel@gnu.org; Sat, 06 May 2006 12:10:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcPM1-0007X3-Ps for grub-devel@gnu.org; Sat, 06 May 2006 12:10:03 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcPM1-0007X0-Mr for grub-devel@gnu.org; Sat, 06 May 2006 12:10:01 -0400 Received: from [194.109.24.33] (helo=smtp-vbr13.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcPMR-0005d0-7R for grub-devel@gnu.org; Sat, 06 May 2006 12:10:27 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr13.xs4all.nl (8.13.6/8.13.6) with ESMTP id k46GA0Mk059429 for ; Sat, 6 May 2006 18:10:00 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <445CA646.7010704@imperial.ac.uk> <87ejz7b48h.fsf@xs4all.nl> <445CBCEE.8050906@imperial.ac.uk> From: Marco Gerards Date: Sat, 06 May 2006 18:12:07 +0200 In-Reply-To: <445CBCEE.8050906@imperial.ac.uk> (vincent guffens's message of "Sat, 06 May 2006 16:12:46 +0100") Message-ID: <87ac9vb0a0.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: pci support 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, 06 May 2006 16:10:03 -0000 vincent guffens writes: > Marco Gerards wrote: >> vincent guffens writes: >> >> Hi Vincent, >> >> >>>I was wondering if there was still an interest in pci support as >>>discussed previously. That is a general interface exported by a module >>>such as >> >> >> Yes, that will make it possible to implement all kinds of drivers and >> make something like lspci possible. >> >> Sorry I still didn't start working on the networking stuff as planned. >> Scripting and other stuff occupies me longer than I originally >> expected. :) > > Sure, no problem! In fact, I was wondering if it would be possible to > have a discussion about the overall networking strategy that will be put > in place for grub2 (and which is schedulled for the next release !). Sure! > As I understand, supporting the etherboot drivers is no longer the > primary option. As it is out of the question to have its own set of > driver, the UNDI driver seems like a good idea. However, UNDI support > would constrain significantly the design of the network stack. In > particular, it defines a lot of structure such as dhcp header, ipv4 > addresses and so on. It also involves interruption while it was assumed > previously that the interfaces would be polled. Well, I do not really know UNDI. I had the impression it was able to send and receive raw ehternet frames. Which is what I want, nothing more and nothing less. At interrupt time, you can store the frames in a queue so they can be polled at a later moment. Or the design should be changed so interruptions can be supported. That's not a big issue I think. > There is also the option of calling etherboot from grub2, which seems > quite appealing but I think I don't really quite get that. Is that etherboot specific or is that the case for every UNDI implementation? -- Marco From MAILER-DAEMON Sat May 06 12:25:18 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcPao-00075O-2x for mharc-grub-devel@gnu.org; Sat, 06 May 2006 12:25:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcPal-00074k-UB for grub-devel@gnu.org; Sat, 06 May 2006 12:25:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcPak-000747-IQ for grub-devel@gnu.org; Sat, 06 May 2006 12:25:14 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcPak-000744-Dj for grub-devel@gnu.org; Sat, 06 May 2006 12:25:14 -0400 Received: from [155.198.117.152] (helo=crumpet.cpn.ee.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FcPbA-00077Q-3y for grub-devel@gnu.org; Sat, 06 May 2006 12:25:40 -0400 Received: from localhost ([127.0.0.1]) by crumpet.cpn.ee.ic.ac.uk with esmtp (Exim 4.44) id 1FcPai-0003LP-Ar for grub-devel@gnu.org; Sat, 06 May 2006 17:25:12 +0100 Message-ID: <445CCDE8.7000109@imperial.ac.uk> Date: Sat, 06 May 2006 17:25:12 +0100 From: vincent guffens User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <445CA646.7010704@imperial.ac.uk> <87ejz7b48h.fsf@xs4all.nl> <445CBCEE.8050906@imperial.ac.uk> <87ac9vb0a0.fsf@xs4all.nl> In-Reply-To: <87ac9vb0a0.fsf@xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: pci support 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, 06 May 2006 16:25:16 -0000 Marco Gerards wrote: > vincent guffens writes: > > >>Marco Gerards wrote: >> >>>vincent guffens writes: >>> >>>Hi Vincent, >>> >>> >>> >>>>I was wondering if there was still an interest in pci support as >>>>discussed previously. That is a general interface exported by a module >>>>such as >>> >>> >>>Yes, that will make it possible to implement all kinds of drivers and >>>make something like lspci possible. >>> >>>Sorry I still didn't start working on the networking stuff as planned. >>>Scripting and other stuff occupies me longer than I originally >>>expected. :) >> >>Sure, no problem! In fact, I was wondering if it would be possible to >>have a discussion about the overall networking strategy that will be put >>in place for grub2 (and which is schedulled for the next release !). > > > Sure! > > >>As I understand, supporting the etherboot drivers is no longer the >>primary option. As it is out of the question to have its own set of >>driver, the UNDI driver seems like a good idea. However, UNDI support >>would constrain significantly the design of the network stack. In >>particular, it defines a lot of structure such as dhcp header, ipv4 >>addresses and so on. It also involves interruption while it was assumed >>previously that the interfaces would be polled. > > > Well, I do not really know UNDI. I had the impression it was able to > send and receive raw ehternet frames. Which is what I want, nothing > more and nothing less. > > At interrupt time, you can store the frames in a queue so they can be > polled at a later moment. Or the design should be changed so > interruptions can be supported. That's not a big issue I think. yes, you can use it with a polling mechanism as well. But UNDI has a much more complex API then just sending and receiving raw frames. You have API calls to request a file via tftp or even mtftp, get the information received from the dhcp server, send UDP packets and so on. It would be waste, I think, to go through the work of supporting UNDI and not getting the entire benefit which would require a strong coordination between the PXE/UNDI code and the net code of grub2 (through the PXE specification) > >>There is also the option of calling etherboot from grub2, which seems >>quite appealing but I think I don't really quite get that. > > > Is that etherboot specific or is that the case for every UNDI > implementation? well, I just mentioned the idea that was raised by Okuji in an earlier post. That is what I meant and I don't know if I understood properly but etherboot implements a PXE stacks. So if a network card does not support it, it would be possible to use etherboot as the PXE stack. But I don't know how it would work. When etherboot is located in an extension rom, then maybe the bios can scan it and use it ? I am not sure but I have sent the question to the etherboot mailing list, I am waiting for some comments. From MAILER-DAEMON Sat May 06 13:05:50 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcQE2-0006A7-7p for mharc-grub-devel@gnu.org; Sat, 06 May 2006 13:05:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcQE0-00069R-AG for grub-devel@gnu.org; Sat, 06 May 2006 13:05:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcQDx-00066o-RK for grub-devel@gnu.org; Sat, 06 May 2006 13:05:47 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcQDx-00066Y-Nj for grub-devel@gnu.org; Sat, 06 May 2006 13:05:45 -0400 Received: from [194.109.24.32] (helo=smtp-vbr12.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcQEN-0001lM-Q3 for grub-devel@gnu.org; Sat, 06 May 2006 13:06:12 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr12.xs4all.nl (8.13.6/8.13.6) with ESMTP id k46H5isP000319 for ; Sat, 6 May 2006 19:05:44 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <445CA646.7010704@imperial.ac.uk> <87ejz7b48h.fsf@xs4all.nl> <445CBCEE.8050906@imperial.ac.uk> <87ac9vb0a0.fsf@xs4all.nl> <445CCDE8.7000109@imperial.ac.uk> From: Marco Gerards Date: Sat, 06 May 2006 19:07:51 +0200 In-Reply-To: <445CCDE8.7000109@imperial.ac.uk> (vincent guffens's message of "Sat, 06 May 2006 17:25:12 +0100") Message-ID: <8764kjaxp4.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: pci support 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, 06 May 2006 17:05:48 -0000 vincent guffens writes: >>>As I understand, supporting the etherboot drivers is no longer the >>>primary option. As it is out of the question to have its own set of >>>driver, the UNDI driver seems like a good idea. However, UNDI support >>>would constrain significantly the design of the network stack. In >>>particular, it defines a lot of structure such as dhcp header, ipv4 >>>addresses and so on. It also involves interruption while it was assumed >>>previously that the interfaces would be polled. >> >> >> Well, I do not really know UNDI. I had the impression it was able to >> send and receive raw ehternet frames. Which is what I want, nothing >> more and nothing less. >> >> At interrupt time, you can store the frames in a queue so they can be >> polled at a later moment. Or the design should be changed so >> interruptions can be supported. That's not a big issue I think. > > yes, you can use it with a polling mechanism as well. But UNDI has a > much more complex API then just sending and receiving raw frames. You > have API calls to request a file via tftp or even mtftp, get the > information received from the dhcp server, send UDP packets and so on. > It would be waste, I think, to go through the work of supporting UNDI > and not getting the entire benefit which would require a strong > coordination between the PXE/UNDI code and the net code of grub2 > (through the PXE specification) The less we rely on PXE code, the less bugs we have to deal with I think. Most firmware implementations are full of bugs, I don't expect the PXE implementations are an exception. Ad besides that, we need full networking support anyways. For example for the PPC port. >>>There is also the option of calling etherboot from grub2, which seems >>>quite appealing but I think I don't really quite get that. >> >> >> Is that etherboot specific or is that the case for every UNDI >> implementation? > > well, I just mentioned the idea that was raised by Okuji in an earlier > post. That is what I meant and I don't know if I understood properly but > etherboot implements a PXE stacks. So if a network card does not support > it, it would be possible to use etherboot as the PXE stack. But I don't > know how it would work. When etherboot is located in an extension rom, > then maybe the bios can scan it and use it ? I am not sure but I have > sent the question to the etherboot mailing list, I am waiting for some > comments. Please let me know. -- Marco From MAILER-DAEMON Sun May 07 01:42:23 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fcc2B-00053G-MB for mharc-grub-devel@gnu.org; Sun, 07 May 2006 01:42:23 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fcc2A-0004zz-6N for grub-devel@gnu.org; Sun, 07 May 2006 01:42:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fcc28-0004xh-C9 for grub-devel@gnu.org; Sun, 07 May 2006 01:42:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fcc28-0004xe-85 for grub-devel@gnu.org; Sun, 07 May 2006 01:42:20 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fcc2f-00011j-RH for grub-devel@gnu.org; Sun, 07 May 2006 01:42:54 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 5FF633C925552 for ; Sun, 7 May 2006 09:06:19 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id E4E293C925551 for ; Sun, 7 May 2006 09:06:18 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: grub-devel@gnu.org Date: Sun, 7 May 2006 07:42:15 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605070742.15975.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.169279, version=0.17.2 Subject: script bug 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: Sun, 07 May 2006 05:42:22 -0000 Try something like this: @ "extremely long long line............................................................." { } grub-emu segfaults. This is partially because of the menu code, partilaly because of the scripting engine code. The menu code currently limits the max number of characters per line to 100 (very bad). So get_line chops the line, then the scripting engine cannot deal with the malformed line. Both must be fixed. Okuji From MAILER-DAEMON Sun May 07 02:00:49 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FccK1-0002Pa-Eq for mharc-grub-devel@gnu.org; Sun, 07 May 2006 02:00:49 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FccK0-0002PG-RH for grub-devel@gnu.org; Sun, 07 May 2006 02:00:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FccJz-0002On-Dj for grub-devel@gnu.org; Sun, 07 May 2006 02:00:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FccJz-0002Ok-8l for grub-devel@gnu.org; Sun, 07 May 2006 02:00:47 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FccKW-0002FM-TW for grub-devel@gnu.org; Sun, 07 May 2006 02:01:21 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id C4F1C3C925554 for ; Sun, 7 May 2006 09:24:46 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 7B8693C925553 for ; Sun, 7 May 2006 09:24:46 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: grub-devel@gnu.org Date: Sun, 7 May 2006 08:00:43 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605070800.43759.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.467945, version=0.17.2 Subject: another script bug 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: Sun, 07 May 2006 06:00:49 -0000 As far as I see, the scripting code is really broken. When executing a menu entry, nothing is executed (setting a variable seems to be executed for an unknown reason, but there is no echo). Okuji From MAILER-DAEMON Sun May 07 07:38:02 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FchaL-00084k-PV for mharc-grub-devel@gnu.org; Sun, 07 May 2006 07:38:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FchaK-00084e-6E for grub-devel@gnu.org; Sun, 07 May 2006 07:38:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FchaI-00084S-Hf for grub-devel@gnu.org; Sun, 07 May 2006 07:37:59 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FchaI-00084P-Cb for grub-devel@gnu.org; Sun, 07 May 2006 07:37:58 -0400 Received: from [194.109.24.24] (helo=smtp-vbr4.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fchat-0001hO-9l for grub-devel@gnu.org; Sun, 07 May 2006 07:38:35 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr4.xs4all.nl (8.13.6/8.13.6) with ESMTP id k47Bbuit031097 for ; Sun, 7 May 2006 13:37:57 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <200605070742.15975.okuji@enbug.org> From: Marco Gerards Date: Sun, 07 May 2006 13:40:05 +0200 In-Reply-To: <200605070742.15975.okuji@enbug.org> (Yoshinori K. Okuji's message of "Sun, 7 May 2006 07:42:15 +0200") Message-ID: <87lktenjvu.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: script bug 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: Sun, 07 May 2006 11:38:00 -0000 "Yoshinori K. Okuji" writes: > Try something like this: > > @ "extremely long long > line............................................................." { > } > > grub-emu segfaults. This is partially because of the menu code, partilaly > because of the scripting engine code. The menu code currently limits the max > number of characters per line to 100 (very bad). So get_line chops the line, > then the scripting engine cannot deal with the malformed line. Both must be > fixed. Yeah, the get_line was broken from the beginning... I think it should be even possible to remove this function because we do not really need it. As for scripting, I will test it in about two weeks. At the moment I have very little time. :-/ -- Marco From MAILER-DAEMON Sun May 07 07:40:17 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FchcX-0000ep-CR for mharc-grub-devel@gnu.org; Sun, 07 May 2006 07:40:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FchcV-0000db-6a for grub-devel@gnu.org; Sun, 07 May 2006 07:40:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FchcT-0000dP-Ih for grub-devel@gnu.org; Sun, 07 May 2006 07:40:14 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FchcT-0000dK-FT for grub-devel@gnu.org; Sun, 07 May 2006 07:40:13 -0400 Received: from [194.109.24.29] (helo=smtp-vbr9.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fchd4-0001ru-7W for grub-devel@gnu.org; Sun, 07 May 2006 07:40:50 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr9.xs4all.nl (8.13.6/8.13.6) with ESMTP id k47BeB6X016981 for ; Sun, 7 May 2006 13:40:11 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <200605070800.43759.okuji@enbug.org> From: Marco Gerards Date: Sun, 07 May 2006 13:42:20 +0200 In-Reply-To: <200605070800.43759.okuji@enbug.org> (Yoshinori K. Okuji's message of "Sun, 7 May 2006 08:00:43 +0200") Message-ID: <87hd42njs3.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: another script bug 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: Sun, 07 May 2006 11:40:15 -0000 "Yoshinori K. Okuji" writes: > As far as I see, the scripting code is really broken. When executing a menu > entry, nothing is executed (setting a variable seems to be executed for an > unknown reason, but there is no echo). Right, and I am able to reproduce this. I know how it is caused but it's not an easy issue to fix properly. This too has a wait a bit, sorry. Can you test it with just a single command in the menu entry? For this specific case things have to work... -- Marco From MAILER-DAEMON Sun May 07 09:27:21 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcjI9-0002JH-SK for mharc-grub-devel@gnu.org; Sun, 07 May 2006 09:27:21 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcjI7-0002GR-CI for grub-devel@gnu.org; Sun, 07 May 2006 09:27:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcjI4-0002G3-IU for grub-devel@gnu.org; Sun, 07 May 2006 09:27:19 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcjI4-0002G0-Dk for grub-devel@gnu.org; Sun, 07 May 2006 09:27:16 -0400 Received: from [81.255.54.11] (helo=mx.laposte.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcjIb-0001YE-UC for grub-devel@gnu.org; Sun, 07 May 2006 09:27:54 -0400 Received: from [192.168.0.14] (82.243.217.90) by mx.laposte.net (7.2.060.1) (authenticated as bersace03) id 4447A77500A71C95 for grub-devel@gnu.org; Sun, 7 May 2006 15:27:09 +0200 From: =?ISO-8859-1?Q?=C9tienne?= Bersac To: grub-devel@gnu.org Content-Type: text/plain; charset=UTF-8 Date: Sun, 07 May 2006 15:27:03 +0200 Message-Id: <1147008423.5354.1.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: Quoted-Printable Subject: Compile error on powerpc 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: Sun, 07 May 2006 13:27:20 -0000 Hello, I try to build latest grub2 cvs on iMac G3 (New World). I got this error :=20 bersace@wenyaave:~/Sources/grub2/build$ make gcc -Iutil -I../util -I. -Iinclude -I../include -Wall -W -DGRUB_DATADIR=3D \"/usr/local/share/grub/powerpc-ieee1275\" -g -O2 -DGRUB_UTIL=3D1 -c -o grub_emu-util_console.o ../util/console.c ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_putchar=C2=BB : ../util/console.c:89: attention : implicit declaration of function =C2=ABaddch=C2=BB ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_setcolor=C2=BB : ../util/console.c:121: attention : implicit declaration of function =C2=ABcolor_set=C2=BB ../util/console.c: Hors de toute fonction : ../util/console.c:124: erreur: =C2=ABERR=C2=BB undeclared here (not in a = function) ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_checkkey=C2=BB : ../util/console.c:136: attention : implicit declaration of function =C2=ABwtimeout=C2=BB ../util/console.c:136: erreur: =C2=ABstdscr=C2=BB undeclared (first use i= n this function) ../util/console.c:136: erreur: (Chaque identificateur non d=C3=A9clar=C3=A9= est rapport=C3=A9 une seule fois ../util/console.c:136: erreur: pour chaque fonction dans laquelle il appara=C3=AEt.) ../util/console.c:137: attention : implicit declaration of function =C2=ABgetch=C2=BB ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_getkey=C2=BB : ../util/console.c:161: erreur: =C2=ABstdscr=C2=BB undeclared (first use i= n this function) ../util/console.c:167: erreur: =C2=ABKEY_LEFT=C2=BB undeclared (first use= in this function) ../util/console.c:171: erreur: =C2=ABKEY_RIGHT=C2=BB undeclared (first us= e in this function) ../util/console.c:175: erreur: =C2=ABKEY_UP=C2=BB undeclared (first use i= n this function) ../util/console.c:179: erreur: =C2=ABKEY_DOWN=C2=BB undeclared (first use= in this function) ../util/console.c:183: erreur: =C2=ABKEY_IC=C2=BB undeclared (first use i= n this function) ../util/console.c:187: erreur: =C2=ABKEY_DC=C2=BB undeclared (first use i= n this function) ../util/console.c:191: erreur: =C2=ABKEY_BACKSPACE=C2=BB undeclared (firs= t use in this function) ../util/console.c:198: erreur: =C2=ABKEY_HOME=C2=BB undeclared (first use= in this function) ../util/console.c:202: erreur: =C2=ABKEY_END=C2=BB undeclared (first use = in this function)../util/console.c:206: erreur: =C2=ABKEY_NPAGE=C2=BB undeclared = (first use in this function) ../util/console.c:210: erreur: =C2=ABKEY_PPAGE=C2=BB undeclared (first us= e in this function) ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_getxy=C2=BB : ../util/console.c:224: attention : implicit declaration of function =C2=ABgetyx=C2=BB ../util/console.c:224: erreur: =C2=ABstdscr=C2=BB undeclared (first use i= n this function) ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_getwh=C2=BB : ../util/console.c:235: attention : implicit declaration of function =C2=ABgetmaxyx=C2=BB ../util/console.c:235: erreur: =C2=ABstdscr=C2=BB undeclared (first use i= n this function) ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_gotoxy=C2=BB : ../util/console.c:243: attention : implicit declaration of function =C2=ABmove=C2=BB ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_cls=C2=BB : ../util/console.c:249: attention : implicit declaration of function =C2=ABclear=C2=BB ../util/console.c:250: attention : implicit declaration of function =C2=ABrefresh=C2=BB ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_setcursor=C2=BB : ../util/console.c:256: attention : implicit declaration of function =C2=ABcurs_set=C2=BB ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_init=C2=BB : ../util/console.c:268: attention : implicit declaration of function =C2=ABinitscr=C2=BB ../util/console.c:269: attention : implicit declaration of function =C2=ABraw=C2=BB ../util/console.c:270: attention : implicit declaration of function =C2=ABnoecho=C2=BB ../util/console.c:271: attention : implicit declaration of function =C2=ABscrollok=C2=BB ../util/console.c:271: erreur: =C2=ABstdscr=C2=BB undeclared (first use i= n this function) ../util/console.c:271: erreur: =C2=ABTRUE=C2=BB undeclared (first use in = this function) ../util/console.c:273: attention : implicit declaration of function =C2=ABnonl=C2=BB ../util/console.c:274: attention : implicit declaration of function =C2=ABintrflush=C2=BB ../util/console.c:274: erreur: =C2=ABFALSE=C2=BB undeclared (first use in= this function) ../util/console.c:275: attention : implicit declaration of function =C2=ABkeypad=C2=BB ../util/console.c:276: attention : implicit declaration of function =C2=ABstart_color=C2=BB ../util/console.c: Dans la fonction =C2=ABgrub_ncurses_fini=C2=BB : ../util/console.c:284: attention : implicit declaration of function =C2=ABendwin=C2=BB make: *** [grub_emu-util_console.o] Erreur 1 bersace@wenyaave:~/Sources/grub2/build$ As said in the TestingOnPowerPC wiki page, i report this error. Thanks. From MAILER-DAEMON Sun May 07 09:51:43 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fcjfj-00037U-Ot for mharc-grub-devel@gnu.org; Sun, 07 May 2006 09:51:43 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fcjfh-00036Q-TE for grub-devel@gnu.org; Sun, 07 May 2006 09:51:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fcjfg-00034I-EB for grub-devel@gnu.org; Sun, 07 May 2006 09:51:41 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fcjfg-00034F-7i for grub-devel@gnu.org; Sun, 07 May 2006 09:51:40 -0400 Received: from [194.109.24.33] (helo=smtp-vbr13.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcjgI-0003KS-D0 for grub-devel@gnu.org; Sun, 07 May 2006 09:52:18 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr13.xs4all.nl (8.13.6/8.13.6) with ESMTP id k47DpcqX023357 for ; Sun, 7 May 2006 15:51:39 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <1147008423.5354.1.camel@localhost> From: Marco Gerards Date: Sun, 07 May 2006 15:53:47 +0200 In-Reply-To: <1147008423.5354.1.camel@localhost> (=?iso-8859-1?Q?=C9tienne?= Bersac's message of "Sun, 07 May 2006 15:27:03 +0200") Message-ID: <87d5eqndp0.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: Compile error on powerpc 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: Sun, 07 May 2006 13:51:42 -0000 =C9tienne Bersac writes: Hi, > I try to build latest grub2 cvs on iMac G3 (New World). I got this > error :=20 It seems you do not have the ncurses header files installed. In Ubuntu this is libncurses5-dev. -- Marco From MAILER-DAEMON Sun May 07 09:53:50 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fcjhm-0003tu-JA for mharc-grub-devel@gnu.org; Sun, 07 May 2006 09:53:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fcjhl-0003tp-8Y for grub-devel@gnu.org; Sun, 07 May 2006 09:53:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fcjhj-0003td-RW for grub-devel@gnu.org; Sun, 07 May 2006 09:53:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fcjhj-0003ta-LT for grub-devel@gnu.org; Sun, 07 May 2006 09:53:47 -0400 Received: from [212.27.42.36] (helo=smtp6-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcjiM-0003Py-0C for grub-devel@gnu.org; Sun, 07 May 2006 09:54:26 -0400 Received: from [192.168.0.15] (did75-13-82-243-217-90.fbx.proxad.net [82.243.217.90]) by smtp6-g19.free.fr (Postfix) with ESMTP id A2622222DA for ; Sun, 7 May 2006 15:53:46 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v749.3) In-Reply-To: <87d5eqndp0.fsf@xs4all.nl> References: <1147008423.5354.1.camel@localhost> <87d5eqndp0.fsf@xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: <286475F7-05D3-41E4-A3A0-7A76E920FD27@laposte.net> Content-Transfer-Encoding: quoted-printable From: =?ISO-8859-1?Q?=C9tienne_Bersac?= Date: Sun, 7 May 2006 15:53:45 +0200 To: The development of GRUB 2 X-Mailer: Apple Mail (2.749.3) Subject: Re: Compile error on powerpc 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: Sun, 07 May 2006 13:53:49 -0000 Le 7 mai 06 =E0 15:53, Marco Gerards a =E9crit : > =C9tienne Bersac writes: > > Hi, > >> I try to build latest grub2 cvs on iMac G3 (New World). I got this >> error : > > It seems you do not have the ncurses header files installed. In > Ubuntu this is libncurses5-dev. I did that. but it still occurs. From MAILER-DAEMON Sun May 07 10:06:14 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fcjtm-00028m-IO for mharc-grub-devel@gnu.org; Sun, 07 May 2006 10:06:14 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fcjtk-00027z-CS for grub-devel@gnu.org; Sun, 07 May 2006 10:06:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fcjtj-00027n-Nw for grub-devel@gnu.org; Sun, 07 May 2006 10:06:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fcjtj-00027k-LT for grub-devel@gnu.org; Sun, 07 May 2006 10:06:11 -0400 Received: from [212.27.42.27] (helo=smtp1-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcjuM-0004fD-5l for grub-devel@gnu.org; Sun, 07 May 2006 10:06:50 -0400 Received: from [192.168.0.15] (did75-13-82-243-217-90.fbx.proxad.net [82.243.217.90]) by smtp1-g19.free.fr (Postfix) with ESMTP id 8D9C19AAC4 for ; Sun, 7 May 2006 16:06:10 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v749.3) In-Reply-To: <286475F7-05D3-41E4-A3A0-7A76E920FD27@laposte.net> References: <1147008423.5354.1.camel@localhost> <87d5eqndp0.fsf@xs4all.nl> <286475F7-05D3-41E4-A3A0-7A76E920FD27@laposte.net> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <40121130-B532-4E5C-9DC2-71E3178DF2D0@laposte.net> Content-Transfer-Encoding: quoted-printable From: =?ISO-8859-1?Q?=C9tienne_Bersac?= Date: Sun, 7 May 2006 16:06:10 +0200 To: The development of GRUB 2 X-Mailer: Apple Mail (2.749.3) Subject: Re: Compile error on powerpc 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: Sun, 07 May 2006 14:06:13 -0000 Okey, It seems that i needed to re run ../configure an recompile the =20 project after installing libncurses5-dev . That would be great if ./=20 configure check for ncurses headers. =C9tienne.= From MAILER-DAEMON Sun May 07 10:17:53 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fck53-0007fl-Mo for mharc-grub-devel@gnu.org; Sun, 07 May 2006 10:17:53 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fck51-0007fM-GH for grub-devel@gnu.org; Sun, 07 May 2006 10:17:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fck50-0007eq-H2 for grub-devel@gnu.org; Sun, 07 May 2006 10:17:51 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fck50-0007eh-B8 for grub-devel@gnu.org; Sun, 07 May 2006 10:17:50 -0400 Received: from [192.116.227.193] (helo=srv2003.bladefusion.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fck5b-0005Ep-S2 for grub-devel@gnu.org; Sun, 07 May 2006 10:18:29 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C671E1.EC6EAAB6" Date: Sun, 7 May 2006 17:24:17 +0300 Message-ID: <63DA313E79D4B947ABC7AE6DDC9CC309040E9F@srv2003.bladefusion.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Re: GRUB2 netboot development thread-index: AcZx4exp34rjEPDvRTyULt8WOwU6XA== From: "Rudy Attias" To: Subject: Re: GRUB2 netboot development 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: Sun, 07 May 2006 14:17:52 -0000 This is a multi-part message in MIME format. ------_=_NextPart_001_01C671E1.EC6EAAB6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hey=20 =20 Well I followed you advice but I came across some issues, probably on customization of the driver, I'm trying to add the tg3 to it. I made some adjustments on the code add some here and remove some there to resolve dependencies but one dependency I can't resolve. This function is not in the tg3.c or tg3.h code ... :(=20 I probably don't know enough C++ do understand that. If you have any ideas I would appreciate it very much. =20 genmoddep: error: pcibios_read_config_dword in tg3 is not defined make: *** [moddep.lst] Error 1 =20 Rudy Attias =20 > Hey, >=20 > =20 >=20 > I'm interested to know, how to add drivers to the new pluggable=20 > architecture (grub2_netboot_7.tgz) from etherboot sources? >=20 > =20 >=20 > Also wanted to say that you guys do great job with this boot loader!=20 > Now it needs to learn to boot from RAID and make coffee and its perfect! >=20 > =20 >=20 > Rudy Attias >=20 =20 Hi! =20 Adding a driver from etherboot (I used 5.4.1) to this version of grub2 should be easy. Note that I have only tried the ns8390 driver so far so it is likely that the process of addind news drivers requires more manual interventions for the moment. The idea is that it could be made completely automatic but it is not yet done. Also note that according to a previous post, this mechanism which allows importing etherboot drivers will not make it to the official grub2. The netboot support wil be based on pxe and undi instead. =20 =20 Anyway, here are the steps: =20 =20 1) Copy the drivers files from the driver you want from Etherboot to grub (Look where ns8390.c and ns8390.h are). =20 2) Edit the c file and add the following code at the begining of the file: =20 /* Added for GRUB support */ #include /* Added for GRUB support */ =20 =20 3) locate in the c code the structure (probably at the bottom) marked with __pci_driver. It must be called something like NAME_driver. =20 =20 4) At the end of the c file, add the following code where NAME should be replaced appropriately: =20 /* Added for GRUB support */ =20 grub_ether_declare_probe(NAME); grub_ether_declare_driver_struct(NAME); =20 GRUB_MOD_INIT(NAME) { (void)mod; /* To stop warning. */ =20 grub_ether_fill_driver(NAME); grub_register_pci_driver(&NAME_grub_driver); } =20 GRUB_MOD_FINI(NAME) { grub_unregister_pci_driver(&NAME_grub_driver); } =20 /* Added for GRUB support */ =20 =20 =20 5) You now have to instruct the building process to compile a module for your new driver. This is done by modifying the file conf/i386-pc.rmk. Do a search for ns8390.mod and notice that it is assigned to a variable called pkgdata_MODULES. Add your module, i.e add NAME.mod to the list of modules assigned to this variable. =20 6) Do a search for ns8390.mod again and add these lines, changing what needs to be changed =20 # For ns8390.mod ns8390_mod_SOURCES =3D drivers/net/ns8390.c ns8390_mod_CFLAGS =3D $(DRIVERS_NET_CFLAGS) $(COMMON_CFLAGS) $(DRIVERS_CFLAGS) ns8390_mod_LDFLAGS =3D $(COMMON_LDFLAGS) =20 7) This is it, autoconf && ./configure && make and see how it goes =20 In order to test your news driver, you have to use the modules pci, pci_etherboot, as well as your new module. You can use the command lspci to check if pci support list your card and lspci_driver to see if your driver was added properly. To probe fo your card, use scan_pci_device. =20 If everything goes well, you can then use tx_test to check for the successfull transmission of a test frame. =20 Good luck, let me know how it goes! =20 =20 ------_=_NextPart_001_01C671E1.EC6EAAB6 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hey

 

Well I followed you advice but I came across = some issues, probably on customization of the driver, I'm trying to add the = tg3 to it. I made some adjustments on the code add some here and remove some = there to resolve dependencies but one dependency I can't resolve. This function = is not in the tg3.c or tg3.h code … :(

I probably don't know enough C++ do understand = that. If you have any ideas I would appreciate it very = much.

 

genmoddep: error: pcibios_read_config_dword in = tg3 is not defined

make: *** [moddep.lst] Error = 1

 

Rudy = Attias

 

> = Hey,

> =

>  =

> =

> I'm interested to = know, how to add drivers to the new pluggable

> architecture (grub2_netboot_7.tgz) from etherboot = sources?

> =

>  =

> =

> Also wanted to say = that you guys do great job with this boot loader!

> Now it needs to learn = to boot from RAID and make coffee and  its = perfect!

> =

>  =

> =

> Rudy = Attias

> =

 

Hi!=

 

Adding a driver from = etherboot (I used 5.4.1) to this version of grub2 should be easy. Note that I have = only tried the ns8390 driver so far so it is likely that the process of = addind news drivers requires more manual interventions for the moment. The idea is = that it could be made completely automatic but it is not yet done. Also note = that according to a previous post, this mechanism which allows importing = etherboot drivers will not make it to the official grub2. The netboot support wil = be based on pxe and undi instead.

 

 

Anyway, here are the = steps:

 

 

1) Copy the drivers files = from the driver you want from Etherboot to grub (Look where ns8390.c and ns8390.h = are).

 

2) Edit the c file and add = the following code at the begining of the file:

 

/* Added for GRUB support = */

#include = <ether_glue.h>

/* Added for GRUB support = */

 

 

3) locate in the c code the structure (probably at the bottom) marked with  __pci_driver. It = must be called something like NAME_driver.

 

 

4) At the end of the c = file, add the following code where NAME should be replaced = appropriately:

 

/* Added for GRUB support = */

 

grub_ether_declare_probe(NAM= E);

grub_ether_declare_driver_st= ruct(NAME);

 

GRUB_MOD_INIT(NAME)

{

  (void)mod;      /* To stop warning. = */

 

  = grub_ether_fill_driver(NAME);

  grub_register_pci_driver(&NAME_grub_driver);=

}

 

GRUB_MOD_FINI(NAME)

{

  grub_unregister_pci_driver(&NAME_grub_driver);

}

 

/* Added for GRUB support = */

 

 

 

5) You now have to instruct = the building process to compile a module for your new driver. This is done = by modifying the file  conf/i386-pc.rmk.

Do a search for ns8390.mod = and notice that it is assigned to a variable called pkgdata_MODULES. Add = your module, i.e add NAME.mod to the list of modules assigned to this = variable.

 

6) Do a search for = ns8390.mod again and add these lines, changing what needs to be = changed

 

# For = ns8390.mod

ns8390_mod_SOURCES =3D drivers/net/ns8390.c ns8390_mod_CFLAGS =3D $(DRIVERS_NET_CFLAGS) = $(COMMON_CFLAGS) $(DRIVERS_CFLAGS) ns8390_mod_LDFLAGS =3D = $(COMMON_LDFLAGS)

 

7) This is it, autoconf = && ./configure && make and see how it = goes

 

In order to test your news = driver, you have to use the modules pci, pci_etherboot, as well as your new = module. You can use the command lspci to check if pci support list your card and lspci_driver to see if your driver was added properly.  To probe fo = your card, use scan_pci_device.

 

If everything goes well, = you can then use tx_test to check for the successfull transmission of a test = frame.

 

Good luck, let me know how = it goes!

 

 

------_=_NextPart_001_01C671E1.EC6EAAB6-- From MAILER-DAEMON Sun May 07 10:48:03 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FckYF-0003TW-IB for mharc-grub-devel@gnu.org; Sun, 07 May 2006 10:48:03 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FckYD-0003SO-HM for grub-devel@gnu.org; Sun, 07 May 2006 10:48:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FckYB-0003QY-GZ for grub-devel@gnu.org; Sun, 07 May 2006 10:48:00 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FckYB-0003QV-9n for grub-devel@gnu.org; Sun, 07 May 2006 10:47:59 -0400 Received: from [212.27.42.28] (helo=smtp2-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FckYo-0007Ky-3g for grub-devel@gnu.org; Sun, 07 May 2006 10:48:38 -0400 Received: from [192.168.0.15] (did75-13-82-243-217-90.fbx.proxad.net [82.243.217.90]) by smtp2-g19.free.fr (Postfix) with ESMTP id 355E8730BD for ; Sun, 7 May 2006 16:47:56 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v749.3) Content-Transfer-Encoding: quoted-printable Message-Id: Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed To: The development of GRUB 2 From: =?ISO-8859-1?Q?=C9tienne_Bersac?= Date: Sun, 7 May 2006 16:47:55 +0200 X-Mailer: Apple Mail (2.749.3) Subject: Grub2 test on iMac G3 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: Sun, 07 May 2006 14:48:01 -0000 Hello, I test the Grub2 on iMac G3, following the howto available at http://=20 grub.enbug.org/TestingOnPowerPC . Here are some comment i wish useful : * even if i set boot-device to hd,2:grubof.modules, i have to =20 manually type "boot" at the OF prompt to have grub loaded. else, the =20 screen keep gray. * as grub version is 1.93, i fill grub.cfg with timeout 5 menuentry "Linux" { linux (hd,2)/boot/vmlinux root=3D/dev/hda3 initrd (hd,2)/boot/initrd.img } But then, i have a kernel panic because it do not find root. I can boot linux with the (great) grub console by typing : grub> linux (hd,2)/boot/vmlinux root=3D/dev/hda3 grub> initrd (hd,2)/boot/initrd.img grub> boot * The menu does not use the whole screen, only the top left corner. =20= That's strange. Wish that helps. =C9tienne.= From MAILER-DAEMON Sun May 07 10:58:24 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FckiF-0000BX-VC for mharc-grub-devel@gnu.org; Sun, 07 May 2006 10:58:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FckiE-00009m-71 for grub-devel@gnu.org; Sun, 07 May 2006 10:58:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FckiB-00009B-Va for grub-devel@gnu.org; Sun, 07 May 2006 10:58:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FckiB-000098-Qt for grub-devel@gnu.org; Sun, 07 May 2006 10:58:19 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fckio-0008Kt-NH for grub-devel@gnu.org; Sun, 07 May 2006 10:58:58 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 944103C92DEE7 for ; Sun, 7 May 2006 18:22:27 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 04F663C92DEE6 for ; Sun, 7 May 2006 18:22:27 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 7 May 2006 16:58:14 +0200 User-Agent: KMail/1.8.2 References: <200605070742.15975.okuji@enbug.org> <87lktenjvu.fsf@xs4all.nl> In-Reply-To: <87lktenjvu.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605071658.14644.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.000546, version=0.17.2 Subject: Re: script bug 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: Sun, 07 May 2006 14:58:22 -0000 On Sunday 07 May 2006 13:40, Marco Gerards wrote: > Yeah, the get_line was broken from the beginning... I think it should > be even possible to remove this function because we do not really need > it. I believe that get_line should be kept. Suppose that you have this kind of config file: 1: do something 2: do another thing 3: do yet another thing To execute these lines, it is not necessary to keep all the three lines in memory, since they can be executed line by line. You can say that the consumed memory is not that much, but I don't think this is a good way of programming. Whenever possible, I think it is better to save memory. BTW, could you describe how the scripting engine is supposed to work? For example, suppose that you have this (the syntax is not very important here): if test -f /boot/kernel; then kernel /boot/kernel fi Is it possible to tell a line at a time to the scripting engine, and let it execute this code block once "fi" is inputted? BASH deals with command lines in this way. Okuji From MAILER-DAEMON Sun May 07 11:00:08 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fckjw-0001Jc-H2 for mharc-grub-devel@gnu.org; Sun, 07 May 2006 11:00:08 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fckju-0001Ix-6U for grub-devel@gnu.org; Sun, 07 May 2006 11:00:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fckjs-0001IO-Lr for grub-devel@gnu.org; Sun, 07 May 2006 11:00:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fckjs-0001IJ-FZ for grub-devel@gnu.org; Sun, 07 May 2006 11:00:04 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FckkV-0008WJ-B0 for grub-devel@gnu.org; Sun, 07 May 2006 11:00:43 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id B44ED3C92DEE7 for ; Sun, 7 May 2006 18:24:13 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 30E713C92DEE6 for ; Sun, 7 May 2006 18:24:13 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 7 May 2006 17:00:00 +0200 User-Agent: KMail/1.8.2 References: <200605070800.43759.okuji@enbug.org> <87hd42njs3.fsf@xs4all.nl> In-Reply-To: <87hd42njs3.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605071700.01028.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.055381, version=0.17.2 Subject: Re: another script bug 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: Sun, 07 May 2006 15:00:06 -0000 On Sunday 07 May 2006 13:42, Marco Gerards wrote: > "Yoshinori K. Okuji" writes: > > As far as I see, the scripting code is really broken. When executing a > > menu entry, nothing is executed (setting a variable seems to be executed > > for an unknown reason, but there is no echo). > > Right, and I am able to reproduce this. I know how it is caused but > it's not an easy issue to fix properly. This too has a wait a bit, > sorry. Can you provide me more details? As you know, I don't like to wait for others to fix bugs, so I will take a look if you cannot fix it immediately. > Can you test it with just a single command in the menu entry? For > this specific case things have to work... I will. Okuji From MAILER-DAEMON Sun May 07 13:58:39 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcnWg-0005lQ-Ty for mharc-grub-devel@gnu.org; Sun, 07 May 2006 13:58:38 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcnWf-0005l6-CQ for grub-devel@gnu.org; Sun, 07 May 2006 13:58:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcnWe-0005kY-Dn for grub-devel@gnu.org; Sun, 07 May 2006 13:58:36 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcnWe-0005kQ-47 for grub-devel@gnu.org; Sun, 07 May 2006 13:58:36 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcnXI-0005EJ-OX for grub-devel@gnu.org; Sun, 07 May 2006 13:59:16 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 8E2473C92DEEC for ; Sun, 7 May 2006 21:22:48 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 91A073C92DEEB for ; Sun, 7 May 2006 21:22:47 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: grub-devel@gnu.org Date: Sun, 7 May 2006 19:58:30 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605071958.31434.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.498625, version=0.17.2 Subject: firmware specification 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: Sun, 07 May 2006 17:58:37 -0000 So far, we've been using the triples (such as i386-pc-gnu) to specify both a CPU and a firmware. I feel that this is not appropriate. The vendor part of the triple can imply what firmware is used, but not always. So, for example, I invented i386-efi for EFI. Since the specification of the triple affects the choice of a compiler, I suspect that our usage is wrong. So I'd like to add a configuration option to specify a firmware type instead of using a vendor name. When the user does not specify her firmware explicitly, configure can guess the firmware from the CPU and the vendor. Is there any objection? Okuji From MAILER-DAEMON Sun May 07 17:46:50 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fcr5W-0001Gu-Q3 for mharc-grub-devel@gnu.org; Sun, 07 May 2006 17:46:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fcr5V-0001Gp-KU for grub-devel@gnu.org; Sun, 07 May 2006 17:46:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fcr5T-0001Gc-7l for grub-devel@gnu.org; Sun, 07 May 2006 17:46:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fcr5T-0001GZ-4x for grub-devel@gnu.org; Sun, 07 May 2006 17:46:47 -0400 Received: from [155.198.5.113] (helo=mr3.cc.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fcr69-0004XM-Sx for grub-devel@gnu.org; Sun, 07 May 2006 17:47:30 -0400 Received: from icexp4.cc.ic.ac.uk ([155.198.3.44] helo=icex.imperial.ac.uk) by mr3.cc.ic.ac.uk with smtp (Exim 4.51) id 1Fcr5Q-0008FG-Ez for grub-devel@gnu.org; Sun, 07 May 2006 22:46:44 +0100 Received: from icex3.ic.ac.uk ([155.198.3.3]) by icex.imperial.ac.uk with Microsoft SMTPSVC(6.0.3790.1830); Sun, 7 May 2006 22:45:52 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C6721F.9CA0C723" Date: Sun, 7 May 2006 22:44:52 +0100 Message-ID: <3C2082E50F32E1459503A8E675E24EE4B04629@icex3.ic.ac.uk> X-MS-Has-Attach: X-MS-TNEF-Correlator: <3C2082E50F32E1459503A8E675E24EE4B04629@icex3.ic.ac.uk> Thread-Topic: Re: GRUB2 netboot development Thread-Index: AcZx4exp34rjEPDvRTyULt8WOwU6XAAPYw5C From: "Guffens, Vincent" To: "The development of GRUB 2" X-OriginalArrivalTime: 07 May 2006 21:45:52.0742 (UTC) FILETIME=[9CD56060:01C6721F] Subject: RE: GRUB2 netboot development 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: Sun, 07 May 2006 21:46:49 -0000 This is a multi-part message in MIME format. ------_=_NextPart_001_01C6721F.9CA0C723 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable >Well I followed you advice but I came across some issues, probably on >customization of the driver, I'm trying to add the tg3 to it. I made >some adjustments on the code add some here and remove some there to >resolve dependencies but one dependency I can't resolve. This function >is not in the tg3.c or tg3.h code ... :(=20 >I probably don't know enough C++ do understand that. If you have any >ideas I would appreciate it very much. =20 >genmoddep: error: pcibios_read_config_dword in tg3 is not defined >make: *** [moddep.lst] Error 1 yes, this is right, this function is not implemented anywhere. I have = published grub2_netboot_8.tgz on my website so that you can have a look. = The module tg3.mod compiles successfully but I did not test it. By the = way, this is not c++ but c (although with a nice object oriented = design)! I hope it will work, but if it does not, I think we should not worry too = much about that for the moment as the netboot development is taking = quite a different direction now. Cheers! ------_=_NextPart_001_01C6721F.9CA0C723 Content-Type: application/ms-tnef; name="winmail.dat" Content-Transfer-Encoding: base64 eJ8+IjUVAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEEgAEAHgAAAFJFOiBHUlVCMiBuZXRib290 IGRldmVsb3BtZW50ADEKAQWAAwAOAAAA1gcFAAcAFgAsADQAAABfAQEggAMADgAAANYHBQAHABYA LQA0AAAAYAEBCYABACEAAABGMkYxNTYwMzVCM0YwRTQ2OTY0RkU1RUEyREQ3Q0E2MwBTBwEDkAYA GAsAADgAAAADACYAAAAAAAMANgAAAAAAQAA5AIsEongfcsYBHgA9AAEAAAAFAAAAUkU6IAAAAAAC AUcAAQAAAC0AAABjPUdCO2E9IDtwPVVLLkFDO2w9SUNFWDMtMDYwNTA3MjE0NTUyWi0xMTE1MwAA AAAeAEkA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S51Y2wu YWMuYmVAZ251Lm9yZwAAAB4AM0ABAAAAHAAAAFJ1ZHkuQXR0aWFzQGJsYWRlZnVzaW9uLmNvbQAe ADhAAQAAAAkAAABWR1VGRkVOUwAAAAAeADlAAQAAAAIAAAAuAAAAAwB2QP////8LACkAAAAAAAsA IwAAAAAAAwAGEIU/8lADAAcQEwMAAAMAEBABAAAAAwAREAEAAAAeAAgQAQAAAGUAAABXRUxMSUZP TExPV0VEWU9VQURWSUNFQlVUSUNBTUVBQ1JPU1NTT01FSVNTVUVTLFBST0JBQkxZT05DVVNUT01J WkFUSU9OT0ZUSEVEUklWRVIsSU1UUllJTkdUT0FERFRIRVRHAAAAAAIBfwABAAAAOAAAADwzQzIw ODJFNTBGMzJFMTQ1OTUwM0E4RTY3NUUyNEVFNEIwNDYyOUBpY2V4My5pYy5hYy51az4AguA= ------_=_NextPart_001_01C6721F.9CA0C723-- From MAILER-DAEMON Sun May 07 19:14:24 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FcsSG-0000uX-FR for mharc-grub-devel@gnu.org; Sun, 07 May 2006 19:14:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcsSF-0000uR-2u for grub-devel@gnu.org; Sun, 07 May 2006 19:14:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcsSD-0000uF-Jr for grub-devel@gnu.org; Sun, 07 May 2006 19:14:22 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcsSD-0000uB-Dy for grub-devel@gnu.org; Sun, 07 May 2006 19:14:21 -0400 Received: from [155.198.5.113] (helo=mr3.cc.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FcsSv-0002BN-4G for grub-devel@gnu.org; Sun, 07 May 2006 19:15:05 -0400 Received: from icexp4.cc.ic.ac.uk ([155.198.3.44] helo=icex.imperial.ac.uk) by mr3.cc.ic.ac.uk with smtp (Exim 4.51) id 1FcsSB-0006v5-Nt for grub-devel@gnu.org; Mon, 08 May 2006 00:14:19 +0100 Received: from icex3.ic.ac.uk ([155.198.3.3]) by icex.imperial.ac.uk with Microsoft SMTPSVC(6.0.3790.1830); Mon, 8 May 2006 00:14:19 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6722B.F77884C3" Date: Mon, 8 May 2006 00:14:18 +0100 Message-ID: <3C2082E50F32E1459503A8E675E24EE4B0462A@icex3.ic.ac.uk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: a simple list Thread-Index: AcZyK/dzjjq5MVIDSh6qoueq//6Yfw== From: "Guffens, Vincent" To: X-OriginalArrivalTime: 07 May 2006 23:14:19.0186 (UTC) FILETIME=[F7B87920:01C6722B] Subject: a simple list 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: Sun, 07 May 2006 23:14:23 -0000 This is a multi-part message in MIME format. ------_=_NextPart_001_01C6722B.F77884C3 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I need to use a simple list to register the pci devices, drivers and so = on. I notice that there are lists like that already in the code so what = would you think about having a list.h file like that ? /* A very simple list. *=20 * If you want a list of struct myitem=20 * you do *=20 * struct myitem *item_list; *=20 * where myitem MUST have its next pointer as the FIRST field *=20 * and you can then add, delete the EL item, * grub_add_list (&item_list, el); * grub_del_list (&item_list, el); * * or call HOOK(item) for each element of the list=20 * grub_iterate_list (item_list, hook); * * This brk version will point el to the list item for which=20 * HOOK(EL) returns a non-null value * grub_iterate_list_brk (item_list, hook, el); * */ struct obj { struct obj *next; /* MUST BE FIRST */ }; #define grub_del_list(list, el) _grub_del_list((struct obj**) list, = (struct obj*) el)=20 #define grub_add_list(list, el) _grub_add_list((struct obj**) list, = (struct obj*) el)=20 #define grub_find_list(list, el) \ (typeof(list)) _grub_find_list((struct obj*) list, (struct obj*) el)=20 #define grub_iterate_list(list, func) \ {typeof(list) el =3D list; while (el) {func(el); el=3Del->next;}} #define grub_iterate_list_brk(list, func, it) \ {typeof(list) el =3D list; it =3D 0; \ while (el) {if (func(el)) {it =3D el; break;} el=3Del->next; }} static inline struct obj* _grub_find_list (struct obj *list, struct obj = *el) { struct obj *it =3D list; for (it =3D list; it; it=3Dit->next) { if (it =3D=3D el) return el; } return 0; }; static inline void _grub_add_list (struct obj **list, struct obj *el) { if ( (!el) || (_grub_find_list (*list, el)) ) return; =20 el->next =3D *list; *list =3D el; }; static inline void _grub_del_list (struct obj **list, struct obj *el) { struct obj **p; struct obj *q; for (p =3D list, q =3D *p; q; p =3D &(q->next), q =3D q->next) if (q =3D=3D el) { *p =3D q->next; break; } }; ------_=_NextPart_001_01C6722B.F77884C3 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable a simple list

Hi,

I need to use a simple list to register the pci devices, drivers and so = on. I notice that there are lists like that already in the code so what = would you think about having a list.h file like that ?

/* A very simple list.
 *
 * If you want a list of struct myitem
 * you do
 *
 * struct myitem *item_list;
 *
 * where myitem MUST have its next pointer as the FIRST field
 *
 * and you can then add, delete the EL item,
 * grub_add_list (&item_list, el);
 * grub_del_list (&item_list, el);
 *
 * or call HOOK(item) for each element of the list
 * grub_iterate_list (item_list, hook);
 *
 * This brk version will point el to the list item for which
 * HOOK(EL) returns a non-null value
 * grub_iterate_list_brk (item_list, hook, el);
 *
 */

struct obj {
  struct obj *next; /* MUST BE FIRST */
};

#define grub_del_list(list, el) _grub_del_list((struct obj**) list, = (struct obj*) el)
#define grub_add_list(list, el) _grub_add_list((struct obj**) list, = (struct obj*) el)
#define grub_find_list(list, el) \
  (typeof(list)) _grub_find_list((struct obj*) list, (struct obj*) = el)
#define grub_iterate_list(list, func) \
  {typeof(list) el =3D list; while (el) {func(el); = el=3Del->next;}}
#define grub_iterate_list_brk(list, func, it) \
  {typeof(list) el =3D list; it =3D 0; \
    while (el) {if (func(el)) {it =3D el; break;} = el=3Del->next; }}

static inline struct obj*  _grub_find_list (struct obj *list, = struct obj *el)
{
  struct obj *it =3D list;
  for (it =3D list; it; it=3Dit->next)
  {
    if (it =3D=3D el) return el;
  }
  return 0;
};

static inline void _grub_add_list (struct obj **list, struct obj = *el)
{
  if ( (!el) || (_grub_find_list (*list, el)) )
    return;
 
  el->next =3D *list;
  *list =3D el;
};

static inline void _grub_del_list (struct obj **list, struct obj = *el)
{
  struct obj **p;
  struct obj *q;

  for (p =3D list, q =3D *p; q; p =3D &(q->next), q =3D = q->next)
    if (q =3D=3D el)
      {
        *p =3D q->next;
        break;
      }
};

------_=_NextPart_001_01C6722B.F77884C3-- From MAILER-DAEMON Mon May 08 03:27:29 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fd09R-0002Ql-KG for mharc-grub-devel@gnu.org; Mon, 08 May 2006 03:27:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fd09P-0002Nu-Me for grub-devel@gnu.org; Mon, 08 May 2006 03:27:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fd09N-0002L4-Jn for grub-devel@gnu.org; Mon, 08 May 2006 03:27:27 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fd09N-0002Ku-FM for grub-devel@gnu.org; Mon, 08 May 2006 03:27:25 -0400 Received: from [129.180.1.222] (helo=mailhub2.une.edu.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fd0A9-0002dj-Vs for grub-devel@gnu.org; Mon, 08 May 2006 03:28:14 -0400 Received: from metz.une.edu.au (metz.une.edu.au [129.180.3.3]) by mailhub2.une.edu.au (Postfix) with ESMTP id BD41D466E for ; Mon, 8 May 2006 17:27:16 +1000 (EST) Received: by metz.une.edu.au (Postfix, from userid 35331) id CAE461295D; Mon, 8 May 2006 17:27:15 +1000 (EST) Date: Mon, 8 May 2006 17:27:15 +1000 From: Andrew Apted To: grub-devel@gnu.org Message-ID: <20060508072715.GA10268@metz.une.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i Subject: Keyboard bugs 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: Mon, 08 May 2006 07:27:28 -0000 Hello, I've noticed a couple of bugs in the keyboard handling of GRUB2: (1) in kern/i386/pc/startup.S, grub_console_checkkey() doesn't translate the code like getkey() does. Personally I think the checkkey() API would be better as a simple boolean value. (2) the grub_console_getkey() and checkkey() return value contains junk (the scan code) in the upper byte. I think the return value should just be a Unicode character, and the GRUB_TERM_ASCII_CHAR macro should go away (at first I thought was a "unicode chop" function, but the real purpose is to discard the scan-code part). Cheers, -- Andrew Apted From MAILER-DAEMON Mon May 08 19:51:53 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FdFW5-000753-6f for mharc-grub-devel@gnu.org; Mon, 08 May 2006 19:51:53 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdFW3-000742-27 for grub-devel@gnu.org; Mon, 08 May 2006 19:51:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdFVy-00071q-7z for grub-devel@gnu.org; Mon, 08 May 2006 19:51:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdFVy-00071g-15 for grub-devel@gnu.org; Mon, 08 May 2006 19:51:46 -0400 Received: from [212.27.42.35] (helo=smtp5-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdFWt-0004jh-10 for grub-devel@gnu.org; Mon, 08 May 2006 19:52:44 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp5-g19.free.fr (Postfix) with ESMTP id BC05024C57 for ; Tue, 9 May 2006 01:51:41 +0200 (CEST) From: =?iso-8859-1?Q?Eric_Salom=E9?= To: "'The development of GRUB 2'" Date: Tue, 9 May 2006 01:51:41 +0200 Message-ID: <003001c672fa$5adab170$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0031_01C6730B.1E668EB0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-Reply-To: <3C2082E50F32E1459503A8E675E24EE4B0462A@icex3.ic.ac.uk> Importance: Normal Subject: RE : a simple list 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: Mon, 08 May 2006 23:51:51 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0031_01C6730B.1E668EB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I didn=92t take a good look at current iterate functions in Grub 2, yet. =20 Most iterations needs a =93init=94 (before treatment of first item) and = a =93fini=94 (after treatment of last item). Further more, one might want to make iteration functions = =93re-entrant=94 (or recursive), or call-back other functions in a generic way. =20 One way to get to such behavior easily cost a bit more than the example you provided :=20 you may just add an argument (let=92s call it the context object) to the call of the iterate function : =20 #define grub_iterate_list(list, func, context) \ {typeof(list) el =3D list; while (el) {func(context, el); = el=3Del->next;} func(context, NULL)} or #define grub_iterate_list(list, func) \ {void * context =3D NULL; typeof(list) el =3D list; while (el) {func(&context, el); el=3Del->next;} func(&context, NULL)} but I prefer the first define as it allows transmission of a full context to the iteration function. =20 my_struct * my_ctxt; =20 my_ctxt =3D NULL; grub_iterate_list(list, my_func, &my_ctxt); =20 void my_func (my_struct ** ctxt, my_item * item) { if (item =3D=3D NULL) { /* End of iteration : Do any cleanup */ if (*ctxt =3D=3D NULL) return; free (*ctxt) =85=85 =85.. return; } if (*ctxt =3D=3D NULL) { /* First iteration : Do any initialization */ *ctxt =3D malloc (sizeof (my_struct)); =85. =85.. } /* Do the iteration stuff */ =85.. return; } =20 In grub_iterate_list_brk, you can use context to send a patern or model object to compare each item of the list with. =20 The draw back is it makes iteration function a bit less readable, but a lot more powerful. =20 _________________________________________ Eric Salom=E9 =96 Paris, France =20 -----Message d'origine----- De : grub-devel-bounces+esalome=3Dctx.net@gnu.org [mailto:grub-devel-bounces+esalome=3Dctx.net@gnu.org] De la part de Guffens, Vincent Envoy=E9 : lundi 8 mai 2006 01:14 =C0 : grub-devel@gnu.org Objet : a simple list =20 Hi, I need to use a simple list to register the pci devices, drivers and so on. I notice that there are lists like that already in the code so what would you think about having a list.h file like that ? /* A very simple list. * * If you want a list of struct myitem * you do * * struct myitem *item_list; * * where myitem MUST have its next pointer as the FIRST field * * and you can then add, delete the EL item, * grub_add_list (&item_list, el); * grub_del_list (&item_list, el); * * or call HOOK(item) for each element of the list * grub_iterate_list (item_list, hook); * * This brk version will point el to the list item for which * HOOK(EL) returns a non-null value * grub_iterate_list_brk (item_list, hook, el); * */ struct obj { struct obj *next; /* MUST BE FIRST */ }; #define grub_del_list(list, el) _grub_del_list((struct obj**) list, (struct obj*) el) #define grub_add_list(list, el) _grub_add_list((struct obj**) list, (struct obj*) el) #define grub_find_list(list, el) \ (typeof(list)) _grub_find_list((struct obj*) list, (struct obj*) el) #define grub_iterate_list(list, func) \ {typeof(list) el =3D list; while (el) {func(el); el=3Del->next;}} #define grub_iterate_list_brk(list, func, it) \ {typeof(list) el =3D list; it =3D 0; \ while (el) {if (func(el)) {it =3D el; break;} el=3Del->next; }} static inline struct obj* _grub_find_list (struct obj *list, struct obj *el) { struct obj *it =3D list; for (it =3D list; it; it=3Dit->next) { if (it =3D=3D el) return el; } return 0; }; static inline void _grub_add_list (struct obj **list, struct obj *el) { if ( (!el) || (_grub_find_list (*list, el)) ) return; =20 el->next =3D *list; *list =3D el; }; static inline void _grub_del_list (struct obj **list, struct obj *el) { struct obj **p; struct obj *q; for (p =3D list, q =3D *p; q; p =3D &(q->next), q =3D q->next) if (q =3D=3D el) { *p =3D q->next; break; } }; ------=_NextPart_000_0031_01C6730B.1E668EB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable a simple list

Hi,

I didn’t take = a good look at current iterate functions in Grub 2, yet.

 

Most iterations = needs a “init” (before treatment of first item) and a “fini” (after = treatment of last item).

Further more, one = might want to make iteration functions “re-entrant” (or recursive), or = call-back other functions in a generic way.

 

One way to get to = such behavior easily cost a bit more than the example you provided : =

you may just add an = argument (let’s call it the context object) to the call of the iterate = function :

 

#define grub_iterate_list(list, func, = context) \
  {typeof(list) el =3D list; while (el) {func(context, el); = el=3Del->next;} func(context, NULL)}
or

#define grub_iterate_list(list, func) \
  {void * context =3D NULL; typeof(list) el =3D list; while (el) = {func(&context, el); el=3Del->next;} func(&context, NULL)}
but I prefer the first define as it allows transmission of a full = context to the iteration function.

 

my_struct * my_ctxt;

 

my_ctxt =3D NULL; grub_iterate_list(list, my_func, = &my_ctxt);

 

void my_func (my_struct ** ctxt, my_item * item) {

=A0=A0=A0=A0=A0 if (item =3D=3D NULL) {

=A0=A0=A0=A0=A0 =A0=A0=A0 /* End of iteration : Do any cleanup */

=A0=A0=A0=A0=A0 =A0=A0=A0 if (*ctxt =3D=3D NULL) return;

=A0=A0=A0=A0=A0 =A0=A0=A0 free (*ctxt) ……

=A0=A0=A0=A0=A0 =A0=A0=A0 …..

=A0=A0=A0=A0=A0 =A0=A0=A0 return;

=A0=A0=A0=A0=A0 }

=A0=A0=A0=A0=A0 if (*ctxt =3D=3D NULL) {

=A0=A0=A0=A0=A0 =A0=A0=A0=A0 /* First iteration : Do any initialization */

=A0=A0=A0=A0=A0 =A0=A0=A0=A0 *ctxt =3D malloc (sizeof (my_struct)); ….

=A0=A0=A0=A0=A0 =A0=A0=A0=A0 …..

}

/* Do the iteration stuff */

…..

return;

}

 

In = grub_iterate_list_brk, you can use context to send a patern or model object to compare each item of = the list with.

 

The draw back is it = makes iteration function a bit less readable, but a lot more = powerful.

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0

_________________= ________________________

Eric Salom=E9 = Paris, France

 

-----Message d'origine-----
De : grub-devel-bounces+esalome=3Dctx.net@gnu.org [mailto:grub-devel-bounces+esalome=3Dctx.net@gnu.org] De la part de Guffens, Vincent
Envoy=E9 : lundi 8 = mai 2006 01:14
=C0 : = grub-devel@gnu.org
Objet : a simple = list

 

Hi,

I need to use a simple list to register the pci devices, drivers and so = on. I notice that there are lists like that already in the code so what would = you think about having a list.h file like that ?

/* A very simple list.
 *
 * If you want a list of struct myitem
 * you do
 *
 * struct myitem *item_list;
 *
 * where myitem MUST have its next pointer as the FIRST field
 *
 * and you can then add, delete the EL item,
 * grub_add_list (&item_list, el);
 * grub_del_list (&item_list, el);
 *
 * or call HOOK(item) for each element of the list
 * grub_iterate_list (item_list, hook);
 *
 * This brk version will point el to the list item for which
 * HOOK(EL) returns a non-null value
 * grub_iterate_list_brk (item_list, hook, el);
 *
 */

struct obj {
  struct obj *next; /* MUST BE FIRST */
};

#define grub_del_list(list, el) _grub_del_list((struct obj**) list, = (struct obj*) el)
#define grub_add_list(list, el) _grub_add_list((struct obj**) list, = (struct obj*) el)
#define grub_find_list(list, el) \
  (typeof(list)) _grub_find_list((struct obj*) list, (struct obj*) = el)
#define grub_iterate_list(list, func) \
  {typeof(list) el =3D list; while (el) {func(el); = el=3Del->next;}}
#define grub_iterate_list_brk(list, func, it) \
  {typeof(list) el =3D list; it =3D 0; \
    while (el) {if (func(el)) {it =3D el; break;} = el=3Del->next; }}

static inline struct obj*  _grub_find_list (struct obj *list, = struct obj *el)
{
  struct obj *it =3D list;
  for (it =3D list; it; it=3Dit->next)
  {
    if (it =3D=3D el) return el;
  }
  return 0;
};

static inline void _grub_add_list (struct obj **list, struct obj = *el)
{
  if ( (!el) || (_grub_find_list (*list, el)) )
    return;
 
  el->next =3D *list;
  *list =3D el;
};

static inline void _grub_del_list (struct obj **list, struct obj = *el)
{
  struct obj **p;
  struct obj *q;

  for (p =3D list, q =3D *p; q; p =3D &(q->next), q =3D = q->next)
    if (q =3D=3D el)
      {
        *p =3D q->next;
        break;
      }
};

------=_NextPart_000_0031_01C6730B.1E668EB0-- From MAILER-DAEMON Tue May 09 01:51:47 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FdL8N-0007Q8-FG for mharc-grub-devel@gnu.org; Tue, 09 May 2006 01:51:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdL8K-0007NE-Pf for grub-devel@gnu.org; Tue, 09 May 2006 01:51:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdL8H-0007Jt-VI for grub-devel@gnu.org; Tue, 09 May 2006 01:51:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdL8H-0007JH-Ly for grub-devel@gnu.org; Tue, 09 May 2006 01:51:41 -0400 Received: from [212.27.42.29] (helo=smtp3-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdL9F-0005fN-2h for grub-devel@gnu.org; Tue, 09 May 2006 01:52:43 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp3-g19.free.fr (Postfix) with ESMTP id 7D37A478E1 for ; Tue, 9 May 2006 07:51:34 +0200 (CEST) From: =?iso-8859-1?Q?Eric_Salom=E9?= To: "'The development of GRUB 2'" Date: Tue, 9 May 2006 07:51:32 +0200 Message-ID: <000001c6732c$a18d38e0$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0001_01C6733D.65178F80" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal In-Reply-To: <87irokn1k8.fsf@xs4all.nl> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Subject: RE : RE : grub-emu state of the art 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: Tue, 09 May 2006 05:51:45 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C6733D.65178F80 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0002_01C6733D.65191620" ------=_NextPart_001_0002_01C6733D.65191620 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi folks, =20 This email to explain how I worked on grub-emu module loading, the choices I have made (for now) and the diff from grub-1.93 delivery. Marco asked me for details (well, that will make it a pretty long email :-)). =20 I worked only on the i386-pc architecture but I believe same steps will lead to a working grub-emu with module loading on powerpc architecture (though I can't do that myself). =20 I=92ve got results : My modules are loading fine, but That may be by chance :-) (I still have great doubts about memory management). So take a close look at what I=92ve done before agreeing/committing changes and yell if I=92ve done anything foolish. =20 There is still work to do, as you=92ll see : =20 Have it compile :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::: First, I had to deal with the main problem on PC: Current delivery of grub-1.93 requires kernel and modules to be compiled with -mregparm=3D3 -mrtd options.=20 Parameters are passed to functions using registers instead of using memory in stack. Assembler code presume that asm functions are called that way too. This is not the standard way libc functions are used to. =20 Also, note that even with -mregparm=3D3 and -mrtd options, parameters = are passed using stack to functions with an undefined number of parameters (such as grub_printf : Those functions in turn expected their parameters in stack). If you don't provide good prototype to functions in your modules that leads to unexpected results. =20 To have a grub-emu compile with these options : a. Either you need to compile a new "libc" library using same options b. Either you can provide grub-emu source files with a "foolyou" prototype include file for all C functions called in libc (there are currently not too many), saying for example : =20 off_t lseek(int fildes, off_t offset, int whence, ...);=20 =20 The ending ... will ask the C compiler to pass all parameters in stack (the way the libc wants it for all functions).=20 And try to compile (I really didn't try that, I was too afraid the compiler would voice me about mismatchs in prototype between Linux standard include files and my "foolme" prototype file. I believe that things would be worst with time, since other modules to come would like to use more library calls (in libc and in other standard libs). =20 I'd rather made the following choices : --------------------------------------- =20 1. Provide new asm code that support for passing parameters in stack, instead of from registers. 2. Change compile options so that the all Grub 2 delivery would now be using passing parameters using stack (and thus I get ride of libc incompatibility) 3. Keep support for "optimized" code (using -mregparm=3D3 -mrtd) just in case someone feels like he can't live without it ;-). =20 New Makefile (i386-pc.mk) shows : #COMMON_ASFLAGS =3D -nostdinc -fno-builtin -DREGPARM #COMMON_CFLAGS =3D -fno-builtin -mrtd -mregparm=3D3 -m32 =20 COMMON_ASFLAGS =3D -nostdinc -fno-builtin COMMON_CFLAGS =3D $(CFLAGS) -m32 =20 Using the first two lines does create optimized and shorter code for kernel and modules (but you won=92t be able to launch grub-emu). The difference is about 210316 bytes against 212684 (for all the modules I have) : 1 % shorter. =20 Using the last two lines, the good news is you can use same modules for grub 2 and for grub-emu, and it compiles fine. =20 Don=92t forget to add the following lines also, to be sure grub-emu is compiled with the same options as the (COMMON) modules (that=92s only = for ease of mind) : grub_emu_CFLAGS =3D $(COMMON_CFLAGS)=20 grub_emu_LDFLAGS =3D $(COMMON_LDFLAGS) $(LIBCURSES) =20 =20 I provided a new kern/i386/pc/startup.S : #ifdef REGPARM #include "startup.S.regparm" #else #include "startup.S.memparm" #endif =20 startup.S.regparm is the =AB old =BB startup.S file. Startup.S.memparm is the new one passing parameters using stack for global functions called by C. That=92s a =93first trial=94 quickly = written that is not fully optimized but seems to be bug free. =20 Had also to do little changes in normal/i386/pc/setjmp.S (easy to read from the diff I attached to this email) and I guess that this is the only (similar) change that will have to be made in powerpc related files. =20 Include a complete dynamic loader for grub-emu :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::: =20 I didn=92t want to use the standard libld.so to load modules : =20 a) modules are =93relocated=94 ELF files, while dynamic loader on Linux deals with =93shared=94 .so ELF files. b) emulation means we better try to use same code than the one used in Grub 2. =20 So I just let included kern/dl.c to the grub-emu code. =20 Had to get ride of template functions in util/grub-emu.c such as=20 grub_arch_dl_check_header (void *ehdr) grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr) And use the real ones (for i386-pc !!) from kern/i386/dl.c. =20 I am also using grub_register_exported_symbols from Grub 2=92s instead = of a null function. =20 Beware : I didn=92t know what to do about grub_arch_modules_addr (void) so I let it return 0 not knowing the consequences. I guess I=92ll have = to come back to that point later on. =20 Makefiles : I don=92t have Ruby running on my pc, so I provided conf/i386-pc.mk diff, but the main thing to be retained is, I just added two dependencies : kern/i386/dl.c and symlist2.c to be compiled with grub-emu. =20 =20 Have a Complete grub-emu (no undefined symbols when loading modules) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::: =20 Well, I guess I was very loosy on that part. The main purpose of my work was to get grub-emu load modules, whether or not it=92s useful somehow. =20 So I kind of =93skip=94 that part and =93gracefully=94 ;-) ended using a symlist2.c file that shows all the work that remains to do : =20 I added two =93null=94 items (function / var), in util/misc.c (but they = may better be in util/grub-emu.c) : int grub_null() { return 0; } =20 int grub_null_var =3D 0; =20 And I just =93connected=94 every undefined symbol in grub-emu to those = two items, using a =93special=94 symlist2.c file (yes I can do such messy = work) : =20 {"grub_vga_set_mode", grub_null}, {"grub_vga_get_font", grub_null}, {"grub_vbe_get_controller_info", grub_null}, {"grub_vbe_get_mode_info", grub_null}, {"grub_vbe_set_mode", grub_null}, {"grub_vbe_get_mode", grub_null}, {"grub_vbe_set_memory_window", grub_null}, {"grub_vbe_get_memory_window", grub_null}, {"grub_vbe_set_scanline_length", grub_null}, {"grub_vbe_get_scanline_length", grub_null}, {"grub_vbe_set_display_start", grub_null}, {"grub_vbe_get_display_start", grub_null}, {"grub_vbe_set_palette_data", grub_null}, =20 I guess that vbe module won=92t be of any use with that =93fixup=94. In fact vbetest command will crash grub-emu. =20 But watch this : =20 {"grub_lower_mem", &grub_null_var}, {"grub_upper_mem", &grub_null_var}, {"grub_os_area_addr", &grub_null_var}, {"grub_os_area_size", &grub_null_var}, {"grub_linux_prot_size", &grub_null_var}, {"grub_linux_tmp_addr", &grub_null_var}, {"grub_linux_real_addr", &grub_null_var}, =20 {"grub_linux_boot_zimage", grub_null}, {"grub_linux_boot_bzimage", grub_null}, {"grub_chainloader_real_boot", grub_null}, {"grub_multiboot_real_boot", grub_null}, =20 =20 Did you say grub-emu main purpose was to boot some kind of OS ? =20 LeftToDo : I guess the makefile for grub-emu has to be changed (a lot ?) and that emulation needs to be completed else have a look of what get me into this and tell me a better fixup.=20 Some functions are only (from I have seen in Grub 2 code) coded in kern/i386/pc/startup.S, and I can=92t include that file into grub-emu. So, either some of the useful functions have to be =93relocated=94 in = some other source file, either these functions needs to have a coding to be used in grub-emu (emulation mode) somewhere within util/. =20 Anyway, for now, modules are loading fine with this =93fixup=94. =20 Loading Modules :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::: =20 I thought I will have to change memory allocation to allow for module loading. Malloc is not what is expected to load code into memory and run it. mmap is the normal way to do that under Linux. =20 In fact, one of my modules loads a sub-module in a very special way (specific dynamic loader), so I needed to code a new function : Grub_mmap(int size) (that takes only one parameter for now) : =20 static char * heapstart=3D(char*) 0x01200000; void * grub_mmap (grub_size_t size) { void * heap; heap=3D(void *)mmap(heapstart, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); heapstart+=3Dsize;=20 printf("Using mmap (size %d)\n", size); return heap; } =20 But surprisingly enough, I didn=92t need to use it to load modules with kern/dl.c. =20 Beware : I am still wondering if I am not loading modules on top of the kernel code in grub-emu !?!, though it=92s been a week that I am using loading module with grub-emu and didn=92t crash yet. =20 Getting Crazy enough to fix some code in Grub 2, just in case. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::: =20 Well, at that point, every thing is setup to =93work=94. But it didn=92t at first trial. =20 Had numerous SIGVSEG failed and mess up in malloc/free grub=92s = routines. =20 I tried to debug, finding out where the bug would be located, and finally used a different compiler (went to gcc-4.0), but kept some changes in grub 2=92s code just in case (not knowing if these changes really matter for your compiler). =20 The mess came from two major points of the code (from what I=92ve found out) : =20 Call to (mod->init) (mod); to initiate modules after loading =20 Well, I guess that this is important, especially when you compile with =96mregparm=3D3 =96mrtd to specify if the function you are calling takes = a fixed number of parameters (to be passed by registers) or an undefined number of parameters (to be passed in the stack). If you don=92t specify that, you let the compiler choose his way of doing it =85 and that might well be the wrong way. The function you called should (has to) be prototyped exactly the same. =20 It=92s crucial for this line of code, because the function you call = relies on the fact the parameter mod is a pointer to a module structure. This structure doesn=92t contain a MAGIC number (I believe it should !) = to check on, before doing anything foolish such as =85 doing things on mod->dep. =20 =20 I fixed : static void grub_mod_init (grub_dl_t mod) __attribute__ ((used));=20 =20 (I suppressed __attribute__ =93unused=94 on parameter mod) =20 I gave a patch for this kind of call : =20 typedef void FINIT(void * ); typedef FINIT * PFINIT; ((PFINIT)mod->init) (mod); =20 (just in case, though the compiler should have correctly guessed it from struct grub_dl). =20 but anyway that sort of patch should be applied everywhere you make a *fct() call to something if *fct is not properly prototyped in include files. =20 =20 Call to setjmp(grub_exit_env) In some cases (I didn=92t try to reproduce since I=92ve moved to gcc = 4.0) the setjmp function received *grub_exit_env instead of grub_exit_env. So I=92ve coded this patch : if (grub_setjmp (&grub_exit_env[0]) =3D=3D 0) instead of=20 if (grub_setjmp (grub_exit_env) =3D=3D 0) though it is less portable. =20 Up to you to see if you keep these =93patches=94. I didn=92t tried to reproduce the errors without those patches since I went to gcc 4.0. =20 Some other changes=20 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::: =20 Added a grub_break() function : That=92s temporary to let me set easy breakpoints with gdb, from modules. =20 Added grub_dprintf("symbols", =85) lines to let me see the loading = process and have a table of which section is loaded at where. =20 I=92d like to talk about how to let gdb know about newly loaded modules, but I=92ll answer to Tomas 'Ebi' Ebenlendr=92s email separately.=20 =20 =20 =20 I don=92t like the diff format I sent, so don=92t hesitate to give me = the right command to send you a diff (=93patch=94) with the format you like best. =20 =20 Best regards, _________________________________________ Eric Salom=E9 - Paris, France =20 =20 > -----Message d'origine----- > De : grub-devel-bounces+esalome=3Dctx.net@gnu.org [mailto:grub-devel- > bounces+esalome=3Dctx.net@gnu.org] De la part de Marco Gerards > Envoy=E9 : vendredi 5 mai 2006 13:39 > =C0 : The development of GRUB 2 > Objet : Re: RE : grub-emu state of the art >=20 > Eric Salom=E9 writes: >=20 > > GRUB 2 Wiki > > ToDoList : Implement ModuleLoading in grub-emu >=20 > Right, and I even added this item. Sorry, I just misunderstood your > previous email. >=20 > > I worked on that : Architecture i386/pc - Emulation on Linux/Ubuntu > > grub-emu is loading all current modules, though some won't do anything > > in emulation mode. The modules .mod are the same as those used for boot > > time. >=20 > Nice! >=20 > > Little changes in source code, though I had to adapt asm files to > > passing parameters in stack (I compile without -mregparm=3D3 -mrtd options > > as I didn't want to recompile the whole C library with those passing > > parameters conventions). >=20 > It would be nice to get this to work for the regular modules too. In > that case we do not need two set of modules. Besides that, it should > also work on the PPC, for example. Which is a lot harder. >=20 > BTW, how did you implement this? I once wrote a hack to do exactly > the same by using mmap to allocate executable memory. On the PPC this > memory needs to be allocated close to the grub-emu binary because > otherwise the relocations would fail. >=20 > > ... when I be done with grub 2 debugging I'll just have to recompile > > with these options (if you like them a lot) and it will work just fine > > (boot time only). >=20 > It's not only that we like them. They make the size of the binaries > smaller. And it is a requirement for the assembler code. >=20 > > ToBeAwardedOf: > > Don't use gcc 3.3 with grub 2's current source files : compiled code is > > wrong and subject to unattended results. > > Runs fine with gcc 4.0. I have still a doubt about gcc 3.4. >=20 > Wrong in what way? We have some workaround for specific gcc bugs. > Although these are sometimes hard to locate, sometimes it might be > worth the effort. >=20 > > LeftToDo : > > > > - see if every modification is useful, as I tried a few things before I > > got a good result, and send a diff patch. >=20 > Please describe how things work in detail so we can discuss possible > issues. >=20 > > - I need a "patched" symlist.c to compile with grub-emu (could be > > generated by a script, but I am too lazy). >=20 > :-) >=20 > > - let gdb know about dynamically loaded modules ;-), but I guess it > > won't be the easy part. >=20 > Yeah, I can imagine that. But in case specific modules have to be > debugged, we can just compile them in as happens currently. This is > what I do now. >=20 > The big advantage of having module support in grub-emu is as a > debugging tool for module loading itself. It will make porting GRUB > to another architecture a lot easier. And besides that, debugging > will be a lot easier too. >=20 > Thanks, > Marco >=20 >=20 >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel ------=_NextPart_001_0002_01C6733D.65191620 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi folks,

 

This email to explain how I worked on = grub-emu module loading, the choices I have made (for now) and the diff from grub-1.93 delivery. Marco asked me for details (well, that will make it a pretty = long email :-)).

 

I worked only on the i386-pc architecture but = I believe same steps will lead to a working grub-emu with module loading = on powerpc architecture (though I can't do that myself).

 

I’ve got results : My modules are = loading fine, but That may be by chance J

(I still have great doubts about memory = management).

So take a close look at what I’ve done = before agreeing/committing changes and yell if I’ve done anything foolish.

 

There is still work to do, as you’ll = see :

 

Have it compile

::::::::::::::::::::::::::::::::::::::::::::::= :::::::::::::::::::::::::::::

First, I had to deal with the main problem on = PC:

Current delivery of grub-1.93 requires kernel = and modules to be compiled with -mregparm=3D3 -mrtd options.

Parameters are passed to functions using = registers instead of using memory in stack. Assembler code presume that asm = functions are called that way too.

This is not the standard way libc functions = are used to.

 

Also, note that even with -mregparm=3D3 and = -mrtd options, parameters are passed using stack to functions with an = undefined number of parameters (such as grub_printf : Those functions in turn = expected their parameters in stack). If you don't provide good prototype to = functions in your modules that leads to unexpected results.

 

To have a grub-emu compile with these options = :

=A0a. Either you need to compile a new = "libc" library using same options

=A0b. Either you can provide grub-emu source = files with a "foolyou" prototype include file for all C functions called = in libc (there are currently not too many), saying for example = :

 

off_t lseek(int = fildes, off_t offset, int whence, ...);

 

The ending ... will ask the C compiler to = pass all parameters in stack (the way the libc wants it for all functions). =

And try to compile (I really didn't try that, = I was too afraid the compiler would voice me about mismatchs in prototype = between Linux standard include files and my "foolme" prototype = file.

I believe that things would be worst with = time, since other modules to come would like to use more library calls (in libc and = in other standard libs).

 

I'd rather made the following choices = :

---------------------------------------=

 

1. Provide new asm code that support for = passing parameters in stack, instead of from registers.

2. Change compile options so that the all = Grub 2 delivery would now be using passing parameters using stack (and thus I = get ride of libc incompatibility)

3. Keep support for "optimized" = code (using -mregparm=3D3 -mrtd) just in case someone feels like he can't live = without it ;-).

 

New Makefile = (i386-pc.mk) shows :

#COMMON_ASFLAGS =3D -nostdinc -fno-builtin = -DREGPARM

#COMMON_CFLAGS =3D -fno-builtin -mrtd = -mregparm=3D3 -m32

 

COMMON_ASFLAGS =3D -nostdinc = -fno-builtin

COMMON_CFLAGS =3D $(CFLAGS) = -m32

 

Using the first two lines does create = optimized and shorter code for kernel and modules (but you won’t be able to = launch grub-emu).

The difference is about 210316 bytes against = 212684 (for all the modules I have) : 1 % shorter.

 

Using the last two lines, the good news is = you can use same modules for grub 2 and for grub-emu, and it compiles = fine.

 

Don’t forget to add the following lines = also, to be sure grub-emu is compiled with the same options as the (COMMON) = modules (that’s only for ease of mind) :

grub_emu_CFLAGS =3D $(COMMON_CFLAGS)

grub_emu_LDFLAGS =3D $(COMMON_LDFLAGS) $(LIBCURSES)

 

 

I provided a new kern/i386/pc/startup.S :

#ifdef = REGPARM

#include "startup.S.regparm"

#else

#include "startup.S.memparm"

#endif

 

startup.S.regparm is the = =AB old =BB startup.S file.

Startup.S.memparm is the new one passing = parameters using stack for global functions called by C. That’s a = “first trial” quickly written that is not fully optimized but seems to be = bug free.

=A0

Had also to do little changes in normal/i386/pc/setjmp.S (easy to = read from the diff I attached to this email) and I guess that this is the only = (similar) change that will have to be made in powerpc related files.

 

Include a complete dynamic loader for = grub-emu

::::::::::::::::::::::::::::::::::::::::::::::= :::::::::::::::::::::::::::::

 

I didn’t want to use the standard = libld.so to load modules :

 

a) modules are “relocated” ELF = files, while dynamic loader on Linux deals with “shared” .so ELF = files.

b) emulation means we better try to use same = code than the one used in Grub 2.

 

So I just let included kern/dl.c to the grub-emu code.

 

Had to get ride of template functions in = util/grub-emu.c such as

grub_arch_dl_check_header (void *ehdr)

grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)

And use the real ones (for i386-pc !!) from = kern/i386/dl.c.

 

I am also using = grub_register_exported_symbols from Grub 2’s instead of a null function.

 

Beware : I didn’t know = what to do about grub_arch_modules_addr (void)

=A0so I let it return 0 not knowing = the consequences. I guess I’ll have to come back to that point later = on.

=A0

Makefiles : I don’t have Ruby running = on my pc, so I provided conf/i386-pc.mk diff, but the main thing to be retained = is, I just added two dependencies :

kern/i386/dl.c<= /b> and symlist2.c = to be compiled with grub-emu.

 

 

Have a Complete grub-emu (no undefined = symbols when loading modules)

::::::::::::::::::::::::::::::::::::::::::::::= :::::::::::::::::::::::::::::

 

Well, I guess I was very loosy on that = part.

The main purpose of my work was to get = grub-emu load modules, whether or not it’s useful somehow.

 

So I kind of “skip” that part and “gracefully” ;-) ended using a symlist2.c file that shows all the work that remains to do :

 

I added two “null” items = (function / var), in util/misc.c (but they may better be in util/grub-emu.c) = :

int = grub_null()

{

=A0=A0=A0 return 0;

}

 

int = grub_null_var =3D 0;

 

And I just “connected” every = undefined symbol in grub-emu to those two items, using a “special” = symlist2.c file (yes I can do such messy work) :

 

=A0=A0=A0=A0=A0 {"grub_vga_set_mode", grub_null},

=A0=A0=A0=A0=A0 {"grub_vga_get_font", grub_null},

=A0=A0=A0=A0=A0 {"grub_vbe_get_controller_info", grub_null},

=A0=A0=A0=A0=A0 {"grub_vbe_get_mode_info", grub_null},

=A0=A0=A0=A0=A0 {"grub_vbe_set_mode", grub_null},

=A0=A0=A0=A0=A0 {"grub_vbe_get_mode", grub_null},

=A0=A0=A0=A0=A0 {"grub_vbe_set_memory_window", grub_null},

=A0=A0=A0=A0=A0 {"grub_vbe_get_memory_window", grub_null},

=A0=A0=A0=A0=A0 {"grub_vbe_set_scanline_length", grub_null},

=A0=A0=A0=A0=A0 {"grub_vbe_get_scanline_length", grub_null},

=A0=A0=A0=A0=A0 {"grub_vbe_set_display_start", grub_null},

=A0=A0=A0=A0=A0 {"grub_vbe_get_display_start", grub_null},

=A0=A0=A0=A0 =A0{"grub_vbe_set_palette_data", grub_null},

 

I guess that vbe module won’t be of any = use with that “fixup”.

In fact vbetest command will crash = grub-emu.

 

But watch this :

 

=A0=A0=A0=A0=A0 {"grub_lower_mem", &grub_null_var},

=A0=A0=A0=A0=A0 {"grub_upper_mem", = &grub_null_var},

=A0=A0=A0=A0=A0 {"grub_os_area_addr", = &grub_null_var},

=A0 = =A0=A0=A0=A0{"grub_os_area_size", &grub_null_var},

=A0=A0=A0=A0=A0 {"grub_linux_prot_size", &grub_null_var},

=A0=A0=A0=A0=A0 {"grub_linux_tmp_addr", &grub_null_var},

=A0=A0=A0=A0=A0 {"grub_linux_real_addr", &grub_null_var},

 

=A0=A0=A0=A0=A0 {"grub_linux_boot_zimage", grub_null},

=A0=A0=A0=A0=A0 {"grub_linux_boot_bzimage", grub_null},

=A0=A0=A0=A0=A0 {"grub_chainloader_real_boot", grub_null},

=A0=A0=A0=A0=A0 {"grub_multiboot_real_boot", grub_null},

 

 

Did you say grub-emu main purpose was to boot = some kind of OS ?

 

LeftToDo : I guess the makefile for grub-emu has to be changed (a = lot ?) and that emulation needs to be completed else have a look of what get me = into this and tell me a better fixup.

Some functions are only (from I have seen in = Grub 2 code) coded in kern/i386/pc/startup.S, and I can’t include that = file into grub-emu.

So, either some of the useful functions have = to be “relocated” in some other source file, either these functions needs to have a coding = to be used in grub-emu (emulation mode) somewhere within = util/.

 

Anyway, for now, modules are loading fine = with this “fixup”.

 

Loading Modules

::::::::::::::::::::::::::::::::::::::::::::::= :::::::::::::::::::::::::::::

 

I thought I will have to change memory = allocation to allow for module loading.

Malloc is not what is expected to load code = into memory and run it.

mmap is the normal way to do that under = Linux.

 

In fact, one of my modules loads a sub-module = in a very special way (specific dynamic loader), so I needed to code a new = function :

Grub_mmap(int size) (that takes only one = parameter for now) :

 

static = char * heapstart=3D(char*) 0x01200000;

void = *

grub_mmap (grub_size_t size)

{

=A0=A0=A0 void * heap;

=A0=A0=A0 heap=3D(void *)mmap(heapstart, size,

=A0=A0=A0=A0=A0 =A0=A0=A0 =A0 PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);

=A0=A0=A0 heapstart+=3Dsize;

=A0=A0=A0 printf("Using mmap (size %d)\n", size);

=A0=A0=A0 return heap;

}

 

But surprisingly enough, I didn’t need = to use it to load modules with kern/dl.c.

 

Beware : I am still wondering if I am not loading modules on top = of the kernel code in grub-emu !?!, though it’s been a week that I am = using loading module with grub-emu and didn’t crash yet.

 

Getting Crazy enough to fix some code in Grub = 2, just in case.

::::::::::::::::::::::::::::::::::::::::::::::= :::::::::::::::::::::::::::::

 

Well, at that point, every thing is setup to = “work”.

But it didn’t at first = trial.

 

Had numerous SIGVSEG failed and mess up in = malloc/free grub’s routines.

 

I tried to debug, finding out where the bug = would be located, and finally used a different compiler (went to gcc-4.0), but = kept some changes in grub 2’s code just in case (not knowing if these = changes really matter for your compiler).

 

The mess came from two major points of the = code (from what I’ve found out) :

 

Call to (mod->init) = (mod); to initiate modules after loading

 

Well, I guess that this is important, = especially when you compile with –mregparm=3D3 –mrtd to specify if the = function you are calling takes a fixed number of parameters (to be passed by = registers) or an undefined number of parameters (to be passed in the stack). If you = don’t specify that, you let the compiler choose his way of doing it … = and that might well be the wrong way. The function you called should (has to) be = prototyped exactly the same.

 

It’s crucial for this line of code, = because the function you call relies on the fact the parameter mod is a pointer to a = module structure.

This structure doesn’t contain a MAGIC = number (I believe it should !) to check on, before doing anything foolish such as = … doing things on mod->dep.

=A0

 

I fixed :

static = void grub_mod_init (grub_dl_t mod) __attribute__ ((used));

 

(I suppressed __attribute__ = “unused” on parameter mod)

 

I gave a patch for this kind of call = :

 

typedef void FINIT(void * );

typedef FINIT * PFINIT;

=A0=A0=A0 ((PFINIT)mod->init) (mod);

 

(just in case, though the compiler should = have correctly guessed it from struct grub_dl).

=A0=A0

but anyway that sort of patch should be = applied everywhere you make a *fct() call to something if *fct is not properly prototyped in include files.

 

 

Call to = setjmp(grub_exit_env)

In some cases (I didn’t try to = reproduce since I’ve moved to gcc 4.0) the setjmp function received *grub_exit_env instead of = grub_exit_env. So I’ve coded this patch :

if = (grub_setjmp (&grub_exit_env[0]) =3D=3D 0)

instead of

if = (grub_setjmp (grub_exit_env) =3D=3D 0)

though it is less portable.

 

Up to you to see if you keep these = “patches”. I didn’t tried to reproduce the errors without those patches since = I went to gcc 4.0.

 

Some other changes

::::::::::::::::::::::::::::::::::::::::::::::= :::::::::::::::::::::::::::::::::::

 

Added a grub_break() function : That’s = temporary to let me set easy breakpoints with gdb, from modules.

 

Added grub_dprintf("symbols", = …) lines to let me see the loading process and have a table of which section is = loaded at where.

 

I’d like to talk about how to let gdb know about newly loaded modules, but = I’ll answer to Tomas 'Ebi' = Ebenlendr’s email separately.

 

 

 

I don’t like the diff format I sent, so = don’t hesitate to give me the right command to send you a diff = (“patch”) with the format you like best.

 

 

Best regards,

_______________________________________= __

Eric Salom=E9 - Paris, France

 

 

> -----Message d'origine-----

> De : grub-devel-bounces+esalome=3Dctx.net@gnu.org [mailto:grub-devel-

> bounces+esalome=3Dctx.net@gnu.org] De la part de Marco = Gerards

> Envoy=E9 : vendredi 5 mai 2006 13:39

> =C0 : The development of GRUB 2

> Objet : Re: RE : grub-emu state of = the art

>

> Eric Salom=E9 <esalome@ctx.net> writes:

>

> > GRUB 2 Wiki

> > ToDoList : Implement ModuleLoading = in grub-emu

>

> Right, and I even added this item.=A0 = Sorry, I just misunderstood your

> previous email.

>

> > I worked on that : Architecture = i386/pc - Emulation on Linux/Ubuntu

> > grub-emu is loading all current = modules, though some won't do anything

> > in emulation mode. The modules .mod = are the same as those used for boot

> > time.

>

> Nice!

>

> > Little changes in source code, = though I had to adapt asm files to

> > passing parameters in stack (I = compile without -mregparm=3D3 -mrtd options

> > as I didn't want to recompile the = whole C library with those passing

> > parameters = conventions).

>

> It would be nice to get this to work for = the regular modules too.=A0 In

> that case we do not need two set of = modules.=A0 Besides that, it should

> also work on the PPC, for example.=A0 = Which is a lot harder.

>

> BTW, how did you implement this?=A0 I = once wrote a hack to do exactly

> the same by using mmap to allocate = executable memory.=A0 On the PPC this

> memory needs to be allocated close to = the grub-emu binary because

> otherwise the relocations would = fail.

>

> > ... when I be done with grub 2 = debugging I'll just have to recompile

> > with these options (if you like = them a lot) and it will work just fine

> > (boot time only).

>

> It's not only that we like them.=A0 They = make the size of the binaries

> smaller.=A0 And it is a requirement for = the assembler code.

>

> > ToBeAwardedOf:

> > Don't use gcc 3.3 with grub 2's = current source files : compiled code is

> > wrong and subject to unattended = results.

> > Runs fine with gcc 4.0. I have = still a doubt about gcc 3.4.

>

> Wrong in what way?=A0 We have some = workaround for specific gcc bugs.

> Although these are sometimes hard to = locate, sometimes it might be

> worth the effort.

>

> > LeftToDo :

> >

> > - see if every modification is = useful, as I tried a few things before I

> > got a good result, and send a diff = patch.

>

> Please describe how things work in = detail so we can discuss possible

> issues.

>

> > - I need a "patched" = symlist.c to compile with grub-emu (could be

> > generated by a script, but I am too = lazy).

>

> :-)

>

> > - let gdb know about dynamically = loaded modules ;-), but I guess it

> > won't be the easy = part.

>

> Yeah, I can imagine that.=A0 But in case = specific modules have to be

> debugged, we can just compile them in as = happens currently.=A0 This is

> what I do now.

>

> The big advantage of having module = support in grub-emu is as a

> debugging tool for module loading = itself.=A0 It will make porting GRUB

> to another architecture a lot easier.=A0 = And besides that, debugging

> will be a lot easier = too.

>

> Thanks,

> Marco

>

>

>

>

> = _______________________________________________

> Grub-devel mailing = list

> Grub-devel@gnu.org

> = http://lists.gnu.org/mailman/listinfo/grub-devel

------=_NextPart_001_0002_01C6733D.65191620-- ------=_NextPart_000_0001_01C6733D.65178F80 Content-Type: text/plain; name="diffpatch.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="diffpatch.txt" diff -n -r ./conf/i386-pc.mk ../../src/grub-1.93/conf/i386-pc.mk=0A= a2 3=0A= #COMMON_ASFLAGS =3D -nostdinc -fno-builtin -DREGPARM=0A= #COMMON_CFLAGS =3D -fno-builtin -mrtd -mregparm=3D3 -m32=0A= =0A= d4 1=0A= a4 2=0A= COMMON_CFLAGS =3D $(CFLAGS) -m32=0A= =0A= a6 3=0A= grub_emu_CFLAGS =3D $(COMMON_CFLAGS) =0A= grub_emu_LDFLAGS =3D $(COMMON_LDFLAGS) $(LIBCURSES)=0A= =0A= d786 3=0A= a788 4=0A= util/i386/pc/misc.c grub_emu_init.c \=0A= symlist2.c kern/i386/dl.c=0A= CLEANFILES +=3D grub-emu grub_emu-commands_boot.o = grub_emu-commands_cat.o grub_emu-commands_cmp.o = grub_emu-commands_configfile.o grub_emu-commands_default.o = grub_emu-commands_help.o grub_emu-commands_terminal.o = grub_emu-commands_ls.o grub_emu-commands_test.o = grub_emu-commands_search.o grub_emu-commands_timeout.o = grub_emu-commands_i386_pc_halt.o grub_emu-commands_i386_pc_reboot.o = grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o = grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o = grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o = grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o = grub_emu-fs_hfsplus.o grub_emu-io_gzio.o grub_emu-kern_device.o = grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_env.o = grub_emu-kern_err.o grub_emu-normal_execute.o grub_emu-kern_file.o = grub_emu-kern_fs.o grub_emu-normal_lexer.o grub_emu-kern_loader.o = grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o = grub_emu-grub_script_tab.o grub_emu-kern_partition.o = grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o = grub_emu-normal_cmdline.o grub_emu-normal_command.o = grub_emu-normal_function.o grub_emu-normal_completion.o = grub_emu-normal_context.o grub_emu-normal_main.o grub_emu-normal_menu.o = grub_emu-normal_menu_entry.o grub_emu-normal_misc.o = grub_emu-normal_script.o grub_emu-partmap_amiga.o = grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o = grub_emu-partmap_acorn.o grub_emu-partmap_gpt.o grub_emu-util_console.o = grub_emu-util_grub_emu.o grub_emu-util_misc.o = grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o = grub_emu-util_i386_pc_misc.o grub_emu-grub_emu_init.o grub_emu-symlist.o = grub_emu-symlist2.o grub_emu-kern_i386_dl.o=0A= MOSTLYCLEANFILES +=3D grub_emu-commands_boot.d grub_emu-commands_cat.d = grub_emu-commands_cmp.d grub_emu-commands_configfile.d = grub_emu-commands_default.d grub_emu-commands_help.d = grub_emu-commands_terminal.d grub_emu-commands_ls.d = grub_emu-commands_test.d grub_emu-commands_search.d = grub_emu-commands_timeout.d grub_emu-commands_i386_pc_halt.d = grub_emu-commands_i386_pc_reboot.d grub_emu-disk_loopback.d = grub_emu-fs_affs.d grub_emu-fs_ext2.d grub_emu-fs_fat.d = grub_emu-fs_fshelp.d grub_emu-fs_hfs.d grub_emu-fs_iso9660.d = grub_emu-fs_jfs.d grub_emu-fs_minix.d grub_emu-fs_sfs.d = grub_emu-fs_ufs.d grub_emu-fs_xfs.d grub_emu-fs_hfsplus.d = grub_emu-io_gzio.d grub_emu-kern_device.d grub_emu-kern_disk.d = grub_emu-kern_dl.d grub_emu-kern_env.d grub_emu-kern_err.d = grub_emu-normal_execute.d grub_emu-kern_file.d grub_emu-kern_fs.d = grub_emu-normal_lexer.d grub_emu-kern_loader.d grub_emu-kern_main.d = grub_emu-kern_misc.d grub_emu-kern_parser.d grub_emu-grub_script_tab.d = grub_emu-kern_partition.d grub_emu-kern_rescue.d grub_emu-kern_term.d = grub_emu-normal_arg.d grub_emu-normal_cmdline.d = grub_emu-normal_command.d grub_emu-normal_function.d = grub_emu-normal_completion.d grub_emu-normal_context.d = grub_emu-normal_main.d grub_emu-normal_menu.d = grub_emu-normal_menu_entry.d grub_emu-normal_misc.d = grub_emu-normal_script.d grub_emu-partmap_amiga.d = grub_emu-partmap_apple.d grub_emu-partmap_pc.d grub_emu-partmap_sun.d = grub_emu-partmap_acorn.d grub_emu-partmap_gpt.d grub_emu-util_console.d = grub_emu-util_grub_emu.d grub_emu-util_misc.d = grub_emu-util_i386_pc_biosdisk.d grub_emu-util_i386_pc_getroot.d = grub_emu-util_i386_pc_misc.d grub_emu-grub_emu_init.d = grub_emu-symlist2.d grub_emu-kern_i386_dl.d=0A= d790 2=0A= a791 2=0A= grub-emu: grub_emu-symlist2.o grub_emu-commands_boot.o = grub_emu-commands_cat.o grub_emu-commands_cmp.o = grub_emu-commands_configfile.o grub_emu-commands_default.o = grub_emu-commands_help.o grub_emu-commands_terminal.o = grub_emu-commands_ls.o grub_emu-commands_test.o = grub_emu-commands_search.o grub_emu-commands_timeout.o = grub_emu-commands_i386_pc_halt.o grub_emu-commands_i386_pc_reboot.o = grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o = grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o = grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o = grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o = grub_emu-fs_hfsplus.o grub_emu-io_gzio.o grub_emu-kern_device.o = grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_env.o = grub_emu-kern_err.o grub_emu-normal_execute.o grub_emu-kern_file.o = grub_emu-kern_fs.o grub_emu-normal_lexer.o grub_emu-kern_loader.o = grub_emu-kern_main.o grub_emu-kern_misc.o grub_emu-kern_parser.o = grub_emu-grub_script_tab.o grub_emu-kern_partition.o = grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o = grub_emu-normal_cmdline.o grub_emu-normal_command.o = grub_emu-normal_function.o grub_emu-normal_completion.o = grub_emu-normal_context.o grub_emu-normal_main.o grub_emu-normal_menu.o = grub_emu-normal_menu_entry.o grub_emu-normal_misc.o = grub_emu-normal_script.o grub_emu-partmap_amiga.o = grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o = grub_emu-partmap_acorn.o grub_emu-partmap_gpt.o grub_emu-util_console.o = grub_emu-util_grub_emu.o grub_emu-util_misc.o = grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o = grub_emu-util_i386_pc_misc.o grub_emu-grub_emu_init.o = grub_emu-kern_i386_dl.o=0A= $(BUILD_CC) -o $@ $^ $(BUILD_CFLAGS) $(BUILD_LDFLAGS) = $(grub_emu_LDFLAGS)=0A= a1024 8=0A= grub_emu-kern_i386_dl.o: kern/i386/dl.c=0A= $(BUILD_CC) -Ikern -I$(srcdir)/kern -I$(srcdir)/kern/i386 = $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=3D1 $(grub_emu_CFLAGS) -c = -o $@ $<=0A= =0A= grub_emu-kern_i386_dl.d: kern/i386/dl.c=0A= set -e; $(BUILD_CC) -Ikern -I$(srcdir)/kern -I$(srcdir)/kern/i386 = $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=3D1 $(grub_emu_CFLAGS) -M = $< | sed 's,dl\.o[ :]*,grub_emu-kern__i386_dl.o $@ : ,g' > $@; [ = -s $@ ] || rm -f $@=0A= =0A= -include grub_emu-kern_i386_dl.d=0A= =0A= a1336 7=0A= grub_emu-symlist2.o: symlist2.c=0A= $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) $(grub_emu_CFLAGS) -c -o = $@ $<=0A= =0A= grub_emu-symlist2.d: symlist2.c=0A= set -e; $(CC) -I. -I$(srcdir)/. $(CPPFLAGS) $(CFLAGS) = $(grub_emu_CFLAGS) -M $< | sed 's,symlist2\.o[ = :]*,grub_emu-symlist2.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@=0A= =0A= -include grub_emu-symlist2.d=0A= d1338 1=0A= diff -n -r ./fs/ext2.c ../../src/grub-1.93/fs/ext2.c=0A= d174 1=0A= a174 1=0A= static grub_dl_t my_mod =3D (grub_dl_t) 0;=0A= diff -n -r ./include/grub/dl.h ../../src/grub-1.93/include/grub/dl.h=0A= d29 1=0A= a29 1=0A= static void grub_mod_init (grub_dl_t mod) __attribute__ ((used)); \=0A= d34 1=0A= a34 1=0A= grub_mod_init (grub_dl_t mod)=0A= diff -n -r ./include/grub/misc.h ../../src/grub-1.93/include/grub/misc.h=0A= a78 1=0A= void EXPORT_FUNC(grub_break) (const char * fct, int i);=0A= diff -n -r ./include/grub/mm.h ../../src/grub-1.93/include/grub/mm.h=0A= a31 1=0A= void *EXPORT_FUNC(grub_mmap) (grub_size_t size);=0A= diff -n -r ./include/grub/util/misc.h = ../../src/grub-1.93/include/grub/util/misc.h=0A= a47 1=0A= void grub_break (const char * fct, int index);=0A= diff -n -r ./kern/dl.c ../../src/grub-1.93/kern/dl.c=0A= d319 1=0A= a319 1=0A= grub_err_t=0A= a361 4=0A= else {=0A= grub_dprintf ("symbols",=0A= "%s: Resolved Symbol %s\n", mod->name, name);=0A= }=0A= d371 1=0A= a371 3=0A= if (grub_dl_register_symbol (name, (void *) sym->st_value, mod)) {=0A= grub_dprintf("symbols",=0A= "Err registering %s (%d)\n", name, grub_errno);=0A= a372 4=0A= } else {=0A= grub_dprintf("symbols",=0A= "%s: Registering %s\n", mod->name, name);=0A= }=0A= d379 1=0A= a379 3=0A= if (grub_dl_register_symbol (name, (void *) sym->st_value, mod)) {=0A= grub_dprintf("symbols",=0A= "Err registering %s (%d)\n", name, grub_errno);=0A= a380 4=0A= } else {=0A= grub_dprintf("symbols",=0A= "%s: Registering %s\n", mod->name, name);=0A= }=0A= a405 2=0A= typedef void FINIT(void * );=0A= typedef FINIT * PFINIT;=0A= d410 1=0A= a410 1=0A= ((PFINIT)mod->init) (mod);=0A= a514 3=0A= grub_dprintf("symbols", =0A= "%s: Section %d loaded at 0x%x (size %d)\n",=0A= mod->name, seg->section, seg->addr, seg->size);=0A= d535 1=0A= a535 1=0A= /* return 0; */=0A= diff -n -r ./kern/i386/pc/startup.S = ../../src/grub-1.93/kern/i386/pc/startup.S=0A= a19 5=0A= #ifdef REGPARM=0A= #include "startup.S.regparm"=0A= #else=0A= #include "startup.S.memparm"=0A= #endif=0A= d21 2150=0A= Only in ../../src/grub-1.93/kern/i386/pc: startup.S.memparm=0A= Only in ../../src/grub-1.93/kern/i386/pc: startup.S.regparm=0A= diff -n -r ./kern/misc.c ../../src/grub-1.93/kern/misc.c=0A= a877 5=0A= =0A= extern int grub_printf (const char * fmt, ...);=0A= void grub_break (const char * fct, int index) {=0A= grub_printf ("%s: Break at %d\n", fct, index);=0A= }=0A= diff -n -r ./kern/mm.c ../../src/grub-1.93/kern/mm.c=0A= a289 6=0A= void *=0A= grub_mmap (grub_size_t size)=0A= {=0A= return grub_memalign (0, size);=0A= }=0A= =0A= diff -n -r ./normal/i386/setjmp.S = ../../src/grub-1.93/normal/i386/setjmp.S=0A= a29 3=0A= #ifndef REGPARM=0A= movl 4(%esp), %eax /* Get Param */=0A= #endif=0A= a44 4=0A= #ifndef REGPARM=0A= movl 4(%esp), %eax /* Get Param */=0A= movl 8(%esp), %edx /* Get Param */=0A= #endif=0A= diff -n -r ./normal/main.c ../../src/grub-1.93/normal/main.c=0A= d236 1=0A= a236 1=0A= if (grub_setjmp (&grub_exit_env[0]) =3D=3D 0)=0A= Only in ../../src/grub-1.93/: symlist2.c=0A= diff -n -r ./util/grub-emu.c ../../src/grub-1.93/util/grub-emu.c=0A= d59 18=0A= a76 1=0A= return 000;=0A= diff -n -r ./util/misc.c ../../src/grub-1.93/util/misc.c=0A= a214 14=0A= #include =0A= =0A= static char * heapstart=3D(char*) 0x01200000;=0A= void *=0A= grub_mmap (grub_size_t size)=0A= {=0A= void * heap;=0A= heap=3D(void *)mmap(heapstart, size,=0A= PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);=0A= heapstart+=3Dsize; =0A= printf("Using mmap (size %d)\n", size);=0A= return heap;=0A= }=0A= =0A= d218 1=0A= a218 1=0A= if (ptr) free (ptr);=0A= d247 5=0A= a273 7=0A= =0A= int grub_null()=0A= {=0A= return 0;=0A= }=0A= =0A= int grub_null_var =3D 0;=0A= ------=_NextPart_000_0001_01C6733D.65178F80 Content-Type: application/octet-stream; name="startup.S.regparm" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="startup.S.regparm" /*=0A= * GRUB -- GRand Unified Bootloader=0A= * Copyright (C) 1999,2000,2001,2002,2003,2005 Free Software = Foundation, Inc.=0A= *=0A= * This program is free software; you can redistribute it and/or modify=0A= * it under the terms of the GNU General Public License as published by=0A= * the Free Software Foundation; either version 2 of the License, or=0A= * (at your option) any later version.=0A= *=0A= * This program is distributed in the hope that it will be useful,=0A= * but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= * GNU General Public License for more details.=0A= *=0A= * You should have received a copy of the GNU General Public License=0A= * along with this program; if not, write to the Free Software=0A= * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=0A= */=0A= =0A= =0A= /*=0A= * Note: These functions defined in this file may be called from C.=0A= * Be careful of that you must not modify some registers. Quote=0A= * from gcc-2.95.2/gcc/config/i386/i386.h:=0A= =0A= 1 for registers not available across function calls.=0A= These must include the FIXED_REGISTERS and also any=0A= registers that can be used without being saved.=0A= The latter must include the registers where values are returned=0A= and the register where structure-value addresses are passed.=0A= Aside from that, you can include as many other registers as you like.=0A= =0A= ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg=0A= { 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }=0A= */=0A= =0A= /*=0A= * Note: GRUB is compiled with the options -mrtd and -mregparm=3D3.=0A= * So the first three arguments are passed in %eax, %edx, and %ecx,=0A= * respectively, and if a function has a fixed number of arguments=0A= * and the number if greater than three, the function must return=0A= * with "ret $N" where N is ((the number of arguments) - 3) * 4.=0A= */=0A= =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= #define ABS(x) ((x) - EXT_C(start) + GRUB_BOOT_MACHINE_KERNEL_ADDR + = 0x200)=0A= =0A= .file "startup.S"=0A= =0A= .text=0A= =0A= /* Tell GAS to generate 16-bit instructions so that this code works=0A= in real mode. */=0A= .code16=0A= =0A= .globl start, _start=0A= start:=0A= _start:=0A= /*=0A= * Guarantee that "main" is loaded at 0x0:0x8200.=0A= */=0A= ljmp $0, $ABS(codestart)=0A= =0A= /*=0A= * Compatibility version number=0A= *=0A= * These MUST be at byte offset 6 and 7 of the executable=0A= * DO NOT MOVE !!!=0A= */=0A= . =3D EXT_C(start) + 0x6=0A= .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR=0A= =0A= /*=0A= * This is a special data area 8 bytes from the beginning.=0A= */=0A= =0A= . =3D EXT_C(start) + 0x8=0A= =0A= VARIABLE(grub_total_module_size)=0A= .long 0=0A= VARIABLE(grub_kernel_image_size)=0A= .long 0=0A= VARIABLE(grub_compressed_size)=0A= .long 0=0A= VARIABLE(grub_install_dos_part)=0A= .long 0xFFFFFFFF=0A= VARIABLE(grub_install_bsd_part)=0A= .long 0xFFFFFFFF=0A= VARIABLE(grub_prefix)=0A= .string "/boot/grub"=0A= =0A= /*=0A= * Leave some breathing room for the prefix.=0A= */=0A= =0A= . =3D EXT_C(start) + 0x50=0A= =0A= /*=0A= * Support for booting GRUB from a Multiboot boot loader (e.g. GRUB = itself).=0A= * This uses the a.out kludge to load raw binary to the area starting at = 1MB,=0A= * and relocates itself after loaded.=0A= */=0A= multiboot_header:=0A= /* magic */=0A= .long 0x1BADB002=0A= /* flags */=0A= .long (1 << 16)=0A= /* checksum */=0A= .long -0x1BADB002 - (1 << 16)=0A= /* header addr */=0A= .long multiboot_header - _start + 0x100000 + 0x200=0A= /* load addr */=0A= .long 0x100000=0A= /* load end addr */=0A= .long 0=0A= /* bss end addr */=0A= .long 0=0A= /* entry addr */=0A= .long multiboot_entry - _start + 0x100000 + 0x200=0A= =0A= multiboot_entry:=0A= .code32=0A= /* obtain the boot device */=0A= movl 12(%ebx), %edx=0A= =0A= /* relocate the code */=0A= movl $(GRUB_KERNEL_MACHINE_RAW_SIZE + 0x200), %ecx=0A= addl EXT_C(grub_compressed_size) - _start + 0x100000 + 0x200, %ecx=0A= movl $0x100000, %esi=0A= movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %edi=0A= cld=0A= rep=0A= movsb=0A= /* jump to the real address */=0A= movl $multiboot_trampoline, %eax=0A= jmp *%eax=0A= =0A= multiboot_trampoline:=0A= /* fill the boot information */=0A= movl %edx, %eax=0A= shrl $8, %eax=0A= xorl %ebx, %ebx=0A= cmpb $0xFF, %ah=0A= je 1f=0A= movb %ah, %bl=0A= movl %ebx, EXT_C(grub_install_dos_part)=0A= 1:=0A= cmpb $0xFF, %al=0A= je 2f=0A= movb %al, %bl=0A= movl %ebx, EXT_C(grub_install_bsd_part)=0A= 2:=0A= shrl $24, %edx=0A= /* enter the usual booting */=0A= call prot_to_real=0A= .code16=0A= =0A= /* the real mode code continues... */=0A= codestart:=0A= cli /* we're not safe here! */=0A= =0A= /* set up %ds, %ss, and %es */=0A= xorw %ax, %ax=0A= movw %ax, %ds=0A= movw %ax, %ss=0A= movw %ax, %es=0A= =0A= /* set up the real mode/BIOS stack */=0A= movl $GRUB_MEMORY_MACHINE_REAL_STACK, %ebp=0A= movl %ebp, %esp=0A= =0A= sti /* we're safe again */=0A= =0A= /* save boot drive reference */=0A= ADDR32 movb %dl, EXT_C(grub_boot_drive)=0A= =0A= /* reset disk system (%ah =3D 0) */=0A= int $0x13=0A= =0A= /* transition to protected mode */=0A= DATA32 call real_to_prot=0A= =0A= /* The ".code32" directive takes GAS out of 16-bit mode. */=0A= .code32=0A= =0A= incl %eax=0A= call EXT_C(grub_gate_a20)=0A= =0A= /* decompress the compressed part and put the result at 1MB */=0A= movl $0x100000, %esi=0A= movl $(START_SYMBOL + GRUB_KERNEL_MACHINE_RAW_SIZE), %edi=0A= =0A= pushl %esi=0A= pushl EXT_C(grub_compressed_size)=0A= pushl %edi=0A= call lzo1x_decompress=0A= addl $12, %esp=0A= =0A= /* copy back the decompressed part */=0A= movl %eax, %ecx=0A= cld=0A= rep=0A= movsb=0A= =0A= /* copy modules before cleaning out the bss */=0A= movl EXT_C(grub_total_module_size), %ecx=0A= movl EXT_C(grub_kernel_image_size), %esi=0A= addl %ecx, %esi=0A= addl $START_SYMBOL, %esi=0A= decl %esi=0A= movl $END_SYMBOL, %edi=0A= addl %ecx, %edi=0A= decl %edi=0A= std=0A= rep=0A= movsb=0A= =0A= /* clean out the bss */=0A= movl $BSS_START_SYMBOL, %edi=0A= =0A= /* compute the bss length */=0A= movl $END_SYMBOL, %ecx=0A= subl %edi, %ecx=0A= =0A= /* clean out */=0A= xorl %eax, %eax=0A= cld=0A= rep=0A= stosb=0A= =0A= /*=0A= * Call the start of main body of C code.=0A= */=0A= call EXT_C(grub_main)=0A= =0A= =0A= /*=0A= * This is the area for all of the special variables.=0A= */=0A= =0A= .p2align 2 /* force 4-byte alignment */=0A= =0A= protstack:=0A= .long GRUB_MEMORY_MACHINE_PROT_STACK=0A= =0A= VARIABLE(grub_boot_drive)=0A= .long 0=0A= =0A= VARIABLE(grub_start_addr)=0A= .long START_SYMBOL=0A= =0A= VARIABLE(grub_end_addr)=0A= .long END_SYMBOL=0A= =0A= VARIABLE(grub_apm_bios_info)=0A= .word 0 /* version */=0A= .word 0 /* cseg */=0A= .long 0 /* offset */=0A= .word 0 /* cseg_16 */=0A= .word 0 /* dseg_16 */=0A= .word 0 /* cseg_len */=0A= .word 0 /* cseg_16_len */=0A= .word 0 /* dseg_16_len */=0A= =0A= /*=0A= * This is the Global Descriptor Table=0A= *=0A= * An entry, a "Segment Descriptor", looks like this:=0A= *=0A= * 31 24 19 16 7 0=0A= * ------------------------------------------------------------=0A= * | | |B| |A| | | |1|0|E|W|A| |=0A= * | BASE 31..24 |G|/|L|V| LIMIT |P|DPL| TYPE | BASE 23:16 | 4=0A= * | | |D| |L| 19..16| | |1|1|C|R|A| |=0A= * ------------------------------------------------------------=0A= * | | |=0A= * | BASE 15..0 | LIMIT 15..0 | 0=0A= * | | |=0A= * ------------------------------------------------------------=0A= *=0A= * Note the ordering of the data items is reversed from the above=0A= * description.=0A= */=0A= =0A= .p2align 2 /* force 4-byte alignment */=0A= gdt:=0A= .word 0, 0=0A= .byte 0, 0, 0, 0=0A= =0A= /* -- code segment --=0A= * base =3D 0x00000000, limit =3D 0xFFFFF (4 KiB Granularity), present=0A= * type =3D 32bit code execute/read, DPL =3D 0=0A= */=0A= .word 0xFFFF, 0=0A= .byte 0, 0x9A, 0xCF, 0=0A= =0A= /* -- data segment --=0A= * base =3D 0x00000000, limit 0xFFFFF (4 KiB Granularity), present=0A= * type =3D 32 bit data read/write, DPL =3D 0 =0A= */=0A= .word 0xFFFF, 0=0A= .byte 0, 0x92, 0xCF, 0=0A= =0A= /* -- 16 bit real mode CS --=0A= * base =3D 0x00000000, limit 0x0FFFF (1 B Granularity), present=0A= * type =3D 16 bit code execute/read only/conforming, DPL =3D 0=0A= */=0A= .word 0xFFFF, 0=0A= .byte 0, 0x9E, 0, 0=0A= =0A= /* -- 16 bit real mode DS --=0A= * base =3D 0x00000000, limit 0x0FFFF (1 B Granularity), present=0A= * type =3D 16 bit data read/write, DPL =3D 0=0A= */=0A= .word 0xFFFF, 0=0A= .byte 0, 0x92, 0, 0=0A= =0A= =0A= /* this is the GDT descriptor */=0A= gdtdesc:=0A= .word 0x27 /* limit */=0A= .long gdt /* addr */=0A= =0A= =0A= /*=0A= * These next two routines, "real_to_prot" and "prot_to_real" are = structured=0A= * in a very specific way. Be very careful when changing them.=0A= *=0A= * NOTE: Use of either one messes up %eax and %ebp.=0A= */=0A= =0A= real_to_prot:=0A= .code16=0A= cli=0A= =0A= /* load the GDT register */=0A= DATA32 ADDR32 lgdt gdtdesc=0A= =0A= /* turn on protected mode */=0A= movl %cr0, %eax=0A= orl $GRUB_MEMORY_MACHINE_CR0_PE_ON, %eax=0A= movl %eax, %cr0=0A= =0A= /* jump to relocation, flush prefetch queue, and reload %cs */=0A= DATA32 ljmp $GRUB_MEMORY_MACHINE_PROT_MODE_CSEG, $protcseg=0A= =0A= .code32=0A= protcseg:=0A= /* reload other segment registers */=0A= movw $GRUB_MEMORY_MACHINE_PROT_MODE_DSEG, %ax=0A= movw %ax, %ds=0A= movw %ax, %es=0A= movw %ax, %fs=0A= movw %ax, %gs=0A= movw %ax, %ss=0A= =0A= /* put the return address in a known safe location */=0A= movl (%esp), %eax=0A= movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK=0A= =0A= /* get protected mode stack */=0A= movl protstack, %eax=0A= movl %eax, %esp=0A= movl %eax, %ebp=0A= =0A= /* get return address onto the right stack */=0A= movl GRUB_MEMORY_MACHINE_REAL_STACK, %eax=0A= movl %eax, (%esp)=0A= =0A= /* zero %eax */=0A= xorl %eax, %eax=0A= =0A= /* return on the old (or initialized) stack! */=0A= ret=0A= =0A= =0A= prot_to_real:=0A= /* just in case, set GDT */=0A= lgdt gdtdesc=0A= =0A= /* save the protected mode stack */=0A= movl %esp, %eax=0A= movl %eax, protstack=0A= =0A= /* get the return address */=0A= movl (%esp), %eax=0A= movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK=0A= =0A= /* set up new stack */=0A= movl $GRUB_MEMORY_MACHINE_REAL_STACK, %eax=0A= movl %eax, %esp=0A= movl %eax, %ebp=0A= =0A= /* set up segment limits */=0A= movw $GRUB_MEMORY_MACHINE_PSEUDO_REAL_DSEG, %ax=0A= movw %ax, %ds=0A= movw %ax, %es=0A= movw %ax, %fs=0A= movw %ax, %gs=0A= movw %ax, %ss=0A= =0A= /* this might be an extra step */=0A= /* jump to a 16 bit segment */=0A= ljmp $GRUB_MEMORY_MACHINE_PSEUDO_REAL_CSEG, $tmpcseg=0A= =0A= tmpcseg:=0A= .code16=0A= =0A= /* clear the PE bit of CR0 */=0A= movl %cr0, %eax=0A= andl $(~GRUB_MEMORY_MACHINE_CR0_PE_ON), %eax=0A= movl %eax, %cr0=0A= =0A= /* flush prefetch queue, reload %cs */=0A= DATA32 ljmp $0, $realcseg=0A= =0A= realcseg:=0A= /* we are in real mode now=0A= * set up the real mode segment registers : DS, SS, ES=0A= */=0A= /* zero %eax */=0A= xorl %eax, %eax=0A= =0A= movw %ax, %ds=0A= movw %ax, %es=0A= movw %ax, %fs=0A= movw %ax, %gs=0A= movw %ax, %ss=0A= =0A= /* restore interrupts */=0A= sti=0A= =0A= /* return on new stack! */=0A= DATA32 ret=0A= =0A= .code32=0A= =0A= =0A= /*=0A= * grub_gate_a20(int on)=0A= *=0A= * Gate address-line 20 for high memory.=0A= *=0A= * This routine is probably overconservative in what it does, but so = what?=0A= *=0A= * It also eats any keystrokes in the keyboard buffer. :-(=0A= */=0A= =0A= FUNCTION(grub_gate_a20)=0A= movl %eax, %edx=0A= =0A= gate_a20_test_current_state: =0A= /* first of all, test if already in a good state */=0A= call gate_a20_check_state=0A= cmpb %al, %dl=0A= jnz gate_a20_try_bios=0A= ret=0A= =0A= gate_a20_try_bios:=0A= /* second, try a BIOS call */=0A= pushl %ebp=0A= call prot_to_real=0A= =0A= .code16=0A= movw $0x2400, %ax=0A= testb %dl, %dl=0A= jz 1f=0A= incw %ax=0A= 1: int $0x15=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %ebp=0A= call gate_a20_check_state=0A= cmpb %al, %dl=0A= jnz gate_a20_try_keyboard_controller=0A= ret=0A= =0A= gate_a20_flush_keyboard_buffer:=0A= inb $0x64=0A= andb $0x02, %al=0A= jnz gate_a20_flush_keyboard_buffer=0A= 2: =0A= inb $0x64=0A= andb $0x01, %al=0A= jz 3f=0A= inb $0x60=0A= jmp 2b=0A= 3:=0A= ret=0A= =0A= gate_a20_try_keyboard_controller: =0A= /* third, try the keyboard controller */=0A= call gate_a20_flush_keyboard_buffer=0A= =0A= movb $0xd1, %al=0A= outb $0x64=0A= 4: =0A= inb $0x64=0A= andb $0x02, %al=0A= jnz 4b=0A= =0A= movb $0xdd, %al=0A= testb %dl, %dl=0A= jz 5f=0A= orb $0x02, %al=0A= 5: outb $0x60=0A= call gate_a20_flush_keyboard_buffer=0A= =0A= /* output a dummy command (USB keyboard hack) */=0A= movb $0xff, %al=0A= outb $0x64=0A= call gate_a20_flush_keyboard_buffer=0A= =0A= call gate_a20_check_state=0A= cmpb %al, %dl=0A= jnz gate_a20_try_system_control_port_a=0A= ret=0A= =0A= gate_a20_try_system_control_port_a:=0A= /* fourth, try the system control port A */=0A= inb $0x92=0A= andb $(~0x03), %al=0A= testb %dl, %dl=0A= jz 6f=0A= orb $0x02, %al=0A= 6: outb $0x92=0A= =0A= /* When turning off Gate A20, do not check the state strictly,=0A= because a failure is not fatal usually, and Gate A20 is always=0A= on some modern machines. */=0A= testb %dl, %dl=0A= jz 7f =0A= call gate_a20_check_state=0A= cmpb %al, %dl=0A= /* everything failed, so restart from the beginning */=0A= jnz gate_a20_try_bios=0A= 7: ret=0A= =0A= gate_a20_check_state:=0A= /* iterate the checking for a while */=0A= movl $100, %ecx=0A= 1: =0A= call 3f=0A= cmpb %al, %dl=0A= jz 2f=0A= loop 1b=0A= 2:=0A= ret=0A= 3: =0A= pushl %ebx=0A= pushl %ecx=0A= xorl %eax, %eax=0A= /* compare the byte at 0x8000 with that at 0x108000 */=0A= movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %ebx=0A= pushl %ebx=0A= /* save the original byte in CL */=0A= movb (%ebx), %cl=0A= /* store the value at 0x108000 in AL */=0A= addl $0x100000, %ebx=0A= movb (%ebx), %al=0A= /* try to set one less value at 0x8000 */=0A= popl %ebx=0A= movb %al, %ch=0A= decb %ch=0A= movb %ch, (%ebx)=0A= /* serialize */=0A= outb %al, $0x80=0A= outb %al, $0x80=0A= /* obtain the value at 0x108000 in CH */=0A= pushl %ebx=0A= addl $0x100000, %ebx=0A= movb (%ebx), %ch=0A= /* this result is 1 if A20 is on or 0 if it is off */=0A= subb %ch, %al=0A= xorb $1, %al=0A= /* restore the original */=0A= popl %ebx=0A= movb %cl, (%ebx)=0A= popl %ecx=0A= popl %ebx=0A= ret=0A= =0A= #include "lzo1x.S"=0A= =0A= =0A= /*=0A= * This call is special... it never returns... in fact it should = simply=0A= * hang at this point!=0A= */=0A= =0A= FUNCTION(grub_stop)=0A= call prot_to_real=0A= =0A= /*=0A= * This next part is sort of evil. It takes advantage of the=0A= * byte ordering on the x86 to work in either 16-bit or 32-bit=0A= * mode, so think about it before changing it.=0A= */=0A= =0A= FUNCTION(grub_hard_stop)=0A= hlt=0A= jmp EXT_C(grub_hard_stop)=0A= =0A= =0A= /*=0A= * grub_stop_floppy()=0A= *=0A= * Stop the floppy drive from spinning, so that other software is=0A= * jumped to with a known state.=0A= */=0A= FUNCTION(grub_stop_floppy)=0A= movw $0x3F2, %dx=0A= xorb %al, %al=0A= outb %al, %dx=0A= ret=0A= =0A= /*=0A= * grub_reboot()=0A= *=0A= * Reboot the system. At the moment, rely on BIOS.=0A= */=0A= FUNCTION(grub_reboot)=0A= call prot_to_real=0A= .code16=0A= /* cold boot */=0A= movw $0x0472, %di=0A= movw %ax, (%di)=0A= ljmp $0xFFFF, $0x0000=0A= .code32=0A= =0A= /*=0A= * grub_halt(int no_apm)=0A= *=0A= * Halt the system, using APM if possible. If NO_APM is true, don't use=0A= * APM even if it is available.=0A= */=0A= FUNCTION(grub_halt)=0A= /* see if zero */=0A= testl %eax, %eax=0A= jnz EXT_C(grub_stop)=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= /* detect APM */=0A= movw $0x5300, %ax=0A= xorw %bx, %bx=0A= int $0x15=0A= jc EXT_C(grub_hard_stop)=0A= /* don't check %bx for buggy BIOSes... */=0A= =0A= /* disconnect APM first */=0A= movw $0x5304, %ax=0A= xorw %bx, %bx=0A= int $0x15=0A= =0A= /* connect APM */=0A= movw $0x5301, %ax=0A= xorw %bx, %bx=0A= int $0x15=0A= jc EXT_C(grub_hard_stop)=0A= =0A= /* set APM protocol level - 1.1 or bust. (this covers APM 1.2 also) */=0A= movw $0x530E, %ax=0A= xorw %bx, %bx=0A= movw $0x0101, %cx=0A= int $0x15=0A= jc EXT_C(grub_hard_stop)=0A= =0A= /* set the power state to off */=0A= movw $0x5307, %ax=0A= movw $1, %bx=0A= movw $3, %cx=0A= int $0x15=0A= =0A= /* shouldn't reach here */=0A= jmp EXT_C(grub_hard_stop)=0A= .code32=0A= =0A= =0A= /*=0A= * void grub_chainloader_real_boot (int drive, void *part_addr)=0A= *=0A= * This starts another boot loader.=0A= */=0A= =0A= FUNCTION(grub_chainloader_real_boot)=0A= pushl %edx=0A= pushl %eax=0A= =0A= call EXT_C(grub_dl_unload_all)=0A= =0A= /* set up to pass boot drive */=0A= popl %edx=0A= =0A= /* ESI must point to a partition table entry */=0A= popl %esi=0A= =0A= /* Turn off Gate A20 */=0A= xorl %eax, %eax=0A= call EXT_C(grub_gate_a20)=0A= =0A= call prot_to_real=0A= .code16=0A= ljmp $0, $GRUB_MEMORY_MACHINE_BOOT_LOADER_ADDR=0A= .code32=0A= =0A= =0A= /*=0A= * void grub_linux_boot_zimage (void)=0A= */=0A= VARIABLE(grub_linux_prot_size)=0A= .long 0=0A= VARIABLE(grub_linux_tmp_addr)=0A= .long 0=0A= VARIABLE(grub_linux_real_addr)=0A= .long 0=0A= =0A= FUNCTION(grub_linux_boot_zimage)=0A= /* copy the kernel */=0A= movl EXT_C(grub_linux_prot_size), %ecx=0A= addl $3, %ecx=0A= shrl $2, %ecx=0A= movl $GRUB_LINUX_BZIMAGE_ADDR, %esi=0A= movl $GRUB_LINUX_ZIMAGE_ADDR, %edi=0A= cld=0A= rep=0A= movsl=0A= =0A= FUNCTION(grub_linux_boot_bzimage)=0A= call EXT_C(grub_dl_unload_all)=0A= =0A= movl EXT_C(grub_linux_real_addr), %ebx=0A= =0A= /* copy the real mode code */=0A= movl EXT_C(grub_linux_tmp_addr), %esi=0A= movl %ebx, %edi=0A= movl $GRUB_LINUX_SETUP_MOVE_SIZE, %ecx=0A= cld=0A= rep=0A= movsb=0A= =0A= /* change %ebx to the segment address */=0A= shrl $4, %ebx=0A= movl %ebx, %eax=0A= addl $0x20, %eax=0A= movw %ax, linux_setup_seg=0A= =0A= /* XXX new stack pointer in safe area for calling functions */=0A= movl $0x4000, %esp=0A= call EXT_C(grub_stop_floppy)=0A= =0A= /* final setup for linux boot */=0A= call prot_to_real=0A= .code16=0A= =0A= cli=0A= movw %bx, %ss=0A= movw $GRUB_LINUX_SETUP_STACK, %sp=0A= =0A= movw %bx, %ds=0A= movw %bx, %es=0A= movw %bx, %fs=0A= movw %bx, %gs=0A= =0A= /* ljmp */=0A= .byte 0xea=0A= .word 0=0A= linux_setup_seg:=0A= .word 0=0A= .code32=0A= =0A= =0A= /*=0A= * This starts the multiboot kernel.=0A= */=0A= =0A= FUNCTION(grub_multiboot_real_boot)=0A= /* Push the entry address on the stack. */=0A= pushl %eax=0A= /* Move the address of the multiboot information structure to ebx. */=0A= movl %edx,%ebx=0A= =0A= /* Unload all modules and stop the floppy driver. */=0A= call EXT_C(grub_dl_unload_all)=0A= call EXT_C(grub_stop_floppy)=0A= =0A= /* Interrupts should be disabled. */=0A= cli=0A= =0A= /* Move the magic value into eax and jump to the kernel. */=0A= movl $GRUB_MB_MAGIC2,%eax=0A= popl %ecx=0A= jmp *%ecx=0A= =0A= =0A= /*=0A= * int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap)=0A= *=0A= * Call IBM/MS INT13 Extensions (int 13 %ah=3DAH) for DRIVE. DAP=0A= * is passed for disk address packet. If an error occurs, return=0A= * non-zero, otherwise zero.=0A= */=0A= =0A= FUNCTION(grub_biosdisk_rw_int13_extensions)=0A= pushl %ebp=0A= pushl %esi=0A= =0A= /* compute the address of disk_address_packet */=0A= movw %cx, %si=0A= xorw %cx, %cx=0A= shrl $4, %ecx /* save the segment to cx */=0A= =0A= /* ah */=0A= movb %al, %dh=0A= /* enter real mode */=0A= call prot_to_real=0A= =0A= .code16=0A= movb %dh, %ah=0A= movw %cx, %ds=0A= int $0x13 /* do the operation */=0A= movb %ah, %dl /* save return value */=0A= /* clear the data segment */=0A= xorw %ax, %ax=0A= movw %ax, %ds=0A= /* back to protected mode */=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %dl, %al /* return value in %eax */=0A= =0A= popl %esi=0A= popl %ebp=0A= =0A= ret=0A= =0A= /*=0A= * int grub_biosdisk_rw_standard (int ah, int drive, int coff, int = hoff,=0A= * int soff, int nsec, int segment)=0A= *=0A= * Call standard and old INT13 (int 13 %ah=3DAH) for DRIVE. Read/write=0A= * NSEC sectors from COFF/HOFF/SOFF into SEGMENT. If an error occurs,=0A= * return non-zero, otherwise zero.=0A= */=0A= =0A= FUNCTION(grub_biosdisk_rw_standard)=0A= pushl %ebp=0A= movl %esp, %ebp=0A= =0A= pushl %ebx=0A= pushl %edi=0A= pushl %esi=0A= =0A= /* set up CHS information */=0A= =0A= /* set %ch to low eight bits of cylinder */=0A= xchgb %cl, %ch=0A= /* set bits 6-7 of %cl to high two bits of cylinder */=0A= shlb $6, %cl=0A= /* set bits 0-5 of %cl to sector */=0A= addb 0xc(%ebp), %cl=0A= /* set %dh to head */=0A= movb 0x8(%ebp), %dh=0A= /* set %ah to AH */=0A= movb %al, %ah=0A= /* set %al to NSEC */=0A= movb 0x10(%ebp), %al=0A= /* save %ax in %di */=0A= movw %ax, %di=0A= /* save SEGMENT in %bx */=0A= movw 0x14(%ebp), %bx=0A= =0A= /* enter real mode */=0A= call prot_to_real=0A= =0A= .code16=0A= movw %bx, %es=0A= xorw %bx, %bx=0A= movw $3, %si /* attempt at least three times */=0A= =0A= 1: =0A= movw %di, %ax=0A= int $0x13 /* do the operation */=0A= jnc 2f /* check if successful */=0A= =0A= movb %ah, %bl /* save return value */=0A= /* if fail, reset the disk system */=0A= xorw %ax, %ax=0A= int $0x13=0A= =0A= decw %si=0A= cmpw $0, %si=0A= je 2f=0A= xorb %bl, %bl=0A= jmp 1b /* retry */=0A= 2: =0A= /* back to protected mode */=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %bl, %al /* return value in %eax */=0A= =0A= popl %esi=0A= popl %edi=0A= popl %ebx=0A= popl %ebp=0A= =0A= ret $(4 * 4)=0A= =0A= =0A= /*=0A= * int grub_biosdisk_check_int13_extensions (int drive)=0A= *=0A= * Check if LBA is supported for DRIVE. If it is supported, then return=0A= * the major version of extensions, otherwise zero.=0A= */=0A= =0A= FUNCTION(grub_biosdisk_check_int13_extensions)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= /* drive */=0A= movb %al, %dl=0A= /* enter real mode */=0A= call prot_to_real=0A= =0A= .code16=0A= movb $0x41, %ah=0A= movw $0x55aa, %bx=0A= int $0x13 /* do the operation */=0A= =0A= /* check the result */=0A= jc 1f=0A= cmpw $0xaa55, %bx=0A= jne 1f=0A= =0A= movb %ah, %bl /* save the major version into %bl */=0A= =0A= /* check if AH=3D0x42 is supported */=0A= andw $1, %cx=0A= jnz 2f=0A= =0A= 1:=0A= xorb %bl, %bl=0A= 2:=0A= /* back to protected mode */=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %bl, %al /* return value in %eax */=0A= =0A= popl %ebx=0A= popl %ebp=0A= =0A= ret=0A= =0A= =0A= /*=0A= * int grub_biosdisk_get_diskinfo_int13_extensions (int drive, void = *drp)=0A= *=0A= * Return the geometry of DRIVE in a drive parameters, DRP. If an error=0A= * occurs, then return non-zero, otherwise zero.=0A= */=0A= =0A= FUNCTION(grub_biosdisk_get_diskinfo_int13_extensions)=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %esi=0A= =0A= /* compute the address of drive parameters */=0A= movw %dx, %si=0A= xorw %dx, %dx=0A= shrl $4, %edx=0A= movw %dx, %bx /* save the segment into %bx */=0A= /* drive */=0A= movb %al, %dl=0A= /* enter real mode */=0A= call prot_to_real=0A= =0A= .code16=0A= movb $0x48, %ah=0A= movw %bx, %ds=0A= int $0x13 /* do the operation */=0A= movb %ah, %bl /* save return value in %bl */=0A= /* clear the data segment */=0A= xorw %ax, %ax=0A= movw %ax, %ds=0A= /* back to protected mode */=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %bl, %al /* return value in %eax */=0A= =0A= popl %esi=0A= popl %ebx=0A= popl %ebp=0A= =0A= ret=0A= =0A= =0A= /*=0A= * int grub_biosdisk_get_diskinfo_standard (int drive,=0A= * unsigned long *cylinders, =0A= * unsigned long *heads,=0A= * unsigned long *sectors)=0A= *=0A= * Return the geometry of DRIVE in CYLINDERS, HEADS and SECTORS. If an=0A= * error occurs, then return non-zero, otherwise zero.=0A= */=0A= =0A= FUNCTION(grub_biosdisk_get_diskinfo_standard)=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %edi=0A= =0A= /* push CYLINDERS */=0A= pushl %edx=0A= /* push HEADS */=0A= pushl %ecx=0A= /* SECTORS is on the stack */=0A= =0A= /* drive */=0A= movb %al, %dl=0A= /* enter real mode */=0A= call prot_to_real=0A= =0A= .code16=0A= movb $0x8, %ah=0A= int $0x13 /* do the operation */=0A= /* check if successful */=0A= testb %ah, %ah=0A= jnz 1f=0A= /* bogus BIOSes may not return an error number */=0A= testb $0x3f, %cl /* 0 sectors means no disk */=0A= jnz 1f /* if non-zero, then succeed */=0A= /* XXX 0x60 is one of the unused error numbers */=0A= movb $0x60, %ah=0A= 1:=0A= movb %ah, %bl /* save return value in %bl */=0A= /* back to protected mode */=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= /* pop HEADS */=0A= popl %edi=0A= movb %dh, %al=0A= incl %eax /* the number of heads is counted from zero */=0A= movl %eax, (%edi)=0A= =0A= /* pop CYLINDERS */=0A= popl %edi=0A= movb %ch, %al=0A= movb %cl, %ah=0A= shrb $6, %ah /* the number of cylinders is counted from zero */=0A= incl %eax=0A= movl %eax, (%edi)=0A= =0A= /* SECTORS */=0A= movl 0x10(%esp), %edi=0A= andb $0x3f, %cl=0A= movzbl %cl, %eax=0A= movl %eax, (%edi)=0A= =0A= xorl %eax, %eax=0A= movb %bl, %al /* return value in %eax */=0A= =0A= popl %edi=0A= popl %ebx=0A= popl %ebp=0A= =0A= ret $4=0A= =0A= =0A= /*=0A= * int grub_biosdisk_get_num_floppies (void)=0A= */=0A= FUNCTION(grub_biosdisk_get_num_floppies)=0A= pushl %ebp=0A= =0A= xorl %edx, %edx=0A= call prot_to_real=0A= =0A= .code16=0A= /* reset the disk system first */=0A= int $0x13=0A= 1:=0A= stc=0A= =0A= /* call GET DISK TYPE */=0A= movb $0x15, %ah=0A= int $0x13=0A= =0A= jc 2f=0A= =0A= /* check if this drive exists */ =0A= testb $0x3, %ah=0A= jz 2f=0A= =0A= incb %dl=0A= cmpb $2, %dl=0A= jne 1b=0A= 2:=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movl %edx, %eax=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= *=0A= * grub_get_memsize(i) : return the memory size in KB. i =3D=3D 0 for = conventional=0A= * memory, i =3D=3D 1 for extended memory=0A= * BIOS call "INT 12H" to get conventional memory size=0A= * BIOS call "INT 15H, AH=3D88H" to get extended memory size=0A= * Both have the return value in AX.=0A= *=0A= */=0A= =0A= FUNCTION(grub_get_memsize)=0A= pushl %ebp=0A= =0A= movl %eax, %edx=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= testl %edx, %edx=0A= jnz xext=0A= =0A= int $0x12=0A= jmp xdone=0A= =0A= xext:=0A= movb $0x88, %ah=0A= int $0x15=0A= =0A= xdone:=0A= movw %ax, %dx=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= =0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= *=0A= * grub_get_eisa_mmap() : return packed EISA memory map, lower 16 bits = is=0A= * memory between 1M and 16M in 1K parts, upper 16 bits is=0A= * memory above 16M in 64K parts. If error, return zero.=0A= * BIOS call "INT 15H, AH=3DE801H" to get EISA memory map,=0A= * AX =3D memory between 1M and 16M in 1K parts.=0A= * BX =3D memory above 16M in 64K parts.=0A= *=0A= */=0A= =0A= FUNCTION(grub_get_eisa_mmap)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= movw $0xe801, %ax=0A= int $0x15=0A= =0A= shll $16, %ebx=0A= movw %ax, %bx=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= cmpb $0x86, %bh=0A= je xnoteisa=0A= =0A= movl %ebx, %eax=0A= =0A= xnoteisa:=0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= *=0A= * grub_get_mmap_entry(addr, cont) : address and old continuation value = (zero to=0A= * start), for the Query System Address Map BIOS call.=0A= *=0A= * Sets the first 4-byte int value of "addr" to the size returned by=0A= * the call. If the call fails, sets it to zero.=0A= *=0A= * Returns: new (non-zero) continuation value, 0 if done.=0A= */=0A= =0A= FUNCTION(grub_get_mmap_entry)=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %edi=0A= pushl %esi=0A= =0A= /* push ADDR */=0A= pushl %eax=0A= =0A= /* place address (+4) in ES:DI */=0A= addl $4, %eax=0A= movl %eax, %edi=0A= andl $0xf, %edi=0A= shrl $4, %eax=0A= movl %eax, %esi=0A= =0A= /* set continuation value */=0A= movl %edx, %ebx=0A= =0A= /* set default maximum buffer size */=0A= movl $0x14, %ecx=0A= =0A= /* set EDX to 'SMAP' */=0A= movl $0x534d4150, %edx=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= movw %si, %es=0A= movl $0xe820, %eax=0A= int $0x15=0A= =0A= DATA32 jc xnosmap=0A= =0A= cmpl $0x534d4150, %eax=0A= jne xnosmap=0A= =0A= cmpl $0x14, %ecx=0A= jl xnosmap=0A= =0A= cmpl $0x400, %ecx=0A= jg xnosmap=0A= =0A= jmp xsmap=0A= =0A= xnosmap:=0A= xorl %ecx, %ecx=0A= =0A= xsmap:=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= /* write length of buffer (zero if error) into ADDR */=0A= popl %eax=0A= movl %ecx, (%eax)=0A= =0A= /* set return value to continuation */=0A= movl %ebx, %eax=0A= =0A= popl %esi=0A= popl %edi=0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * void grub_console_real_putchar (int c)=0A= *=0A= * Put the character C on the console. Because GRUB wants to write a=0A= * character with an attribute, this implementation is a bit tricky.=0A= * If C is a control character (CR, LF, BEL, BS), use INT 10, AH =3D 0Eh=0A= * (TELETYPE OUTPUT). Otherwise, save the original position, put a space,=0A= * save the current position, restore the original position, write the=0A= * character and the attribute, and restore the current position.=0A= *=0A= * The reason why this is so complicated is that there is no easy way to=0A= * get the height of the screen, and the TELETYPE OUPUT BIOS call doesn't=0A= * support setting a background attribute.=0A= */=0A= FUNCTION(grub_console_real_putchar)=0A= movl %eax, %edx=0A= pusha=0A= movb EXT_C(grub_console_cur_color), %bl=0A= =0A= call prot_to_real=0A= .code16=0A= movb %dl, %al=0A= xorb %bh, %bh=0A= =0A= /* use teletype output if control character */=0A= cmpb $0x7, %al=0A= je 1f=0A= cmpb $0x8, %al=0A= je 1f=0A= cmpb $0xa, %al=0A= je 1f=0A= cmpb $0xd, %al=0A= je 1f=0A= =0A= /* save the character and the attribute on the stack */=0A= pushw %ax=0A= pushw %bx=0A= =0A= /* get the current position */=0A= movb $0x3, %ah=0A= int $0x10=0A= =0A= /* check the column with the width */=0A= cmpb $79, %dl=0A= jl 2f=0A= =0A= /* print CR and LF, if next write will exceed the width */ =0A= movw $0x0e0d, %ax=0A= int $0x10=0A= movb $0x0a, %al=0A= int $0x10=0A= =0A= /* get the current position */=0A= movb $0x3, %ah=0A= int $0x10=0A= =0A= 2: =0A= /* restore the character and the attribute */=0A= popw %bx=0A= popw %ax=0A= =0A= /* write the character with the attribute */=0A= movb $0x9, %ah=0A= movw $1, %cx=0A= int $0x10=0A= =0A= /* move the cursor forward */=0A= incb %dl=0A= movb $0x2, %ah=0A= int $0x10=0A= =0A= jmp 3f=0A= =0A= 1: movw $1, %bx=0A= movb $0xe, %ah=0A= int $0x10=0A= =0A= 3: DATA32 call real_to_prot=0A= .code32=0A= =0A= popa=0A= ret=0A= =0A= =0A= /*=0A= * int grub_console_getkey (void)=0A= * BIOS call "INT 16H Function 00H" to read character from keyboard=0A= * Call with %ah =3D 0x0=0A= * Return: %ah =3D keyboard scan code=0A= * %al =3D ASCII character=0A= */=0A= =0A= /* this table is used in translate_keycode below */=0A= translation_table:=0A= .word GRUB_CONSOLE_KEY_LEFT, 2=0A= .word GRUB_CONSOLE_KEY_RIGHT, 6=0A= .word GRUB_CONSOLE_KEY_UP, 16=0A= .word GRUB_CONSOLE_KEY_DOWN, 14=0A= .word GRUB_CONSOLE_KEY_HOME, 1=0A= .word GRUB_CONSOLE_KEY_END, 5=0A= .word GRUB_CONSOLE_KEY_DC, 4=0A= .word GRUB_CONSOLE_KEY_BACKSPACE, 8=0A= .word GRUB_CONSOLE_KEY_PPAGE, 7=0A= .word GRUB_CONSOLE_KEY_NPAGE, 3=0A= .word 0=0A= =0A= /*=0A= * translate_keycode translates the key code %dx to an ascii code.=0A= */=0A= .code16=0A= =0A= translate_keycode:=0A= pushw %bx=0A= pushw %si=0A= =0A= movw $ABS(translation_table), %si=0A= =0A= 1: lodsw=0A= /* check if this is the end */=0A= testw %ax, %ax=0A= jz 2f=0A= /* load the ascii code into %ax */=0A= movw %ax, %bx=0A= lodsw=0A= /* check if this matches the key code */=0A= cmpw %bx, %dx=0A= jne 1b=0A= /* translate %dx, if successful */=0A= movw %ax, %dx=0A= =0A= 2: popw %si=0A= popw %bx=0A= ret=0A= =0A= .code32=0A= =0A= FUNCTION(grub_console_getkey)=0A= pushl %ebp=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= int $0x16=0A= =0A= movw %ax, %dx /* real_to_prot uses %eax */=0A= call translate_keycode=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= =0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * int grub_console_checkkey (void)=0A= * if there is a character pending, return it; otherwise return -1=0A= * BIOS call "INT 16H Function 01H" to check whether a character is = pending=0A= * Call with %ah =3D 0x1=0A= * Return:=0A= * If key waiting to be input:=0A= * %ah =3D keyboard scan code=0A= * %al =3D ASCII character=0A= * Zero flag =3D clear=0A= * else=0A= * Zero flag =3D set=0A= */=0A= FUNCTION(grub_console_checkkey)=0A= pushl %ebp=0A= xorl %edx, %edx=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= movb $0x1, %ah=0A= int $0x16=0A= =0A= jz notpending=0A= =0A= movw %ax, %dx=0A= DATA32 jmp pending=0A= =0A= notpending:=0A= decl %edx=0A= =0A= pending:=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movl %edx, %eax=0A= =0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * grub_uint16_t grub_console_getxy (void)=0A= * BIOS call "INT 10H Function 03h" to get cursor position=0A= * Call with %ah =3D 0x03=0A= * %bh =3D page=0A= * Returns %ch =3D starting scan line=0A= * %cl =3D ending scan line=0A= * %dh =3D row (0 is top)=0A= * %dl =3D column (0 is left)=0A= */=0A= =0A= =0A= FUNCTION(grub_console_getxy)=0A= pushl %ebp=0A= pushl %ebx /* save EBX */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= xorb %bh, %bh /* set page to 0 */=0A= movb $0x3, %ah=0A= int $0x10 /* get cursor position */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %dl, %ah=0A= movb %dh, %al=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * void grub_console_gotoxy(grub_uint8_t x, grub_uint8_t y)=0A= * BIOS call "INT 10H Function 02h" to set cursor position=0A= * Call with %ah =3D 0x02=0A= * %bh =3D page=0A= * %dh =3D row (0 is top)=0A= * %dl =3D column (0 is left)=0A= */=0A= =0A= =0A= FUNCTION(grub_console_gotoxy)=0A= pushl %ebp=0A= pushl %ebx /* save EBX */=0A= =0A= movb %dl, %dh /* %dh =3D y */=0A= movb %al, %dl /* %dl =3D x */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= xorb %bh, %bh /* set page to 0 */=0A= movb $0x2, %ah=0A= int $0x10 /* set cursor position */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * void grub_console_cls (void)=0A= * BIOS call "INT 10H Function 09h" to write character and attribute=0A= * Call with %ah =3D 0x09=0A= * %al =3D (character)=0A= * %bh =3D (page number)=0A= * %bl =3D (attribute)=0A= * %cx =3D (number of times)=0A= */=0A= =0A= FUNCTION(grub_console_cls)=0A= pushl %ebp=0A= pushl %ebx /* save EBX */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= /* move the cursor to the beginning */=0A= movb $0x02, %ah=0A= xorb %bh, %bh=0A= xorw %dx, %dx=0A= int $0x10=0A= =0A= /* write spaces to the entire screen */=0A= movw $0x0920, %ax=0A= movw $0x07, %bx=0A= movw $(80 * 25), %cx=0A= int $0x10=0A= =0A= /* move back the cursor */=0A= movb $0x02, %ah=0A= int $0x10=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * void grub_console_setcursor (int on)=0A= * BIOS call "INT 10H Function 01h" to set cursor type=0A= * Call with %ah =3D 0x01=0A= * %ch =3D cursor starting scanline=0A= * %cl =3D cursor ending scanline=0A= */=0A= =0A= console_cursor_state:=0A= .byte 1=0A= console_cursor_shape:=0A= .word 0=0A= =0A= FUNCTION(grub_console_setcursor)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= /* push ON */=0A= pushl %eax=0A= =0A= /* check if the standard cursor shape has already been saved */=0A= movw console_cursor_shape, %ax=0A= testw %ax, %ax=0A= jne 1f=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movb $0x03, %ah=0A= xorb %bh, %bh=0A= int $0x10=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %cx, console_cursor_shape=0A= 1:=0A= /* set %cx to the designated cursor shape */=0A= movw $0x2000, %cx=0A= popl %eax=0A= testl %eax, %eax=0A= jz 2f=0A= movw console_cursor_shape, %cx=0A= 2: =0A= call prot_to_real=0A= .code16=0A= =0A= movb $0x1, %ah=0A= int $0x10 =0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_getrtsecs()=0A= * if a seconds value can be read, read it and return it (BCD),=0A= * otherwise return 0xFF=0A= * BIOS call "INT 1AH Function 02H" to check whether a character is = pending=0A= * Call with %ah =3D 0x2=0A= * Return:=0A= * If RT Clock can give correct values=0A= * %ch =3D hour (BCD)=0A= * %cl =3D minutes (BCD)=0A= * %dh =3D seconds (BCD)=0A= * %dl =3D daylight savings time (00h std, 01h = daylight)=0A= * Carry flag =3D clear=0A= * else=0A= * Carry flag =3D set=0A= * (this indicates that the clock is updating, or=0A= * that it isn't running)=0A= */=0A= FUNCTION(grub_getrtsecs)=0A= pushl %ebp=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= clc=0A= movb $0x2, %ah=0A= int $0x1a=0A= =0A= DATA32 jnc gottime=0A= movb $0xff, %dh=0A= =0A= gottime:=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %dh, %al=0A= =0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * grub_get_rtc()=0A= * return the real time in ticks, of which there are about=0A= * 18-20 per second=0A= */=0A= FUNCTION(grub_get_rtc)=0A= pushl %ebp=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= /* %ax is already zero */=0A= int $0x1a=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movl %ecx, %eax=0A= shll $16, %eax=0A= movw %dx, %ax=0A= =0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * unsigned char grub_vga_set_mode (unsigned char mode)=0A= */=0A= FUNCTION(grub_vga_set_mode)=0A= pushl %ebp=0A= pushl %ebx=0A= movl %eax, %ecx=0A= =0A= call prot_to_real=0A= .code16=0A= /* get current mode */=0A= xorw %bx, %bx=0A= movb $0x0f, %ah=0A= int $0x10=0A= movb %al, %dl=0A= =0A= /* set the new mode */=0A= movb %cl, %al=0A= xorb %ah, %ah=0A= int $0x10=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %dl, %al=0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * unsigned char *grub_vga_get_font (void)=0A= */=0A= FUNCTION(grub_vga_get_font)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= call prot_to_real=0A= .code16=0A= movw $0x1130, %ax=0A= movb $0x06, %bh=0A= int $0x10=0A= movw %es, %bx=0A= movw %bp, %dx=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movzwl %bx, %ecx=0A= shll $4, %ecx=0A= movw %dx, %ax=0A= addl %ecx, %eax=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_controller_info (struct = grub_vbe_info_block *controller_info)=0A= *=0A= * Register allocations for parameters:=0A= * %eax *controller_info=0A= */=0A= FUNCTION(grub_vbe_get_controller_info)=0A= pushl %ebp=0A= pushl %edi=0A= =0A= movw %ax, %di /* Store *controller_info to %edx:%di. */=0A= xorw %ax, %ax=0A= shrl $4, %eax=0A= mov %eax, %edx /* prot_to_real destroys %eax. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= pushw %es=0A= =0A= movw %dx, %es /* *controller_info is now on %es:%di. */=0A= movw $0x4f00, %ax=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= popw %es=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movl %edx, %eax=0A= andl $0x0FFFF, %eax /* Return value in %eax. */=0A= =0A= popl %edi=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_mode_info (grub_uint32_t mode,=0A= * struct grub_vbe_mode_info_block *mode_info)=0A= *=0A= * Register allocations for parameters:=0A= * %eax mode=0A= * %edx *mode_info=0A= */=0A= FUNCTION(grub_vbe_get_mode_info)=0A= pushl %ebp=0A= pushl %edi=0A= =0A= movl %eax, %ecx /* Store mode number to %ecx. */=0A= =0A= movw %dx, %di /* Store *mode_info to %edx:%di. */=0A= xorw %dx, %dx=0A= shrl $4, %edx=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= pushw %es=0A= =0A= movw %dx, %es /* *mode_info is now on %es:%di. */=0A= movw $0x4f01, %ax=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= popw %es=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movl %edx, %eax=0A= andl $0x0FFFF, %eax /* Return value in %eax. */=0A= =0A= popl %edi=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_set_mode (grub_uint32_t mode,=0A= * struct grub_vbe_crtc_info_block *crtc_info)=0A= *=0A= * Register allocations for parameters:=0A= * %eax mode=0A= * %edx *crtc_info=0A= */=0A= FUNCTION(grub_vbe_set_mode)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= movl %eax, %ebx /* Store mode in %ebx. */=0A= =0A= movw %dx, %di /* Store *crtc_info to %edx:%di. */=0A= xorw %dx, %dx=0A= shrl $4, %edx=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= pushw %es=0A= =0A= movw %dx, %es /* *crtc_info is now on %es:%di. */=0A= =0A= movw $0x4f02, %ax=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= popw %es=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_mode (grub_uint32_t *mode)=0A= *=0A= * Register allocations for parameters:=0A= * %eax *mode=0A= */=0A= FUNCTION(grub_vbe_get_mode)=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %eax /* Push *mode to stack. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f03, %ax=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %edi /* Pops *mode from stack to %edi. */=0A= andl $0xFFFF, %ebx=0A= movl %ebx, (%edi)=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_set_memory_window (grub_uint32_t window,=0A= * grub_uint32_t position);=0A= *=0A= * Register allocations for parameters:=0A= * %eax window=0A= * %edx position=0A= */=0A= FUNCTION(grub_vbe_set_memory_window)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= movl %eax, %ebx=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f05, %ax=0A= andw $0x00ff, %bx /* BL =3D window, BH =3D 0, Set memory window. */=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_memory_window (grub_uint32_t window,=0A= * grub_uint32_t *position);=0A= *=0A= * Register allocations for parameters:=0A= * %eax window=0A= * %edx *position=0A= */=0A= FUNCTION(grub_vbe_get_memory_window)=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %edx /* Push *position to stack. */=0A= =0A= movl %eax, %ebx /* Store window in %ebx. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f05, %ax=0A= andw $0x00ff, %bx /* BL =3D window. */=0A= orw $0x0100, %bx /* BH =3D 1, Get memory window. */=0A= int $0x10=0A= =0A= movw %ax, %bx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %edi /* pops *position from stack to %edi. */=0A= andl $0xFFFF, %edx=0A= movl %edx, (%edi) /* Return position to caller. */=0A= =0A= movw %bx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_set_scanline_length (grub_uint32_t length)=0A= *=0A= * Register allocations for parameters:=0A= * %eax length=0A= */=0A= FUNCTION(grub_vbe_set_scanline_length)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= movl %eax, %ecx /* Store length in %ecx. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f06, %ax=0A= movw $0x0002, %bx /* BL =3D 2, Set Scan Line in Bytes. */=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_scanline_length (grub_uint32_t *length)=0A= *=0A= * Register allocations for parameters:=0A= * %eax *length=0A= */=0A= FUNCTION(grub_vbe_get_scanline_length)=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %edx /* Push *length to stack. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f06, %ax=0A= movw $0x0001, %bx /* BL =3D 1, Get Scan Line Length (in bytes). */=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %edi /* Pops *length from stack to %edi. */=0A= andl $0xFFFF, %ebx=0A= movl %ebx, (%edi) /* Return length to caller. */=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_set_display_start (grub_uint32_t x,=0A= * grub_uint32_t y)=0A= *=0A= * Register allocations for parameters:=0A= * %eax x=0A= * %edx y=0A= */=0A= FUNCTION(grub_vbe_set_display_start)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= movl %eax, %ecx /* Store x in %ecx. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f07, %ax=0A= movw $0x0080, %bx /* BL =3D 80h, Set Display Start =0A= during Vertical Retrace. */=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_display_start (grub_uint32_t *x,=0A= * grub_uint32_t *y)=0A= *=0A= * Register allocations for parameters:=0A= * %eax *x=0A= * %edx *y=0A= */=0A= FUNCTION(grub_vbe_get_display_start)=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %eax /* Push *x to stack. */=0A= pushl %edx /* Push *y to stack. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f07, %ax=0A= movw $0x0001, %bx /* BL =3D 1, Get Display Start. */=0A= int $0x10=0A= =0A= movw %ax, %bx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %edi /* Pops *y from stack to %edi. */=0A= andl $0xFFFF, %edx=0A= movl %edx, (%edi) /* Return y-position to caller. */=0A= =0A= popl %edi /* Pops *x from stack to %edi. */=0A= andl $0xFFFF, %ecx=0A= movl %ecx, (%edi) /* Return x-position to caller. */=0A= =0A= movw %bx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_set_palette_data (grub_uint32_t = color_count,=0A= * grub_uint32_t start_index,=0A= * struct grub_vbe_palette_data *palette_data)=0A= *=0A= * Register allocations for parameters:=0A= * %eax color_count=0A= * %edx start_index=0A= * %ecx *palette_data=0A= */=0A= FUNCTION(grub_vbe_set_palette_data)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= movl %eax, %ebx /* Store color_count in %ebx. */=0A= =0A= movw %cx, %di /* Store *palette_data to %ecx:%di. */=0A= xorw %cx, %cx=0A= shrl $4, %ecx=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= pushw %es=0A= =0A= movw %cx, %es /* *palette_data is now on %es:%di. */=0A= movw %bx, %cx /* color_count is now on %cx. */=0A= =0A= movw $0x4f09, %ax=0A= xorw %bx, %bx /* BL =3D 0, Set Palette Data. */=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= popw %es=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= ------=_NextPart_000_0001_01C6733D.65178F80 Content-Type: text/plain; name="diffsym.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="diffsym.txt" a52 3=0A= extern int grub_null();=0A= extern int grub_null_var;=0A= =0A= d138 2=0A= a140 1=0A= {"grub_mmap", grub_mmap},=0A= d174 2=0A= a175 2=0A= {"grub_console_checkkey", grub_checkkey},=0A= {"grub_console_getkey", grub_getkey},=0A= d178 4=0A= a181 5=0A= {"grub_break", grub_break},=0A= {"grub_linux_boot_zimage", grub_null},=0A= {"grub_linux_boot_bzimage", grub_null},=0A= {"grub_chainloader_real_boot", grub_null},=0A= {"grub_multiboot_real_boot", grub_null},=0A= d183 13=0A= a195 13=0A= {"grub_vga_set_mode", grub_null},=0A= {"grub_vga_get_font", grub_null},=0A= {"grub_vbe_get_controller_info", grub_null},=0A= {"grub_vbe_get_mode_info", grub_null},=0A= {"grub_vbe_set_mode", grub_null},=0A= {"grub_vbe_get_mode", grub_null},=0A= {"grub_vbe_set_memory_window", grub_null},=0A= {"grub_vbe_get_memory_window", grub_null},=0A= {"grub_vbe_set_scanline_length", grub_null},=0A= {"grub_vbe_get_scanline_length", grub_null},=0A= {"grub_vbe_set_display_start", grub_null},=0A= {"grub_vbe_get_display_start", grub_null},=0A= {"grub_vbe_set_palette_data", grub_null},=0A= d199 7=0A= a205 7=0A= {"grub_lower_mem", &grub_null_var},=0A= {"grub_upper_mem", &grub_null_var},=0A= {"grub_os_area_addr", &grub_null_var},=0A= {"grub_os_area_size", &grub_null_var},=0A= {"grub_linux_prot_size", &grub_null_var},=0A= {"grub_linux_tmp_addr", &grub_null_var},=0A= {"grub_linux_real_addr", &grub_null_var},=0A= ------=_NextPart_000_0001_01C6733D.65178F80 Content-Type: application/octet-stream; name="startup.S" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="startup.S" /*=0A= * GRUB -- GRand Unified Bootloader=0A= * Copyright (C) 1999,2000,2001,2002,2003,2005 Free Software = Foundation, Inc.=0A= *=0A= * This program is free software; you can redistribute it and/or modify=0A= * it under the terms of the GNU General Public License as published by=0A= * the Free Software Foundation; either version 2 of the License, or=0A= * (at your option) any later version.=0A= *=0A= * This program is distributed in the hope that it will be useful,=0A= * but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= * GNU General Public License for more details.=0A= *=0A= * You should have received a copy of the GNU General Public License=0A= * along with this program; if not, write to the Free Software=0A= * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=0A= */=0A= =0A= #ifdef REGPARM=0A= #include "startup.S.regparm"=0A= #else=0A= #include "startup.S.memparm"=0A= #endif=0A= =0A= ------=_NextPart_000_0001_01C6733D.65178F80 Content-Type: application/octet-stream; name="startup.S.memparm" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="startup.S.memparm" /*=0A= * GRUB -- GRand Unified Bootloader=0A= * Copyright (C) 1999,2000,2001,2002,2003,2005 Free Software = Foundation, Inc.=0A= *=0A= * This program is free software; you can redistribute it and/or modify=0A= * it under the terms of the GNU General Public License as published by=0A= * the Free Software Foundation; either version 2 of the License, or=0A= * (at your option) any later version.=0A= *=0A= * This program is distributed in the hope that it will be useful,=0A= * but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= * GNU General Public License for more details.=0A= *=0A= * You should have received a copy of the GNU General Public License=0A= * along with this program; if not, write to the Free Software=0A= * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.=0A= */=0A= =0A= =0A= /*=0A= * Note: These functions defined in this file may be called from C.=0A= * Be careful of that you must not modify some registers. Quote=0A= * from gcc-2.95.2/gcc/config/i386/i386.h:=0A= =0A= 1 for registers not available across function calls.=0A= These must include the FIXED_REGISTERS and also any=0A= registers that can be used without being saved.=0A= The latter must include the registers where values are returned=0A= and the register where structure-value addresses are passed.=0A= Aside from that, you can include as many other registers as you like.=0A= =0A= ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg=0A= { 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }=0A= */=0A= =0A= /*=0A= * Note: GRUB is compiled with the options -mrtd and -mregparm=3D3.=0A= * So the first three arguments are passed in %eax, %edx, and %ecx,=0A= * respectively, and if a function has a fixed number of arguments=0A= * and the number if greater than three, the function must return=0A= * with "ret $N" where N is ((the number of arguments) - 3) * 4.=0A= */=0A= =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= #define ABS(x) ((x) - EXT_C(start) + GRUB_BOOT_MACHINE_KERNEL_ADDR + = 0x200)=0A= =0A= .file "startup.S"=0A= =0A= .text=0A= =0A= /* Tell GAS to generate 16-bit instructions so that this code works=0A= in real mode. */=0A= .code16=0A= =0A= .globl start, _start=0A= start:=0A= _start:=0A= /*=0A= * Guarantee that "main" is loaded at 0x0:0x8200.=0A= */=0A= ljmp $0, $ABS(codestart)=0A= =0A= /*=0A= * Compatibility version number=0A= *=0A= * These MUST be at byte offset 6 and 7 of the executable=0A= * DO NOT MOVE !!!=0A= */=0A= . =3D EXT_C(start) + 0x6=0A= .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR=0A= =0A= /*=0A= * This is a special data area 8 bytes from the beginning.=0A= */=0A= =0A= . =3D EXT_C(start) + 0x8=0A= =0A= VARIABLE(grub_total_module_size)=0A= .long 0=0A= VARIABLE(grub_kernel_image_size)=0A= .long 0=0A= VARIABLE(grub_compressed_size)=0A= .long 0=0A= VARIABLE(grub_install_dos_part)=0A= .long 0xFFFFFFFF=0A= VARIABLE(grub_install_bsd_part)=0A= .long 0xFFFFFFFF=0A= VARIABLE(grub_prefix)=0A= .string "/boot/grub"=0A= =0A= /*=0A= * Leave some breathing room for the prefix.=0A= */=0A= =0A= . =3D EXT_C(start) + 0x50=0A= =0A= /*=0A= * Support for booting GRUB from a Multiboot boot loader (e.g. GRUB = itself).=0A= * This uses the a.out kludge to load raw binary to the area starting at = 1MB,=0A= * and relocates itself after loaded.=0A= */=0A= multiboot_header:=0A= /* magic */=0A= .long 0x1BADB002=0A= /* flags */=0A= .long (1 << 16)=0A= /* checksum */=0A= .long -0x1BADB002 - (1 << 16)=0A= /* header addr */=0A= .long multiboot_header - _start + 0x100000 + 0x200=0A= /* load addr */=0A= .long 0x100000=0A= /* load end addr */=0A= .long 0=0A= /* bss end addr */=0A= .long 0=0A= /* entry addr */=0A= .long multiboot_entry - _start + 0x100000 + 0x200=0A= =0A= multiboot_entry:=0A= .code32=0A= /* obtain the boot device */=0A= movl 12(%ebx), %edx=0A= =0A= /* relocate the code */=0A= movl $(GRUB_KERNEL_MACHINE_RAW_SIZE + 0x200), %ecx=0A= addl EXT_C(grub_compressed_size) - _start + 0x100000 + 0x200, %ecx=0A= movl $0x100000, %esi=0A= movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %edi=0A= cld=0A= rep=0A= movsb=0A= /* jump to the real address */=0A= movl $multiboot_trampoline, %eax=0A= jmp *%eax=0A= =0A= multiboot_trampoline:=0A= /* fill the boot information */=0A= movl %edx, %eax=0A= shrl $8, %eax=0A= xorl %ebx, %ebx=0A= cmpb $0xFF, %ah=0A= je 1f=0A= movb %ah, %bl=0A= movl %ebx, EXT_C(grub_install_dos_part)=0A= 1:=0A= cmpb $0xFF, %al=0A= je 2f=0A= movb %al, %bl=0A= movl %ebx, EXT_C(grub_install_bsd_part)=0A= 2:=0A= shrl $24, %edx=0A= /* enter the usual booting */=0A= call prot_to_real=0A= .code16=0A= =0A= /* the real mode code continues... */=0A= codestart:=0A= cli /* we're not safe here! */=0A= =0A= /* set up %ds, %ss, and %es */=0A= xorw %ax, %ax=0A= movw %ax, %ds=0A= movw %ax, %ss=0A= movw %ax, %es=0A= =0A= /* set up the real mode/BIOS stack */=0A= movl $GRUB_MEMORY_MACHINE_REAL_STACK, %ebp=0A= movl %ebp, %esp=0A= =0A= sti /* we're safe again */=0A= =0A= /* save boot drive reference */=0A= ADDR32 movb %dl, EXT_C(grub_boot_drive)=0A= =0A= /* reset disk system (%ah =3D 0) */=0A= int $0x13=0A= =0A= /* transition to protected mode */=0A= DATA32 call real_to_prot=0A= =0A= /* The ".code32" directive takes GAS out of 16-bit mode. */=0A= .code32=0A= =0A= incl %eax=0A= call EXT_C(grub_gate_a20)=0A= =0A= /* decompress the compressed part and put the result at 1MB */=0A= movl $0x100000, %esi=0A= movl $(START_SYMBOL + GRUB_KERNEL_MACHINE_RAW_SIZE), %edi=0A= =0A= pushl %esi=0A= pushl EXT_C(grub_compressed_size)=0A= pushl %edi=0A= call lzo1x_decompress=0A= addl $12, %esp=0A= =0A= /* copy back the decompressed part */=0A= movl %eax, %ecx=0A= cld=0A= rep=0A= movsb=0A= =0A= /* copy modules before cleaning out the bss */=0A= movl EXT_C(grub_total_module_size), %ecx=0A= movl EXT_C(grub_kernel_image_size), %esi=0A= addl %ecx, %esi=0A= addl $START_SYMBOL, %esi=0A= decl %esi=0A= movl $END_SYMBOL, %edi=0A= addl %ecx, %edi=0A= decl %edi=0A= std=0A= rep=0A= movsb=0A= =0A= /* clean out the bss */=0A= movl $BSS_START_SYMBOL, %edi=0A= =0A= /* compute the bss length */=0A= movl $END_SYMBOL, %ecx=0A= subl %edi, %ecx=0A= =0A= /* clean out */=0A= xorl %eax, %eax=0A= cld=0A= rep=0A= stosb=0A= =0A= /*=0A= * Call the start of main body of C code.=0A= */=0A= call EXT_C(grub_main)=0A= =0A= =0A= /*=0A= * This is the area for all of the special variables.=0A= */=0A= =0A= .p2align 2 /* force 4-byte alignment */=0A= =0A= protstack:=0A= .long GRUB_MEMORY_MACHINE_PROT_STACK=0A= =0A= VARIABLE(grub_boot_drive)=0A= .long 0=0A= =0A= VARIABLE(grub_start_addr)=0A= .long START_SYMBOL=0A= =0A= VARIABLE(grub_end_addr)=0A= .long END_SYMBOL=0A= =0A= VARIABLE(grub_apm_bios_info)=0A= .word 0 /* version */=0A= .word 0 /* cseg */=0A= .long 0 /* offset */=0A= .word 0 /* cseg_16 */=0A= .word 0 /* dseg_16 */=0A= .word 0 /* cseg_len */=0A= .word 0 /* cseg_16_len */=0A= .word 0 /* dseg_16_len */=0A= =0A= /*=0A= * This is the Global Descriptor Table=0A= *=0A= * An entry, a "Segment Descriptor", looks like this:=0A= *=0A= * 31 24 19 16 7 0=0A= * ------------------------------------------------------------=0A= * | | |B| |A| | | |1|0|E|W|A| |=0A= * | BASE 31..24 |G|/|L|V| LIMIT |P|DPL| TYPE | BASE 23:16 | 4=0A= * | | |D| |L| 19..16| | |1|1|C|R|A| |=0A= * ------------------------------------------------------------=0A= * | | |=0A= * | BASE 15..0 | LIMIT 15..0 | 0=0A= * | | |=0A= * ------------------------------------------------------------=0A= *=0A= * Note the ordering of the data items is reversed from the above=0A= * description.=0A= */=0A= =0A= .p2align 2 /* force 4-byte alignment */=0A= gdt:=0A= .word 0, 0=0A= .byte 0, 0, 0, 0=0A= =0A= /* -- code segment --=0A= * base =3D 0x00000000, limit =3D 0xFFFFF (4 KiB Granularity), present=0A= * type =3D 32bit code execute/read, DPL =3D 0=0A= */=0A= .word 0xFFFF, 0=0A= .byte 0, 0x9A, 0xCF, 0=0A= =0A= /* -- data segment --=0A= * base =3D 0x00000000, limit 0xFFFFF (4 KiB Granularity), present=0A= * type =3D 32 bit data read/write, DPL =3D 0 =0A= */=0A= .word 0xFFFF, 0=0A= .byte 0, 0x92, 0xCF, 0=0A= =0A= /* -- 16 bit real mode CS --=0A= * base =3D 0x00000000, limit 0x0FFFF (1 B Granularity), present=0A= * type =3D 16 bit code execute/read only/conforming, DPL =3D 0=0A= */=0A= .word 0xFFFF, 0=0A= .byte 0, 0x9E, 0, 0=0A= =0A= /* -- 16 bit real mode DS --=0A= * base =3D 0x00000000, limit 0x0FFFF (1 B Granularity), present=0A= * type =3D 16 bit data read/write, DPL =3D 0=0A= */=0A= .word 0xFFFF, 0=0A= .byte 0, 0x92, 0, 0=0A= =0A= =0A= /* this is the GDT descriptor */=0A= gdtdesc:=0A= .word 0x27 /* limit */=0A= .long gdt /* addr */=0A= =0A= =0A= /*=0A= * These next two routines, "real_to_prot" and "prot_to_real" are = structured=0A= * in a very specific way. Be very careful when changing them.=0A= *=0A= * NOTE: Use of either one messes up %eax and %ebp.=0A= */=0A= =0A= real_to_prot:=0A= .code16=0A= cli=0A= =0A= /* load the GDT register */=0A= DATA32 ADDR32 lgdt gdtdesc=0A= =0A= /* turn on protected mode */=0A= movl %cr0, %eax=0A= orl $GRUB_MEMORY_MACHINE_CR0_PE_ON, %eax=0A= movl %eax, %cr0=0A= =0A= /* jump to relocation, flush prefetch queue, and reload %cs */=0A= DATA32 ljmp $GRUB_MEMORY_MACHINE_PROT_MODE_CSEG, $protcseg=0A= =0A= .code32=0A= protcseg:=0A= /* reload other segment registers */=0A= movw $GRUB_MEMORY_MACHINE_PROT_MODE_DSEG, %ax=0A= movw %ax, %ds=0A= movw %ax, %es=0A= movw %ax, %fs=0A= movw %ax, %gs=0A= movw %ax, %ss=0A= =0A= /* put the return address in a known safe location */=0A= movl (%esp), %eax=0A= movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK=0A= =0A= /* get protected mode stack */=0A= movl protstack, %eax=0A= movl %eax, %esp=0A= movl %eax, %ebp=0A= =0A= /* get return address onto the right stack */=0A= movl GRUB_MEMORY_MACHINE_REAL_STACK, %eax=0A= movl %eax, (%esp)=0A= =0A= /* zero %eax */=0A= xorl %eax, %eax=0A= =0A= /* return on the old (or initialized) stack! */=0A= ret=0A= =0A= =0A= prot_to_real:=0A= /* just in case, set GDT */=0A= lgdt gdtdesc=0A= =0A= /* save the protected mode stack */=0A= movl %esp, %eax=0A= movl %eax, protstack=0A= =0A= /* get the return address */=0A= movl (%esp), %eax=0A= movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK=0A= =0A= /* set up new stack */=0A= movl $GRUB_MEMORY_MACHINE_REAL_STACK, %eax=0A= movl %eax, %esp=0A= movl %eax, %ebp=0A= =0A= /* set up segment limits */=0A= movw $GRUB_MEMORY_MACHINE_PSEUDO_REAL_DSEG, %ax=0A= movw %ax, %ds=0A= movw %ax, %es=0A= movw %ax, %fs=0A= movw %ax, %gs=0A= movw %ax, %ss=0A= =0A= /* this might be an extra step */=0A= /* jump to a 16 bit segment */=0A= ljmp $GRUB_MEMORY_MACHINE_PSEUDO_REAL_CSEG, $tmpcseg=0A= =0A= tmpcseg:=0A= .code16=0A= =0A= /* clear the PE bit of CR0 */=0A= movl %cr0, %eax=0A= andl $(~GRUB_MEMORY_MACHINE_CR0_PE_ON), %eax=0A= movl %eax, %cr0=0A= =0A= /* flush prefetch queue, reload %cs */=0A= DATA32 ljmp $0, $realcseg=0A= =0A= realcseg:=0A= /* we are in real mode now=0A= * set up the real mode segment registers : DS, SS, ES=0A= */=0A= /* zero %eax */=0A= xorl %eax, %eax=0A= =0A= movw %ax, %ds=0A= movw %ax, %es=0A= movw %ax, %fs=0A= movw %ax, %gs=0A= movw %ax, %ss=0A= =0A= /* restore interrupts */=0A= sti=0A= =0A= /* return on new stack! */=0A= DATA32 ret=0A= =0A= .code32=0A= =0A= =0A= /*=0A= * grub_gate_a20(int on)=0A= *=0A= * Gate address-line 20 for high memory.=0A= *=0A= * This routine is probably overconservative in what it does, but so = what?=0A= *=0A= * It also eats any keystrokes in the keyboard buffer. :-(=0A= */=0A= =0A= FUNCTION(grub_gate_a20)=0A= movl %eax, %edx=0A= =0A= gate_a20_test_current_state: =0A= /* first of all, test if already in a good state */=0A= call gate_a20_check_state=0A= cmpb %al, %dl=0A= jnz gate_a20_try_bios=0A= ret=0A= =0A= gate_a20_try_bios:=0A= /* second, try a BIOS call */=0A= pushl %ebp=0A= call prot_to_real=0A= =0A= .code16=0A= movw $0x2400, %ax=0A= testb %dl, %dl=0A= jz 1f=0A= incw %ax=0A= 1: int $0x15=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %ebp=0A= call gate_a20_check_state=0A= cmpb %al, %dl=0A= jnz gate_a20_try_keyboard_controller=0A= ret=0A= =0A= gate_a20_flush_keyboard_buffer:=0A= inb $0x64=0A= andb $0x02, %al=0A= jnz gate_a20_flush_keyboard_buffer=0A= 2: =0A= inb $0x64=0A= andb $0x01, %al=0A= jz 3f=0A= inb $0x60=0A= jmp 2b=0A= 3:=0A= ret=0A= =0A= gate_a20_try_keyboard_controller: =0A= /* third, try the keyboard controller */=0A= call gate_a20_flush_keyboard_buffer=0A= =0A= movb $0xd1, %al=0A= outb $0x64=0A= 4: =0A= inb $0x64=0A= andb $0x02, %al=0A= jnz 4b=0A= =0A= movb $0xdd, %al=0A= testb %dl, %dl=0A= jz 5f=0A= orb $0x02, %al=0A= 5: outb $0x60=0A= call gate_a20_flush_keyboard_buffer=0A= =0A= /* output a dummy command (USB keyboard hack) */=0A= movb $0xff, %al=0A= outb $0x64=0A= call gate_a20_flush_keyboard_buffer=0A= =0A= call gate_a20_check_state=0A= cmpb %al, %dl=0A= jnz gate_a20_try_system_control_port_a=0A= ret=0A= =0A= gate_a20_try_system_control_port_a:=0A= /* fourth, try the system control port A */=0A= inb $0x92=0A= andb $(~0x03), %al=0A= testb %dl, %dl=0A= jz 6f=0A= orb $0x02, %al=0A= 6: outb $0x92=0A= =0A= /* When turning off Gate A20, do not check the state strictly,=0A= because a failure is not fatal usually, and Gate A20 is always=0A= on some modern machines. */=0A= testb %dl, %dl=0A= jz 7f =0A= call gate_a20_check_state=0A= cmpb %al, %dl=0A= /* everything failed, so restart from the beginning */=0A= jnz gate_a20_try_bios=0A= 7: ret=0A= =0A= gate_a20_check_state:=0A= /* iterate the checking for a while */=0A= movl $100, %ecx=0A= 1: =0A= call 3f=0A= cmpb %al, %dl=0A= jz 2f=0A= loop 1b=0A= 2:=0A= ret=0A= 3: =0A= pushl %ebx=0A= pushl %ecx=0A= xorl %eax, %eax=0A= /* compare the byte at 0x8000 with that at 0x108000 */=0A= movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %ebx=0A= pushl %ebx=0A= /* save the original byte in CL */=0A= movb (%ebx), %cl=0A= /* store the value at 0x108000 in AL */=0A= addl $0x100000, %ebx=0A= movb (%ebx), %al=0A= /* try to set one less value at 0x8000 */=0A= popl %ebx=0A= movb %al, %ch=0A= decb %ch=0A= movb %ch, (%ebx)=0A= /* serialize */=0A= outb %al, $0x80=0A= outb %al, $0x80=0A= /* obtain the value at 0x108000 in CH */=0A= pushl %ebx=0A= addl $0x100000, %ebx=0A= movb (%ebx), %ch=0A= /* this result is 1 if A20 is on or 0 if it is off */=0A= subb %ch, %al=0A= xorb $1, %al=0A= /* restore the original */=0A= popl %ebx=0A= movb %cl, (%ebx)=0A= popl %ecx=0A= popl %ebx=0A= ret=0A= =0A= #include "lzo1x.S"=0A= =0A= =0A= /*=0A= * This call is special... it never returns... in fact it should = simply=0A= * hang at this point!=0A= */=0A= =0A= FUNCTION(grub_stop)=0A= call prot_to_real=0A= =0A= /*=0A= * This next part is sort of evil. It takes advantage of the=0A= * byte ordering on the x86 to work in either 16-bit or 32-bit=0A= * mode, so think about it before changing it.=0A= */=0A= =0A= FUNCTION(grub_hard_stop)=0A= hlt=0A= jmp EXT_C(grub_hard_stop)=0A= =0A= =0A= /*=0A= * grub_stop_floppy()=0A= *=0A= * Stop the floppy drive from spinning, so that other software is=0A= * jumped to with a known state.=0A= */=0A= FUNCTION(grub_stop_floppy)=0A= movw $0x3F2, %dx=0A= xorb %al, %al=0A= outb %al, %dx=0A= ret=0A= =0A= /*=0A= * grub_reboot()=0A= *=0A= * Reboot the system. At the moment, rely on BIOS.=0A= */=0A= FUNCTION(grub_reboot)=0A= call prot_to_real=0A= .code16=0A= /* cold boot */=0A= movw $0x0472, %di=0A= movw %ax, (%di)=0A= ljmp $0xFFFF, $0x0000=0A= .code32=0A= =0A= /*=0A= * grub_halt(int no_apm)=0A= *=0A= * Halt the system, using APM if possible. If NO_APM is true, don't use=0A= * APM even if it is available.=0A= */=0A= FUNCTION(grub_halt)=0A= /* see if zero */=0A= mov 4(%esp), %eax=0A= testl %eax, %eax=0A= jnz EXT_C(grub_stop)=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= /* detect APM */=0A= movw $0x5300, %ax=0A= xorw %bx, %bx=0A= int $0x15=0A= jc EXT_C(grub_hard_stop)=0A= /* don't check %bx for buggy BIOSes... */=0A= =0A= /* disconnect APM first */=0A= movw $0x5304, %ax=0A= xorw %bx, %bx=0A= int $0x15=0A= =0A= /* connect APM */=0A= movw $0x5301, %ax=0A= xorw %bx, %bx=0A= int $0x15=0A= jc EXT_C(grub_hard_stop)=0A= =0A= /* set APM protocol level - 1.1 or bust. (this covers APM 1.2 also) */=0A= movw $0x530E, %ax=0A= xorw %bx, %bx=0A= movw $0x0101, %cx=0A= int $0x15=0A= jc EXT_C(grub_hard_stop)=0A= =0A= /* set the power state to off */=0A= movw $0x5307, %ax=0A= movw $1, %bx=0A= movw $3, %cx=0A= int $0x15=0A= =0A= /* shouldn't reach here */=0A= jmp EXT_C(grub_hard_stop)=0A= .code32=0A= =0A= =0A= /*=0A= * void grub_chainloader_real_boot (int drive, void *part_addr)=0A= *=0A= * This starts another boot loader.=0A= */=0A= =0A= FUNCTION(grub_chainloader_real_boot)=0A= pushl %edx=0A= pushl %eax=0A= =0A= call EXT_C(grub_dl_unload_all)=0A= =0A= /* set up to pass boot drive */=0A= mov 4(%esp),%edx=0A= =0A= /* ESI must point to a partition table entry */=0A= mov 8(%esp),%esi=0A= =0A= /* Turn off Gate A20 */=0A= xorl %eax, %eax=0A= call EXT_C(grub_gate_a20)=0A= =0A= call prot_to_real=0A= .code16=0A= ljmp $0, $GRUB_MEMORY_MACHINE_BOOT_LOADER_ADDR=0A= .code32=0A= =0A= =0A= /*=0A= * void grub_linux_boot_zimage (void)=0A= */=0A= VARIABLE(grub_linux_prot_size)=0A= .long 0=0A= VARIABLE(grub_linux_tmp_addr)=0A= .long 0=0A= VARIABLE(grub_linux_real_addr)=0A= .long 0=0A= =0A= FUNCTION(grub_linux_boot_zimage)=0A= /* copy the kernel */=0A= movl EXT_C(grub_linux_prot_size), %ecx=0A= addl $3, %ecx=0A= shrl $2, %ecx=0A= movl $GRUB_LINUX_BZIMAGE_ADDR, %esi=0A= movl $GRUB_LINUX_ZIMAGE_ADDR, %edi=0A= cld=0A= rep=0A= movsl=0A= =0A= FUNCTION(grub_linux_boot_bzimage)=0A= call EXT_C(grub_dl_unload_all)=0A= =0A= movl EXT_C(grub_linux_real_addr), %ebx=0A= =0A= /* copy the real mode code */=0A= movl EXT_C(grub_linux_tmp_addr), %esi=0A= movl %ebx, %edi=0A= movl $GRUB_LINUX_SETUP_MOVE_SIZE, %ecx=0A= cld=0A= rep=0A= movsb=0A= =0A= /* change %ebx to the segment address */=0A= shrl $4, %ebx=0A= movl %ebx, %eax=0A= addl $0x20, %eax=0A= movw %ax, linux_setup_seg=0A= =0A= /* XXX new stack pointer in safe area for calling functions */=0A= movl $0x4000, %esp=0A= call EXT_C(grub_stop_floppy)=0A= =0A= /* final setup for linux boot */=0A= call prot_to_real=0A= .code16=0A= =0A= cli=0A= movw %bx, %ss=0A= movw $GRUB_LINUX_SETUP_STACK, %sp=0A= =0A= movw %bx, %ds=0A= movw %bx, %es=0A= movw %bx, %fs=0A= movw %bx, %gs=0A= =0A= /* ljmp */=0A= .byte 0xea=0A= .word 0=0A= linux_setup_seg:=0A= .word 0=0A= .code32=0A= =0A= =0A= /*=0A= * This starts the multiboot kernel.=0A= */=0A= =0A= FUNCTION(grub_multiboot_real_boot)=0A= /* Push the entry address on the stack. */=0A= /* Move the address of the multiboot information structure to ebx. */=0A= movl 8(%esp),%ebx=0A= =0A= /* Unload all modules and stop the floppy driver. */=0A= call EXT_C(grub_dl_unload_all)=0A= call EXT_C(grub_stop_floppy)=0A= =0A= /* Interrupts should be disabled. */=0A= cli=0A= =0A= /* Move the magic value into eax and jump to the kernel. */=0A= movl $GRUB_MB_MAGIC2,%eax=0A= movl 4(%esp),%ecx=0A= jmp *%ecx=0A= =0A= =0A= /*=0A= * int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap)=0A= *=0A= * Call IBM/MS INT13 Extensions (int 13 %ah=3DAH) for DRIVE. DAP=0A= * is passed for disk address packet. If an error occurs, return=0A= * non-zero, otherwise zero.=0A= */=0A= =0A= FUNCTION(grub_biosdisk_rw_int13_extensions)=0A= movw 0x4(%esp), %ax=0A= movw 0x8(%esp), %dx=0A= mov 0xC(%esp), %ecx=0A= pushl %ebp=0A= pushl %esi=0A= =0A= /* compute the address of disk_address_packet */=0A= movw %cx, %si=0A= xorw %cx, %cx=0A= shrl $4, %ecx /* save the segment to cx */=0A= =0A= /* ah */=0A= movb %al, %dh=0A= /* enter real mode */=0A= call prot_to_real=0A= =0A= .code16=0A= movb %dh, %ah=0A= movw %cx, %ds=0A= int $0x13 /* do the operation */=0A= movb %ah, %dl /* save return value */=0A= /* clear the data segment */=0A= xorw %ax, %ax=0A= movw %ax, %ds=0A= /* back to protected mode */=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %dl, %al /* return value in %eax */=0A= =0A= popl %esi=0A= popl %ebp=0A= =0A= ret=0A= =0A= /*=0A= * int grub_biosdisk_rw_standard (int ah, int drive, int coff, int = hoff,=0A= * int soff, int nsec, int segment)=0A= *=0A= * Call standard and old INT13 (int 13 %ah=3DAH) for DRIVE. Read/write=0A= * NSEC sectors from COFF/HOFF/SOFF into SEGMENT. If an error occurs,=0A= * return non-zero, otherwise zero.=0A= */=0A= =0A= FUNCTION(grub_biosdisk_rw_standard)=0A= pushl %ebp=0A= movl %esp, %ebp=0A= =0A= pushl %ebx=0A= pushl %edi=0A= pushl %esi=0A= =0A= /* set up CHS information */=0A= movw 0x8(%ebp), %ax=0A= movw 0xC(%ebp), %dx=0A= movw 0x10(%ebp), %cx=0A= =0A= /* set %ch to low eight bits of cylinder */=0A= xchgb %cl, %ch=0A= /* set bits 6-7 of %cl to high two bits of cylinder */=0A= shlb $6, %cl=0A= /* set bits 0-5 of %cl to sector */=0A= addb 0x18(%ebp), %cl=0A= /* set %dh to head */=0A= movb 0x14(%ebp), %dh=0A= /* set %ah to AH */=0A= movb %al, %ah=0A= /* set %al to NSEC */=0A= movb 0x1c(%ebp), %al=0A= /* save %ax in %di */=0A= movw %ax, %di=0A= /* save SEGMENT in %bx */=0A= movw 0x20(%ebp), %bx=0A= =0A= /* enter real mode */=0A= call prot_to_real=0A= =0A= .code16=0A= movw %bx, %es=0A= xorw %bx, %bx=0A= movw $3, %si /* attempt at least three times */=0A= =0A= 1: =0A= movw %di, %ax=0A= int $0x13 /* do the operation */=0A= jnc 2f /* check if successful */=0A= =0A= movb %ah, %bl /* save return value */=0A= /* if fail, reset the disk system */=0A= xorw %ax, %ax=0A= int $0x13=0A= =0A= decw %si=0A= cmpw $0, %si=0A= je 2f=0A= xorb %bl, %bl=0A= jmp 1b /* retry */=0A= 2: =0A= /* back to protected mode */=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %bl, %al /* return value in %eax */=0A= =0A= popl %esi=0A= popl %edi=0A= popl %ebx=0A= popl %ebp=0A= =0A= ret $(4 * 4)=0A= =0A= =0A= /*=0A= * int grub_biosdisk_check_int13_extensions (int drive)=0A= *=0A= * Check if LBA is supported for DRIVE. If it is supported, then return=0A= * the major version of extensions, otherwise zero.=0A= */=0A= =0A= FUNCTION(grub_biosdisk_check_int13_extensions)=0A= movw 0x4(%esp), %ax=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= /* drive */=0A= movb %al, %dl=0A= /* enter real mode */=0A= call prot_to_real=0A= =0A= .code16=0A= movb $0x41, %ah=0A= movw $0x55aa, %bx=0A= int $0x13 /* do the operation */=0A= =0A= /* check the result */=0A= jc 1f=0A= cmpw $0xaa55, %bx=0A= jne 1f=0A= =0A= movb %ah, %bl /* save the major version into %bl */=0A= =0A= /* check if AH=3D0x42 is supported */=0A= andw $1, %cx=0A= jnz 2f=0A= =0A= 1:=0A= xorb %bl, %bl=0A= 2:=0A= /* back to protected mode */=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %bl, %al /* return value in %eax */=0A= =0A= popl %ebx=0A= popl %ebp=0A= =0A= ret=0A= =0A= =0A= /*=0A= * int grub_biosdisk_get_diskinfo_int13_extensions (int drive, void = *drp)=0A= *=0A= * Return the geometry of DRIVE in a drive parameters, DRP. If an error=0A= * occurs, then return non-zero, otherwise zero.=0A= */=0A= =0A= FUNCTION(grub_biosdisk_get_diskinfo_int13_extensions)=0A= movw 0x4(%esp), %ax=0A= mov 0x8(%esp), %edx=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %esi=0A= =0A= /* compute the address of drive parameters */=0A= movw %dx, %si=0A= xorw %dx, %dx=0A= shrl $4, %edx=0A= movw %dx, %bx /* save the segment into %bx */=0A= /* drive */=0A= movb %al, %dl=0A= /* enter real mode */=0A= call prot_to_real=0A= =0A= .code16=0A= movb $0x48, %ah=0A= movw %bx, %ds=0A= int $0x13 /* do the operation */=0A= movb %ah, %bl /* save return value in %bl */=0A= /* clear the data segment */=0A= xorw %ax, %ax=0A= movw %ax, %ds=0A= /* back to protected mode */=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %bl, %al /* return value in %eax */=0A= =0A= popl %esi=0A= popl %ebx=0A= popl %ebp=0A= =0A= ret=0A= =0A= =0A= /*=0A= * int grub_biosdisk_get_diskinfo_standard (int drive,=0A= * unsigned long *cylinders, =0A= * unsigned long *heads,=0A= * unsigned long *sectors)=0A= *=0A= * Return the geometry of DRIVE in CYLINDERS, HEADS and SECTORS. If an=0A= * error occurs, then return non-zero, otherwise zero.=0A= */=0A= =0A= FUNCTION(grub_biosdisk_get_diskinfo_standard)=0A= movw 0x4(%esp), %ax=0A= mov 0x8(%esp), %edx=0A= mov 0xC(%esp), %ecx=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %edi=0A= =0A= /* push CYLINDERS */=0A= pushl %edx=0A= /* push HEADS */=0A= pushl %ecx=0A= /* SECTORS is on the stack */=0A= =0A= /* drive */=0A= movb %al, %dl=0A= /* enter real mode */=0A= call prot_to_real=0A= =0A= .code16=0A= movb $0x8, %ah=0A= int $0x13 /* do the operation */=0A= /* check if successful */=0A= testb %ah, %ah=0A= jnz 1f=0A= /* bogus BIOSes may not return an error number */=0A= testb $0x3f, %cl /* 0 sectors means no disk */=0A= jnz 1f /* if non-zero, then succeed */=0A= /* XXX 0x60 is one of the unused error numbers */=0A= movb $0x60, %ah=0A= 1:=0A= movb %ah, %bl /* save return value in %bl */=0A= /* back to protected mode */=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= /* pop HEADS */=0A= popl %edi=0A= movb %dh, %al=0A= incl %eax /* the number of heads is counted from zero */=0A= movl %eax, (%edi)=0A= =0A= /* pop CYLINDERS */=0A= popl %edi=0A= movb %ch, %al=0A= movb %cl, %ah=0A= shrb $6, %ah /* the number of cylinders is counted from zero */=0A= incl %eax=0A= movl %eax, (%edi)=0A= =0A= /* SECTORS */=0A= movl 0x1c(%esp), %edi=0A= andb $0x3f, %cl=0A= movzbl %cl, %eax=0A= movl %eax, (%edi)=0A= =0A= xorl %eax, %eax=0A= movb %bl, %al /* return value in %eax */=0A= =0A= popl %edi=0A= popl %ebx=0A= popl %ebp=0A= =0A= ret $4=0A= =0A= =0A= /*=0A= * int grub_biosdisk_get_num_floppies (void)=0A= */=0A= FUNCTION(grub_biosdisk_get_num_floppies)=0A= pushl %ebp=0A= =0A= xorl %edx, %edx=0A= call prot_to_real=0A= =0A= .code16=0A= /* reset the disk system first */=0A= int $0x13=0A= 1:=0A= stc=0A= =0A= /* call GET DISK TYPE */=0A= movb $0x15, %ah=0A= int $0x13=0A= =0A= jc 2f=0A= =0A= /* check if this drive exists */ =0A= testb $0x3, %ah=0A= jz 2f=0A= =0A= incb %dl=0A= cmpb $2, %dl=0A= jne 1b=0A= 2:=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movl %edx, %eax=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= *=0A= * grub_get_memsize(i) : return the memory size in KB. i =3D=3D 0 for = conventional=0A= * memory, i =3D=3D 1 for extended memory=0A= * BIOS call "INT 12H" to get conventional memory size=0A= * BIOS call "INT 15H, AH=3D88H" to get extended memory size=0A= * Both have the return value in AX.=0A= *=0A= */=0A= =0A= FUNCTION(grub_get_memsize)=0A= mov 0x4(%esp), %eax=0A= pushl %ebp=0A= =0A= movl %eax, %edx=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= testl %edx, %edx=0A= jnz xext=0A= =0A= int $0x12=0A= jmp xdone=0A= =0A= xext:=0A= movb $0x88, %ah=0A= int $0x15=0A= =0A= xdone:=0A= movw %ax, %dx=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= =0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= *=0A= * grub_get_eisa_mmap() : return packed EISA memory map, lower 16 bits = is=0A= * memory between 1M and 16M in 1K parts, upper 16 bits is=0A= * memory above 16M in 64K parts. If error, return zero.=0A= * BIOS call "INT 15H, AH=3DE801H" to get EISA memory map,=0A= * AX =3D memory between 1M and 16M in 1K parts.=0A= * BX =3D memory above 16M in 64K parts.=0A= *=0A= */=0A= =0A= FUNCTION(grub_get_eisa_mmap)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= movw $0xe801, %ax=0A= int $0x15=0A= =0A= shll $16, %ebx=0A= movw %ax, %bx=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= cmpb $0x86, %bh=0A= je xnoteisa=0A= =0A= movl %ebx, %eax=0A= =0A= xnoteisa:=0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= *=0A= * grub_get_mmap_entry(addr, cont) : address and old continuation value = (zero to=0A= * start), for the Query System Address Map BIOS call.=0A= *=0A= * Sets the first 4-byte int value of "addr" to the size returned by=0A= * the call. If the call fails, sets it to zero.=0A= *=0A= * Returns: new (non-zero) continuation value, 0 if done.=0A= */=0A= =0A= FUNCTION(grub_get_mmap_entry)=0A= mov 0x4(%esp), %eax=0A= mov 0x8(%esp), %edx=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %edi=0A= pushl %esi=0A= =0A= /* push ADDR */=0A= pushl %eax=0A= =0A= /* place address (+4) in ES:DI */=0A= addl $4, %eax=0A= movl %eax, %edi=0A= andl $0xf, %edi=0A= shrl $4, %eax=0A= movl %eax, %esi=0A= =0A= /* set continuation value */=0A= movl %edx, %ebx=0A= =0A= /* set default maximum buffer size */=0A= movl $0x14, %ecx=0A= =0A= /* set EDX to 'SMAP' */=0A= movl $0x534d4150, %edx=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= movw %si, %es=0A= movl $0xe820, %eax=0A= int $0x15=0A= =0A= DATA32 jc xnosmap=0A= =0A= cmpl $0x534d4150, %eax=0A= jne xnosmap=0A= =0A= cmpl $0x14, %ecx=0A= jl xnosmap=0A= =0A= cmpl $0x400, %ecx=0A= jg xnosmap=0A= =0A= jmp xsmap=0A= =0A= xnosmap:=0A= xorl %ecx, %ecx=0A= =0A= xsmap:=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= /* write length of buffer (zero if error) into ADDR */=0A= popl %eax=0A= movl %ecx, (%eax)=0A= =0A= /* set return value to continuation */=0A= movl %ebx, %eax=0A= =0A= popl %esi=0A= popl %edi=0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * void grub_console_real_putchar (int c)=0A= *=0A= * Put the character C on the console. Because GRUB wants to write a=0A= * character with an attribute, this implementation is a bit tricky.=0A= * If C is a control character (CR, LF, BEL, BS), use INT 10, AH =3D 0Eh=0A= * (TELETYPE OUTPUT). Otherwise, save the original position, put a space,=0A= * save the current position, restore the original position, write the=0A= * character and the attribute, and restore the current position.=0A= *=0A= * The reason why this is so complicated is that there is no easy way to=0A= * get the height of the screen, and the TELETYPE OUPUT BIOS call doesn't=0A= * support setting a background attribute.=0A= */=0A= FUNCTION(grub_console_real_putchar)=0A= mov 0x4(%esp), %eax=0A= movl %eax, %edx=0A= pusha=0A= movb EXT_C(grub_console_cur_color), %bl=0A= =0A= call prot_to_real=0A= .code16=0A= movb %dl, %al=0A= xorb %bh, %bh=0A= =0A= /* use teletype output if control character */=0A= cmpb $0x7, %al=0A= je 1f=0A= cmpb $0x8, %al=0A= je 1f=0A= cmpb $0xa, %al=0A= je 1f=0A= cmpb $0xd, %al=0A= je 1f=0A= =0A= /* save the character and the attribute on the stack */=0A= pushw %ax=0A= pushw %bx=0A= =0A= /* get the current position */=0A= movb $0x3, %ah=0A= int $0x10=0A= =0A= /* check the column with the width */=0A= cmpb $79, %dl=0A= jl 2f=0A= =0A= /* print CR and LF, if next write will exceed the width */ =0A= movw $0x0e0d, %ax=0A= int $0x10=0A= movb $0x0a, %al=0A= int $0x10=0A= =0A= /* get the current position */=0A= movb $0x3, %ah=0A= int $0x10=0A= =0A= 2: =0A= /* restore the character and the attribute */=0A= popw %bx=0A= popw %ax=0A= =0A= /* write the character with the attribute */=0A= movb $0x9, %ah=0A= movw $1, %cx=0A= int $0x10=0A= =0A= /* move the cursor forward */=0A= incb %dl=0A= movb $0x2, %ah=0A= int $0x10=0A= =0A= jmp 3f=0A= =0A= 1: movw $1, %bx=0A= movb $0xe, %ah=0A= int $0x10=0A= =0A= 3: DATA32 call real_to_prot=0A= .code32=0A= =0A= popa=0A= ret=0A= =0A= =0A= /*=0A= * int grub_console_getkey (void)=0A= * BIOS call "INT 16H Function 00H" to read character from keyboard=0A= * Call with %ah =3D 0x0=0A= * Return: %ah =3D keyboard scan code=0A= * %al =3D ASCII character=0A= */=0A= =0A= /* this table is used in translate_keycode below */=0A= translation_table:=0A= .word GRUB_CONSOLE_KEY_LEFT, 2=0A= .word GRUB_CONSOLE_KEY_RIGHT, 6=0A= .word GRUB_CONSOLE_KEY_UP, 16=0A= .word GRUB_CONSOLE_KEY_DOWN, 14=0A= .word GRUB_CONSOLE_KEY_HOME, 1=0A= .word GRUB_CONSOLE_KEY_END, 5=0A= .word GRUB_CONSOLE_KEY_DC, 4=0A= .word GRUB_CONSOLE_KEY_BACKSPACE, 8=0A= .word GRUB_CONSOLE_KEY_PPAGE, 7=0A= .word GRUB_CONSOLE_KEY_NPAGE, 3=0A= .word 0=0A= =0A= /*=0A= * translate_keycode translates the key code %dx to an ascii code.=0A= */=0A= .code16=0A= =0A= translate_keycode:=0A= pushw %bx=0A= pushw %si=0A= =0A= movw $ABS(translation_table), %si=0A= =0A= 1: lodsw=0A= /* check if this is the end */=0A= testw %ax, %ax=0A= jz 2f=0A= /* load the ascii code into %ax */=0A= movw %ax, %bx=0A= lodsw=0A= /* check if this matches the key code */=0A= cmpw %bx, %dx=0A= jne 1b=0A= /* translate %dx, if successful */=0A= movw %ax, %dx=0A= =0A= 2: popw %si=0A= popw %bx=0A= ret=0A= =0A= .code32=0A= =0A= FUNCTION(grub_console_getkey)=0A= pushl %ebp=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= int $0x16=0A= =0A= movw %ax, %dx /* real_to_prot uses %eax */=0A= call translate_keycode=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= =0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * int grub_console_checkkey (void)=0A= * if there is a character pending, return it; otherwise return -1=0A= * BIOS call "INT 16H Function 01H" to check whether a character is = pending=0A= * Call with %ah =3D 0x1=0A= * Return:=0A= * If key waiting to be input:=0A= * %ah =3D keyboard scan code=0A= * %al =3D ASCII character=0A= * Zero flag =3D clear=0A= * else=0A= * Zero flag =3D set=0A= */=0A= FUNCTION(grub_console_checkkey)=0A= pushl %ebp=0A= xorl %edx, %edx=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= movb $0x1, %ah=0A= int $0x16=0A= =0A= jz notpending=0A= =0A= movw %ax, %dx=0A= DATA32 jmp pending=0A= =0A= notpending:=0A= decl %edx=0A= =0A= pending:=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movl %edx, %eax=0A= =0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * grub_uint16_t grub_console_getxy (void)=0A= * BIOS call "INT 10H Function 03h" to get cursor position=0A= * Call with %ah =3D 0x03=0A= * %bh =3D page=0A= * Returns %ch =3D starting scan line=0A= * %cl =3D ending scan line=0A= * %dh =3D row (0 is top)=0A= * %dl =3D column (0 is left)=0A= */=0A= =0A= =0A= FUNCTION(grub_console_getxy)=0A= pushl %ebp=0A= pushl %ebx /* save EBX */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= xorb %bh, %bh /* set page to 0 */=0A= movb $0x3, %ah=0A= int $0x10 /* get cursor position */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %dl, %ah=0A= movb %dh, %al=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * void grub_console_gotoxy(grub_uint8_t x, grub_uint8_t y)=0A= * BIOS call "INT 10H Function 02h" to set cursor position=0A= * Call with %ah =3D 0x02=0A= * %bh =3D page=0A= * %dh =3D row (0 is top)=0A= * %dl =3D column (0 is left)=0A= */=0A= =0A= =0A= FUNCTION(grub_console_gotoxy)=0A= mov 0x4(%esp), %eax=0A= mov 0x8(%esp), %edx=0A= pushl %ebp=0A= pushl %ebx /* save EBX */=0A= =0A= movb %dl, %dh /* %dh =3D y */=0A= movb %al, %dl /* %dl =3D x */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= xorb %bh, %bh /* set page to 0 */=0A= movb $0x2, %ah=0A= int $0x10 /* set cursor position */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * void grub_console_cls (void)=0A= * BIOS call "INT 10H Function 09h" to write character and attribute=0A= * Call with %ah =3D 0x09=0A= * %al =3D (character)=0A= * %bh =3D (page number)=0A= * %bl =3D (attribute)=0A= * %cx =3D (number of times)=0A= */=0A= =0A= FUNCTION(grub_console_cls)=0A= pushl %ebp=0A= pushl %ebx /* save EBX */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= /* move the cursor to the beginning */=0A= movb $0x02, %ah=0A= xorb %bh, %bh=0A= xorw %dx, %dx=0A= int $0x10=0A= =0A= /* write spaces to the entire screen */=0A= movw $0x0920, %ax=0A= movw $0x07, %bx=0A= movw $(80 * 25), %cx=0A= int $0x10=0A= =0A= /* move back the cursor */=0A= movb $0x02, %ah=0A= int $0x10=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * void grub_console_setcursor (int on)=0A= * BIOS call "INT 10H Function 01h" to set cursor type=0A= * Call with %ah =3D 0x01=0A= * %ch =3D cursor starting scanline=0A= * %cl =3D cursor ending scanline=0A= */=0A= =0A= console_cursor_state:=0A= .byte 1=0A= console_cursor_shape:=0A= .word 0=0A= =0A= FUNCTION(grub_console_setcursor)=0A= mov 0x4(%esp), %eax=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= /* push ON */=0A= pushl %eax=0A= =0A= /* check if the standard cursor shape has already been saved */=0A= movw console_cursor_shape, %ax=0A= testw %ax, %ax=0A= jne 1f=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movb $0x03, %ah=0A= xorb %bh, %bh=0A= int $0x10=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %cx, console_cursor_shape=0A= 1:=0A= /* set %cx to the designated cursor shape */=0A= movw $0x2000, %cx=0A= popl %eax=0A= testl %eax, %eax=0A= jz 2f=0A= movw console_cursor_shape, %cx=0A= 2: =0A= call prot_to_real=0A= .code16=0A= =0A= movb $0x1, %ah=0A= int $0x10 =0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_getrtsecs()=0A= * if a seconds value can be read, read it and return it (BCD),=0A= * otherwise return 0xFF=0A= * BIOS call "INT 1AH Function 02H" to check whether a character is = pending=0A= * Call with %ah =3D 0x2=0A= * Return:=0A= * If RT Clock can give correct values=0A= * %ch =3D hour (BCD)=0A= * %cl =3D minutes (BCD)=0A= * %dh =3D seconds (BCD)=0A= * %dl =3D daylight savings time (00h std, 01h = daylight)=0A= * Carry flag =3D clear=0A= * else=0A= * Carry flag =3D set=0A= * (this indicates that the clock is updating, or=0A= * that it isn't running)=0A= */=0A= FUNCTION(grub_getrtsecs)=0A= pushl %ebp=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= clc=0A= movb $0x2, %ah=0A= int $0x1a=0A= =0A= DATA32 jnc gottime=0A= movb $0xff, %dh=0A= =0A= gottime:=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %dh, %al=0A= =0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * grub_get_rtc()=0A= * return the real time in ticks, of which there are about=0A= * 18-20 per second=0A= */=0A= FUNCTION(grub_get_rtc)=0A= pushl %ebp=0A= =0A= call prot_to_real /* enter real mode */=0A= .code16=0A= =0A= /* %ax is already zero */=0A= int $0x1a=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movl %ecx, %eax=0A= shll $16, %eax=0A= movw %dx, %ax=0A= =0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * unsigned char grub_vga_set_mode (unsigned char mode)=0A= */=0A= FUNCTION(grub_vga_set_mode)=0A= mov 0x4(%esp), %eax=0A= pushl %ebp=0A= pushl %ebx=0A= movl %eax, %ecx=0A= =0A= call prot_to_real=0A= .code16=0A= /* get current mode */=0A= xorw %bx, %bx=0A= movb $0x0f, %ah=0A= int $0x10=0A= movb %al, %dl=0A= =0A= /* set the new mode */=0A= movb %cl, %al=0A= xorb %ah, %ah=0A= int $0x10=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movb %dl, %al=0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= =0A= /*=0A= * unsigned char *grub_vga_get_font (void)=0A= */=0A= FUNCTION(grub_vga_get_font)=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= call prot_to_real=0A= .code16=0A= movw $0x1130, %ax=0A= movb $0x06, %bh=0A= int $0x10=0A= movw %es, %bx=0A= movw %bp, %dx=0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movzwl %bx, %ecx=0A= shll $4, %ecx=0A= movw %dx, %ax=0A= addl %ecx, %eax=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_controller_info (struct = grub_vbe_info_block *controller_info)=0A= *=0A= * Register allocations for parameters:=0A= * %eax *controller_info=0A= */=0A= FUNCTION(grub_vbe_get_controller_info)=0A= mov 0x4(%esp), %eax=0A= pushl %ebp=0A= pushl %edi=0A= =0A= movw %ax, %di /* Store *controller_info to %edx:%di. */=0A= xorw %ax, %ax=0A= shrl $4, %eax=0A= mov %eax, %edx /* prot_to_real destroys %eax. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= pushw %es=0A= =0A= movw %dx, %es /* *controller_info is now on %es:%di. */=0A= movw $0x4f00, %ax=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= popw %es=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movl %edx, %eax=0A= andl $0x0FFFF, %eax /* Return value in %eax. */=0A= =0A= popl %edi=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_mode_info (grub_uint32_t mode,=0A= * struct grub_vbe_mode_info_block *mode_info)=0A= *=0A= * Register allocations for parameters:=0A= * %eax mode=0A= * %edx *mode_info=0A= */=0A= FUNCTION(grub_vbe_get_mode_info)=0A= mov 0x4(%esp), %eax=0A= mov 0x8(%esp), %edx=0A= pushl %ebp=0A= pushl %edi=0A= =0A= movl %eax, %ecx /* Store mode number to %ecx. */=0A= =0A= movw %dx, %di /* Store *mode_info to %edx:%di. */=0A= xorw %dx, %dx=0A= shrl $4, %edx=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= pushw %es=0A= =0A= movw %dx, %es /* *mode_info is now on %es:%di. */=0A= movw $0x4f01, %ax=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= popw %es=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movl %edx, %eax=0A= andl $0x0FFFF, %eax /* Return value in %eax. */=0A= =0A= popl %edi=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_set_mode (grub_uint32_t mode,=0A= * struct grub_vbe_crtc_info_block *crtc_info)=0A= *=0A= * Register allocations for parameters:=0A= * %eax mode=0A= * %edx *crtc_info=0A= */=0A= FUNCTION(grub_vbe_set_mode)=0A= mov 0x4(%esp), %eax=0A= mov 0x8(%esp), %edx=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= movl %eax, %ebx /* Store mode in %ebx. */=0A= =0A= movw %dx, %di /* Store *crtc_info to %edx:%di. */=0A= xorw %dx, %dx=0A= shrl $4, %edx=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= pushw %es=0A= =0A= movw %dx, %es /* *crtc_info is now on %es:%di. */=0A= =0A= movw $0x4f02, %ax=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= popw %es=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_mode (grub_uint32_t *mode)=0A= *=0A= * Register allocations for parameters:=0A= * %eax *mode=0A= */=0A= FUNCTION(grub_vbe_get_mode)=0A= mov 0x4(%esp), %eax=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %eax /* Push *mode to stack. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f03, %ax=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %edi /* Pops *mode from stack to %edi. */=0A= andl $0xFFFF, %ebx=0A= movl %ebx, (%edi)=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_set_memory_window (grub_uint32_t window,=0A= * grub_uint32_t position);=0A= *=0A= * Register allocations for parameters:=0A= * %eax window=0A= * %edx position=0A= */=0A= FUNCTION(grub_vbe_set_memory_window)=0A= mov 0x4(%esp), %eax=0A= mov 0x8(%esp), %edx=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= movl %eax, %ebx=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f05, %ax=0A= andw $0x00ff, %bx /* BL =3D window, BH =3D 0, Set memory window. */=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_memory_window (grub_uint32_t window,=0A= * grub_uint32_t *position);=0A= *=0A= * Register allocations for parameters:=0A= * %eax window=0A= * %edx *position=0A= */=0A= FUNCTION(grub_vbe_get_memory_window)=0A= mov 0x4(%esp), %eax=0A= mov 0x8(%esp), %edx=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %edx /* Push *position to stack. */=0A= =0A= movl %eax, %ebx /* Store window in %ebx. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f05, %ax=0A= andw $0x00ff, %bx /* BL =3D window. */=0A= orw $0x0100, %bx /* BH =3D 1, Get memory window. */=0A= int $0x10=0A= =0A= movw %ax, %bx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %edi /* pops *position from stack to %edi. */=0A= andl $0xFFFF, %edx=0A= movl %edx, (%edi) /* Return position to caller. */=0A= =0A= movw %bx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_set_scanline_length (grub_uint32_t length)=0A= *=0A= * Register allocations for parameters:=0A= * %eax length=0A= */=0A= FUNCTION(grub_vbe_set_scanline_length)=0A= mov 0x4(%esp), %eax=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= movl %eax, %ecx /* Store length in %ecx. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f06, %ax=0A= movw $0x0002, %bx /* BL =3D 2, Set Scan Line in Bytes. */=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_scanline_length (grub_uint32_t *length)=0A= *=0A= * Register allocations for parameters:=0A= * %eax *length=0A= */=0A= FUNCTION(grub_vbe_get_scanline_length)=0A= mov 0x4(%esp), %eax=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %edx /* Push *length to stack. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f06, %ax=0A= movw $0x0001, %bx /* BL =3D 1, Get Scan Line Length (in bytes). */=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %edi /* Pops *length from stack to %edi. */=0A= andl $0xFFFF, %ebx=0A= movl %ebx, (%edi) /* Return length to caller. */=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_set_display_start (grub_uint32_t x,=0A= * grub_uint32_t y)=0A= *=0A= * Register allocations for parameters:=0A= * %eax x=0A= * %edx y=0A= */=0A= FUNCTION(grub_vbe_set_display_start)=0A= mov 0x4(%esp), %eax=0A= mov 0x8(%esp), %edx=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= movl %eax, %ecx /* Store x in %ecx. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f07, %ax=0A= movw $0x0080, %bx /* BL =3D 80h, Set Display Start =0A= during Vertical Retrace. */=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_get_display_start (grub_uint32_t *x,=0A= * grub_uint32_t *y)=0A= *=0A= * Register allocations for parameters:=0A= * %eax *x=0A= * %edx *y=0A= */=0A= FUNCTION(grub_vbe_get_display_start)=0A= mov 0x4(%esp), %eax=0A= mov 0x8(%esp), %edx=0A= pushl %ebp=0A= pushl %ebx=0A= pushl %eax /* Push *x to stack. */=0A= pushl %edx /* Push *y to stack. */=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= movw $0x4f07, %ax=0A= movw $0x0001, %bx /* BL =3D 1, Get Display Start. */=0A= int $0x10=0A= =0A= movw %ax, %bx /* real_to_prot destroys %eax. */=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= popl %edi /* Pops *y from stack to %edi. */=0A= andl $0xFFFF, %edx=0A= movl %edx, (%edi) /* Return y-position to caller. */=0A= =0A= popl %edi /* Pops *x from stack to %edi. */=0A= andl $0xFFFF, %ecx=0A= movl %ecx, (%edi) /* Return x-position to caller. */=0A= =0A= movw %bx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= =0A= /*=0A= * grub_vbe_status_t grub_vbe_set_palette_data (grub_uint32_t = color_count,=0A= * grub_uint32_t start_index,=0A= * struct grub_vbe_palette_data *palette_data)=0A= *=0A= * Register allocations for parameters:=0A= * %eax color_count=0A= * %edx start_index=0A= * %ecx *palette_data=0A= */=0A= FUNCTION(grub_vbe_set_palette_data)=0A= mov 0x4(%esp), %eax=0A= mov 0x8(%esp), %edx=0A= mov 0xC(%esp), %ecx=0A= pushl %ebp=0A= pushl %ebx=0A= =0A= movl %eax, %ebx /* Store color_count in %ebx. */=0A= =0A= movw %cx, %di /* Store *palette_data to %ecx:%di. */=0A= xorw %cx, %cx=0A= shrl $4, %ecx=0A= =0A= call prot_to_real=0A= .code16=0A= =0A= pushw %es=0A= =0A= movw %cx, %es /* *palette_data is now on %es:%di. */=0A= movw %bx, %cx /* color_count is now on %cx. */=0A= =0A= movw $0x4f09, %ax=0A= xorw %bx, %bx /* BL =3D 0, Set Palette Data. */=0A= int $0x10=0A= =0A= movw %ax, %dx /* real_to_prot destroys %eax. */=0A= =0A= popw %es=0A= =0A= DATA32 call real_to_prot=0A= .code32=0A= =0A= movw %dx, %ax=0A= andl $0xFFFF, %eax /* Return value in %eax. */=0A= =0A= popl %ebx=0A= popl %ebp=0A= ret=0A= ------=_NextPart_000_0001_01C6733D.65178F80-- From MAILER-DAEMON Tue May 09 03:18:41 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FdMUS-0003b2-At for mharc-grub-devel@gnu.org; Tue, 09 May 2006 03:18:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdMUR-0003aD-7N for grub-devel@gnu.org; Tue, 09 May 2006 03:18:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdMUO-0003Yg-OG for grub-devel@gnu.org; Tue, 09 May 2006 03:18:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdMUO-0003Yb-4E for grub-devel@gnu.org; Tue, 09 May 2006 03:18:36 -0400 Received: from [192.116.227.193] (helo=srv2003.bladefusion.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdMVO-0005KW-LR for grub-devel@gnu.org; Tue, 09 May 2006 03:19:38 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 9 May 2006 10:25:05 +0300 Message-ID: <63DA313E79D4B947ABC7AE6DDC9CC309040EA2@srv2003.bladefusion.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: GRUB2 netboot development thread-index: AcZyuggh8/UfiKO8Sp2L1NZUTFULVAAfyNfQ From: "Rudy Attias" To: Subject: RE: GRUB2 netboot development 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: Tue, 09 May 2006 07:18:39 -0000 Netboot is taking a different direction? I'm curious about that, can you give some details? =20 Rudy Attias >Well I followed you advice but I came across some issues, probably on >customization of the driver, I'm trying to add the tg3 to it. I made >some adjustments on the code add some here and remove some there to >resolve dependencies but one dependency I can't resolve. This function >is not in the tg3.c or tg3.h code ... :(=20 >I probably don't know enough C++ do understand that. If you have any >ideas I would appreciate it very much. =20 >genmoddep: error: pcibios_read_config_dword in tg3 is not defined >make: *** [moddep.lst] Error 1 yes, this is right, this function is not implemented anywhere. I have published grub2_netboot_8.tgz on my website so that you can have a look. The module tg3.mod compiles successfully but I did not test it. By the way, this is not c++ but c (although with a nice object oriented design)! I hope it will work, but if it does not, I think we should not worry too much about that for the moment as the netboot development is taking quite a different direction now. Cheers! From MAILER-DAEMON Tue May 09 05:08:32 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FdOCm-0005Se-GQ for mharc-grub-devel@gnu.org; Tue, 09 May 2006 05:08:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdOCk-0005SO-Hl for grub-devel@gnu.org; Tue, 09 May 2006 05:08:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdOCj-0005SC-Sf for grub-devel@gnu.org; Tue, 09 May 2006 05:08:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdOCj-0005S9-Nk for grub-devel@gnu.org; Tue, 09 May 2006 05:08:29 -0400 Received: from [155.198.5.113] (helo=mr3.cc.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FdODj-0007N9-Qo for grub-devel@gnu.org; Tue, 09 May 2006 05:09:33 -0400 Received: from icexp1.cc.ic.ac.uk ([155.198.3.41] helo=icex.imperial.ac.uk) by mr3.cc.ic.ac.uk with smtp (Exim 4.51) id 1FdOCf-00019Y-Eb for grub-devel@gnu.org; Tue, 09 May 2006 10:08:25 +0100 Received: from [155.198.117.83] ([155.198.117.83]) by icex.imperial.ac.uk with Microsoft SMTPSVC(6.0.3790.1830); Tue, 9 May 2006 10:08:24 +0100 Message-ID: <44605C08.3020100@imperial.ac.uk> Date: Tue, 09 May 2006 10:08:24 +0100 From: vincent guffens User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <003001c672fa$5adab170$0b00a8c0@yoda> In-Reply-To: <003001c672fa$5adab170$0b00a8c0@yoda> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 09 May 2006 09:08:24.0771 (UTC) FILETIME=[208ED930:01C67348] Subject: Re: RE : a simple list 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: Tue, 09 May 2006 09:08:31 -0000 Thank you for this information. Adding the concept of context is indeed the right idea. I was doing it as follows void function (grub_device_t dev) { grub_device_t it; auto int look_for_dev (grub_device_t); int look_for_dev (grub_device_t grub_device_t other_dev) { return compare (dev, other_dev) } grub_iterate_list_brk (grub_devices, look_for_dev, it); } but it has to be compared with something like void function (grub_device_t dev) { grub_device_t it = grub_devices; while (it) { if ( compare (dev, it) ) break; } } which is obviously simpler. Maybe the only two functions that are really needed are add and del ? Also, I found out yesterday that the compiler throws out warning about strict aliasing when using the iterate function. I had to add -fno-strict-aliasing to get rid of them. Eric Salomé wrote: > Hi, > > I didn’t take a good look at current iterate functions in Grub 2, yet. > > > > Most iterations needs a “init” (before treatment of first item) and a > “fini” (after treatment of last item). > > Further more, one might want to make iteration functions “re-entrant” > (or recursive), or call-back other functions in a generic way. > > > > One way to get to such behavior easily cost a bit more than the example > you provided : > > you may just add an argument (let’s call it the context object) to the > call of the iterate function : > > > > #define grub_iterate_list(list, func, context) \ > {typeof(list) el = list; while (el) {func(context, el); el=el->next;} > func(context, NULL)} > or > > #define grub_iterate_list(list, func) \ > {void * context = NULL; typeof(list) el = list; while (el) > {func(&context, el); el=el->next;} func(&context, NULL)} > but I prefer the first define as it allows transmission of a full > context to the iteration function. > > > > my_struct * my_ctxt; > > > > my_ctxt = NULL; grub_iterate_list(list, my_func, &my_ctxt); > > > > void my_func (my_struct ** ctxt, my_item * item) { > > if (item == NULL) { > > /* End of iteration : Do any cleanup */ > > if (*ctxt == NULL) return; > > free (*ctxt) …… > > ….. > > return; > > } > > if (*ctxt == NULL) { > > /* First iteration : Do any initialization */ > > *ctxt = malloc (sizeof (my_struct)); …. > > ….. > > } > > /* Do the iteration stuff */ > > ….. > > return; > > } > > > > In grub_iterate_list_brk, you can use context to send a patern or model > object to compare each item of the list with. > > > > The draw back is it makes iteration function a bit less readable, but a > lot more powerful. > > > > _________________________________________ > > Eric Salomé – Paris, France > > > > -----Message d'origine----- > De : grub-devel-bounces+esalome=ctx.net@gnu.org > [mailto:grub-devel-bounces+esalome=ctx.net@gnu.org] De la part de > Guffens, Vincent > Envoyé : lundi 8 mai 2006 01:14 > À : grub-devel@gnu.org > Objet : a simple list > > > > Hi, > > I need to use a simple list to register the pci devices, drivers and so > on. I notice that there are lists like that already in the code so what > would you think about having a list.h file like that ? > > /* A very simple list. > * > * If you want a list of struct myitem > * you do > * > * struct myitem *item_list; > * > * where myitem MUST have its next pointer as the FIRST field > * > * and you can then add, delete the EL item, > * grub_add_list (&item_list, el); > * grub_del_list (&item_list, el); > * > * or call HOOK(item) for each element of the list > * grub_iterate_list (item_list, hook); > * > * This brk version will point el to the list item for which > * HOOK(EL) returns a non-null value > * grub_iterate_list_brk (item_list, hook, el); > * > */ > > struct obj { > struct obj *next; /* MUST BE FIRST */ > }; > > #define grub_del_list(list, el) _grub_del_list((struct obj**) list, > (struct obj*) el) > #define grub_add_list(list, el) _grub_add_list((struct obj**) list, > (struct obj*) el) > #define grub_find_list(list, el) \ > (typeof(list)) _grub_find_list((struct obj*) list, (struct obj*) el) > #define grub_iterate_list(list, func) \ > {typeof(list) el = list; while (el) {func(el); el=el->next;}} > #define grub_iterate_list_brk(list, func, it) \ > {typeof(list) el = list; it = 0; \ > while (el) {if (func(el)) {it = el; break;} el=el->next; }} > > static inline struct obj* _grub_find_list (struct obj *list, struct obj > *el) > { > struct obj *it = list; > for (it = list; it; it=it->next) > { > if (it == el) return el; > } > return 0; > }; > > static inline void _grub_add_list (struct obj **list, struct obj *el) > { > if ( (!el) || (_grub_find_list (*list, el)) ) > return; > > el->next = *list; > *list = el; > }; > > static inline void _grub_del_list (struct obj **list, struct obj *el) > { > struct obj **p; > struct obj *q; > > for (p = list, q = *p; q; p = &(q->next), q = q->next) > if (q == el) > { > *p = q->next; > break; > } > }; > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel -- Vincent Guffens Intelligent Systems & Networks Group Research associate, Imperial College From MAILER-DAEMON Tue May 09 05:24:11 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FdORv-0004kJ-G1 for mharc-grub-devel@gnu.org; Tue, 09 May 2006 05:24:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdORt-0004hk-7I for grub-devel@gnu.org; Tue, 09 May 2006 05:24:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdORq-0004fO-78 for grub-devel@gnu.org; Tue, 09 May 2006 05:24:08 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdORq-0004fG-2a for grub-devel@gnu.org; Tue, 09 May 2006 05:24:06 -0400 Received: from [155.198.5.113] (helo=mr3.cc.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FdOSr-00013Z-Lj for grub-devel@gnu.org; Tue, 09 May 2006 05:25:09 -0400 Received: from icexp4.cc.ic.ac.uk ([155.198.3.44] helo=icex.imperial.ac.uk) by mr3.cc.ic.ac.uk with smtp (Exim 4.51) id 1FdORn-00046h-J7 for grub-devel@gnu.org; Tue, 09 May 2006 10:24:03 +0100 Received: from [155.198.117.83] ([155.198.117.83]) by icex.imperial.ac.uk with Microsoft SMTPSVC(6.0.3790.1830); Tue, 9 May 2006 10:23:19 +0100 Message-ID: <44605F87.4060703@imperial.ac.uk> Date: Tue, 09 May 2006 10:23:19 +0100 From: vincent guffens User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <63DA313E79D4B947ABC7AE6DDC9CC309040EA2@srv2003.bladefusion.com> In-Reply-To: <63DA313E79D4B947ABC7AE6DDC9CC309040EA2@srv2003.bladefusion.com> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 09 May 2006 09:23:19.0500 (UTC) FILETIME=[35DBA8C0:01C6734A] Subject: Re: GRUB2 netboot development 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: Tue, 09 May 2006 09:24:10 -0000 Rudy Attias wrote: > > Netboot is taking a different direction? I'm curious about that, can you > give some details? yes, grub legacy also used the drivers from Etherboot and it was reported not be easily manageable. When Etherboot developpers decide to change something, the glue code written in grub might have to change too and so grub developper must constantly track these changes. Also, this messy glue code is not particularly elegant and is not very funny to program. It does not seem to me that it would happen too often but it will happen and I don't have the experience that developpers from grub legacy have. So now the idea is to have a unique UNDI driver or maybe to find a way to call into etherboot and come back into grub if the PXE/UNDI is not supported. For the moment it is not clear for anyone I think how calling into etherboot would be done. From MAILER-DAEMON Tue May 09 07:05:50 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FdQ2I-00070w-Fv for mharc-grub-devel@gnu.org; Tue, 09 May 2006 07:05:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdQ2F-000702-Pe for grub-devel@gnu.org; Tue, 09 May 2006 07:05:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdQ2E-0006zK-1x for grub-devel@gnu.org; Tue, 09 May 2006 07:05:47 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdQ2D-0006zH-UG for grub-devel@gnu.org; Tue, 09 May 2006 07:05:45 -0400 Received: from [155.198.5.114] (helo=mr4.cc.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FdQ3G-0001ZN-GW for grub-devel@gnu.org; Tue, 09 May 2006 07:06:50 -0400 Received: from icexp4.cc.ic.ac.uk ([155.198.3.44] helo=icex.imperial.ac.uk) by mr4.cc.ic.ac.uk with smtp (Exim 4.51) id 1FdQ2C-0003PQ-2d for grub-devel@gnu.org; Tue, 09 May 2006 12:05:44 +0100 Received: from [155.198.117.83] ([155.198.117.83]) by icex.imperial.ac.uk with Microsoft SMTPSVC(6.0.3790.1830); Tue, 9 May 2006 12:05:35 +0100 Message-ID: <4460777F.1030203@imperial.ac.uk> Date: Tue, 09 May 2006 12:05:35 +0100 From: vincent guffens User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <000001c6732c$a18d38e0$0b00a8c0@yoda> In-Reply-To: <000001c6732c$a18d38e0$0b00a8c0@yoda> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 09 May 2006 11:05:35.0354 (UTC) FILETIME=[7F1CADA0:01C67358] Subject: Re: RE : RE : grub-emu state of the art 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: Tue, 09 May 2006 11:05:48 -0000 Eric Salomé wrote: > Hi folks, > > > > This email to explain how I worked on grub-emu module loading, the > choices I have made (for now) and the diff from grub-1.93 delivery. > Marco asked me for details (well, that will make it a pretty long email > :-)). > > > > I worked only on the i386-pc architecture but I believe same steps will > lead to a working grub-emu with module loading on powerpc architecture > (though I can't do that myself). > > > > I’ve got results : My modules are loading fine, but That may be by > chance :-) > > (I still have great doubts about memory management). I did not look at your attachment so I am not sure what your are speaking about but I wonder why you mention memory management ? Memory management in grub-emu isn't done with the usual malloc and free ? From MAILER-DAEMON Tue May 09 16:54:59 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FdZER-0004KO-CZ for mharc-grub-devel@gnu.org; Tue, 09 May 2006 16:54:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdZEP-0004K9-Rg for grub-devel@gnu.org; Tue, 09 May 2006 16:54:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdZEN-0004Jw-Sn for grub-devel@gnu.org; Tue, 09 May 2006 16:54:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdZEN-0004Jt-NR for grub-devel@gnu.org; Tue, 09 May 2006 16:54:55 -0400 Received: from [212.27.42.28] (helo=smtp2-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdYss-0007PR-NV for grub-devel@gnu.org; Tue, 09 May 2006 16:32:43 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp2-g19.free.fr (Postfix) with ESMTP id 2D5C36D495 for ; Tue, 9 May 2006 22:31:31 +0200 (CEST) From: =?iso-8859-1?Q?Eric_Salom=E9?= To: "'The development of GRUB 2'" Date: Tue, 9 May 2006 22:31:30 +0200 Message-ID: <000b01c673a7$8e74cdb0$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-Reply-To: <3C2082E50F32E1459503A8E675E24EE4B0462A@icex3.ic.ac.uk> Importance: Normal Subject: RE : a simple list 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: Tue, 09 May 2006 20:54:58 -0000 Hi Vincent, I picked up your email from the archive as I didn't received it yet. As you see, it's very easy with a simple #define to create simple code for simple cases and yet be powerful for more complex cases : #define grub_iterate_list_brk(list, func, context, it) \ {typeof(list) el =3D list; it =3D 0; \ while (el) {if (func(context, el)) {it =3D el; break;} = el=3Del->next; }} that you can call with=20 grub_iterate_list_brk(grub_devices, compare, dev, it); with the simpliest compare function between two devices, and you get in-line functions nearly as simpler as the one you wrote. But let's try this : item * grub_iterate_list_brk (item * start,=20 void * (*fct) (void * a, void * b), void * search) { while (start && fct(search, (void *) start)) start =3D start->next; return start ? start : (item *) fct(search, NULL); } that you can call with : it =3D (dev *) grub_iterate_list_brk((item *) grub_devices,=20 devcompare, device); You are not in-lining functions (that makes the code smaller) and this is a simple devcompare function to see how it works : void * devcompare (dev * a, dev * b) { if (b =3D=3D NULL) return NULL; if (a =3D=3D NULL) return NULL; return (void *) strcmp (a->name, b->name); } Which is 3 line long but still is readable ... and yet powerful : If (b =3D=3D NULL) return NULL; You have ended the list and didn't find a match ? grub_iterate_list_brk let the compare function choose what it likes to return as a result : Can be NULL (not found) Can be a default value Can be the "best" item picked out of the iteration process that matches best the criteria; as you like :-) If (a =3D=3D NULL) return NULL; What happens then ? if you call grub_iterate_list_brk with no criteria (device =3D=3D NULL), than it assumes you want any item and returns the first item in the list. That's good behaviour and only a small overhead in devcompare. Return (void *) strcmp (a->name, b->name);=20 Grub_iterate_list_brk return the item for which the compare function returns 0 (or NULL), so that you can easily write : Return (void *) ( a->id - b->id || a->magic - b-> magic || strcmp(a->name, b->name) ); =20 Is that what you were looking for ? PS: Sorry folks for my previous emails sent in html : it sent lots of useless blank lines for nothing. ________________________________________ Eric Salom=E9 =96 Paris, France From:=20 vincent guffens Subject:=20 Re: RE : a simple list Date:=20 Tue, 09 May 2006 10:08:24 +0100 User-agent:=20 Debian Thunderbird 1.0.7 (X11/20051017) Thank you for this information. Adding the concept of context is indeed the right idea. I was doing it as follows void function (grub_device_t dev) { grub_device_t it; auto int look_for_dev (grub_device_t); int look_for_dev (grub_device_t grub_device_t other_dev) { return compare (dev, other_dev) } grub_iterate_list_brk (grub_devices, look_for_dev, it); } but it has to be compared with something like void function (grub_device_t dev) { grub_device_t it =3D grub_devices; while (it) { if ( compare (dev, it) ) break; } } which is obviously simpler. Maybe the only two functions that are really needed are add and del ? From MAILER-DAEMON Tue May 09 18:13:26 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FdaSM-0002fe-RU for mharc-grub-devel@gnu.org; Tue, 09 May 2006 18:13:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdaSL-0002e5-C0 for grub-devel@gnu.org; Tue, 09 May 2006 18:13:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdaSJ-0002c4-PS for grub-devel@gnu.org; Tue, 09 May 2006 18:13:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdaSJ-0002bn-JP for grub-devel@gnu.org; Tue, 09 May 2006 18:13:23 -0400 Received: from [155.198.117.152] (helo=crumpet.cpn.ee.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FdZnF-0003G9-0o for grub-devel@gnu.org; Tue, 09 May 2006 17:30:57 -0400 Received: from localhost ([127.0.0.1]) by crumpet.cpn.ee.ic.ac.uk with esmtp (Exim 4.44) id 1FdZm4-0005ki-DM for grub-devel@gnu.org; Tue, 09 May 2006 22:29:44 +0100 Message-ID: <446109C8.9010606@imperial.ac.uk> Date: Tue, 09 May 2006 22:29:44 +0100 From: vincent guffens User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <000b01c673a7$8e74cdb0$0b00a8c0@yoda> In-Reply-To: <000b01c673a7$8e74cdb0$0b00a8c0@yoda> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: RE : a simple list 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: Tue, 09 May 2006 22:13:25 -0000 Eric Salomé wrote: > Hi Vincent, > > I picked up your email from the archive as I didn't received it yet. > > As you see, it's very easy with a simple #define to create simple code > for simple cases and yet be powerful for more complex cases : > #define grub_iterate_list_brk(list, func, context, it) \ > {typeof(list) el = list; it = 0; \ > while (el) {if (func(context, el)) {it = el; break;} el=el->next; }} > > that you can call with > > grub_iterate_list_brk(grub_devices, compare, dev, it); > > with the simpliest compare function between two devices, and you get > in-line functions nearly as simpler as the one you wrote. > > But let's try this : > > item * grub_iterate_list_brk (item * start, > void * (*fct) (void * a, void * b), void * search) { > while (start && fct(search, (void *) start)) start = > start->next; > return start ? start : (item *) fct(search, NULL); > } > > that you can call with : > > it = (dev *) grub_iterate_list_brk((item *) grub_devices, > devcompare, device); Thank you very, this is definitely interesting although I don't like these explicit castings in the code, especially not the one to (item *). But at the end of the day I think this is overkilled and the while (dev) seems more appropriate for simple tasks like the one I need. From MAILER-DAEMON Tue May 09 18:38:43 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fdaqp-0005IX-HD for mharc-grub-devel@gnu.org; Tue, 09 May 2006 18:38:43 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fdaqo-0005IH-Jk for grub-devel@gnu.org; Tue, 09 May 2006 18:38:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fdaqm-0005Ho-Kq for grub-devel@gnu.org; Tue, 09 May 2006 18:38:42 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fdaqm-0005Hl-Gy for grub-devel@gnu.org; Tue, 09 May 2006 18:38:40 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fdarv-0000qM-IY for grub-devel@gnu.org; Tue, 09 May 2006 18:39:51 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 69C6B3C934CED for ; Wed, 10 May 2006 02:03:48 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id D1C843C934CEC for ; Wed, 10 May 2006 02:03:47 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Wed, 10 May 2006 00:38:34 +0200 User-Agent: KMail/1.8.2 References: <20060508072715.GA10268@metz.une.edu.au> In-Reply-To: <20060508072715.GA10268@metz.une.edu.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605100038.34858.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.499988, version=0.17.2 Subject: Re: Keyboard bugs 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: Tue, 09 May 2006 22:38:42 -0000 On Monday 08 May 2006 09:27, Andrew Apted wrote: > (1) in kern/i386/pc/startup.S, grub_console_checkkey() > doesn't translate the code like getkey() does. This is not a bug, because we don't interpret the return value as a scan code. As long as the return value is greater than or equal to zero, there is no problem. > Personally I think the checkkey() API would be better > as a simple boolean value. I can agree with this, although the priority is not high. > (2) the grub_console_getkey() and checkkey() return value > contains junk (the scan code) in the upper byte. > > I think the return value should just be a Unicode > character, and the GRUB_TERM_ASCII_CHAR macro should > go away (at first I thought was a "unicode chop" > function, but the real purpose is to discard the > scan-code part). However, we cannot say that it is a unicode char, because unicode does not define control codes. I bet that it is better to keep the current way, because this is more flexible. Thank you for your suggestions, anyway. Okuji From MAILER-DAEMON Wed May 10 16:31:01 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FdvKn-0001aw-4A for mharc-grub-devel@gnu.org; Wed, 10 May 2006 16:31:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdvKl-0001ar-Sa for grub-devel@gnu.org; Wed, 10 May 2006 16:30:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdvKj-0001aI-2j for grub-devel@gnu.org; Wed, 10 May 2006 16:30:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdvKi-0001aD-VR for grub-devel@gnu.org; Wed, 10 May 2006 16:30:56 -0400 Received: from [212.27.42.35] (helo=smtp5-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdvM4-0005eO-Ko for grub-devel@gnu.org; Wed, 10 May 2006 16:32:20 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp5-g19.free.fr (Postfix) with ESMTP id 83106251D0 for ; Wed, 10 May 2006 22:30:53 +0200 (CEST) From: =?utf-8?Q?Eric_Salom=C3=A9?= To: "'The development of GRUB 2'" Date: Wed, 10 May 2006 22:30:52 +0200 Message-ID: <000a01c67470$a2c4bf40$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-Reply-To: <3469.213.192.3.1.1146734633.squirrel@drak.ucw.cz> Importance: Normal Subject: RE : RE : grub-emu state of the art : GDB interface 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: Wed, 10 May 2006 20:31:00 -0000 > -----Message d'origine----- > De : grub-devel-bounces+esalome=3Dctx.net@gnu.org [mailto:grub-devel- > bounces+esalome=3Dctx.net@gnu.org] De la part de Tom=C3=A1=C5=A1 = Ebenlendr > Envoy=C3=A9 : jeudi 4 mai 2006 11:24 > =C3=80 : The development of GRUB 2 > Objet : Re: RE : grub-emu state of the art >=20 >=20 > > - let gdb know about dynamically loaded modules ;-), but I guess it > > won't be the easy part. >=20 > That depends how modules are loaded in grub-emu. With standard libdl = it > couldn't be problem. Of course, they are loaded with kern/dl.c in grub-emu, to comply with = what is done in grub2 images. I thought we could add code compiled only with GRUB_UTIL to supply load = maps the way libdl does, during the grub_load_segments(), etc. process = and merely call _dl_debug_state() for gdb to know about newly loaded = symbols before the call to mod->init(mod) is done. But that's a lot to do and I was wondering if someone reading us just = didn't do that yet in another lifetime. > But I remember a situation when we run gdb on UML(user mode linux) = kernel. > When we loaded a kernel module there (using kernel dynamic loader), = gdb > was able to print adress where it is loaded, and also it was able to = load > symbol table with given memory offset. But we had to read the address > by our eyes and type the offset (exactly same number) to gdb by hand. > Later we used expect script to do this. >=20 That's about just what I am doing right now. There is a difference of importance : grub's modules are relocated ELF = file, not shared ELF file (.so) and my gdb just *don't* load symbol = table from relocated ELF file (why has it to be so dummy, that still = question me, anyway shared ELF files contains more info for gdb to use = apparently, including source lines references). So believe it or not, this ended up to this for now (in case someone = would be interested) : - I have added debug lines in the code (set debug=3Dsymbols to activate) = to read the address of loaded segments.=20 - I relink modules I debug with the -shared option instead of the -r = option of ld to produce module.mod + "same" module.so files. - I command gdb to read symbols from .so files at startup = (add-symbol-file commands with the correct addresses for .text, .rodata, = .data and .bss segments) and that's it, ready to go. Next step would be to automate the all process. You can then loads modules and debug them without the need to change = Makefiles to include modules in the main kernel. Eric Salom=C3=A9 - Paris, France From MAILER-DAEMON Fri May 12 08:51:39 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FeX7L-0006j8-7Z for mharc-grub-devel@gnu.org; Fri, 12 May 2006 08:51:39 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FeX7J-0006io-LP for grub-devel@gnu.org; Fri, 12 May 2006 08:51:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FeX7I-0006iB-8x for grub-devel@gnu.org; Fri, 12 May 2006 08:51:37 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeX7I-0006i6-1r for grub-devel@gnu.org; Fri, 12 May 2006 08:51:36 -0400 Received: from [200.61.53.195] (helo=mail.corest.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FeX91-00023M-5p for grub-devel@gnu.org; Fri, 12 May 2006 08:53:23 -0400 Received: from webmail.corest.com (lan-53-196.CORESECURITY.COM [200.61.53.196]) by sin.core-sdi.com (mail system) with ESMTP id 4F3021A6B2D for ; Fri, 12 May 2006 12:51:31 +0000 (GMT) Message-ID: <44648523.8080905@corest.com> Date: Fri, 12 May 2006 09:52:51 -0300 From: Gerardo Richarte X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <4457893F.3030703@corest.com> In-Reply-To: <4457893F.3030703@corest.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: GRUB 2 and eltorito boot (no emul) 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, 12 May 2006 12:51:37 -0000 Hi, I asked something in the past but got no answer, I'm going to try a different approach. Suppose I wanted to implement eltorito boot (as for mkiso -b iso/boot/eltorito -no-emul-boot -boot-load-size 4 -boot-info-table) for GRUB 2. What do you think would be the best approach? I took a look at GRUB Legacy's eltorito_start and it doesn't think neither too complicated nor too different to boot.S from GRUB 2, give or take a table. What I mean, is, what do you think I should do in order to implement it in such a way that I don't trash all sources? Also, if you think I should not need eltorito for making bootable ISOs I'd love to know how to do it (I need to boot with a 700KB kernel and a 20/25 MB module (gziped to 10MB) thanks gera PS: My original question was regarding VBE and eltorito, my solution was to implement some extra vbe support for GRUB Legacy, mainly because I needed eltorito, and GRUB 2 doesn't have it... From MAILER-DAEMON Fri May 12 09:20:17 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FeXZ3-0000cZ-RW for mharc-grub-devel@gnu.org; Fri, 12 May 2006 09:20:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FeXZ2-0000c3-9m for grub-devel@gnu.org; Fri, 12 May 2006 09:20:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FeXYz-0000bP-UQ for grub-devel@gnu.org; Fri, 12 May 2006 09:20:15 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeXYz-0000bM-Mo for grub-devel@gnu.org; Fri, 12 May 2006 09:20:13 -0400 Received: from [147.175.55.175] (helo=meta.morph.sk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FeXaj-0004iM-Sg for grub-devel@gnu.org; Fri, 12 May 2006 09:22:02 -0400 Received: by meta.morph.sk (Postfix, from userid 1018) id 35A55731; Fri, 12 May 2006 15:20:07 +0200 (CEST) Date: Fri, 12 May 2006 15:20:07 +0200 From: Lubomir Kundrak To: grub-devel@gnu.org Message-ID: <20060512132007.GA88582@meta.morph.sk> Mail-Followup-To: Lubomir Kundrak , grub-devel@gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: Debugging GRUB2 with GDB and QEMU 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, 12 May 2006 13:20:16 -0000 I wrote some GDB macros that might be helpful for people that want to debug GRUB 2 modules with QEMU. [1] [1] http://NetBSD.sk/~lkundrak/misc/grub2-gdb/ The file genmk.rb.diff is a patch to makefile-generator script, that makes the build system leave output files with debugging information. Of course, one has have ruby interpreter to regenerate the makefiles and compile GRUB with -g afterwards. Second file is .gdbinit, the GDB initialization file. It is commented, so there is no need to describe it here. It basically passes the information extracted from list headed by grub_dl_head to the perl script, gmodule.pl, and loads its output. It also sets a breakpoint whose command list contains macro for loading proper symbol file each time a module is loaded. (I know the work could be done without the help of a Perl script, but it would be far more complicated, I guess) Another note worth mentioning is that you'll probably want to add aliases for some functions, so that all gdb facilities will work correctly. You will at least want to define the symbol 'main' for backtraces to stop at the right place. Some facilities also want the function 'malloc' to be defined. So, you'll probably have to add something like .globl main main = codestart to assembly language sources or malloc() __attribute__ ((alias("grub_malloc"))); to C files. I hope this will be useful to at least some of you. Best regards! Lubo. -- o Lubomir Kundrak *O* , http://skosi.org/~lkundrak/ (_) SKOSI -- Slovak OpenSource Initiative From MAILER-DAEMON Fri May 12 23:12:29 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FekYP-00088h-1N for mharc-grub-devel@gnu.org; Fri, 12 May 2006 23:12:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FekYN-00088Y-OV for grub-devel@gnu.org; Fri, 12 May 2006 23:12:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FekYJ-000888-NM for grub-devel@gnu.org; Fri, 12 May 2006 23:12:27 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FekYJ-000885-HR for grub-devel@gnu.org; Fri, 12 May 2006 23:12:23 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FekaB-0004Y3-MN for grub-devel@gnu.org; Fri, 12 May 2006 23:14:19 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 3CAB43C000F41 for ; Sat, 13 May 2006 06:38:57 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id BD17A3C000F40 for ; Sat, 13 May 2006 06:38:56 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sat, 13 May 2006 05:12:18 +0200 User-Agent: KMail/1.8.2 References: <4457893F.3030703@corest.com> <44648523.8080905@corest.com> In-Reply-To: <44648523.8080905@corest.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605130512.18837.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.461629, version=0.17.2 Subject: Re: GRUB 2 and eltorito boot (no emul) 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, 13 May 2006 03:12:27 -0000 On Friday 12 May 2006 14:52, Gerardo Richarte wrote: > Suppose I wanted to implement eltorito boot (as for mkiso -b > iso/boot/eltorito -no-emul-boot -boot-load-size 4 -boot-info-table) for > GRUB 2. What do you think would be the best approach? I took a look at > GRUB Legacy's eltorito_start and it doesn't think neither too > complicated nor too different to boot.S from GRUB 2, give or take a table. For now, the easiest way is to use the hard drive emulation mode. This should work transparently. But I don't know how many BIOSes correctly implement the emulation. If you really want to use the no emulation mode, it would be the easiest to port the feature from GRUB Legacy, as you guess. FYI, a student might work on this issue in the Summer of Code. Okuji From MAILER-DAEMON Sat May 13 00:37:13 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FelsP-0005yn-Hf for mharc-grub-devel@gnu.org; Sat, 13 May 2006 00:37:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FelsO-0005xt-98 for grub-devel@gnu.org; Sat, 13 May 2006 00:37:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FelsM-0005xF-AX for grub-devel@gnu.org; Sat, 13 May 2006 00:37:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FelsM-0005xA-3g for grub-devel@gnu.org; Sat, 13 May 2006 00:37:10 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FeluE-0001Y5-RY for grub-devel@gnu.org; Sat, 13 May 2006 00:39:07 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id E7A6E3C000F41 for ; Sat, 13 May 2006 08:03:44 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id A7ED33C000F40 for ; Sat, 13 May 2006 08:03:44 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: grub-devel@gnu.org Date: Sat, 13 May 2006 06:37:04 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605130637.05012.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.499623, version=0.17.2 Subject: yet another scripting bug 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, 13 May 2006 04:37:12 -0000 Multiple commands in one line do not work. I get a segfault on grub-emu. grub> ls ; ls Program received signal SIGSEGV, Segmentation fault. grub_script_execute_argument_to_string (arg=0x8458b51) at ../normal/execute.c:50 50 if (argi->type == 1) (gdb) bt #0 grub_script_execute_argument_to_string (arg=0x8458b51) at ../normal/execute.c:50 #1 0x0805884d in grub_script_execute_cmdline (cmd=0x807e814) at ../normal/execute.c:135 #2 0x08058711 in grub_script_execute_cmd (cmd=Variable "cmd" is not available. ) at ../normal/execute.c:34 #3 0x0805df60 in grub_command_execute (cmdline=0x806fd60 "ls ; ls", interactive=1) at ../normal/command.c:216 #4 0x0805dc0b in grub_cmdline_run (nested=0) at ../normal/cmdline.c:163 #5 0x0805f577 in grub_normal_execute (config=0x807e7f0 "(hd0,1)/boot/grub/grub.cfg", nested=0) at ../normal/main.c:437 #6 0x0805f5cd in grub_enter_normal_mode (config=0x807e7f0 "(hd0,1)/boot/grub/grub.cfg") at ../normal/main.c:248 #7 0x0805f63e in grub_rescue_cmd_normal (argc=0, argv=0x0) at ../normal/main.c:459 #8 0x0805c39b in grub_enter_rescue_mode () at ../kern/rescue.c:600 #9 0x08063e79 in main (argc=5, argv=0xbff1dc94) at ../util/grub-emu.c:210 Okuji From MAILER-DAEMON Sat May 13 00:38:33 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Felth-0006G8-Rj for mharc-grub-devel@gnu.org; Sat, 13 May 2006 00:38:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Feltg-0006G2-Dp for grub-devel@gnu.org; Sat, 13 May 2006 00:38:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Feltf-0006Fq-3G for grub-devel@gnu.org; Sat, 13 May 2006 00:38:32 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Felte-0006Fn-UO for grub-devel@gnu.org; Sat, 13 May 2006 00:38:30 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FelvX-0001cB-QB for grub-devel@gnu.org; Sat, 13 May 2006 00:40:28 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 187CE3C000F41; Sat, 13 May 2006 08:05:06 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id D6B743C000F40; Sat, 13 May 2006 08:05:05 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: Lubomir Kundrak , grub-devel@gnu.org Date: Sat, 13 May 2006 06:38:26 +0200 User-Agent: KMail/1.8.2 References: <20060512132007.GA88582@meta.morph.sk> In-Reply-To: <20060512132007.GA88582@meta.morph.sk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605130638.26578.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.491147, version=0.17.2 Cc: Subject: Re: Debugging GRUB2 with GDB and QEMU 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, 13 May 2006 04:38:32 -0000 On Friday 12 May 2006 15:20, Lubomir Kundrak wrote: > I wrote some GDB macros that might be helpful for people > that want to debug GRUB 2 modules with QEMU. [1] Great! I guess it is necessary to compile the binary with -O0 or -O1 to get a reasonable backtrace... I'd appreciate if you can write a HOWTO. :) Okuji From MAILER-DAEMON Sat May 13 00:39:24 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FeluW-0006gw-2Z for mharc-grub-devel@gnu.org; Sat, 13 May 2006 00:39:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FeluV-0006gL-2o for grub-devel@gnu.org; Sat, 13 May 2006 00:39:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FeluU-0006g9-9T for grub-devel@gnu.org; Sat, 13 May 2006 00:39:22 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeluU-0006g6-6M for grub-devel@gnu.org; Sat, 13 May 2006 00:39:22 -0400 Received: from [129.180.1.212] (helo=mailhub1.une.edu.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FelwM-0001fM-J5 for grub-devel@gnu.org; Sat, 13 May 2006 00:41:19 -0400 Received: from metz.une.edu.au (metz.une.edu.au [129.180.3.3]) by mailhub1.une.edu.au (Postfix) with ESMTP id 5C24E1845D for ; Sat, 13 May 2006 14:39:11 +1000 (EST) Received: by metz.une.edu.au (Postfix, from userid 35331) id AA6BB129AC; Sat, 13 May 2006 14:39:10 +1000 (EST) Date: Sat, 13 May 2006 14:39:10 +1000 From: Andrew Apted To: The development of GRUB 2 Message-ID: <20060513043910.GA27804@metz.une.edu.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="huq684BweRXVnRxX" Content-Disposition: inline User-Agent: Mutt/1.3.25i Subject: PATCH: checkkey returns boolean 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, 13 May 2006 04:39:23 -0000 --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, This patch makes the grub_checkkey() function return a boolean value (1 = a key is available, 0 = none). I have tested it with play.mod, and it works OK. Note that the grub_console_checkkey() function in term/efi/console.c already (erroneously) assumed a boolean value, so this patch automatically fixes that. Cheers, -- Andrew Apted --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="checkkey_boolean.diff" Index: ChangeLog =================================================================== RCS file: /sources/grub/grub2/ChangeLog,v retrieving revision 1.262 diff -u -r1.262 ChangeLog --- ChangeLog 9 May 2006 20:11:11 -0000 1.262 +++ ChangeLog 12 May 2006 15:02:30 -0000 @@ -1,3 +1,16 @@ +2006-05-12 Andrew Apted + + * include/grub/term.h: changed API of grub_checkkey() to + return a boolean value (1 = key available, 0 = none). + + * commands/i386/pc/play.c (grub_cmd_play): Likewise. + * kern/i386/pc/startup.S (grub_console_checkkey): Likewise. + * normal/menu.c (run_menu): Likewise. + * term/i386/pc/serial.c (grub_serial_checkkey): Likewise. + (serial_hw_init): Likewise. + * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Likewise. + * util/console.c (grub_ncurses_checkkey): Likewise. + 2006-05-09 Vesa Jaaskelainen * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds Index: commands/i386/pc/play.c =================================================================== RCS file: /sources/grub/grub2/commands/i386/pc/play.c,v retrieving revision 1.1 diff -u -r1.1 play.c --- commands/i386/pc/play.c 3 Dec 2005 16:18:27 -0000 1.1 +++ commands/i386/pc/play.c 12 May 2006 15:02:30 -0000 @@ -186,7 +186,7 @@ while (grub_file_read (file, (void *) &buf, sizeof (struct note)) == sizeof (struct note) - && buf.pitch != T_FINE && grub_checkkey () < 0) + && buf.pitch != T_FINE && ! grub_checkkey ()) { grub_dprintf ("play", "pitch = %d, duration = %d\n", buf.pitch, @@ -204,7 +204,7 @@ } to = grub_get_rtc () + BASE_TEMPO * buf.duration / tempo; - while (((unsigned int) grub_get_rtc () <= to) && (grub_checkkey () < 0)) + while (((unsigned int) grub_get_rtc () <= to) && ! grub_checkkey ()) ; } @@ -213,7 +213,7 @@ grub_file_close (file); - while (grub_checkkey () > 0) + while (grub_checkkey ()) grub_getkey (); return 0; Index: include/grub/term.h =================================================================== RCS file: /sources/grub/grub2/include/grub/term.h,v retrieving revision 1.10 diff -u -r1.10 term.h --- include/grub/term.h 15 Oct 2005 09:22:31 -0000 1.10 +++ include/grub/term.h 12 May 2006 15:02:31 -0000 @@ -140,7 +140,8 @@ encoded in Unicode. */ grub_ssize_t (*getcharwidth) (grub_uint32_t c); - /* Check if any input character is available. */ + /* Check if any input character is available. + The return value is boolean (1 = available, 0 = none). */ int (*checkkey) (void); /* Get a character. */ Index: kern/i386/pc/startup.S =================================================================== RCS file: /sources/grub/grub2/kern/i386/pc/startup.S,v retrieving revision 1.22 diff -u -r1.22 startup.S --- kern/i386/pc/startup.S 6 May 2006 22:33:51 -0000 1.22 +++ kern/i386/pc/startup.S 12 May 2006 15:02:33 -0000 @@ -1446,7 +1446,7 @@ /* * int grub_console_checkkey (void) - * if there is a character pending, return it; otherwise return -1 + * if there is a character pending, return 1; otherwise return 0 * BIOS call "INT 16H Function 01H" to check whether a character is pending * Call with %ah = 0x1 * Return: @@ -1467,15 +1467,11 @@ movb $0x1, %ah int $0x16 - jz notpending + jz notpending - movw %ax, %dx - DATA32 jmp pending + incl %edx notpending: - decl %edx - -pending: DATA32 call real_to_prot .code32 Index: normal/menu.c =================================================================== RCS file: /sources/grub/grub2/normal/menu.c,v retrieving revision 1.16 diff -u -r1.16 menu.c --- normal/menu.c 7 May 2006 18:28:24 -0000 1.16 +++ normal/menu.c 12 May 2006 15:02:33 -0000 @@ -340,7 +340,7 @@ return default_entry; } - if (grub_checkkey () >= 0 || timeout < 0) + if (grub_checkkey () || timeout < 0) { c = GRUB_TERM_ASCII_CHAR (grub_getkey ()); Index: term/i386/pc/serial.c =================================================================== RCS file: /sources/grub/grub2/term/i386/pc/serial.c,v retrieving revision 1.2 diff -u -r1.2 serial.c --- term/i386/pc/serial.c 13 Nov 2005 15:47:09 -0000 1.2 +++ term/i386/pc/serial.c 12 May 2006 15:02:33 -0000 @@ -254,10 +254,7 @@ static int grub_serial_checkkey (void) { - if (fill_input_buf (1)) - return input_buf[0]; - else - return -1; + return (fill_input_buf (1) > 0); } /* The serial version of getkey. */ @@ -310,7 +307,7 @@ outb (serial_settings.port + UART_MCR, UART_ENABLE_MODEM); /* Drain the input buffer. */ - while (grub_serial_checkkey () != -1) + while (grub_serial_checkkey ()) (void) grub_serial_getkey (); /* FIXME: should check if the serial terminal was found. */ Index: term/ieee1275/ofconsole.c =================================================================== RCS file: /sources/grub/grub2/term/ieee1275/ofconsole.c,v retrieving revision 1.9 diff -u -r1.9 ofconsole.c --- term/ieee1275/ofconsole.c 10 Nov 2005 01:57:52 -0000 1.9 +++ term/ieee1275/ofconsole.c 12 May 2006 15:02:33 -0000 @@ -196,7 +196,7 @@ return 1; } - return -1; + return 0; } static int Index: util/console.c =================================================================== RCS file: /sources/grub/grub2/util/console.c,v retrieving revision 1.13 diff -u -r1.13 console.c --- util/console.c 21 Aug 2005 07:22:51 -0000 1.13 +++ util/console.c 12 May 2006 15:02:33 -0000 @@ -131,7 +131,7 @@ /* Check for SAVED_CHAR. This should not be true, because this means checkkey is called twice continuously. */ if (saved_char != ERR) - return saved_char; + return 1; wtimeout (stdscr, 100); c = getch (); @@ -139,10 +139,10 @@ if (c != ERR) { saved_char = c; - return c; + return 1; } - return -1; + return 0; } static int --huq684BweRXVnRxX-- From MAILER-DAEMON Sat May 13 01:28:24 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Femfw-0001IL-J4 for mharc-grub-devel@gnu.org; Sat, 13 May 2006 01:28:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Femfu-0001I1-HG for grub-devel@gnu.org; Sat, 13 May 2006 01:28:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Femfs-0001Hh-37 for grub-devel@gnu.org; Sat, 13 May 2006 01:28:21 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Femfr-0001He-U6 for grub-devel@gnu.org; Sat, 13 May 2006 01:28:19 -0400 Received: from [212.27.42.35] (helo=smtp5-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Femhl-0005hA-9F for grub-devel@gnu.org; Sat, 13 May 2006 01:30:17 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp5-g19.free.fr (Postfix) with ESMTP id 813AA253C5 for ; Sat, 13 May 2006 07:28:15 +0200 (CEST) From: =?iso-8859-1?Q?Eric_Salom=E9?= To: "'The development of GRUB 2'" Date: Sat, 13 May 2006 07:28:13 +0200 Message-ID: <000f01c6764e$090c1030$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-Reply-To: <20060512132007.GA88582@meta.morph.sk> Importance: Normal Subject: RE : Debugging GRUB2 with GDB and QEMU 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, 13 May 2006 05:28:22 -0000 Hi Lubomir, Thanks for the scripts. It is just what I was looking for. Meanwhile, since my last email, I have done something foolish.=20 I've coded in grub's sources just the same algorithm you provide but I've clumbered the sources with new functions those purpose is only for debugging while you are doing all the job outside of the sources, and one might think it's better the way you do. 1) Got Ruby and change the makefiles just the way you do to get .elf files with debugging info. (I've setup for a different extension but I'll change for .elf) 2) Added a very few lines to grub_load_segments() to get the name of the section along with its load address in mod->segment. (You might want that to get ride of the readelf and perl script) 3) Build in a buffer, during build_load_core() and grub_load_segments() processing, the string=20 "filename.elf load_addr -s .text 0x23888 ... " print it on the screen with grub_dprintf. 4) Call a function with that string argument to be caught by a .gdbinit script to launch the add-symbol-file command before the call to (mod->init(mod)). I first thought I could just get along with add-symbol-file command to gdb, but I was frustrated I could not set breakpoint ahead of time and then have it resolved when the module is loaded .... I was in the mood of doing C development so I've been overkilling again : Before I even finished the .gdbinit script, I've changed my mind and done "one" step further :=20 5) Added the "filename.elf -s .text 0x23234 ... " to the list of link_maps maintained by ld.so (actually ld.so complains a little but I'll fix that later) and do the call to _ld_debug_state() to generate a shlib event in gdb. 6) Changed the solib-svr4.c in gdb 6.1 so that it can handle loading ELF file with instructions to load each segment separately at the right place. So I am running with a modified gdb that understand grub's way of loading modules on the fly. If you think it can be of general interest, we can start from here to define a GDB interface to Grub 2. Otherwise, I'll use Ludomir external scripts since I don't want to maintain separate source files from the official delivery. Note that if we change somewhat the way grub load modules and allocate first the memory to contain all the segments, lying right one after another in memory, we won't have to change gdb anymore (step 6). Best regards, _________________________________________ Eric Salom=E9 - Paris, France From MAILER-DAEMON Sat May 13 14:45:47 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fez7b-0002iI-AI for mharc-grub-devel@gnu.org; Sat, 13 May 2006 14:45:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fez7a-0002ht-07 for grub-devel@gnu.org; Sat, 13 May 2006 14:45:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fez7X-0002gC-MY for grub-devel@gnu.org; Sat, 13 May 2006 14:45:45 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fez7X-0002g5-G1 for grub-devel@gnu.org; Sat, 13 May 2006 14:45:43 -0400 Received: from [24.25.9.103] (helo=ms-smtp-04.southeast.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fez9Y-00008q-Lu for grub-devel@gnu.org; Sat, 13 May 2006 14:47:48 -0400 Received: from [192.168.16.101] (cpe-065-188-140-187.triad.res.rr.com [65.188.140.187]) by ms-smtp-04.southeast.rr.com (8.13.6/8.13.6) with ESMTP id k4DIjfH6003238 for ; Sat, 13 May 2006 14:45:41 -0400 (EDT) Message-ID: <44662951.2050600@xacks.com> Date: Sat, 13 May 2006 14:45:37 -0400 From: devShadow User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <20060512132007.GA88582@meta.morph.sk> In-Reply-To: <20060512132007.GA88582@meta.morph.sk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine Subject: Re: Debugging GRUB2 with GDB and QEMU 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, 13 May 2006 18:45:46 -0000 Hi, thanks for the help with debugging modules. I have a module that I created and still need a little assistance in getting gdb to break in my module's grub_cmd_*. I am able to connect to QEMU with gdb and when I load the module, gdb loads the symbol table for my module. But, when I set a breakpoint at the address of the first operation in my module, gdb doesn't break when I execute the command in GRUB. If it has something to do with the aliases you mention at the bottom of your message, could you elaborate a little more or direct me in the right direction? Thanks David Johnson Lubomir Kundrak wrote: > I wrote some GDB macros that might be helpful for people > that want to debug GRUB 2 modules with QEMU. [1] > > [1] http://NetBSD.sk/~lkundrak/misc/grub2-gdb/ > > The file genmk.rb.diff is a patch to makefile-generator > script, that makes the build system leave output files with > debugging information. Of course, one has have ruby interpreter > to regenerate the makefiles and compile GRUB with -g > afterwards. > > Second file is .gdbinit, the GDB initialization file. It is > commented, so there is no need to describe it here. It basically > passes the information extracted from list headed by grub_dl_head to > the perl script, gmodule.pl, and loads its output. It also > sets a breakpoint whose command list contains macro for loading > proper symbol file each time a module is loaded. (I know the work > could be done without the help of a Perl script, but it would > be far more complicated, I guess) > > Another note worth mentioning is that you'll probably want > to add aliases for some functions, so that all gdb facilities > will work correctly. You will at least want to define the symbol > 'main' for backtraces to stop at the right place. Some facilities > also want the function 'malloc' to be defined. So, you'll > probably have to add something like > > .globl main > main = codestart > > to assembly language sources or > > malloc() __attribute__ ((alias("grub_malloc"))); > > to C files. > > I hope this will be useful to at least some of you. Best regards! > Lubo. > From MAILER-DAEMON Sat May 13 18:16:36 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Ff2Pb-0003uM-Ts for mharc-grub-devel@gnu.org; Sat, 13 May 2006 18:16:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ff2Pa-0003tN-QL for grub-devel@gnu.org; Sat, 13 May 2006 18:16:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ff2PZ-0003s6-Aa for grub-devel@gnu.org; Sat, 13 May 2006 18:16:34 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ff2PZ-0003s3-3v for grub-devel@gnu.org; Sat, 13 May 2006 18:16:33 -0400 Received: from [212.27.42.29] (helo=smtp3-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Ff2Rc-0005lM-6k for grub-devel@gnu.org; Sat, 13 May 2006 18:18:40 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp3-g19.free.fr (Postfix) with ESMTP id 747AB48755; Sun, 14 May 2006 00:16:31 +0200 (CEST) From: =?iso-8859-1?Q?Eric_Salom=E9?= To: "'The development of GRUB 2'" Date: Sun, 14 May 2006 00:16:31 +0200 Message-ID: <000001c676da$e3cae1b0$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal In-Reply-To: <20060512132007.GA88582@meta.morph.sk> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Cc: Subject: RE : Debugging GRUB2 with GDB and QEMU 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, 13 May 2006 22:16:35 -0000 Hi Lubomir, I've tested your scripts. They are great. So I changed my code in kern/dl.c to reflect your .elf convention and I have all ready to use=20 With -DGRUB_COMPAT_GDB You need to recompile gdb with a modified solib-svr4.c file that allows an ELF file to be loaded at different non-contigus memory locations, one for each section. All is automatic using ld.so interface to gdb and you can set pending breakpoints waiting for the "shared lib" (the grub module) to be loaded. (ld.so doesn't complain anymore when the program quits, I've added a grub_unload_all() before exiting grub-emu for modules loaded with the "insmod" command) Without -DGRUB_COMPAT_GDB Every thing is setup so that before calling grub_dl_mod_init() there is a call to grub_gdb_load_mod(mod) and mod->elf contains the string=20 Filename.elf -s .text 0x233 -s .rodata 0x236=20 Ready to be feed to a .gdbinit script that generates the add-symbol-file command to be swallowed by any standard gdb. I've noticed that the attachment files I've sent with my previous emails were not received on Grub 2 mailing list, so that I can send you (and to others) my source code if you wish to your personal email address. Source code is ok, should work on both 32-bits and 64-bits architectures, though I don't do too many checks to prevent buffer overflow in grub-emu. I hope you might find these source extensions to kern/dl.c useful. It's a great pleasure to be able to dynamically load modules and do the debugging task at ease. Thanks again Lubomir. Your scripts have been a great help to finalize this GRUB / GDB interface. PS: the following lines in genmk.rb didn't work too well on my pc (Ubuntu) : +#{exec}: #{pre_obj} #{mod_obj} -rm -f $@ $(CC) $(#{prefix}_LDFLAGS) $(LDFLAGS) -Wl,-r,-d -o $@ $^ ld (when called by gcc) complains it can't find -lgcc_s, so I changed back to=20 $(LD) $(#{prefix}_LDFLAGS) $(LDFLAGS) -r -d -o $@ $^ Best Regards, _______________________________________ Eric Salom=E9 - Paris, France > -----Message d'origine----- > De=A0: grub-devel-bounces+esalome=3Dctx.net@gnu.org = [mailto:grub-devel- > bounces+esalome=3Dctx.net@gnu.org] De la part de Lubomir Kundrak > Envoy=E9=A0: vendredi 12 mai 2006 15:20 > =C0=A0: grub-devel@gnu.org > Objet=A0: Debugging GRUB2 with GDB and QEMU >=20 > I wrote some GDB macros that might be helpful for people > that want to debug GRUB 2 modules with QEMU. [1] >=20 > [1] http://NetBSD.sk/~lkundrak/misc/grub2-gdb/ >=20 > The file genmk.rb.diff is a patch to makefile-generator > script, that makes the build system leave output files with > debugging information. Of course, one has have ruby interpreter > to regenerate the makefiles and compile GRUB with -g > afterwards. >=20 > Second file is .gdbinit, the GDB initialization file. It is > commented, so there is no need to describe it here. It basically > passes the information extracted from list headed by grub_dl_head to > the perl script, gmodule.pl, and loads its output. It also > sets a breakpoint whose command list contains macro for loading > proper symbol file each time a module is loaded. (I know the work > could be done without the help of a Perl script, but it would > be far more complicated, I guess) >=20 > Another note worth mentioning is that you'll probably want > to add aliases for some functions, so that all gdb facilities > will work correctly. You will at least want to define the symbol > 'main' for backtraces to stop at the right place. Some facilities > also want the function 'malloc' to be defined. So, you'll > probably have to add something like >=20 > .globl main > main =3D codestart >=20 > to assembly language sources or >=20 > malloc() __attribute__ ((alias("grub_malloc"))); >=20 > to C files. >=20 > I hope this will be useful to at least some of you. Best regards! > Lubo. >=20 > -- > o Lubomir Kundrak > *O* , http://skosi.org/~lkundrak/ > (_) SKOSI -- Slovak OpenSource Initiative >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel From MAILER-DAEMON Sun May 14 10:01:34 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FfHA6-0003XL-PU for mharc-grub-devel@gnu.org; Sun, 14 May 2006 10:01:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfHA4-0003VD-OD for grub-devel@gnu.org; Sun, 14 May 2006 10:01:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfHA4-0003V1-5s for grub-devel@gnu.org; Sun, 14 May 2006 10:01:32 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfHA4-0003Uy-14 for grub-devel@gnu.org; Sun, 14 May 2006 10:01:32 -0400 Received: from [147.175.55.175] (helo=meta.morph.sk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FfHCG-0004vh-4B for grub-devel@gnu.org; Sun, 14 May 2006 10:03:48 -0400 Received: by meta.morph.sk (Postfix, from userid 1018) id B4FA666A; Sun, 14 May 2006 16:01:24 +0200 (CEST) Date: Sun, 14 May 2006 16:01:24 +0200 From: Lubomir Kundrak To: The development of GRUB 2 Message-ID: <20060514140124.GA9983@meta.morph.sk> Mail-Followup-To: Lubomir Kundrak , The development of GRUB 2 References: <20060512132007.GA88582@meta.morph.sk> <44662951.2050600@xacks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44662951.2050600@xacks.com> User-Agent: Mutt/1.4.2.1i Subject: Re: Debugging GRUB2 with GDB and QEMU 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: Sun, 14 May 2006 14:01:33 -0000 I noticed, that when any segment is 0 bytes long and starts at 0x0, gdb desn't resolve symbols correctly. I have motified the gmodule.pl to reflect this. Please check an updated version. regards, lubo On Sat, May 13, 2006 at 02:45:37PM -0400, devShadow wrote: > X-Original-To: lkundrak@skosi.org > Delivered-To: lkundrak@morph.sk > Date: Sat, 13 May 2006 14:45:37 -0400 > From: devShadow > User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) > X-Accept-Language: en-us, en > To: The development of GRUB 2 > In-Reply-To: <20060512132007.GA88582@meta.morph.sk> > X-Virus-Scanned: Symantec AntiVirus Scan Engine > Subject: Re: Debugging GRUB2 with GDB and QEMU > 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: , > > Errors-To: grub-devel-bounces+lkundrak=skosi.org@gnu.org > > Hi, thanks for the help with debugging modules. I have a module that I > created and still need a little assistance in getting gdb to break in my > module's grub_cmd_*. I am able to connect to QEMU with gdb and when I > load the module, gdb loads the symbol table for my module. > > But, when I set a breakpoint at the address of the first operation in my > module, gdb doesn't break when I execute the command in GRUB. If it has > something to do with the aliases you mention at the bottom of your > message, could you elaborate a little more or direct me in the right > direction? > > Thanks > > David Johnson > > Lubomir Kundrak wrote: > >I wrote some GDB macros that might be helpful for people > >that want to debug GRUB 2 modules with QEMU. [1] > > > >[1] http://NetBSD.sk/~lkundrak/misc/grub2-gdb/ > > > >The file genmk.rb.diff is a patch to makefile-generator > >script, that makes the build system leave output files with > >debugging information. Of course, one has have ruby interpreter > >to regenerate the makefiles and compile GRUB with -g > >afterwards. > > > >Second file is .gdbinit, the GDB initialization file. It is > >commented, so there is no need to describe it here. It basically > >passes the information extracted from list headed by grub_dl_head to > >the perl script, gmodule.pl, and loads its output. It also > >sets a breakpoint whose command list contains macro for loading > >proper symbol file each time a module is loaded. (I know the work > >could be done without the help of a Perl script, but it would > >be far more complicated, I guess) > > > >Another note worth mentioning is that you'll probably want > >to add aliases for some functions, so that all gdb facilities > >will work correctly. You will at least want to define the symbol > >'main' for backtraces to stop at the right place. Some facilities > >also want the function 'malloc' to be defined. So, you'll > >probably have to add something like > > > >.globl main > >main = codestart > > > >to assembly language sources or > > > >malloc() __attribute__ ((alias("grub_malloc"))); > > > >to C files. > > > >I hope this will be useful to at least some of you. Best regards! > >Lubo. > > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel -- o Lubomir Kundrak *O* , http://skosi.org/~lkundrak/ (_) SKOSI -- Slovak OpenSource Initiative From MAILER-DAEMON Sun May 14 10:34:31 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FfHfz-000449-Ln for mharc-grub-devel@gnu.org; Sun, 14 May 2006 10:34:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfHfx-00043U-M3 for grub-devel@gnu.org; Sun, 14 May 2006 10:34:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfHfv-000438-TA for grub-devel@gnu.org; Sun, 14 May 2006 10:34:29 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfHfv-000435-QR for grub-devel@gnu.org; Sun, 14 May 2006 10:34:27 -0400 Received: from [82.94.249.43] (helo=neonescio.viaisn.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FfHi8-0007KU-Dz for grub-devel@gnu.org; Sun, 14 May 2006 10:36:44 -0400 Received: from dijkstra.dekkers.cx ([2001:838:3ce::1] ident=Debian-exim) by neonescio.viaisn.org with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1FfHfs-0001r7-DH for grub-devel@gnu.org; Sun, 14 May 2006 16:34:24 +0200 Received: from localhost ([127.0.0.1] helo=dijkstra.dekkers.cx ident=jeroen) by dijkstra.dekkers.cx with esmtp (Exim 4.61) (envelope-from ) id 1FfHfX-0000FK-4I for grub-devel@gnu.org; Sun, 14 May 2006 16:34:03 +0200 Date: Sun, 14 May 2006 16:34:02 +0200 Message-ID: <87iro8ptet.wl%jeroen@vrijschrift.org> From: Jeroen Dekkers To: The development of GRUB 2 In-Reply-To: <40121130-B532-4E5C-9DC2-71E3178DF2D0@laposte.net> References: <1147008423.5354.1.camel@localhost> <87d5eqndp0.fsf@xs4all.nl> <286475F7-05D3-41E4-A3A0-7A76E920FD27@laposte.net> <40121130-B532-4E5C-9DC2-71E3178DF2D0@laposte.net> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [PATCH] Give an error if curses isn't found 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: Sun, 14 May 2006 14:34:29 -0000 At Sun, 7 May 2006 16:06:10 +0200, =C9tienne Bersac wrote: >=20 > Okey, >=20 > It seems that i needed to re run ../configure an recompile the =20 > project after installing libncurses5-dev . That would be great if ./=20 > configure check for ncurses headers. We already check for it, but we just continue when we don't find it. Configure should abort when it doesn't find curses however. This patch gives you an error message when the curses library isn't found. Jeroen Dekkers 2006-05-14 Jeroen Dekkers * configure.ac: Display an error when the curses library isn't found. Index: configure.ac =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/grub/grub2/configure.ac,v retrieving revision 1.27 diff -u -p -r1.27 configure.ac --- configure.ac 9 May 2006 00:05:49 -0000 1.27 +++ configure.ac 14 May 2006 14:24:34 -0000 @@ -187,7 +187,8 @@ fi =20 # Check for curses. AC_CHECK_LIB(ncurses, wgetch, [LIBCURSES=3D"-lncurses"], - [AC_CHECK_LIB(curses, wgetch, [LIBCURSES=3D"-lcurses"])]) + AC_CHECK_LIB(curses, wgetch, [LIBCURSES=3D"-lcurses"], + AC_MSG_ERROR([curses library not found]))) AC_SUBST(LIBCURSES) =20 # Check for headers. From MAILER-DAEMON Sun May 14 12:13:35 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FfJDr-00052r-D3 for mharc-grub-devel@gnu.org; Sun, 14 May 2006 12:13:35 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfJDq-000515-Bz for grub-devel@gnu.org; Sun, 14 May 2006 12:13:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfJDo-0004yj-Bk for grub-devel@gnu.org; Sun, 14 May 2006 12:13:33 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfJDo-0004yZ-57 for grub-devel@gnu.org; Sun, 14 May 2006 12:13:32 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FfJG1-00079b-T9 for grub-devel@gnu.org; Sun, 14 May 2006 12:15:50 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 979403C000F44 for ; Sun, 14 May 2006 19:40:44 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 6E5813C000F42 for ; Sun, 14 May 2006 19:40:44 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 14 May 2006 18:13:26 +0200 User-Agent: KMail/1.8.2 References: <1147008423.5354.1.camel@localhost> <40121130-B532-4E5C-9DC2-71E3178DF2D0@laposte.net> <87iro8ptet.wl%jeroen@vrijschrift.org> In-Reply-To: <87iro8ptet.wl%jeroen@vrijschrift.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605141813.26370.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.500185, version=0.17.2 Subject: Re: [PATCH] Give an error if curses isn't found 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: Sun, 14 May 2006 16:13:34 -0000 On Sunday 14 May 2006 16:34, Jeroen Dekkers wrote: > We already check for it, but we just continue when we don't find > it. Configure should abort when it doesn't find curses however. This > patch gives you an error message when the curses library isn't > found. I'm not sure if this is a good idea. Isn't it better to just skip the compilation of grub-emu, since grub-emu is not really necessary? Marco, what is your opinion? Okuji From MAILER-DAEMON Tue May 16 17:38:20 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fg7FE-0007uZ-P0 for mharc-grub-devel@gnu.org; Tue, 16 May 2006 17:38:20 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fg7FD-0007tV-7Z for grub-devel@gnu.org; Tue, 16 May 2006 17:38:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fg7FC-0007t9-68 for grub-devel@gnu.org; Tue, 16 May 2006 17:38:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fg7FC-0007t0-2l for grub-devel@gnu.org; Tue, 16 May 2006 17:38:18 -0400 Received: from [155.198.117.152] (helo=crumpet.cpn.ee.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fg7Hu-0005g0-B4 for grub-devel@gnu.org; Tue, 16 May 2006 17:41:06 -0400 Received: from localhost ([127.0.0.1]) by crumpet.cpn.ee.ic.ac.uk with esmtp (Exim 4.44) id 1Fg7F8-0001VM-3u for grub-devel@gnu.org; Tue, 16 May 2006 22:38:14 +0100 Message-ID: <446A4644.80807@imperial.ac.uk> Date: Tue, 16 May 2006 22:38:12 +0100 From: vincent guffens User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [patch 1/3] PCI support (abstract interface) 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: Tue, 16 May 2006 21:38:19 -0000 Hello, Here is a patch to add pci support to grub2. 2006-05-16 Vincent Guffens * drivers/: New directory * conf/i386-pc.rmk (pkgdata_MODULES): Added pci.mod to the list of modules. (DRIVERS_CFLAGS): Added. (pci_mod_SOURCES): Likewise. (pci_mod_CFLAGS): Likewise. (pci_mod_LDFLAGS): Likewise. * drivers/include/grub/pci.h: New file. * drivers/include/grub/list.h: Likewise. * drivers/pci/pci.c: Likewise. diff -rNu grub2/ChangeLog grub2-pci/ChangeLog --- grub2/ChangeLog 2006-05-14 22:16:16.000000000 +0100 +++ grub2-pci/ChangeLog 2006-05-16 21:51:22.000000000 +0100 @@ -1,3 +1,18 @@ +2006-05-16 Vincent Guffens + + * drivers/: New directory. + + * conf/i386-pc.rmk (pkgdata_MODULES): Added pci.mod + to the list of modules. + (DRIVERS_CFLAGS): Added. + (pci_mod_SOURCES): Likewise. + (pci_mod_CFLAGS): Likewise. + (pci_mod_LDFLAGS): Likewise. + + * drivers/include/grub/pci.h: New file. + * drivers/include/grub/list.h: Likewise. + * drivers/pci/pci.c: Likewise. + 2006-05-14 Yoshinori K. Okuji * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of diff -rNu grub2/conf/i386-pc.rmk grub2-pci/conf/i386-pc.rmk --- grub2/conf/i386-pc.rmk 2006-05-07 19:28:23.000000000 +0100 +++ grub2-pci/conf/i386-pc.rmk 2006-05-16 21:07:30.000000000 +0100 @@ -3,6 +3,7 @@ COMMON_ASFLAGS = -nostdinc -fno-builtin COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32 COMMON_LDFLAGS = -melf_i386 -nostdlib +DRIVERS_CFLAGS = -Idrivers/include -fno-strict-aliasing # Images. pkgdata_IMAGES = boot.img diskboot.img kernel.img pxeboot.img @@ -116,7 +117,7 @@ pkgdata_MODULES = _chain.mod _linux.mod linux.mod normal.mod \ _multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod \ vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \ - videotest.mod play.mod + videotest.mod play.mod pci.mod # For _chain.mod. _chain_mod_SOURCES = loader/i386/pc/chainloader.c @@ -209,4 +210,9 @@ videotest_mod_CFLAGS = $(COMMON_CFLAGS) videotest_mod_LDFLAGS = $(COMMON_LDFLAGS) +# For pci.mod +pci_mod_SOURCES = drivers/pci/pci.c +pci_mod_CFLAGS = $(COMMON_CFLAGS) $(DRIVERS_CFLAGS) +pci_mod_LDFLAGS = $(COMMON_LDFLAGS) + include $(srcdir)/conf/common.mk diff -rNu grub2/drivers/include/grub/list.h grub2-pci/drivers/include/grub/list.h --- grub2/drivers/include/grub/list.h 1970-01-01 01:00:00.000000000 +0100 +++ grub2-pci/drivers/include/grub/list.h 2006-05-16 21:10:58.000000000 +0100 @@ -0,0 +1,86 @@ +/* list.h - A very simple list. */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2006 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +/* + If you want a list of struct myitem + you do + + struct myitem *item_list; + + where myitem MUST have its next pointer as the FIRST field + + and you can then add, delete the EL item, + grub_add_list (&item_list, el); + grub_del_list (&item_list, el); + + or call HOOK(item) for each element of the list + grub_iterate_list (item_list, hook); + + This brk version will point el to the list item for which + HOOK(EL) returns a non-null value + grub_iterate_list_brk (item_list, hook, el); + */ + +struct obj { + struct obj *next; /* MUST BE FIRST */ +}; + +#define grub_del_list(list, el) _grub_del_list((struct obj**) list, (struct obj*) el) +#define grub_add_list(list, el) _grub_add_list((struct obj**) list, (struct obj*) el) +#define grub_find_list(list, el) \ + (typeof(list)) _grub_find_list((struct obj*) list, (struct obj*) el) +#define grub_iterate_list(list, func) \ + {typeof(list) el = list; while (el) {func(el); el=el->next;}} +#define grub_iterate_list_brk(list, func, it) \ + {typeof(list) el = list; it = 0; \ + while (el) {if (func(el)) {it = el; break;} el=el->next; }} + +static inline struct obj* _grub_find_list (struct obj *list, struct obj *el) +{ + struct obj *it = list; + for (it = list; it; it=it->next) + { + if (it == el) return el; + } + return 0; +}; + +static inline void _grub_add_list (struct obj **list, struct obj *el) +{ + if ( (!el) || (_grub_find_list (*list, el)) ) + return; + + el->next = *list; + *list = el; +}; + +static inline void _grub_del_list (struct obj **list, struct obj *el) +{ + struct obj **p; + struct obj *q; + + for (p = list, q = *p; q; p = &(q->next), q = q->next) + if (q == el) + { + *p = q->next; + break; + } +}; diff -rNu grub2/drivers/include/grub/pci.h grub2-pci/drivers/include/grub/pci.h --- grub2/drivers/include/grub/pci.h 1970-01-01 01:00:00.000000000 +0100 +++ grub2-pci/drivers/include/grub/pci.h 2006-05-16 21:10:58.000000000 +0100 @@ -0,0 +1,119 @@ +/* pci.h Abstract interface for GRUB PCI support. */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2006 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef GRUB_PCI_H_ +#define GRUB_PCI_H_ + +#include +#include +#include +#include + +/* Device type advertised by the driver */ +#define GRUB_NET_ETHERNET 0 + +#define GRUB_PCI_SLOT(devfn) ((devfn) >> 3) +#define GRUB_PCI_FUNC(devfn) ((devfn) & 0x07) + +struct grub_pci_ids +{ + grub_uint16_t vendor; + grub_uint16_t dev_id; + const char *name; +}; + +struct grub_pci_device; + +struct grub_pci_driver +{ + struct grub_pci_driver *next; + int type; + const char *name; + grub_err_t (*probe) (struct grub_pci_device *); + struct grub_pci_ids *ids; + int id_count; + grub_uint32_t class; +}; + +struct grub_pci_device +{ + struct grub_pci_device *next; + char *name; + grub_uint8_t bus; + grub_uint16_t vendor; + grub_uint16_t dev_id; + grub_uint8_t devfn; + grub_uint32_t class; + grub_addr_t ioaddr; + grub_addr_t membase; + grub_addr_t romaddr; + grub_uint8_t irq; + const struct grub_pci_driver *driver; +}; + +typedef struct grub_pci_device *grub_pci_device_t; + +struct grub_pci_io_support +{ + grub_err_t (*read_config_byte) (grub_pci_device_t, grub_addr_t, grub_uint8_t *value); + grub_err_t (*write_config_byte) (grub_pci_device_t, grub_addr_t, grub_uint8_t value); + grub_err_t (*read_config_word) (grub_pci_device_t, grub_addr_t, grub_uint16_t *value); + grub_err_t (*write_config_word) (grub_pci_device_t, grub_addr_t, grub_uint16_t value); + grub_err_t (*read_config_dword) (grub_pci_device_t, grub_addr_t, grub_uint32_t *value); + grub_err_t (*write_config_dword) (grub_pci_device_t, grub_addr_t, grub_uint32_t value); + grub_addr_t (*bus_base) (unsigned int bus); +}; + +struct grub_pci_support +{ + /* My name. */ + const char *name; + + void (*init)(void); + void (*fini)(void); + + void (*adjust) (grub_pci_device_t p); + + /* Base Address Register helper functions. There are up to 6 BARs + PCI_BASE_ADDRESS_{[0-5]} in the configuration space of each device */ + unsigned long (*bar_start) (grub_pci_device_t, unsigned int bar); + unsigned long (*bar_size) (grub_pci_device_t, unsigned int bar); + + int (*find_capability) (grub_pci_device_t, int cap); + + /* Call HOOK with each pci device. */ + grub_err_t (*iterate) (grub_err_t (*hook) (grub_pci_device_t)); + + /* Fill the pci device structure (romaddr, ioaddr, membase, irq) + given (bus, devfn, vendor, dev_id, class) */ + grub_err_t (*init_pdev) (grub_pci_device_t); + + /* Low level io functions. */ + struct grub_pci_io_support *io; +}; + +extern void grub_set_pci_support (struct grub_pci_support *); +extern void grub_unset_pci_support (struct grub_pci_support *); +extern void grub_register_pci_driver (struct grub_pci_driver *drv) ; +extern void grub_unregister_pci_driver (struct grub_pci_driver *drv); + +#endif + + diff -rNu grub2/drivers/pci/pci.c grub2-pci/drivers/pci/pci.c --- grub2/drivers/pci/pci.c 1970-01-01 01:00:00.000000000 +0100 +++ grub2-pci/drivers/pci/pci.c 2006-05-16 21:11:32.000000000 +0100 @@ -0,0 +1,284 @@ +/* pci.c - abstract PCI support for grub2. */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2006 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* This is not a list (there can be only one). */ +static struct grub_pci_support *grub_pci_support; +/* Lists of available drivers. */ +static struct grub_pci_driver *grub_pci_drivers; +/* Lists of PCI devices driven by GRUB. */ +static struct grub_pci_device *grub_pci_devices; + +/* Add DEV at the head of the PCI device list. */ +/* This function allocates the memory. */ +static void grub_register_pci_device (struct grub_pci_device *dev, + struct grub_pci_driver *drv) +{ + grub_pci_device_t ndev = (grub_pci_device_t) grub_malloc (sizeof(*ndev)); + + /* TODO: what about the name ? */ + + ndev->bus = dev->bus; + ndev->vendor = dev->vendor; + ndev->dev_id = dev->dev_id; + ndev->devfn = dev->devfn; + ndev->class = dev->class; + ndev->ioaddr = dev->ioaddr; + ndev->membase = dev->membase; + ndev->romaddr = dev->romaddr; + ndev->irq = dev->irq; + ndev->driver = drv; + + grub_add_list (&grub_pci_devices, ndev); +} + +/* Unlink DEV from the list of PCI devices. */ +/* This function frees the memory. */ +static void grub_unregister_pci_device (struct grub_pci_device *dev) +{ + grub_del_list (&grub_pci_devices, dev); + + /* TODO: Don't forget to free the name if used */ + + grub_free (dev); + +} + +void grub_set_pci_support (struct grub_pci_support *pci_s) +{ + if (grub_pci_support && grub_pci_support->fini) + grub_pci_support->fini (); + + grub_pci_support = pci_s; + + if (pci_s && pci_s->init) + pci_s->init (); +} + +void grub_unset_pci_support (struct grub_pci_support *pci_s) +{ + if (grub_pci_support == pci_s) + { + if (pci_s->fini) + pci_s->fini (); + grub_pci_support = 0; + } +} + +static int +is_alredy_driven (grub_pci_device_t pdev) +{ + grub_pci_device_t it; + auto int is_pdev_in_list (grub_pci_device_t); + + int is_pdev_in_list (grub_pci_device_t dev) + { + if ( (dev->bus == pdev->bus) && + (GRUB_PCI_SLOT(dev->devfn) == GRUB_PCI_SLOT(pdev->devfn)) && + (GRUB_PCI_FUNC(dev->dev_id) == GRUB_PCI_FUNC(pdev->dev_id)) ) + return 1; + else + return 0; + }; + grub_iterate_list_brk (grub_pci_devices, is_pdev_in_list, it); + + return (it != 0); + +} + +/* lspci functions. */ +static grub_err_t +print_pci_dev_n (grub_pci_device_t pdev) +{ + grub_printf ("%02x:%02x.%01x [%04x/%04x] class %04x\n",pdev->bus, + GRUB_PCI_SLOT(pdev->devfn), GRUB_PCI_FUNC(pdev->devfn), + pdev->vendor, pdev->dev_id, pdev->class >> 8); + + return 0; + +}; + +static grub_err_t +grub_cmd_lspci (struct grub_arg_list *state __attribute__ ((unused)), + int argc __attribute__ ((unused)), + char **args __attribute__ ((unused))) +{ + + if (!grub_pci_support) + { + grub_printf ("No specific PCI support, try \"insmod pci_etherboot\"\n"); + return GRUB_ERR_TEST_FAILURE; + } + + grub_pci_support->iterate (print_pci_dev_n); + return GRUB_ERR_NONE; +} + +static grub_err_t +grub_cmd_lspci_driver (struct grub_arg_list *state __attribute__ ((unused)), + int argc __attribute__ ((unused)), + char **args __attribute__ ((unused))) +{ + struct grub_pci_driver *drv= grub_pci_drivers; + struct grub_pci_device *dev; + + + grub_printf ("Available PCI drivers:\n"); + while (drv) + { + dev = grub_pci_devices; + + grub_printf ("-> %s:",drv->name); + while (dev) + { + if (dev->driver == drv) + grub_printf ("(%02x:%02x.%01x) ",dev->bus, + GRUB_PCI_SLOT(dev->devfn), GRUB_PCI_FUNC(dev->devfn)); + dev=dev->next; + } + grub_printf ("\n"); + drv = drv->next; + } + + return GRUB_ERR_NONE; +} + +/* Scan driver functions. */ +static grub_err_t +scan_driver (grub_pci_device_t pdev) +{ + struct grub_pci_driver * drv = grub_pci_drivers; + grub_err_t er; + int i; + + /* If this device is already driven, do nothing */ + if (is_alredy_driven (pdev)) + return GRUB_ERR_TEST_FAILURE; + + while (drv) + { + for (i=0; iid_count; i++ ) + { + if ( ((pdev->vendor == drv->ids[i].vendor) && + (pdev->dev_id == drv->ids[i].dev_id)) || + ((pdev->class >> 8) == drv->class) ) + { + grub_pci_support->init_pdev (pdev); + + if ((pdev->class >> 8) != drv->class) + { + grub_dprintf ("pci","Probing for %s with driver %s\n", + drv->ids[i].name, drv->name); + } + else + { + grub_dprintf ("pci","Probing for class %04x with driver %s\n", + drv->class, drv->name); + } + + er = drv->probe (pdev); + + if (er == GRUB_ERR_NONE) { + grub_register_pci_device (pdev,drv); + return GRUB_ERR_NONE; + } + } + } + drv=drv->next; + } + + return GRUB_ERR_TEST_FAILURE; +} + + +/* Add DRV at the head of the driver list. */ +void grub_register_pci_driver (struct grub_pci_driver *drv) +{ + grub_add_list (&grub_pci_drivers, drv); + grub_pci_support->iterate (scan_driver); +} + +/* Unlink DRV from the driver list. */ +void grub_unregister_pci_driver (struct grub_pci_driver *drv) +{ + auto int find_used_driver (grub_pci_device_t); + grub_pci_device_t dev; + + int find_used_driver (grub_pci_device_t device) + { + if (device->driver == drv) + return 1; + else + return 0; + }; + + grub_iterate_list_brk (grub_pci_devices, find_used_driver, dev); + while ( dev ) + { + grub_unregister_pci_device (dev); + grub_iterate_list_brk (grub_pci_devices, find_used_driver, dev); + } + + grub_del_list (&grub_pci_drivers, drv); +} + + +static grub_err_t +grub_cmd_scan_pci_device (struct grub_arg_list *state __attribute__ ((unused)), + int argc __attribute__ ((unused)), + char **args __attribute__ ((unused))) +{ + + if (!grub_pci_support) + { + grub_printf ("No specific PCI support, try \"insmod pci_etherboot\"\n"); + return GRUB_ERR_TEST_FAILURE; + } + + grub_pci_support->iterate (scan_driver); + return GRUB_ERR_NONE; +} + +/* GRUB module functions. */ +GRUB_MOD_INIT(pci) +{ + (void)mod; /* To stop warning. */ + grub_register_command ("lspci", grub_cmd_lspci, GRUB_COMMAND_FLAG_BOTH, + "lspci", "list the PCI devices", 0); + grub_register_command ("lspci_driver", grub_cmd_lspci_driver, GRUB_COMMAND_FLAG_BOTH, + "lspci_driver", "list available PCI drivers and the devices they drive", 0); + grub_register_command ("scan_pci_device", grub_cmd_scan_pci_device, GRUB_COMMAND_FLAG_BOTH, + "scan_pci_device", "Scan the PCI bus for devices for which we have a driver", 0); +} + +GRUB_MOD_FINI(pci) +{ + grub_unregister_command ("lspci"); + grub_unregister_command ("lspci_driver"); + grub_unregister_command ("scan_pci_device"); +} From MAILER-DAEMON Tue May 16 17:38:37 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fg7FV-00083j-AJ for mharc-grub-devel@gnu.org; Tue, 16 May 2006 17:38:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fg7FT-00082p-L5 for grub-devel@gnu.org; Tue, 16 May 2006 17:38:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fg7FS-00081r-Ms for grub-devel@gnu.org; Tue, 16 May 2006 17:38:35 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fg7FR-00081j-Mb for grub-devel@gnu.org; Tue, 16 May 2006 17:38:33 -0400 Received: from [155.198.117.152] (helo=crumpet.cpn.ee.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fg7I9-0005iU-D6 for grub-devel@gnu.org; Tue, 16 May 2006 17:41:22 -0400 Received: from localhost ([127.0.0.1]) by crumpet.cpn.ee.ic.ac.uk with esmtp (Exim 4.44) id 1Fg7FN-0001W6-1H for grub-devel@gnu.org; Tue, 16 May 2006 22:38:30 +0100 Message-ID: <446A4653.70103@imperial.ac.uk> Date: Tue, 16 May 2006 22:38:27 +0100 From: vincent guffens User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [patch 2/3] PCI support (implementation from etherboot) 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: Tue, 16 May 2006 21:38:35 -0000 Some directories, other than drivers/include/etherboot/i386 might have to be created by hand. 2006-05-16 Vincent Guffens * drivers/include/etherboot/: New directory. * drivers/pci/i386/: Likewise. * configure.ac (AC_CONFIG_LINKS): Added drivers/include/etherboot/cpu links. * conf/i386-pc.rmk (pkgdata_MODULES): Added pci_etherboot.mod to the list of modules. (pci_etherboot_mod_SOURCES): Added. (pci_etherboot_mod_CFLAGS): Likewise. (pci_etherboot_mod_LDFLAGS): Likewise. * drivers/include/etherboot/pci_ids.h: New file. * drivers/include/etherboot/pci_defs.h: Likewise. * drivers/include/etherboot/i386/io.h: Likewise. * drivers/include/etherboot/i386/limits.h: Likewise. * drivers/pci/pci_etherboot.c: Likewise. * drivers/pci/i386/pci_io.c: Likewise. diff -rNu grub2-pci/ChangeLog grub2-pci_etherboot/ChangeLog --- grub2-pci/ChangeLog 2006-05-16 21:51:22.000000000 +0100 +++ grub2-pci_etherboot/ChangeLog 2006-05-16 21:51:44.000000000 +0100 @@ -1,5 +1,26 @@ 2006-05-16 Vincent Guffens + * drivers/include/etherboot/: New directory. + * drivers/pci/i386/: Likewise. + + * configure.ac (AC_CONFIG_LINKS): Added drivers/include/etherboot/cpu + links. + + * conf/i386-pc.rmk (pkgdata_MODULES): Added pci_etherboot.mod + to the list of modules. + (pci_etherboot_mod_SOURCES): Added. + (pci_etherboot_mod_CFLAGS): Likewise. + (pci_etherboot_mod_LDFLAGS): Likewise. + + * drivers/include/etherboot/pci_ids.h: New file. + * drivers/include/etherboot/pci_defs.h: Likewise. + * drivers/include/etherboot/i386/io.h: Likewise. + * drivers/include/etherboot/i386/limits.h: Likewise. + * drivers/pci/pci_etherboot.c: Likewise. + * drivers/pci/i386/pci_io.c: Likewise. + +2006-05-16 Vincent Guffens + * drivers/: New directory. * conf/i386-pc.rmk (pkgdata_MODULES): Added pci.mod Binary files grub2-pci/.ChangeLog.swp and grub2-pci_etherboot/.ChangeLog.swp differ diff -rNu grub2-pci/conf/i386-pc.rmk grub2-pci_etherboot/conf/i386-pc.rmk --- grub2-pci/conf/i386-pc.rmk 2006-05-16 21:07:30.000000000 +0100 +++ grub2-pci_etherboot/conf/i386-pc.rmk 2006-05-16 21:27:03.000000000 +0100 @@ -117,7 +117,7 @@ pkgdata_MODULES = _chain.mod _linux.mod linux.mod normal.mod \ _multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod \ vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \ - videotest.mod play.mod pci.mod + videotest.mod play.mod pci.mod pci_etherboot.mod # For _chain.mod. _chain_mod_SOURCES = loader/i386/pc/chainloader.c @@ -215,4 +215,9 @@ pci_mod_CFLAGS = $(COMMON_CFLAGS) $(DRIVERS_CFLAGS) pci_mod_LDFLAGS = $(COMMON_LDFLAGS) +# For pci_etherboot.mod +pci_etherboot_mod_SOURCES = drivers/pci/pci_etherboot.c drivers/pci/i386/pci_io.c +pci_etherboot_mod_CFLAGS = $(COMMON_CFLAGS) $(DRIVERS_CFLAGS) +pci_etherboot_mod_LDFLAGS = $(COMMON_LDFLAGS) + include $(srcdir)/conf/common.mk diff -rNu grub2-pci/configure.ac grub2-pci_etherboot/configure.ac --- grub2-pci/configure.ac 2006-05-16 21:53:10.000000000 +0100 +++ grub2-pci_etherboot/configure.ac 2006-05-16 21:53:29.000000000 +0100 @@ -208,6 +208,7 @@ # Output files. AC_CONFIG_LINKS([include/grub/cpu:include/grub/$host_cpu + drivers/include/etherboot/cpu:drivers/include/etherboot/$host_cpu include/grub/machine:include/grub/$host_cpu/$platform]) AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh]) AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) diff -rNu grub2-pci/drivers/include/etherboot/i386/io.h grub2-pci_etherboot/drivers/include/etherboot/i386/io.h --- grub2-pci/drivers/include/etherboot/i386/io.h 1970-01-01 01:00:00.000000000 +0100 +++ grub2-pci_etherboot/drivers/include/etherboot/i386/io.h 2006-05-16 21:31:31.000000000 +0100 @@ -0,0 +1,206 @@ +/* io.h - Architecture specific input/output functions */ +/* Imported from Etherboot 5.4.1 */ + +#ifndef ETHERBOOT_IO_H +#define ETHERBOOT_IO_H + +/* + * This file contains the definitions for the x86 IO instructions + * inb/inw/inl/outb/outw/outl and the "string versions" of the same + * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing" + * versions of the single-IO instructions (inb_p/inw_p/..). + * + * This file is not meant to be obfuscating: it's just complicated + * to (a) handle it all in a way that makes gcc able to optimize it + * as well as possible and (b) trying to avoid writing the same thing + * over and over again with slight variations and possibly making a + * mistake somewhere. + */ + +/* + * Thanks to James van Artsdalen for a better timing-fix than + * the two short jumps: using outb's to a nonexistent port seems + * to guarantee better timings even on fast machines. + * + * On the other hand, I'd like to be sure of a non-existent port: + * I feel a bit unsafe about using 0x80 (should be safe, though) + * + * Linus + */ + +#ifdef SLOW_IO_BY_JUMPING +#define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:") +#else +#define __SLOW_DOWN_IO __asm__ __volatile__("outb %al,$0x80") +#endif + +#ifdef REALLY_SLOW_IO +#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; } +#else +#define SLOW_DOWN_IO __SLOW_DOWN_IO +#endif + +/* + * readX/writeX() are used to access memory mapped devices. On some + * architectures the memory mapped IO stuff needs to be accessed + * differently. On the x86 architecture, we just read/write the + * memory location directly. + */ +#define readb(addr) (*(volatile unsigned char *) (addr)) +#define readw(addr) (*(volatile unsigned short *) (addr)) +#define readl(addr) (*(volatile unsigned int *) (addr)) + +#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b)) +#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b)) +#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b)) + +#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) +#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) + +/* + * Force strict CPU ordering. + * And yes, this is required on UP too when we're talking + * to devices. + * + * For now, "wmb()" doesn't actually do anything, as all + * Intel CPU's follow what Intel calls a *Processor Order*, + * in which all writes are seen in the program order even + * outside the CPU. + * + * I expect future Intel CPU's to have a weaker ordering, + * but I'd also expect them to finally get their act together + * and add some real memory barriers if so. + * + * Some non intel clones support out of order store. wmb() ceases to be a + * nop for these. + */ + +#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory") +#define rmb() mb() +#define wmb() mb(); + + +/* + * Talk about misusing macros.. + */ + +#define __OUT1(s,x) \ +extern void __out##s(unsigned x value, unsigned short port); \ +extern inline void __out##s(unsigned x value, unsigned short port) { + +#define __OUT2(s,s1,s2) \ +__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" + +#define __OUT(s,s1,x) \ +__OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \ +__OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); } \ +__OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \ +__OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } + +#define __IN1(s,x) \ +extern unsigned x __in##s(unsigned short port); \ +extern inline unsigned x __in##s(unsigned short port) { unsigned x _v; + +#define __IN2(s,s1,s2) \ +__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" + +#define __IN(s,s1,x,i...) \ +__IN1(s,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \ +__IN1(s##c,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); return _v; } \ +__IN1(s##_p,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; return _v; } \ +__IN1(s##c_p,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } + +#define __INS(s) \ +extern void ins##s(unsigned short port, void * addr, unsigned long count); \ +extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ +{ __asm__ __volatile__ ("cld ; rep ; ins" #s \ +: "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } + +#define __OUTS(s) \ +extern void outs##s(unsigned short port, const void * addr, unsigned long count); \ +extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ +{ __asm__ __volatile__ ("cld ; rep ; outs" #s \ +: "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } + +__IN(b,"", char) +__IN(w,"",short) +__IN(l,"", long) + +__OUT(b,"b",char) +__OUT(w,"w",short) +__OUT(l,,int) + +__INS(b) +__INS(w) +__INS(l) + +__OUTS(b) +__OUTS(w) +__OUTS(l) + +/* + * Note that due to the way __builtin_constant_p() works, you + * - can't use it inside a inline function (it will never be true) + * - you don't have to worry about side effects within the __builtin.. + */ +#define outb(val,port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __outbc((val),(port)) : \ + __outb((val),(port))) + +#define inb(port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __inbc(port) : \ + __inb(port)) + +#define outb_p(val,port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __outbc_p((val),(port)) : \ + __outb_p((val),(port))) + +#define inb_p(port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __inbc_p(port) : \ + __inb_p(port)) + +#define outw(val,port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __outwc((val),(port)) : \ + __outw((val),(port))) + +#define inw(port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __inwc(port) : \ + __inw(port)) + +#define outw_p(val,port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __outwc_p((val),(port)) : \ + __outw_p((val),(port))) + +#define inw_p(port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __inwc_p(port) : \ + __inw_p(port)) + +#define outl(val,port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __outlc((val),(port)) : \ + __outl((val),(port))) + +#define inl(port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __inlc(port) : \ + __inl(port)) + +#define outl_p(val,port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __outlc_p((val),(port)) : \ + __outl_p((val),(port))) + +#define inl_p(port) \ +((__builtin_constant_p((port)) && (port) < 256) ? \ + __inlc_p(port) : \ + __inl_p(port)) + +#endif /* ETHERBOOT_IO_H */ diff -rNu grub2-pci/drivers/include/etherboot/i386/limits.h grub2-pci_etherboot/drivers/include/etherboot/i386/limits.h --- grub2-pci/drivers/include/etherboot/i386/limits.h 1970-01-01 01:00:00.000000000 +0100 +++ grub2-pci_etherboot/drivers/include/etherboot/i386/limits.h 2006-05-16 21:31:31.000000000 +0100 @@ -0,0 +1,8 @@ +#ifndef LIMITS_H +#define LIMITS_H + +/* Maximum value an `unsigned long' can hold. (Minimum is 0.) */ +#define ULONG_MAX 4294967295UL + +#endif + diff -rNu grub2-pci/drivers/include/etherboot/pci_defs.h grub2-pci_etherboot/drivers/include/etherboot/pci_defs.h --- grub2-pci/drivers/include/etherboot/pci_defs.h 1970-01-01 01:00:00.000000000 +0100 +++ grub2-pci_etherboot/drivers/include/etherboot/pci_defs.h 2006-05-16 21:31:14.000000000 +0100 @@ -0,0 +1,229 @@ +/* This is verbatim from Etherboot (5.4.1) pci.h */ + +#include "pci_ids.h" + +#define PCI_COMMAND_IO 0x1 /* Enable response in I/O space */ +#define PCI_COMMAND_MEM 0x2 /* Enable response in mem space */ +#define PCI_COMMAND_MASTER 0x4 /* Enable bus mastering */ +#define PCI_LATENCY_TIMER 0x0d /* 8 bits */ +#define PCI_COMMAND_SPECIAL 0x8 /* Enable response to special cycles */ +#define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */ +#define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */ +#define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */ +#define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */ +#define PCI_COMMAND_SERR 0x100 /* Enable SERR */ +#define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ + +#define PCIBIOS_PCI_FUNCTION_ID 0xb1XX +#define PCIBIOS_PCI_BIOS_PRESENT 0xb101 +#define PCIBIOS_FIND_PCI_DEVICE 0xb102 +#define PCIBIOS_FIND_PCI_CLASS_CODE 0xb103 +#define PCIBIOS_GENERATE_SPECIAL_CYCLE 0xb106 +#define PCIBIOS_READ_CONFIG_BYTE 0xb108 +#define PCIBIOS_READ_CONFIG_WORD 0xb109 +#define PCIBIOS_READ_CONFIG_DWORD 0xb10a +#define PCIBIOS_WRITE_CONFIG_BYTE 0xb10b +#define PCIBIOS_WRITE_CONFIG_WORD 0xb10c +#define PCIBIOS_WRITE_CONFIG_DWORD 0xb10d + +#define PCI_VENDOR_ID 0x00 /* 16 bits */ +#define PCI_DEVICE_ID 0x02 /* 16 bits */ +#define PCI_COMMAND 0x04 /* 16 bits */ + +#define PCI_STATUS 0x06 /* 16 bits */ +#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ +#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */ +#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */ +#define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */ +#define PCI_STATUS_PARITY 0x100 /* Detected parity error */ +#define PCI_STATUS_DEVSEL_MASK 0x600 /* DEVSEL timing */ +#define PCI_STATUS_DEVSEL_FAST 0x000 +#define PCI_STATUS_DEVSEL_MEDIUM 0x200 +#define PCI_STATUS_DEVSEL_SLOW 0x400 +#define PCI_STATUS_SIG_TARGET_ABORT 0x800 /* Set on target abort */ +#define PCI_STATUS_REC_TARGET_ABORT 0x1000 /* Master ack of " */ +#define PCI_STATUS_REC_MASTER_ABORT 0x2000 /* Set on master abort */ +#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000 /* Set when we drive SERR */ +#define PCI_STATUS_DETECTED_PARITY 0x8000 /* Set on parity error */ + +#define PCI_REVISION 0x08 /* 8 bits */ +#define PCI_REVISION_ID 0x08 /* 8 bits */ +#define PCI_CLASS_REVISION 0x08 /* 32 bits */ +#define PCI_CLASS_CODE 0x0b /* 8 bits */ +#define PCI_SUBCLASS_CODE 0x0a /* 8 bits */ +#define PCI_HEADER_TYPE 0x0e /* 8 bits */ +#define PCI_HEADER_TYPE_NORMAL 0 +#define PCI_HEADER_TYPE_BRIDGE 1 +#define PCI_HEADER_TYPE_CARDBUS 2 + + +/* Header type 0 (normal devices) */ +#define PCI_CARDBUS_CIS 0x28 +#define PCI_SUBSYSTEM_VENDOR_ID 0x2c +#define PCI_SUBSYSTEM_ID 0x2e + +#define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */ +#define PCI_BASE_ADDRESS_1 0x14 /* 32 bits */ +#define PCI_BASE_ADDRESS_2 0x18 /* 32 bits */ +#define PCI_BASE_ADDRESS_3 0x1c /* 32 bits */ +#define PCI_BASE_ADDRESS_4 0x20 /* 32 bits */ +#define PCI_BASE_ADDRESS_5 0x24 /* 32 bits */ + +#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06 +#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00 /* 32 bit address */ +#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M [obsolete] */ +#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */ + +#ifndef PCI_BASE_ADDRESS_IO_MASK +#define PCI_BASE_ADDRESS_IO_MASK (~0x03) +#endif +#ifndef PCI_BASE_ADDRESS_MEM_MASK +#define PCI_BASE_ADDRESS_MEM_MASK (~0x0f) +#endif +#define PCI_BASE_ADDRESS_SPACE_IO 0x01 +#define PCI_ROM_ADDRESS 0x30 /* 32 bits */ +#define PCI_ROM_ADDRESS_ENABLE 0x01 /* Write 1 to enable ROM, + bits 31..11 are address, + 10..2 are reserved */ + +#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */ + +#define PCI_INTERRUPT_LINE 0x3c /* IRQ number (0-15) */ +#define PCI_INTERRUPT_PIN 0x3d /* IRQ pin on PCI bus (A-D) */ + +/* Header type 1 (PCI-to-PCI bridges) */ +#define PCI_PRIMARY_BUS 0x18 /* Primary bus number */ +#define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */ +#define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the bridge */ +#define PCI_SEC_LATENCY_TIMER 0x1b /* Latency timer for secondary interface */ +#define PCI_IO_BASE 0x1c /* I/O range behind the bridge */ +#define PCI_IO_LIMIT 0x1d +#define PCI_IO_RANGE_TYPE_MASK 0x0f /* I/O bridging type */ +#define PCI_IO_RANGE_TYPE_16 0x00 +#define PCI_IO_RANGE_TYPE_32 0x01 +#define PCI_IO_RANGE_MASK ~0x0f +#define PCI_SEC_STATUS 0x1e /* Secondary status register, only bit 14 used */ +#define PCI_MEMORY_BASE 0x20 /* Memory range behind */ +#define PCI_MEMORY_LIMIT 0x22 +#define PCI_MEMORY_RANGE_TYPE_MASK 0x0f +#define PCI_MEMORY_RANGE_MASK ~0x0f +#define PCI_PREF_MEMORY_BASE 0x24 /* Prefetchable memory range behind */ +#define PCI_PREF_MEMORY_LIMIT 0x26 +#define PCI_PREF_RANGE_TYPE_MASK 0x0f +#define PCI_PREF_RANGE_TYPE_32 0x00 +#define PCI_PREF_RANGE_TYPE_64 0x01 +#define PCI_PREF_RANGE_MASK ~0x0f +#define PCI_PREF_BASE_UPPER32 0x28 /* Upper half of prefetchable memory range */ +#define PCI_PREF_LIMIT_UPPER32 0x2c +#define PCI_IO_BASE_UPPER16 0x30 /* Upper half of I/O addresses */ +#define PCI_IO_LIMIT_UPPER16 0x32 +/* 0x34 same as for htype 0 */ +/* 0x35-0x3b is reserved */ +#define PCI_ROM_ADDRESS1 0x38 /* Same as PCI_ROM_ADDRESS, but for htype 1 */ +/* 0x3c-0x3d are same as for htype 0 */ +#define PCI_BRIDGE_CONTROL 0x3e +#define PCI_BRIDGE_CTL_PARITY 0x01 /* Enable parity detection on secondary interface */ +#define PCI_BRIDGE_CTL_SERR 0x02 /* The same for SERR forwarding */ +#define PCI_BRIDGE_CTL_NO_ISA 0x04 /* Disable bridging of ISA ports */ +#define PCI_BRIDGE_CTL_VGA 0x08 /* Forward VGA addresses */ +#define PCI_BRIDGE_CTL_MASTER_ABORT 0x20 /* Report master aborts */ +#define PCI_BRIDGE_CTL_BUS_RESET 0x40 /* Secondary bus reset */ +#define PCI_BRIDGE_CTL_FAST_BACK 0x80 /* Fast Back2Back enabled on secondary interface */ + +#define PCI_CB_CAPABILITY_LIST 0x14 + +/* Capability lists */ + +#define PCI_CAP_LIST_ID 0 /* Capability ID */ +#define PCI_CAP_ID_PM 0x01 /* Power Management */ +#define PCI_CAP_ID_AGP 0x02 /* Accelerated Graphics Port */ +#define PCI_CAP_ID_VPD 0x03 /* Vital Product Data */ +#define PCI_CAP_ID_SLOTID 0x04 /* Slot Identification */ +#define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */ +#define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */ +#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ +#define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ +#define PCI_CAP_SIZEOF 4 + +/* Power Management Registers */ + +#define PCI_PM_PMC 2 /* PM Capabilities Register */ +#define PCI_PM_CAP_VER_MASK 0x0007 /* Version */ +#define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */ +#define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */ +#define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */ +#define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxilliary power support mask */ +#define PCI_PM_CAP_D1 0x0200 /* D1 power state support */ +#define PCI_PM_CAP_D2 0x0400 /* D2 power state support */ +#define PCI_PM_CAP_PME 0x0800 /* PME pin supported */ +#define PCI_PM_CAP_PME_MASK 0xF800 /* PME Mask of all supported states */ +#define PCI_PM_CAP_PME_D0 0x0800 /* PME# from D0 */ +#define PCI_PM_CAP_PME_D1 0x1000 /* PME# from D1 */ +#define PCI_PM_CAP_PME_D2 0x2000 /* PME# from D2 */ +#define PCI_PM_CAP_PME_D3 0x4000 /* PME# from D3 (hot) */ +#define PCI_PM_CAP_PME_D3cold 0x8000 /* PME# from D3 (cold) */ +#define PCI_PM_CTRL 4 /* PM control and status register */ +#define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */ +#define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */ +#define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */ +#define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */ +#define PCI_PM_CTRL_PME_STATUS 0x8000 /* PME pin status */ +#define PCI_PM_PPB_EXTENSIONS 6 /* PPB support extensions (??) */ +#define PCI_PM_PPB_B2_B3 0x40 /* Stop clock when in D3hot (??) */ +#define PCI_PM_BPCC_ENABLE 0x80 /* Bus power/clock control enable (??) */ +#define PCI_PM_DATA_REGISTER 7 /* (??) */ +#define PCI_PM_SIZEOF 8 + +/* AGP registers */ + +#define PCI_AGP_VERSION 2 /* BCD version number */ +#define PCI_AGP_RFU 3 /* Rest of capability flags */ +#define PCI_AGP_STATUS 4 /* Status register */ +#define PCI_AGP_STATUS_RQ_MASK 0xff000000 /* Maximum number of requests - 1 */ +#define PCI_AGP_STATUS_SBA 0x0200 /* Sideband addressing supported */ +#define PCI_AGP_STATUS_64BIT 0x0020 /* 64-bit addressing supported */ +#define PCI_AGP_STATUS_FW 0x0010 /* FW transfers supported */ +#define PCI_AGP_STATUS_RATE4 0x0004 /* 4x transfer rate supported */ +#define PCI_AGP_STATUS_RATE2 0x0002 /* 2x transfer rate supported */ +#define PCI_AGP_STATUS_RATE1 0x0001 /* 1x transfer rate supported */ +#define PCI_AGP_COMMAND 8 /* Control register */ +#define PCI_AGP_COMMAND_RQ_MASK 0xff000000 /* Master: Maximum number of requests */ +#define PCI_AGP_COMMAND_SBA 0x0200 /* Sideband addressing enabled */ +#define PCI_AGP_COMMAND_AGP 0x0100 /* Allow processing of AGP transactions */ +#define PCI_AGP_COMMAND_64BIT 0x0020 /* Allow processing of 64-bit addresses */ +#define PCI_AGP_COMMAND_FW 0x0010 /* Force FW transfers */ +#define PCI_AGP_COMMAND_RATE4 0x0004 /* Use 4x rate */ +#define PCI_AGP_COMMAND_RATE2 0x0002 /* Use 2x rate */ +#define PCI_AGP_COMMAND_RATE1 0x0001 /* Use 1x rate */ +#define PCI_AGP_SIZEOF 12 + +/* Slot Identification */ + +#define PCI_SID_ESR 2 /* Expansion Slot Register */ +#define PCI_SID_ESR_NSLOTS 0x1f /* Number of expansion slots available */ +#define PCI_SID_ESR_FIC 0x20 /* First In Chassis Flag */ +#define PCI_SID_CHASSIS_NR 3 /* Chassis Number */ + +/* Message Signalled Interrupts registers */ + +#define PCI_MSI_FLAGS 2 /* Various flags */ +#define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */ +#define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */ +#define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */ +#define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */ +#define PCI_MSI_RFU 3 /* Rest of capability flags */ +#define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ +#define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ +#define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ +#define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ + +#define PCI_SLOT(devfn) ((devfn) >> 3) +#define PCI_FUNC(devfn) ((devfn) & 0x07) + +#define BIOS32_SIGNATURE (('_' << 0) + ('3' << 8) + ('2' << 16) + ('_' << 24)) + +/* PCI signature: "PCI " */ +#define PCI_SIGNATURE (('P' << 0) + ('C' << 8) + ('I' << 16) + (' ' << 24)) + +/* PCI service signature: "$PCI" */ +#define PCI_SERVICE (('$' << 0) + ('P' << 8) + ('C' << 16) + ('I' << 24)) diff -rNu grub2-pci/drivers/include/etherboot/pci_ids.h grub2-pci_etherboot/drivers/include/etherboot/pci_ids.h --- grub2-pci/drivers/include/etherboot/pci_ids.h 1970-01-01 01:00:00.000000000 +0100 +++ grub2-pci_etherboot/drivers/include/etherboot/pci_ids.h 2006-05-16 21:31:14.000000000 +0100 @@ -0,0 +1,344 @@ +/* Verbatim from Etherboot 5.4.1 */ +/* + * PCI Class, Vendor and Device IDs + * + * Please keep sorted. + */ + +/* Device classes and subclasses */ + +#define PCI_CLASS_NOT_DEFINED 0x0000 +#define PCI_CLASS_NOT_DEFINED_VGA 0x0001 + +#define PCI_BASE_CLASS_STORAGE 0x01 +#define PCI_CLASS_STORAGE_SCSI 0x0100 +#define PCI_CLASS_STORAGE_IDE 0x0101 +#define PCI_CLASS_STORAGE_FLOPPY 0x0102 +#define PCI_CLASS_STORAGE_IPI 0x0103 +#define PCI_CLASS_STORAGE_RAID 0x0104 +#define PCI_CLASS_STORAGE_OTHER 0x0180 + +#define PCI_BASE_CLASS_NETWORK 0x02 +#define PCI_CLASS_NETWORK_ETHERNET 0x0200 +#define PCI_CLASS_NETWORK_TOKEN_RING 0x0201 +#define PCI_CLASS_NETWORK_FDDI 0x0202 +#define PCI_CLASS_NETWORK_ATM 0x0203 +#define PCI_CLASS_NETWORK_OTHER 0x0280 + +#define PCI_BASE_CLASS_DISPLAY 0x03 +#define PCI_CLASS_DISPLAY_VGA 0x0300 +#define PCI_CLASS_DISPLAY_XGA 0x0301 +#define PCI_CLASS_DISPLAY_3D 0x0302 +#define PCI_CLASS_DISPLAY_OTHER 0x0380 + +#define PCI_BASE_CLASS_MULTIMEDIA 0x04 +#define PCI_CLASS_MULTIMEDIA_VIDEO 0x0400 +#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401 +#define PCI_CLASS_MULTIMEDIA_PHONE 0x0402 +#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480 + +#define PCI_BASE_CLASS_MEMORY 0x05 +#define PCI_CLASS_MEMORY_RAM 0x0500 +#define PCI_CLASS_MEMORY_FLASH 0x0501 +#define PCI_CLASS_MEMORY_OTHER 0x0580 + +#define PCI_BASE_CLASS_BRIDGE 0x06 +#define PCI_CLASS_BRIDGE_HOST 0x0600 +#define PCI_CLASS_BRIDGE_ISA 0x0601 +#define PCI_CLASS_BRIDGE_EISA 0x0602 +#define PCI_CLASS_BRIDGE_MC 0x0603 +#define PCI_CLASS_BRIDGE_PCI 0x0604 +#define PCI_CLASS_BRIDGE_PCMCIA 0x0605 +#define PCI_CLASS_BRIDGE_NUBUS 0x0606 +#define PCI_CLASS_BRIDGE_CARDBUS 0x0607 +#define PCI_CLASS_BRIDGE_RACEWAY 0x0608 +#define PCI_CLASS_BRIDGE_OTHER 0x0680 + +#define PCI_BASE_CLASS_COMMUNICATION 0x07 +#define PCI_CLASS_COMMUNICATION_SERIAL 0x0700 +#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701 +#define PCI_CLASS_COMMUNICATION_MULTISERIAL 0x0702 +#define PCI_CLASS_COMMUNICATION_MODEM 0x0703 +#define PCI_CLASS_COMMUNICATION_OTHER 0x0780 + +#define PCI_BASE_CLASS_SYSTEM 0x08 +#define PCI_CLASS_SYSTEM_PIC 0x0800 +#define PCI_CLASS_SYSTEM_DMA 0x0801 +#define PCI_CLASS_SYSTEM_TIMER 0x0802 +#define PCI_CLASS_SYSTEM_RTC 0x0803 +#define PCI_CLASS_SYSTEM_PCI_HOTPLUG 0x0804 +#define PCI_CLASS_SYSTEM_OTHER 0x0880 + +#define PCI_BASE_CLASS_INPUT 0x09 +#define PCI_CLASS_INPUT_KEYBOARD 0x0900 +#define PCI_CLASS_INPUT_PEN 0x0901 +#define PCI_CLASS_INPUT_MOUSE 0x0902 +#define PCI_CLASS_INPUT_SCANNER 0x0903 +#define PCI_CLASS_INPUT_GAMEPORT 0x0904 +#define PCI_CLASS_INPUT_OTHER 0x0980 + +#define PCI_BASE_CLASS_DOCKING 0x0a +#define PCI_CLASS_DOCKING_GENERIC 0x0a00 +#define PCI_CLASS_DOCKING_OTHER 0x0a80 + +#define PCI_BASE_CLASS_PROCESSOR 0x0b +#define PCI_CLASS_PROCESSOR_386 0x0b00 +#define PCI_CLASS_PROCESSOR_486 0x0b01 +#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02 +#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10 +#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20 +#define PCI_CLASS_PROCESSOR_MIPS 0x0b30 +#define PCI_CLASS_PROCESSOR_CO 0x0b40 + +#define PCI_BASE_CLASS_SERIAL 0x0c +#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 +#define PCI_CLASS_SERIAL_ACCESS 0x0c01 +#define PCI_CLASS_SERIAL_SSA 0x0c02 +#define PCI_CLASS_SERIAL_USB 0x0c03 +#define PCI_CLASS_SERIAL_FIBER 0x0c04 +#define PCI_CLASS_SERIAL_SMBUS 0x0c05 + +#define PCI_BASE_CLASS_INTELLIGENT 0x0e +#define PCI_CLASS_INTELLIGENT_I2O 0x0e00 + +#define PCI_BASE_CLASS_SATELLITE 0x0f +#define PCI_CLASS_SATELLITE_TV 0x0f00 +#define PCI_CLASS_SATELLITE_AUDIO 0x0f01 +#define PCI_CLASS_SATELLITE_VOICE 0x0f03 +#define PCI_CLASS_SATELLITE_DATA 0x0f04 + +#define PCI_BASE_CLASS_CRYPT 0x10 +#define PCI_CLASS_CRYPT_NETWORK 0x1000 +#define PCI_CLASS_CRYPT_ENTERTAINMENT 0x1001 +#define PCI_CLASS_CRYPT_OTHER 0x1080 + +#define PCI_BASE_CLASS_SIGNAL_PROCESSING 0x11 +#define PCI_CLASS_SP_DPIO 0x1100 +#define PCI_CLASS_SP_OTHER 0x1180 + +#define PCI_CLASS_OTHERS 0xff + +/* Vendors */ + +#define PCI_VENDOR_ID_DYNALINK 0x0675 +#define PCI_VENDOR_ID_BERKOM 0x0871 +#define PCI_VENDOR_ID_COMPAQ 0x0e11 +#define PCI_VENDOR_ID_NCR 0x1000 +#define PCI_VENDOR_ID_LSI_LOGIC 0x1000 +#define PCI_VENDOR_ID_ATI 0x1002 +#define PCI_VENDOR_ID_VLSI 0x1004 +#define PCI_VENDOR_ID_ADL 0x1005 +#define PCI_VENDOR_ID_NS 0x100b +#define PCI_VENDOR_ID_TSENG 0x100c +#define PCI_VENDOR_ID_WEITEK 0x100e +#define PCI_VENDOR_ID_DEC 0x1011 +#define PCI_VENDOR_ID_CIRRUS 0x1013 +#define PCI_VENDOR_ID_IBM 0x1014 +#define PCI_VENDOR_ID_COMPEX2 0x101a +/* pci.ids says "AT&T GIS (NCR)" */ +#define PCI_VENDOR_ID_WD 0x101c +#define PCI_VENDOR_ID_AMI 0x101e +#define PCI_VENDOR_ID_AMD 0x1022 +#define PCI_VENDOR_ID_TRIDENT 0x1023 +#define PCI_VENDOR_ID_AI 0x1025 +#define PCI_VENDOR_ID_DELL 0x1028 +#define PCI_VENDOR_ID_MATROX 0x102B +#define PCI_VENDOR_ID_CT 0x102c +#define PCI_VENDOR_ID_MIRO 0x1031 +#define PCI_VENDOR_ID_NEC 0x1033 +#define PCI_VENDOR_ID_FD 0x1036 +#define PCI_VENDOR_ID_SIS 0x1039 +#define PCI_VENDOR_ID_SI 0x1039 +#define PCI_VENDOR_ID_HP 0x103c +#define PCI_VENDOR_ID_PCTECH 0x1042 +#define PCI_VENDOR_ID_ASUSTEK 0x1043 +#define PCI_VENDOR_ID_DPT 0x1044 +#define PCI_VENDOR_ID_OPTI 0x1045 +#define PCI_VENDOR_ID_ELSA 0x1048 +#define PCI_VENDOR_ID_ELSA 0x1048 +#define PCI_VENDOR_ID_SGS 0x104a +#define PCI_VENDOR_ID_BUSLOGIC 0x104B +#define PCI_VENDOR_ID_TI 0x104c +#define PCI_VENDOR_ID_SONY 0x104d +#define PCI_VENDOR_ID_OAK 0x104e +/* Winbond have two vendor IDs! See 0x10ad as well */ +#define PCI_VENDOR_ID_WINBOND2 0x1050 +#define PCI_VENDOR_ID_ANIGMA 0x1051 +#define PCI_VENDOR_ID_EFAR 0x1055 +#define PCI_VENDOR_ID_MOTOROLA 0x1057 +#define PCI_VENDOR_ID_MOTOROLA_OOPS 0x1507 +#define PCI_VENDOR_ID_PROMISE 0x105a +#define PCI_VENDOR_ID_N9 0x105d +#define PCI_VENDOR_ID_UMC 0x1060 +#define PCI_VENDOR_ID_X 0x1061 +#define PCI_VENDOR_ID_MYLEX 0x1069 +#define PCI_VENDOR_ID_PICOP 0x1066 +#define PCI_VENDOR_ID_APPLE 0x106b +#define PCI_VENDOR_ID_YAMAHA 0x1073 +#define PCI_VENDOR_ID_NEXGEN 0x1074 +#define PCI_VENDOR_ID_QLOGIC 0x1077 +#define PCI_VENDOR_ID_CYRIX 0x1078 +#define PCI_VENDOR_ID_LEADTEK 0x107d +#define PCI_VENDOR_ID_INTERPHASE 0x107e +#define PCI_VENDOR_ID_CONTAQ 0x1080 +#define PCI_VENDOR_ID_FOREX 0x1083 +#define PCI_VENDOR_ID_OLICOM 0x108d +#define PCI_VENDOR_ID_SUN 0x108e +#define PCI_VENDOR_ID_CMD 0x1095 +#define PCI_VENDOR_ID_VISION 0x1098 +#define PCI_VENDOR_ID_BROOKTREE 0x109e +#define PCI_VENDOR_ID_SIERRA 0x10a8 +#define PCI_VENDOR_ID_SGI 0x10a9 +#define PCI_VENDOR_ID_ACC 0x10aa +#define PCI_VENDOR_ID_WINBOND 0x10ad +#define PCI_VENDOR_ID_DATABOOK 0x10b3 +#define PCI_VENDOR_ID_PLX 0x10b5 +#define PCI_VENDOR_ID_MADGE 0x10b6 +#define PCI_VENDOR_ID_3COM 0x10b7 +#define PCI_VENDOR_ID_SMC 0x10b8 +#define PCI_VENDOR_ID_SUNDANCE 0x13F0 +#define PCI_VENDOR_ID_AL 0x10b9 +#define PCI_VENDOR_ID_MITSUBISHI 0x10ba +#define PCI_VENDOR_ID_SURECOM 0x10bd +#define PCI_VENDOR_ID_NEOMAGIC 0x10c8 +#define PCI_VENDOR_ID_ASP 0x10cd +#define PCI_VENDOR_ID_MACRONIX 0x10d9 +#define PCI_VENDOR_ID_TCONRAD 0x10da +#define PCI_VENDOR_ID_CERN 0x10dc +#define PCI_VENDOR_ID_NVIDIA 0x10de +#define PCI_VENDOR_ID_IMS 0x10e0 +#define PCI_VENDOR_ID_TEKRAM2 0x10e1 +#define PCI_VENDOR_ID_TUNDRA 0x10e3 +#define PCI_VENDOR_ID_AMCC 0x10e8 +#define PCI_VENDOR_ID_INTERG 0x10ea +#define PCI_VENDOR_ID_REALTEK 0x10ec +#define PCI_VENDOR_ID_XILINX 0x10ee +#define PCI_VENDOR_ID_TRUEVISION 0x10fa +#define PCI_VENDOR_ID_INIT 0x1101 +#define PCI_VENDOR_ID_CREATIVE 0x1102 +/* duplicate: ECTIVA */ +#define PCI_VENDOR_ID_ECTIVA 0x1102 +/* duplicate: CREATIVE */ +#define PCI_VENDOR_ID_TTI 0x1103 +#define PCI_VENDOR_ID_VIA 0x1106 +#define PCI_VENDOR_ID_VIATEC 0x1106 +#define PCI_VENDOR_ID_SIEMENS 0x110A +#define PCI_VENDOR_ID_SMC2 0x1113 +#define PCI_VENDOR_ID_VORTEX 0x1119 +#define PCI_VENDOR_ID_EF 0x111a +#define PCI_VENDOR_ID_IDT 0x111d +#define PCI_VENDOR_ID_FORE 0x1127 +#define PCI_VENDOR_ID_IMAGINGTECH 0x112f +#define PCI_VENDOR_ID_PHILIPS 0x1131 +#define PCI_VENDOR_ID_EICON 0x1133 +#define PCI_VENDOR_ID_CYCLONE 0x113c +#define PCI_VENDOR_ID_ALLIANCE 0x1142 +#define PCI_VENDOR_ID_SYSKONNECT 0x1148 +#define PCI_VENDOR_ID_VMIC 0x114a +#define PCI_VENDOR_ID_DIGI 0x114f +#define PCI_VENDOR_ID_MUTECH 0x1159 +#define PCI_VENDOR_ID_XIRCOM 0x115d +#define PCI_VENDOR_ID_RENDITION 0x1163 +#define PCI_VENDOR_ID_SERVERWORKS 0x1166 +#define PCI_VENDOR_ID_SBE 0x1176 +#define PCI_VENDOR_ID_TOSHIBA 0x1179 +#define PCI_VENDOR_ID_RICOH 0x1180 +#define PCI_VENDOR_ID_DLINK 0x1186 +#define PCI_VENDOR_ID_ARTOP 0x1191 +#define PCI_VENDOR_ID_ZEITNET 0x1193 +#define PCI_VENDOR_ID_OMEGA 0x119b +#define PCI_VENDOR_ID_FUJITSU_ME 0x119e +#define PCI_SUBVENDOR_ID_KEYSPAN 0x11a9 +#define PCI_VENDOR_ID_GALILEO 0x11ab +#define PCI_VENDOR_ID_LINKSYS 0x11ad +#define PCI_VENDOR_ID_LITEON 0x11ad +#define PCI_VENDOR_ID_V3 0x11b0 +#define PCI_VENDOR_ID_NP 0x11bc +#define PCI_VENDOR_ID_ATT 0x11c1 +#define PCI_VENDOR_ID_SPECIALIX 0x11cb +#define PCI_VENDOR_ID_AURAVISION 0x11d1 +#define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 +#define PCI_VENDOR_ID_IKON 0x11d5 +#define PCI_VENDOR_ID_ZORAN 0x11de +#define PCI_VENDOR_ID_KINETIC 0x11f4 +#define PCI_VENDOR_ID_COMPEX 0x11f6 +#define PCI_VENDOR_ID_RP 0x11fe +#define PCI_VENDOR_ID_CYCLADES 0x120e +#define PCI_VENDOR_ID_ESSENTIAL 0x120f +#define PCI_VENDOR_ID_O2 0x1217 +#define PCI_VENDOR_ID_3DFX 0x121a +#define PCI_VENDOR_ID_SIGMADES 0x1236 +#define PCI_VENDOR_ID_CCUBE 0x123f +#define PCI_VENDOR_ID_AVM 0x1244 +#define PCI_VENDOR_ID_DIPIX 0x1246 +#define PCI_VENDOR_ID_STALLION 0x124d +#define PCI_VENDOR_ID_OPTIBASE 0x1255 +#define PCI_VENDOR_ID_ESS 0x125d +#define PCI_VENDOR_ID_HARRIS 0x1260 +#define PCI_VENDOR_ID_SATSAGEM 0x1267 +#define PCI_VENDOR_ID_HUGHES 0x1273 +#define PCI_VENDOR_ID_ENSONIQ 0x1274 +#define PCI_VENDOR_ID_ROCKWELL 0x127A +#define PCI_VENDOR_ID_DAVICOM 0x1282 +#define PCI_VENDOR_ID_ITE 0x1283 +/* formerly Platform Tech */ +#define PCI_VENDOR_ID_ESS_OLD 0x1285 +#define PCI_VENDOR_ID_ALTEON 0x12ae +#define PCI_VENDOR_ID_USR 0x12B9 +#define PCI_VENDOR_ID_HOLTEK 0x12c3 +#define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 +#define PCI_VENDOR_ID_PICTUREL 0x12c5 +#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 +#define PCI_SUBVENDOR_ID_CHASE_PCIFAST 0x12E0 +#define PCI_SUBVENDOR_ID_CHASE_PCIRAS 0x124D +#define PCI_VENDOR_ID_AUREAL 0x12eb +#define PCI_VENDOR_ID_CBOARDS 0x1307 +#define PCI_VENDOR_ID_SIIG 0x131f +#define PCI_VENDOR_ID_ADMTEK 0x1317 +#define PCI_VENDOR_ID_DOMEX 0x134a +#define PCI_VENDOR_ID_QUATECH 0x135C +#define PCI_VENDOR_ID_SEALEVEL 0x135e +#define PCI_VENDOR_ID_HYPERCOPE 0x1365 +#define PCI_VENDOR_ID_KAWASAKI 0x136b +#define PCI_VENDOR_ID_LMC 0x1376 +#define PCI_VENDOR_ID_NETGEAR 0x1385 +#define PCI_VENDOR_ID_APPLICOM 0x1389 +#define PCI_VENDOR_ID_MOXA 0x1393 +#define PCI_VENDOR_ID_CCD 0x1397 +#define PCI_VENDOR_ID_MICROGATE 0x13c0 +#define PCI_VENDOR_ID_3WARE 0x13C1 +#define PCI_VENDOR_ID_ABOCOM 0x13D1 +#define PCI_VENDOR_ID_CMEDIA 0x13f6 +#define PCI_VENDOR_ID_LAVA 0x1407 +#define PCI_VENDOR_ID_TIMEDIA 0x1409 +#define PCI_VENDOR_ID_OXSEMI 0x1415 +#define PCI_VENDOR_ID_AIRONET 0x14b9 +#define PCI_VENDOR_ID_TITAN 0x14D2 +#define PCI_VENDOR_ID_PANACOM 0x14d4 +#define PCI_VENDOR_ID_BROADCOM 0x14e4 +#define PCI_VENDOR_ID_SYBA 0x1592 +#define PCI_VENDOR_ID_MORETON 0x15aa +#define PCI_VENDOR_ID_ZOLTRIX 0x15b0 +#define PCI_VENDOR_ID_PDC 0x15e9 +#define PCI_VENDOR_ID_FSC 0x1734 +#define PCI_VENDOR_ID_SYMPHONY 0x1c1c +#define PCI_VENDOR_ID_TEKRAM 0x1de1 +#define PCI_VENDOR_ID_3DLABS 0x3d3d +#define PCI_VENDOR_ID_AVANCE 0x4005 +#define PCI_VENDOR_ID_AKS 0x416c +#define PCI_VENDOR_ID_NETVIN 0x4a14 +#define PCI_VENDOR_ID_S3 0x5333 +#define PCI_VENDOR_ID_DCI 0x6666 +#define PCI_VENDOR_ID_GENROCO 0x5555 +#define PCI_VENDOR_ID_INTEL 0x8086 +#define PCI_VENDOR_ID_COMPUTONE 0x8e0e +#define PCI_SUBVENDOR_ID_COMPUTONE 0x8e0e +#define PCI_VENDOR_ID_KTI 0x8e2e +#define PCI_VENDOR_ID_ADAPTEC 0x9004 +#define PCI_VENDOR_ID_ADAPTEC2 0x9005 +#define PCI_VENDOR_ID_ATRONICS 0x907f +#define PCI_VENDOR_ID_HOLTEK2 0x9412 +#define PCI_VENDOR_ID_NETMOS 0x9710 +#define PCI_SUBVENDOR_ID_EXSYS 0xd84d +#define PCI_VENDOR_ID_TIGERJET 0xe159 +#define PCI_VENDOR_ID_ARK 0xedd8 diff -rNu grub2-pci/drivers/pci/i386/pci_io.c grub2-pci_etherboot/drivers/pci/i386/pci_io.c --- grub2-pci/drivers/pci/i386/pci_io.c 1970-01-01 01:00:00.000000000 +0100 +++ grub2-pci_etherboot/drivers/pci/i386/pci_io.c 2006-05-16 21:32:02.000000000 +0100 @@ -0,0 +1,80 @@ +/* pci_io.c : Architecture specific PCI IO functions, + Adapted from Etherboot 5.4.1 - pci_io.c */ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2, or (at + * your option) any later version. + */ + +#include +#include + + +#define CONFIG_CMD(dev, where) \ + (0x80000000 | (dev->bus << 16) | (dev->devfn << 8) | (where & ~3)) + +static grub_err_t read_config_byte (grub_pci_device_t dev, grub_addr_t where, + grub_uint8_t *value) +{ + outl(CONFIG_CMD(dev, where), 0xCF8); + *value = inb(0xCFC + (where&3)); + return GRUB_ERR_NONE; +} + +static grub_err_t write_config_byte (grub_pci_device_t dev, grub_addr_t where, + grub_uint8_t value) +{ + outl(CONFIG_CMD(dev, where), 0xCF8); + outb(value, 0xCFC + (where&3)); + return GRUB_ERR_NONE; +} + +static grub_err_t read_config_word (grub_pci_device_t dev, grub_addr_t where, + grub_uint16_t *value) +{ + outl(CONFIG_CMD(dev, where), 0xCF8); + *value = inw(0xCFC + (where&2)); + return GRUB_ERR_NONE; +} + +static grub_err_t write_config_word (grub_pci_device_t dev, grub_addr_t where, + grub_uint16_t value) +{ + outl(CONFIG_CMD(dev, where), 0xCF8); + outw(value, 0xCFC + (where&2)); + return GRUB_ERR_NONE; +} + +static grub_err_t read_config_dword (grub_pci_device_t dev, grub_addr_t where, + grub_uint32_t *value) +{ + outl(CONFIG_CMD(dev, where), 0xCF8); + *value = inl(0xCFC); + return GRUB_ERR_NONE; +} + +static grub_err_t write_config_dword (grub_pci_device_t dev, grub_addr_t where, + grub_uint32_t value) +{ + outl(CONFIG_CMD(dev, where), 0xCF8); + outw(value, 0xCFC + (where&2)); + return GRUB_ERR_NONE; +} + +static grub_addr_t bus_base (unsigned int bus __attribute__((unused))) +{ + /* architecturally this must be 0 */ + return 0; +} + +struct grub_pci_io_support grub_pci_io_support_etherboot = + { + read_config_byte, + write_config_byte, + read_config_word, + write_config_word, + read_config_dword, + write_config_dword, + bus_base + }; diff -rNu grub2-pci/drivers/pci/pci_etherboot.c grub2-pci_etherboot/drivers/pci/pci_etherboot.c --- grub2-pci/drivers/pci/pci_etherboot.c 1970-01-01 01:00:00.000000000 +0100 +++ grub2-pci_etherboot/drivers/pci/pci_etherboot.c 2006-05-16 21:31:47.000000000 +0100 @@ -0,0 +1,296 @@ +/* pci_etherboot.c - PCI implementation, Adapted from Etherboot */ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2, or (at + * your option) any later version. + */ + + +#include +#include +#include +#include +#include + +extern struct grub_pci_io_support grub_pci_io_support_etherboot; + +/* + * Set device to be a busmaster in case BIOS neglected to do so. + * Also adjust PCI latency timer to a reasonable value, 32. + */ +static void adjust_pci_device (grub_pci_device_t p) +{ + unsigned short new_command, pci_command; + unsigned char pci_latency; + + grub_pci_io_support_etherboot.read_config_word (p, + PCI_COMMAND, &pci_command); + + new_command = pci_command | PCI_COMMAND_MASTER|PCI_COMMAND_IO; + + if (pci_command != new_command) + { + /* PCI BIOS has not enabled this device! */ + grub_pci_io_support_etherboot.write_config_word (p, + PCI_COMMAND, new_command); + } + + grub_pci_io_support_etherboot.read_config_byte (p, + PCI_LATENCY_TIMER, &pci_latency); + + if (pci_latency < 32) + { + grub_pci_io_support_etherboot.write_config_byte (p, + PCI_LATENCY_TIMER, 32); + } +} + +/* + * Find the start of a pci resource. + */ +static unsigned long pci_bar_start (grub_pci_device_t dev, unsigned int index) +{ + grub_uint32_t lo, hi; + unsigned long bar; + grub_pci_io_support_etherboot.read_config_dword (dev, index, &lo); + if (lo & PCI_BASE_ADDRESS_SPACE_IO) + { + bar = lo & PCI_BASE_ADDRESS_IO_MASK; + } else + { + bar = 0; + if ((lo & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64) + { + grub_pci_io_support_etherboot.read_config_dword (dev, index + 4, &hi); + if (hi) + { +#if ULONG_MAX > 0xffffffff + bar = hi; + bar <<=32; +#else + grub_printf ("Unhandled 64bit BAR %08x:%08x\n", hi, lo); + return -1UL; +#endif + } + } + bar |= lo & PCI_BASE_ADDRESS_MEM_MASK; + } + + return bar + grub_pci_io_support_etherboot.bus_base (dev->bus); + +} + +/* + * Find the size of a pci resource. + */ +static unsigned long pci_bar_size (grub_pci_device_t dev, unsigned int bar) +{ + grub_uint32_t start, size; + /* Save the original bar */ + grub_pci_io_support_etherboot.read_config_dword(dev, bar, &start); + /* Compute which bits can be set */ + grub_pci_io_support_etherboot.write_config_dword(dev, bar, ~0); + grub_pci_io_support_etherboot.read_config_dword(dev, bar, &size); + /* Restore the original size */ + grub_pci_io_support_etherboot.write_config_dword(dev, bar, start); + /* Find the significant bits */ + if (start & PCI_BASE_ADDRESS_SPACE_IO) { + size &= PCI_BASE_ADDRESS_IO_MASK; + } else { + size &= PCI_BASE_ADDRESS_MEM_MASK; + } + /* Find the lowest bit set */ + size = size & ~(size - 1); + return size; +} + +/* + pci_find_capability - query for devices' capabilities + @dev: PCI device to query + @cap: capability code + + Tell if a device supports a given PCI capability. + Returns the address of the requested capability structure within the + device's PCI configuration space or 0 in case the device does not + support it. Possible values for @cap: + + %PCI_CAP_ID_PM Power Management + + %PCI_CAP_ID_AGP Accelerated Graphics Port + + %PCI_CAP_ID_VPD Vital Product Data + + %PCI_CAP_ID_SLOTID Slot Identification + + %PCI_CAP_ID_MSI Message Signalled Interrupts + + %PCI_CAP_ID_CHSWP CompactPCI HotSwap + */ +static int pci_find_capability (grub_pci_device_t dev, int cap) +{ + grub_uint16_t status; + grub_uint8_t pos, id; + grub_uint8_t hdr_type; + int ttl = 48; + + grub_pci_io_support_etherboot.read_config_word(dev, PCI_STATUS, &status); + if (!(status & PCI_STATUS_CAP_LIST)) + return 0; + grub_pci_io_support_etherboot.read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type); + switch (hdr_type & 0x7F) + { + case PCI_HEADER_TYPE_NORMAL: + case PCI_HEADER_TYPE_BRIDGE: + default: + grub_pci_io_support_etherboot.read_config_byte(dev, PCI_CAPABILITY_LIST, &pos); + break; + case PCI_HEADER_TYPE_CARDBUS: + grub_pci_io_support_etherboot.read_config_byte(dev, PCI_CB_CAPABILITY_LIST, &pos); + break; + } + + while (ttl-- && pos >= 0x40) + { + pos &= ~3; + /* Read cpability in ID */ + grub_pci_io_support_etherboot.read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id); + + if (id == 0xff) + break; + if (id == cap) + return pos; + grub_pci_io_support_etherboot.read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos); + } + return 0; +} + +/* + For each PCI device, HOOK will be called with the following + fields of the grub_pci_device structure set: + bus, devfn, vendor, dev_id, class + + If you happen to be interested in a particular device, + malloc a new one, copy the fields above and initialise the + remaining fields with init_pdev (dev). +*/ +static grub_err_t iterate (grub_err_t (*hook) (grub_pci_device_t)) +{ + struct grub_pci_device pdev; + grub_uint32_t l; + unsigned int bus,devfn; + unsigned char hdr_type = 0; + + + /* + Scan all PCI buses, until we find our card. + We could be smart only scan the required buses but that + is error prone, and tricky. + By scanning all possible pci buses in order we should find + our card eventually. + */ + +#define NBUSES 256 +#define NBFN 256 + + for (bus = 0; bus < NBUSES; bus++) + { + pdev.bus = bus; + for (devfn = 0; devfn < NBFN; devfn++) + { + pdev.devfn = devfn; + if (PCI_FUNC (devfn) == 0) + grub_pci_io_support_etherboot.read_config_byte(&pdev, + PCI_HEADER_TYPE, &hdr_type); + else if (!(hdr_type & 0x80)) /* not a multi-function device */ + continue; + + grub_pci_io_support_etherboot.read_config_dword(&pdev, + PCI_VENDOR_ID, &l); + + /* some broken boards return 0 if a slot is empty: */ + if (l == 0xffffffff || l == 0x00000000) + continue; + + + pdev.vendor = l & 0xffff; + pdev.dev_id = (l >> 16) & 0xffff; + + grub_pci_io_support_etherboot.read_config_dword(&pdev, + PCI_REVISION, &l); + + pdev.class = (l >> 8) & 0xffffff; + + hook (&pdev); + } + } + return GRUB_ERR_NONE; +} + +static grub_err_t +init_pdev (grub_pci_device_t dev) +{ + grub_uint32_t membase, ioaddr, romaddr; + grub_uint8_t irq; + int reg; + + + /* Get the ROM base address */ + grub_pci_io_support_etherboot.read_config_dword(dev, PCI_ROM_ADDRESS, &romaddr); + romaddr >>= 10; + dev->romaddr = romaddr; + + /* Get the ``membase'' */ + grub_pci_io_support_etherboot.read_config_dword(dev, PCI_BASE_ADDRESS_1, &membase); + dev->membase = membase; + + /* Get the ``ioaddr'' */ + for (reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4) + { + grub_pci_io_support_etherboot.read_config_dword(dev, reg, &ioaddr); + if ((ioaddr & PCI_BASE_ADDRESS_IO_MASK) == 0 || + (ioaddr & PCI_BASE_ADDRESS_SPACE_IO) == 0) + continue; + + + /* Strip the I/O address out of the returned value */ + ioaddr &= PCI_BASE_ADDRESS_IO_MASK; + + /* Take the first one or the one that matches in boot ROM address */ + dev->ioaddr = ioaddr; + } + + /* Get the irq */ + grub_pci_io_support_etherboot.read_config_byte(dev, PCI_INTERRUPT_PIN, &irq); + if (irq) + grub_pci_io_support_etherboot.read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); + + dev->irq = irq; + + return GRUB_ERR_NONE; +} + +struct grub_pci_support grub_pci_support_etherboot = +{ +.name = "Etherboot PCI support", +.init = 0, +.fini = 0, +.adjust = adjust_pci_device, +.bar_start = pci_bar_start, +.bar_size = pci_bar_size, +.find_capability = pci_find_capability, +.iterate = iterate, +.init_pdev = init_pdev, +.io = &grub_pci_io_support_etherboot +}; + +GRUB_MOD_INIT(pci_etherboot) +{ + (void)mod; /* To stop warning. */ + grub_set_pci_support(&grub_pci_support_etherboot); +} + +GRUB_MOD_FINI(pci_etherboot) +{ + grub_unset_pci_support(&grub_pci_support_etherboot); +} From MAILER-DAEMON Tue May 16 17:40:44 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fg7HY-0000QU-0O for mharc-grub-devel@gnu.org; Tue, 16 May 2006 17:40:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fg7HW-0000P6-CG for grub-devel@gnu.org; Tue, 16 May 2006 17:40:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fg7HV-0000OY-SI for grub-devel@gnu.org; Tue, 16 May 2006 17:40:42 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fg7HV-0000ON-Mj for grub-devel@gnu.org; Tue, 16 May 2006 17:40:41 -0400 Received: from [155.198.117.152] (helo=crumpet.cpn.ee.ic.ac.uk) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fg7KE-00066w-6w for grub-devel@gnu.org; Tue, 16 May 2006 17:43:30 -0400 Received: from localhost ([127.0.0.1]) by crumpet.cpn.ee.ic.ac.uk with esmtp (Exim 4.44) id 1Fg7HT-0001cY-Ag for grub-devel@gnu.org; Tue, 16 May 2006 22:40:39 +0100 Message-ID: <446A46D5.7040704@imperial.ac.uk> Date: Tue, 16 May 2006 22:40:37 +0100 From: vincent guffens User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [patch 3/3] PCI support (simple test driver) 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: Tue, 16 May 2006 21:40:42 -0000 And here comes the last part, this test driver detects the ne2000 card in qemu. 2006-05-16 Vincent Guffens * drivers/net/: New directory. * conf/i386-pc.rmk (pkgdata_MODULES): Added test_driver.mod to the list of modules. (test_driver_mod_SOURCES): Added. (test_driver_mod_CFLAGS): Likewise. (test_driver_mod_LDFLAGS): Likewise. * driver/net/test_driver.c: New file. diff -rNu grub2-pci_etherboot/ChangeLog grub2-pci_test_driver/ChangeLog --- grub2-pci_etherboot/ChangeLog 2006-05-16 21:51:44.000000000 +0100 +++ grub2-pci_test_driver/ChangeLog 2006-05-16 21:52:08.000000000 +0100 @@ -1,5 +1,17 @@ 2006-05-16 Vincent Guffens + * drivers/net/: New directory. + + * conf/i386-pc.rmk (pkgdata_MODULES): Added test_driver.mod + to the list of modules. + (test_driver_mod_SOURCES): Added. + (test_driver_mod_CFLAGS): Likewise. + (test_driver_mod_LDFLAGS): Likewise. + + * driver/net/test_driver.c: New file. + +2006-05-16 Vincent Guffens + * drivers/include/etherboot/: New directory. * drivers/pci/i386/: Likewise. diff -rNu grub2-pci_etherboot/conf/i386-pc.rmk grub2-pci_test_driver/conf/i386-pc.rmk --- grub2-pci_etherboot/conf/i386-pc.rmk 2006-05-16 21:27:03.000000000 +0100 +++ grub2-pci_test_driver/conf/i386-pc.rmk 2006-05-16 21:39:54.000000000 +0100 @@ -117,7 +117,8 @@ pkgdata_MODULES = _chain.mod _linux.mod linux.mod normal.mod \ _multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod \ vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \ - videotest.mod play.mod pci.mod pci_etherboot.mod + videotest.mod play.mod pci.mod pci_etherboot.mod \ + test_driver.mod # For _chain.mod. _chain_mod_SOURCES = loader/i386/pc/chainloader.c @@ -220,4 +221,9 @@ pci_etherboot_mod_CFLAGS = $(COMMON_CFLAGS) $(DRIVERS_CFLAGS) pci_etherboot_mod_LDFLAGS = $(COMMON_LDFLAGS) +# For test_driver.mod +test_driver_mod_SOURCES = drivers/net/test_driver.c +test_driver_mod_CFLAGS = $(COMMON_CFLAGS) $(DRIVERS_CFLAGS) +test_driver_mod_LDFLAGS = $(COMMON_LDFLAGS) + include $(srcdir)/conf/common.mk diff -rNu grub2-pci_etherboot/drivers/net/test_driver.c grub2-pci_test_driver/drivers/net/test_driver.c --- grub2-pci_etherboot/drivers/net/test_driver.c 1970-01-01 01:00:00.000000000 +0100 +++ grub2-pci_test_driver/drivers/net/test_driver.c 2006-05-16 21:40:07.000000000 +0100 @@ -0,0 +1,40 @@ +#include +#include +#include +#include +#include + +static grub_err_t +test_driver_probe (grub_pci_device_t pdev __attribute__((unused))) +{ + /* Whah! if it was always so simple. */ + return GRUB_ERR_NONE; +} + +static struct grub_pci_ids test_driver_ids[] = +{ + {0x10ec, 0x8029, "realtek 8029 test"}, + {0x1186, 0x0300, "dlink-528"}, +}; + +static struct grub_pci_driver test_driver = +{ + .next = 0, + .type = GRUB_NET_ETHERNET, + .name = "Test driver", + .probe = test_driver_probe, + .ids = test_driver_ids, + .id_count = sizeof(test_driver_ids)/sizeof(test_driver_ids[0]), + .class = 0, /* could be PCI_CLASS_NETWORK_ETHERNET + for generic drivers */ +}; + +GRUB_MOD_INIT(test_driver) +{ + grub_register_pci_driver (&test_driver); +} + +GRUB_MOD_FINI(test_driver) +{ + grub_unregister_pci_driver (&test_driver); +} From MAILER-DAEMON Wed May 17 17:15:52 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FgTN1-0002Oc-RR for mharc-grub-devel@gnu.org; Wed, 17 May 2006 17:15:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FgTMz-0002MO-Jq for grub-devel@gnu.org; Wed, 17 May 2006 17:15:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FgTMx-0002Iv-2t for grub-devel@gnu.org; Wed, 17 May 2006 17:15:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgTMw-0002Ig-O2 for grub-devel@gnu.org; Wed, 17 May 2006 17:15:46 -0400 Received: from [24.25.9.100] (helo=ms-smtp-01.southeast.rr.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FgTPt-0006SA-8i for grub-devel@gnu.org; Wed, 17 May 2006 17:18:49 -0400 Received: from [192.168.16.101] (cpe-065-188-140-187.triad.res.rr.com [65.188.140.187]) by ms-smtp-01.southeast.rr.com (8.13.6/8.13.6) with ESMTP id k4HLFido014470 for ; Wed, 17 May 2006 17:15:45 -0400 (EDT) Message-ID: <446B9280.2060703@xacks.com> Date: Wed, 17 May 2006 17:15:44 -0400 From: David Johnson User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <20060512132007.GA88582@meta.morph.sk> <44662951.2050600@xacks.com> <20060514140124.GA9983@meta.morph.sk> In-Reply-To: <20060514140124.GA9983@meta.morph.sk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine Subject: Re: Debugging GRUB2 with GDB and QEMU 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: Wed, 17 May 2006 21:15:49 -0000 Thanks, I now have gdb running as I expect in my module. David Lubomir Kundrak wrote: > I noticed, that when any segment is 0 bytes long and starts > at 0x0, gdb desn't resolve symbols correctly. > I have motified the gmodule.pl to reflect this. > Please check an updated version. > > regards, > lubo > From MAILER-DAEMON Thu May 18 08:27:14 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fghb0-0005l3-Pi for mharc-grub-devel@gnu.org; Thu, 18 May 2006 08:27:14 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fghaz-0005kx-A7 for grub-devel@gnu.org; Thu, 18 May 2006 08:27:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fghax-0005kR-S1 for grub-devel@gnu.org; Thu, 18 May 2006 08:27:13 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fghax-0005kO-JN for grub-devel@gnu.org; Thu, 18 May 2006 08:27:11 -0400 Received: from [147.175.55.175] (helo=meta.morph.sk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fghe2-00038r-V5 for grub-devel@gnu.org; Thu, 18 May 2006 08:30:23 -0400 Received: by meta.morph.sk (Postfix, from userid 1018) id ADF16736; Thu, 18 May 2006 14:27:02 +0200 (CEST) Date: Thu, 18 May 2006 14:27:02 +0200 From: Lubomir Kundrak To: grub-devel@gnu.org Message-ID: <20060518122702.GA60590@meta.morph.sk> Mail-Followup-To: Lubomir Kundrak , grub-devel@gnu.org References: <20060512132007.GA88582@meta.morph.sk> <200605130638.26578.okuji@enbug.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200605130638.26578.okuji@enbug.org> User-Agent: Mutt/1.4.2.1i Subject: Re: Debugging GRUB2 with GDB and QEMU 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: Thu, 18 May 2006 12:27:13 -0000 On Sat, May 13, 2006 at 06:38:26AM +0200, Yoshinori K. Okuji wrote: > Message-Id: <200605130638.26578.okuji@enbug.org> > > Great! > > I guess it is necessary to compile the binary with -O0 or -O1 to get a > reasonable backtrace... I'd appreciate if you can write a HOWTO. :) On i386 GCC generates full stack frames even with -O optizations. It only omits frame pointer on architectures on which it doesn't interfere with debugging. I started a small HOWTO recently, so here is it: [1]. Enjoy :o) [1] http://NetBSD.sk/~lkundrak/misc/grub2-gdb/howto.html > > Okuji Lubo -- o Lubomir Kundrak *O* , http://skosi.org/~lkundrak/ (_) SKOSI -- Slovak OpenSource Initiative From MAILER-DAEMON Thu May 18 09:35:32 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fgif6-0000Ik-Jw for mharc-grub-devel@gnu.org; Thu, 18 May 2006 09:35:32 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fgif5-0000IC-81 for grub-devel@gnu.org; Thu, 18 May 2006 09:35:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fgif3-0000HY-7l for grub-devel@gnu.org; Thu, 18 May 2006 09:35:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fgif3-0000HU-4Z for grub-devel@gnu.org; Thu, 18 May 2006 09:35:29 -0400 Received: from [207.69.195.70] (helo=pop-borzoi.atl.sa.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fgii9-0000HQ-10 for grub-devel@gnu.org; Thu, 18 May 2006 09:38:41 -0400 Received: from user-0vvde2g.cable.mindspring.com ([63.246.184.80] helo=[192.168.0.103]) by pop-borzoi.atl.sa.earthlink.net with esmtp (Exim 3.36 #10) id 1Fgif1-0000tp-00 for grub-devel@gnu.org; Thu, 18 May 2006 09:35:27 -0400 From: Hollis Blanchard To: The development of GRUB 2 In-Reply-To: <20060518122702.GA60590@meta.morph.sk> References: <20060512132007.GA88582@meta.morph.sk> <200605130638.26578.okuji@enbug.org> <20060518122702.GA60590@meta.morph.sk> Content-Type: text/plain Date: Thu, 18 May 2006 08:35:25 -0500 Message-Id: <1147959325.23666.3.camel@diesel> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 (2.6.0-1) Content-Transfer-Encoding: 7bit Subject: Re: Debugging GRUB2 with GDB and QEMU 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: Thu, 18 May 2006 13:35:31 -0000 On Thu, 2006-05-18 at 14:27 +0200, Lubomir Kundrak wrote: > On Sat, May 13, 2006 at 06:38:26AM +0200, Yoshinori K. Okuji wrote: > > On i386 GCC generates full stack frames even with -O optizations. > It only omits frame pointer on architectures on which it doesn't > interfere with debugging. > > I started a small HOWTO recently, so here is it: [1]. Enjoy :o) > [1] http://NetBSD.sk/~lkundrak/misc/grub2-gdb/howto.html This looks like very interesting stuff, but wouldn't it be better to put this in the wiki? Please see http://grub.enbug.org. -Hollis From MAILER-DAEMON Thu May 18 19:55:47 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FgsLL-0005K0-Ic for mharc-grub-devel@gnu.org; Thu, 18 May 2006 19:55:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FgsLJ-0005JP-Op for grub-devel@gnu.org; Thu, 18 May 2006 19:55:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FgsLH-0005JD-Bp for grub-devel@gnu.org; Thu, 18 May 2006 19:55:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgsLH-0005JA-55 for grub-devel@gnu.org; Thu, 18 May 2006 19:55:43 -0400 Received: from [64.233.184.233] (helo=wr-out-0506.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FgsOT-0008Gy-4M for grub-devel@gnu.org; Thu, 18 May 2006 19:59:01 -0400 Received: by wr-out-0506.google.com with SMTP id 68so761165wra for ; Thu, 18 May 2006 16:55:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=FbQPTpZnVLPeOOYCxSwjVXJqJp4ubUqusCEIoVF0dCIFpyd4YVtNk+VPIlvZG67E6Vv280rTkXPRQcLlNK5uds0pR/DCwMfeUvOC7oVaLEYubCMEJJGnuXsspENXVJRI+hDFxwg1NibltfEu8RyDYi2fHMyKdpUoEhjg4BNMzxo= Received: by 10.64.185.17 with SMTP id i17mr727497qbf; Thu, 18 May 2006 16:55:42 -0700 (PDT) Received: by 10.64.48.2 with HTTP; Thu, 18 May 2006 16:55:42 -0700 (PDT) Message-ID: <5876e7e80605181655i13120caake5dfcdd0542e9f52@mail.gmail.com> Date: Thu, 18 May 2006 18:55:42 -0500 From: "=?ISO-8859-1?Q?Jes=FAs_Velazquez?=" To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_47626_14299474.1147996542410" Subject: Question regarding Grub2 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: Thu, 18 May 2006 23:55:46 -0000 ------=_Part_47626_14299474.1147996542410 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi guys: In a SMP machine, is it possible to execute code on another CPU other that the boot cpu?. How can it be accomplished? I'm doing some machine check testing and I created a module to read MSR, its work fine but I have to setup some machine checks registers on all cpus. But, As far as I concerned, the OS starts up the cpus on a SMP machine. How can It be possible in Grub2? Thanks. Jesus ------=_Part_47626_14299474.1147996542410 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi guys:

In a SMP machine, is it possible to execute code on another CPU other that the boot cpu?. How can it be accomplished?

I'm doing some machine check testing and I created a module to read MSR, its work fine but I have to setup some machine checks registers on all cpus. But, As far as I concerned, the OS starts up the cpus on a SMP machine. How can It be possible in Grub2?


Thanks.

Jesus

------=_Part_47626_14299474.1147996542410-- From MAILER-DAEMON Thu May 18 21:14:11 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FgtZD-00028z-MH for mharc-grub-devel@gnu.org; Thu, 18 May 2006 21:14:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FgtZC-00028M-6y for grub-devel@gnu.org; Thu, 18 May 2006 21:14:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FgtZ9-00027q-Ot for grub-devel@gnu.org; Thu, 18 May 2006 21:14:08 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgtZ9-00027n-Hq for grub-devel@gnu.org; Thu, 18 May 2006 21:14:07 -0400 Received: from [64.233.184.225] (helo=wr-out-0506.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FgtcM-0004na-HU for grub-devel@gnu.org; Thu, 18 May 2006 21:17:26 -0400 Received: by wr-out-0506.google.com with SMTP id 68so792384wra for ; Thu, 18 May 2006 18:14:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=KTotLXhI9ErCFnXNzgRc5J13crB34mmOsqNdFgLRg1iKNIiKOkqC4OENuDZvvEOajROe7i7nv+cz7O+32H4rY+F1iSklRz3Gugc8BZYHP6yMBftdL0OGrBo1OPGTCN47sb20Dp2Yo+mt81nK4+93LRqqVx9ft0ZKuoZVSmw04V4= Received: by 10.65.113.4 with SMTP id q4mr401949qbm; Thu, 18 May 2006 18:14:05 -0700 (PDT) Received: by 10.65.40.5 with HTTP; Thu, 18 May 2006 18:14:05 -0700 (PDT) Message-ID: <7ecfc990605181814t6026d81ex183cf43551ad5647@mail.gmail.com> Date: Fri, 19 May 2006 09:14:05 +0800 From: "lee shaver" To: "The development of GRUB 2" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: grub-mkimage cannot be found? 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, 19 May 2006 01:14:10 -0000 when I run grub-install(configure with --prefix=3D/usr) on my i386-pc, it report "/usr/sbin/grub-mkimage cannot be found". instead, this file is installed in path "/usr/bin". In the grub-install script: grub_mkimage=3D$(prefix)/sbin/grub-mkimage but in the files /conf/i386-pc.mk and /conf/i386-pc,rmk: bin_UTILITY=3Dgrub-mkimage sbin_UTILITY=3Dgrub-setup.... in the files i386-efi.[r]mk, like this. so, after I move grub-mkimage from bin_UTILITY to sbin_UTILITY and rebuild it, this error disappeared. From MAILER-DAEMON Fri May 19 06:17:10 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fh22g-0007Hx-0s for mharc-grub-devel@gnu.org; Fri, 19 May 2006 06:17:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fh22f-0007Hr-Fo for grub-devel@gnu.org; Fri, 19 May 2006 06:17:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fh22b-0007Ha-Oz for grub-devel@gnu.org; Fri, 19 May 2006 06:17:09 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fh22b-0007HX-MC for grub-devel@gnu.org; Fri, 19 May 2006 06:17:05 -0400 Received: from [147.175.55.175] (helo=meta.morph.sk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fh25t-0007aU-RN for grub-devel@gnu.org; Fri, 19 May 2006 06:20:30 -0400 Received: by meta.morph.sk (Postfix, from userid 1018) id D6E95731; Fri, 19 May 2006 12:16:58 +0200 (CEST) Date: Fri, 19 May 2006 12:16:58 +0200 From: Lubomir Kundrak To: The development of GRUB 2 Message-ID: <20060519101658.GC60590@meta.morph.sk> Mail-Followup-To: Lubomir Kundrak , The development of GRUB 2 References: <20060512132007.GA88582@meta.morph.sk> <200605130638.26578.okuji@enbug.org> <20060518122702.GA60590@meta.morph.sk> <1147959325.23666.3.camel@diesel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1147959325.23666.3.camel@diesel> User-Agent: Mutt/1.4.2.1i Subject: Re: Debugging GRUB2 with GDB and QEMU 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, 19 May 2006 10:17:09 -0000 On Thu, May 18, 2006 at 08:35:25AM -0500, Hollis Blanchard wrote: > > On Thu, 2006-05-18 at 14:27 +0200, Lubomir Kundrak wrote: > > On Sat, May 13, 2006 at 06:38:26AM +0200, Yoshinori K. Okuji wrote: > > > > On i386 GCC generates full stack frames even with -O optizations. > > It only omits frame pointer on architectures on which it doesn't > > interfere with debugging. > > > > I started a small HOWTO recently, so here is it: [1]. Enjoy :o) > > [1] http://NetBSD.sk/~lkundrak/misc/grub2-gdb/howto.html > > This looks like very interesting stuff, but wouldn't it be better to put > this in the wiki? Please see http://grub.enbug.org. > > -Hollis Yeah, I thought about it, but I don't have Internet connection at home, so I am unable to edit it in wiki when offline, so it's easier for me to have it as a standalone file. If anyone wants to change anything, I will accept a patch for that hapilly. -- o Lubomir Kundrak *O* , http://skosi.org/~lkundrak/ (_) SKOSI -- Slovak OpenSource Initiative From MAILER-DAEMON Fri May 19 07:23:41 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fh353-0006LV-8w for mharc-grub-devel@gnu.org; Fri, 19 May 2006 07:23:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fh351-0006JJ-4p for grub-devel@gnu.org; Fri, 19 May 2006 07:23:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fh34z-0006Ie-BN for grub-devel@gnu.org; Fri, 19 May 2006 07:23:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fh34z-0006Ib-8m for grub-devel@gnu.org; Fri, 19 May 2006 07:23:37 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fh38I-0004sb-0M for grub-devel@gnu.org; Fri, 19 May 2006 07:27:02 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 441873C827EBD for ; Fri, 19 May 2006 14:52:55 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 41F6D3C822FBC for ; Fri, 19 May 2006 14:52:48 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Fri, 19 May 2006 13:23:27 +0200 User-Agent: KMail/1.8.2 References: <7ecfc990605181814t6026d81ex183cf43551ad5647@mail.gmail.com> In-Reply-To: <7ecfc990605181814t6026d81ex183cf43551ad5647@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605191323.27515.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.497987, version=0.17.2 Subject: Re: grub-mkimage cannot be found? 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, 19 May 2006 11:23:39 -0000 On Friday 19 May 2006 03:14, lee shaver wrote: > when I run grub-install(configure with --prefix=/usr) on my i386-pc, > it report "/usr/sbin/grub-mkimage cannot be found". instead, this file > is installed in path "/usr/bin". > In the grub-install script: > grub_mkimage=$(prefix)/sbin/grub-mkimage > but in the files /conf/i386-pc.mk and /conf/i386-pc,rmk: > bin_UTILITY=grub-mkimage > sbin_UTILITY=grub-setup.... > in the files i386-efi.[r]mk, like this. Thank you for your report. I've fixed it right now. Okuji From MAILER-DAEMON Fri May 19 07:25:22 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fh36g-0007KE-Fh for mharc-grub-devel@gnu.org; Fri, 19 May 2006 07:25:22 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fh36e-0007K4-Rs for grub-devel@gnu.org; Fri, 19 May 2006 07:25:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fh36c-0007Gr-2z for grub-devel@gnu.org; Fri, 19 May 2006 07:25:20 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fh36b-0007Gi-TF for grub-devel@gnu.org; Fri, 19 May 2006 07:25:17 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fh39u-00050h-K1 for grub-devel@gnu.org; Fri, 19 May 2006 07:28:42 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 50ED83C827EBD; Fri, 19 May 2006 14:54:37 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id AB52B3C822FBC; Fri, 19 May 2006 14:54:35 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: Lubomir Kundrak , grub-devel@gnu.org Date: Fri, 19 May 2006 13:25:14 +0200 User-Agent: KMail/1.8.2 References: <20060512132007.GA88582@meta.morph.sk> <200605130638.26578.okuji@enbug.org> <20060518122702.GA60590@meta.morph.sk> In-Reply-To: <20060518122702.GA60590@meta.morph.sk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605191325.15043.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.499693, version=0.17.2 Cc: Subject: Re: Debugging GRUB2 with GDB and QEMU 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, 19 May 2006 11:25:21 -0000 On Thursday 18 May 2006 14:27, Lubomir Kundrak wrote: > On Sat, May 13, 2006 at 06:38:26AM +0200, Yoshinori K. Okuji wrote: > > Message-Id: <200605130638.26578.okuji@enbug.org> > > > > Great! > > > > I guess it is necessary to compile the binary with -O0 or -O1 to get a > > reasonable backtrace... I'd appreciate if you can write a HOWTO. :) > > On i386 GCC generates full stack frames even with -O optizations. > It only omits frame pointer on architectures on which it doesn't > interfere with debugging. The problem is not the frame pointers. With -Os, gcc inlines functions used only once. For example, grub_dl_add is eliminated in gcc 4.x. Okuji From MAILER-DAEMON Fri May 19 17:48:11 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FhCpP-0004Yf-47 for mharc-grub-devel@gnu.org; Fri, 19 May 2006 17:48:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FhCpN-0004Ya-9d for grub-devel@gnu.org; Fri, 19 May 2006 17:48:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FhCpK-0004YL-Ey for grub-devel@gnu.org; Fri, 19 May 2006 17:48:08 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FhCpK-0004YG-8J for grub-devel@gnu.org; Fri, 19 May 2006 17:48:06 -0400 Received: from [217.158.120.143] (helo=mail.ukfsn.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FhCsi-0000P6-MC for grub-devel@gnu.org; Fri, 19 May 2006 17:51:36 -0400 Received: from hardknott.home.whinlatter.ukfsn.org (84-45-213-194.no-dns-yet.enta.net [84.45.213.194]) by mail.ukfsn.org (Postfix) with ESMTP id 91FB7E710B for ; Fri, 19 May 2006 22:40:47 +0100 (BST) Received: from rleigh by hardknott.home.whinlatter.ukfsn.org with local (Exim 4.62) (envelope-from ) id 1FhCpG-0004Ag-EE for grub-devel@gnu.org; Fri, 19 May 2006 22:48:02 +0100 From: Roger Leigh To: The development of GRUB 2 References: <7ecfc990605181814t6026d81ex183cf43551ad5647@mail.gmail.com> <200605191323.27515.okuji@enbug.org> Date: Fri, 19 May 2006 22:47:59 +0100 In-Reply-To: <200605191323.27515.okuji@enbug.org> (Yoshinori K. Okuji's message of "Fri, 19 May 2006 13:23:27 +0200") Message-ID: <87hd3lznxs.fsf@hardknott.home.whinlatter.ukfsn.org> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: Re: grub-mkimage cannot be found? 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, 19 May 2006 21:48:09 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable "Yoshinori K. Okuji" writes: > On Friday 19 May 2006 03:14, lee shaver wrote: >> when I run grub-install(configure with --prefix=3D/usr) on my i386-pc, >> it report "/usr/sbin/grub-mkimage cannot be found". instead, this file >> is installed in path "/usr/bin". >> In the grub-install script: >> grub_mkimage=3D$(prefix)/sbin/grub-mkimage >> but in the files /conf/i386-pc.mk and /conf/i386-pc,rmk: >> bin_UTILITY=3Dgrub-mkimage >> sbin_UTILITY=3Dgrub-setup.... >> in the files i386-efi.[r]mk, like this. > > Thank you for your report. I've fixed it right now. This also needs fixing up in at least these two places for powerpc. Regards, Roger =2D-=20 Roger Leigh Printing on GNU/Linux? http://gutenprint.sourceforge.net/ Debian GNU/Linux http://www.debian.org/ GPG Public Key: 0x25BFB848. Please sign and encrypt your m= ail. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFEbj0SVcFcaSW/uEgRAh9mAJ41Klww9S8Zpn8Hum4zYPFVuP5pWQCePTIu jO6r9Qlfxyjw8R5pDz210UY= =FNMW -----END PGP SIGNATURE----- --=-=-=-- From MAILER-DAEMON Sat May 20 07:29:05 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FhPdp-0005L6-0u for mharc-grub-devel@gnu.org; Sat, 20 May 2006 07:29:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FhPdn-0005L1-PZ for grub-devel@gnu.org; Sat, 20 May 2006 07:29:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FhPdm-0005J6-BS for grub-devel@gnu.org; Sat, 20 May 2006 07:29:02 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FhPdm-0005Iv-4r for grub-devel@gnu.org; Sat, 20 May 2006 07:29:02 -0400 Received: from [194.109.24.33] (helo=smtp-vbr13.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FhPhI-0004iX-H9 for grub-devel@gnu.org; Sat, 20 May 2006 07:32:40 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr13.xs4all.nl (8.13.6/8.13.6) with ESMTP id k4KBT0aV038586 for ; Sat, 20 May 2006 13:29:00 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <1147008423.5354.1.camel@localhost> <40121130-B532-4E5C-9DC2-71E3178DF2D0@laposte.net> <87iro8ptet.wl%jeroen@vrijschrift.org> <200605141813.26370.okuji@enbug.org> From: Marco Gerards Date: Sat, 20 May 2006 13:31:38 +0200 In-Reply-To: <200605141813.26370.okuji@enbug.org> (Yoshinori K. Okuji's message of "Sun, 14 May 2006 18:13:26 +0200") Message-ID: <87y7wx3pb9.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: [PATCH] Give an error if curses isn't found 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, 20 May 2006 11:29:03 -0000 "Yoshinori K. Okuji" writes: > On Sunday 14 May 2006 16:34, Jeroen Dekkers wrote: >> We already check for it, but we just continue when we don't find >> it. Configure should abort when it doesn't find curses however. This >> patch gives you an error message when the curses library isn't >> found. > > I'm not sure if this is a good idea. Isn't it better to just skip the > compilation of grub-emu, since grub-emu is not really necessary? Marco, what > is your opinion? The only reason for grub-emu to exist is for debugging reasons. At least that is how I see it. It would be even better if grub-emu would not be compiled by default. -- Marco From MAILER-DAEMON Sat May 20 13:34:58 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FhVLu-0005Av-Bt for mharc-grub-devel@gnu.org; Sat, 20 May 2006 13:34:58 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FhVLs-00059I-DX for grub-devel@gnu.org; Sat, 20 May 2006 13:34:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FhVLr-00058L-A6 for grub-devel@gnu.org; Sat, 20 May 2006 13:34:55 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FhVLr-00058B-22 for grub-devel@gnu.org; Sat, 20 May 2006 13:34:55 -0400 Received: from [85.160.2.143] (helo=host0.dyn.jankratochvil.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FhVPP-0007Pj-Od for grub-devel@gnu.org; Sat, 20 May 2006 13:38:37 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.13.6/8.13.4) with ESMTP id k4KHYlKU003522; Sat, 20 May 2006 19:34:47 +0200 Received: (from lace@localhost) by host0.dyn.jankratochvil.net (8.13.6/8.13.6/Submit) id k4KHYjpO003516; Sat, 20 May 2006 19:34:45 +0200 Date: Sat, 20 May 2006 19:34:45 +0200 From: Jan Kratochvil To: grub-devel@gnu.org, johninsd@san.rr.com Message-ID: <20060520173445.GA2112@host0.dyn.jankratochvil.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: Jan Kolar Subject: [patch] Universal RAID1 safe BIOS booting 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, 20 May 2006 17:34:56 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, there is AFAIK no solution for safe booting from RAID1 devices such as in the typical case of two harddrives in a PC (Primary Master+Primary Slave or Primary Master+Secondary Master). Created a BIOS wrapper to automatically detect disk failure and swap 0x80<->0x81 reading so it applies to stage1/stage2/kernel/initrd/whatever loading. It was tested using QEMU patches simulating various disk failures. http://cvs.jankratochvil.net/viewcvs/biosautoraid/biosautoraid.tar.gz?tarball=1 http://cvs.jankratochvil.net/viewcvs/biosautoraid/README?rev=HEAD WHY: The loading of stage2 can be fixed only for 0x80 or 0x81 but there is never a foolproof choice. Sometimes the primary drive 0x80 dies while becoming unreadable, in some other cases it dies while disappearing from POST so 0x81 becomes 0x80. If you set 0x80 or 0x81 there are always some disk crash cases where the booting will fail. Fallback to the second drive during failure of the kernel load is AFAIK not possible with LILO and it is even a bit complicated to configure with GRUB. REQUIREMENTS: This solution is fully independent of the used loader. Either LILO or GRUB can be used, both have been tested. Just the sectors required for booting need to be exactly at the same sectors of both disks. This is satisfied with standard Linux-RAID devices /dev/md* if both disks are partitioned the same way. DISADVANTAGE: Currently it does not support LBA32 handling so you must install the boot stuff under the first 8GB. I have some draft LBA32 support done but it never got debugged/finished as there are no business needs for it. The whole swapping wrapper no longer fits into 1 sector so it needs its own stage2 loader (also with automatic drives swapping) etc. TESTING/DEBUGGING: Used the attached "block-limit.diff" QEMU patch, it is user unfriendly to use. SPONSORSHIP: Development paid by the courtesy of JK Labs s.r.o. Some integration into GRUB/LILO would be wised? Do you find it useful? Regards, Lace --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="block-limit.diff" Index: block-qcow.c =================================================================== RCS file: /sources/qemu/qemu/block-qcow.c,v retrieving revision 1.6 diff -u -p -r1.6 block-qcow.c --- block-qcow.c 18 Dec 2005 18:28:15 -0000 1.6 +++ block-qcow.c 27 Feb 2006 21:07:09 -0000 @@ -458,6 +458,15 @@ static int qcow_read(BlockDriverState *b int ret, index_in_cluster, n; uint64_t cluster_offset; + static BlockDriverState *bs_first=NULL; + if (!bs_first) + bs_first=bs; + if (bs==bs_first && sector_num) { +fprintf(stderr,"%p:%lld+%d: %s\n",bs,(long long)sector_num,nb_sectors,bs->filename); +puts("fail"); + return -1; + } + while (nb_sectors > 0) { cluster_offset = get_cluster_offset(bs, sector_num << 9, 0, 0, 0, 0); index_in_cluster = sector_num & (s->cluster_sectors - 1); Index: block.c =================================================================== RCS file: /sources/qemu/qemu/block.c,v retrieving revision 1.25 diff -u -p -r1.25 block.c --- block.c 18 Dec 2005 18:28:15 -0000 1.25 +++ block.c 27 Feb 2006 21:07:10 -0000 @@ -709,6 +709,25 @@ static int raw_read(BlockDriverState *bs BDRVRawState *s = bs->opaque; int ret; + static BlockDriverState *bs_first=NULL; + if (!bs_first) + bs_first=bs; + if (!strcmp(bs->filename,"/tmp/sda-head.bin") && bs==bs_first && sector_num) { +fprintf(stderr,"%p:%lld+%d: %s\n",bs,(long long)sector_num,nb_sectors,bs->filename); +puts("fail"); + return -1; + } +#if 0 + fprintf(stderr,"%p:%lld+%d: %s\n",bs,(long long)sector_num,nb_sectors,bs->filename); + if (!strcmp(bs->filename,"/tmp/sda-head.bin") && bs==bs_first && ((sector_num/63)&1)) { +puts("fail"); + return -1; + } + if (!strcmp(bs->filename,"/tmp/sda-head.bin") && bs!=bs_first && !((sector_num/63)&1)) { +puts("fail"); + return -1; + } +#endif lseek(s->fd, sector_num * 512, SEEK_SET); ret = read(s->fd, buf, nb_sectors * 512); if (ret != nb_sectors * 512) --5vNYLRcllDrimb99-- From MAILER-DAEMON Sun May 21 12:28:15 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fhqmt-0004aB-Do for mharc-grub-devel@gnu.org; Sun, 21 May 2006 12:28:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fhqms-0004a2-4m for grub-devel@gnu.org; Sun, 21 May 2006 12:28:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fhqmn-0004Zg-O7 for grub-devel@gnu.org; Sun, 21 May 2006 12:28:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fhqmn-0004Zd-IQ for grub-devel@gnu.org; Sun, 21 May 2006 12:28:09 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fhqqb-0007WG-5F for grub-devel@gnu.org; Sun, 21 May 2006 12:32:05 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id B882C3CAA6516 for ; Sun, 21 May 2006 19:58:26 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 8E44A3CAA6515 for ; Sun, 21 May 2006 19:58:26 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Sun, 21 May 2006 18:28:07 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605211828.07911.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.499848, version=0.17.2 Subject: bug and reaction about nested functions 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: Sun, 21 May 2006 16:28:14 -0000 Please add comments on this bug entry if you want to prohibit executable stacks: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27702 Okuji From MAILER-DAEMON Mon May 22 04:51:57 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fi68r-00061S-Hq for mharc-grub-devel@gnu.org; Mon, 22 May 2006 04:51:57 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fi68p-00060J-9N for grub-devel@gnu.org; Mon, 22 May 2006 04:51:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fi68n-0005zv-Jg for grub-devel@gnu.org; Mon, 22 May 2006 04:51:54 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fi68n-0005zs-Cs for grub-devel@gnu.org; Mon, 22 May 2006 04:51:53 -0400 Received: from [147.175.55.175] (helo=meta.morph.sk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fi6Ck-0007it-DT for grub-devel@gnu.org; Mon, 22 May 2006 04:55:58 -0400 Received: by meta.morph.sk (Postfix, from userid 1018) id 7A841734; Mon, 22 May 2006 10:51:47 +0200 (CEST) Date: Mon, 22 May 2006 10:51:46 +0200 From: Lubomir Kundrak To: grub-devel@gnu.org Message-ID: <20060522085146.GC70384@meta.morph.sk> Mail-Followup-To: Lubomir Kundrak , grub-devel@gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: Remote debugging GRUB over a serial line 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: Mon, 22 May 2006 08:51:55 -0000 Hi! For those who are interested, here's gdb remote stub for debugging over serial line. http://netbsd.sk/~lkundrak/misc/grub2-gdb/grub2-gdb-stub.diff This week I'll try to clean up the code, so don't expect it to be particularly good yet. I also added a paragraph on remote debugging to the howto http://netbsd.sk/~lkundrak/misc/grub2-gdb/howto.html -- o Lubomir Kundrak *O* , http://skosi.org/~lkundrak/ (_) SKOSI -- Slovak OpenSource Initiative From MAILER-DAEMON Mon May 22 09:57:31 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FiAuZ-0006sI-IN for mharc-grub-devel@gnu.org; Mon, 22 May 2006 09:57:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FiAuX-0006sD-IX for grub-devel@gnu.org; Mon, 22 May 2006 09:57:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FiAuV-0006s1-8O for grub-devel@gnu.org; Mon, 22 May 2006 09:57:28 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiAuV-0006ry-2Q for grub-devel@gnu.org; Mon, 22 May 2006 09:57:27 -0400 Received: from [194.109.24.30] (helo=smtp-vbr10.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FiAyU-0001AF-VF for grub-devel@gnu.org; Mon, 22 May 2006 10:01:35 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr10.xs4all.nl (8.13.6/8.13.6) with ESMTP id k4MDvJpx026841 for ; Mon, 22 May 2006 15:57:22 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <20060522085146.GC70384@meta.morph.sk> From: Marco Gerards Date: Mon, 22 May 2006 16:00:01 +0200 In-Reply-To: <20060522085146.GC70384@meta.morph.sk> (Lubomir Kundrak's message of "Mon, 22 May 2006 10:51:46 +0200") Message-ID: <87odxqma72.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: Remote debugging GRUB over a serial line 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: Mon, 22 May 2006 13:57:29 -0000 Lubomir Kundrak writes: Hi Lubomir, > For those who are interested, here's gdb remote stub > for debugging over serial line. > > http://netbsd.sk/~lkundrak/misc/grub2-gdb/grub2-gdb-stub.diff > > This week I'll try to clean up the code, so don't > expect it to be particularly good yet. When it is finished, could you please send the patch to the list (inline) and can you include a changelog entry? That will make it easier to get the patch applied. Thanks, Marco From MAILER-DAEMON Mon May 22 20:54:06 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FiL9y-0003aM-Da for mharc-grub-devel@gnu.org; Mon, 22 May 2006 20:54:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FiL9x-0003aH-H4 for grub-devel@gnu.org; Mon, 22 May 2006 20:54:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FiL9v-0003Zx-Qd for grub-devel@gnu.org; Mon, 22 May 2006 20:54:04 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiL9v-0003Zu-LY for grub-devel@gnu.org; Mon, 22 May 2006 20:54:03 -0400 Received: from [64.233.184.224] (helo=wr-out-0506.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FiLE1-0003dN-M1 for grub-devel@gnu.org; Mon, 22 May 2006 20:58:18 -0400 Received: by wr-out-0506.google.com with SMTP id 68so1949255wra for ; Mon, 22 May 2006 17:54:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=S5fqew7Aqf0wHEq/Z1c/UIZ0L4B9zB8h6lwt+i70ysNxGNesxVffGN2JxFQTmrU4/1II+/ztfHjf6UcbujaNYpJOkKV564/R2dEb2aUESvus/QoDdznVD+uM7/FU0pcw/e6PbFj2Ji2U2e+EQqaSdKORksl3vvKg5AGSnkFxXdY= Received: by 10.65.145.14 with SMTP id x14mr1427468qbn; Mon, 22 May 2006 17:54:02 -0700 (PDT) Received: by 10.65.40.12 with HTTP; Mon, 22 May 2006 17:54:02 -0700 (PDT) Message-ID: <7ecfc990605221754t735b2db4je8e80500a1a8f424@mail.gmail.com> Date: Tue, 23 May 2006 08:54:02 +0800 From: "lee shaver" To: "The development of GRUB 2" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: the 0.9X version grub.conf not be supported by 1.9X? 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: Tue, 23 May 2006 00:54:05 -0000 Hi,all. I have rebuild the lattest version grub in my FC3(with grub-0.95), after grub-install and reboot, I can't found the OS menu, but the shell interface comes. I have to use linux XXX initrd XXX boot to boot my OS. the old version grub.conf not be supported? then what is the new format config file? From MAILER-DAEMON Tue May 23 03:49:07 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FiRdb-00088V-NB for mharc-grub-devel@gnu.org; Tue, 23 May 2006 03:49:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FiRdZ-00087w-J2 for grub-devel@gnu.org; Tue, 23 May 2006 03:49:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FiRdX-00086a-RJ for grub-devel@gnu.org; Tue, 23 May 2006 03:49:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiRdX-00086O-Lw for grub-devel@gnu.org; Tue, 23 May 2006 03:49:03 -0400 Received: from [66.249.92.168] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FiRhi-000287-0L for grub-devel@gnu.org; Tue, 23 May 2006 03:53:22 -0400 Received: by ug-out-1314.google.com with SMTP id y2so1516470uge for ; Tue, 23 May 2006 00:49:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=myY7JneeBiPlE5cgzTpgT5Cs7b5fkmvEdelSCIhwJOA8shH1aByCEwfn9wQD0NJBwM1rPsUohdoBRdHd+HsqgGzpg5rushLQByxgkrIfirgi2WAlzVJq6Hzvxhe9IDtOq86168nS/5xR418LvxacLr1BrwKrGXKwSf22sPsPxiE= Received: by 10.78.23.16 with SMTP id 16mr1347427huw; Tue, 23 May 2006 00:49:02 -0700 (PDT) Received: by 10.78.46.20 with HTTP; Tue, 23 May 2006 00:49:02 -0700 (PDT) Message-ID: Date: Tue, 23 May 2006 10:49:02 +0300 From: "Ian Brown" To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: changing colors in grub.conf - please help ! 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: Tue, 23 May 2006 07:49:05 -0000 Hello, After looking at man pages of grub.conf, I had tried to change the colors in grub.conf but nothing worked. I added : color white/red yellow/green and rebooted ; but I don't see any red, green or yellow. As far as I understand it should had recognized these colors ! Regards, Rami From MAILER-DAEMON Tue May 23 06:45:54 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FiUOg-0005pK-8D for mharc-grub-devel@gnu.org; Tue, 23 May 2006 06:45:54 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FiUOe-0005os-FZ for grub-devel@gnu.org; Tue, 23 May 2006 06:45:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FiUOc-0005oD-PB for grub-devel@gnu.org; Tue, 23 May 2006 06:45:52 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FiUOc-0005o9-JI for grub-devel@gnu.org; Tue, 23 May 2006 06:45:50 -0400 Received: from [147.175.55.175] (helo=meta.morph.sk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FiUSo-0000UQ-2B for grub-devel@gnu.org; Tue, 23 May 2006 06:50:10 -0400 Received: by meta.morph.sk (Postfix, from userid 1018) id 41F91734; Tue, 23 May 2006 12:45:46 +0200 (CEST) Date: Tue, 23 May 2006 12:45:45 +0200 From: Lubomir Kundrak To: The development of GRUB 2 Message-ID: <20060523104545.GB12032@meta.morph.sk> Mail-Followup-To: Lubomir Kundrak , The development of GRUB 2 References: <20060522085146.GC70384@meta.morph.sk> <87odxqma72.fsf@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87odxqma72.fsf@xs4all.nl> User-Agent: Mutt/1.4.2.1i Subject: Re: Remote debugging GRUB over a serial line 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: Tue, 23 May 2006 10:45:52 -0000 On Mon, May 22, 2006 at 04:00:01PM +0200, Marco Gerards wrote: > From: Marco Gerards > Date: Mon, 22 May 2006 16:00:01 +0200 > In-Reply-To: <20060522085146.GC70384@meta.morph.sk> (Lubomir Kundrak's message > of "Mon, 22 May 2006 10:51:46 +0200") > Message-ID: <87odxqma72.fsf@xs4all.nl> > Subject: Re: Remote debugging GRUB over a serial line > > Lubomir Kundrak writes: > > Hi Lubomir, > > > For those who are interested, here's gdb remote stub > > for debugging over serial line. > > > > http://netbsd.sk/~lkundrak/misc/grub2-gdb/grub2-gdb-stub.diff > > > > This week I'll try to clean up the code, so don't > > expect it to be particularly good yet. > > When it is finished, could you please send the patch to the list > (inline) and can you include a changelog entry? That will make it > easier to get the patch applied. > > Thanks, > Marco So okay, I have tidied the code up a little, trying to comply with GNU coding standards & wrote a changelog entry. Here is it: 2006-05-23: Lubomir Kundrak * conf/i386-pc.rmk: Add serial and gdb modules to the list of modules to be built. * term/i386/pc/serial.c (serial_hw_put): Let some useful serial driver functions be exported. (grub_serial_getkey): Likewise * kern/dl.c (grub_dl_resolve_symbols): Let the trapvec symbol be resolved correctly (instead of 0). * gdb/cstub.c: New file. * gdb/gdb.c: New file. * gdb/i386/idt.c: New file. * gdb/i386/signal.c: New file. * gdb/i386/machdep.S: New file. * include/grub/gdb.h: New file. * include/grub/i386/gdb.h: New file. * include/grub/i386/pc/kernel.h: New file. * kern/i386/pc/startup.S: New file. diff -EbwBruN grub2.orig/conf/i386-pc.rmk grub2/conf/i386-pc.rmk --- grub2.orig/conf/i386-pc.rmk 2006-04-26 10:26:53.000000000 +0200 +++ grub2/conf/i386-pc.rmk 2006-05-23 00:01:43.000000000 +0200 @@ -116,7 +116,14 @@ pkgdata_MODULES = _chain.mod _linux.mod linux.mod normal.mod \ _multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod \ vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \ - videotest.mod play.mod + videotest.mod play.mod serial.mod gdb.mod + +# For gdb.mod. +gdb_mod_SOURCES = gdb/cstub.c gdb/gdb.c gdb/i386/idt.c \ + gdb/i386/machdep.S gdb/i386/signal.c +gdb_mod_CFLAGS = $(COMMON_CFLAGS) +gdb_mod_LDFLAGS = $(COMMON_LDFLAGS) +gdb_mod_ASFLAGS = $(COMMON_ASFLAGS) # For _chain.mod. _chain_mod_SOURCES = loader/i386/pc/chainloader.c diff -EbwBruN grub2.orig/gdb/cstub.c grub2/gdb/cstub.c --- grub2.orig/gdb/cstub.c 1970-01-01 01:00:00.000000000 +0100 +++ grub2/gdb/cstub.c 2006-05-22 23:59:24.000000000 +0200 @@ -0,0 +1,362 @@ +/* cstub.c - machine independent portion of remote GDB stub */ +/* + * Copyright (C) 2006 Lubomir Kundrak + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include + +static const char hexchars[] = "0123456789abcdef"; +int grub_gdb_regs[GRUB_MACHINE_NR_REGS]; + +#define GRUB_GDB_COMBUF_SIZE 400 /* At least sizeof(grub_gdb_regs)*2 are needed for + register packets. */ +static char grub_gdb_inbuf[GRUB_GDB_COMBUF_SIZE]; +static char grub_gdb_outbuf[GRUB_GDB_COMBUF_SIZE]; + +int (*grub_gdb_getchar) (); +void (*grub_gdb_putchar) (int); + +static int +hex (ch) + char ch; +{ + if ((ch >= 'a') && (ch <= 'f')) + return (ch - 'a' + 10); + if ((ch >= '0') && (ch <= '9')) + return (ch - '0'); + if ((ch >= 'A') && (ch <= 'F')) + return (ch - 'A' + 10); + return (-1); +} + +/* Scan for the sequence $#. */ +static char * +grub_gdb_getpacket (void) +{ + char *buffer = &grub_gdb_inbuf[0]; + unsigned char checksum; + unsigned char xmitcsum; + int count; + char ch; + + while (1) + { + /* Wait around for the start character, ignore all other + characters. */ + while ((ch = grub_gdb_getchar ()) != '$'); + + retry: + checksum = 0; + xmitcsum = -1; + count = 0; + + /* Now read until a # or end of buffer is found. */ + while (count < GRUB_GDB_COMBUF_SIZE) + { + ch = grub_gdb_getchar (); + if (ch == '$') + goto retry; + if (ch == '#') + break; + checksum += ch; + buffer[count] = ch; + count = count + 1; + } + buffer[count] = 0; + + if (ch == '#') + { + ch = grub_gdb_getchar (); + xmitcsum = hex (ch) << 4; + ch = grub_gdb_getchar (); + xmitcsum += hex (ch); + + if (checksum != xmitcsum) + { + grub_dprintf ("gdb", + "bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n", + checksum, xmitcsum, buffer); + grub_gdb_putchar ('-'); /* Failed checksum. */ + } + else + { + grub_gdb_putchar ('+'); /* Successful transfer. */ + + /* If a sequence char is present, reply the sequence ID. */ + if (buffer[2] == ':') + { + grub_gdb_putchar (buffer[0]); + grub_gdb_putchar (buffer[1]); + + return &buffer[3]; + } + return &buffer[0]; + } + } + } +} + +/* Send the packet in buffer. */ +static void +grub_gdb_putpacket (char *buffer) +{ + unsigned char checksum; + int count; + char ch; + + /* $#. */ + do + { + grub_gdb_putchar ('$'); + checksum = 0; + count = 0; + + while ((ch = buffer[count])) + { + grub_gdb_putchar (ch); + checksum += ch; + count += 1; + } + + grub_gdb_putchar ('#'); + grub_gdb_putchar (hexchars[checksum >> 4]); + grub_gdb_putchar (hexchars[checksum % 16]); + } + while (grub_gdb_getchar () != '+'); +} + +/* Convert the memory pointed to by mem into hex, placing result in buf. + Return a pointer to the last char put in buf (NULL). */ +static char * +grub_gdb_mem2hex (char *mem, char *buf, int count) +{ + int i; + unsigned char ch; + + for (i = 0; i < count; i++) + { + ch = *mem++; + *buf++ = hexchars[ch >> 4]; + *buf++ = hexchars[ch % 16]; + } + *buf = 0; + return (buf); +} + +/* Convert the hex array pointed to by buf into binary to be placed in mem. + Return a pointer to the character after the last byte written. */ +static char * +grub_gdb_hex2mem (char *buf, char *mem, int count) +{ + int i; + unsigned char ch; + + for (i = 0; i < count; i++) + { + ch = hex (*buf++) << 4; + ch = ch + hex (*buf++); + *mem++ = ch; + } + return (mem); +} + +/* Convert hex characters to int and return the number of characters + processed. */ +static int +grub_gdb_hex2int (char **ptr, int *int_value) +{ + int num_chars = 0; + int hex_value; + + *int_value = 0; + + while (**ptr) + { + hex_value = hex (**ptr); + if (hex_value >= 0) + { + *int_value = (*int_value << 4) | hex_value; + num_chars++; + } + else + break; + + (*ptr)++; + } + + return (num_chars); +} + +/* This function does all command procesing for interfacing to gdb. */ +void +grub_gdb_trap (int trap_no) +{ + int sig_no; + int stepping; + int addr; + int length; + char *ptr; + int newPC; + + sig_no = grub_gdb_trap2sig (trap_no); + + ptr = grub_gdb_outbuf; + + /* Reply to host that an exception has occurred. */ + + *ptr++ = 'T'; /* Notify gdb with signo, PC, FP and SP. */ + + *ptr++ = hexchars[sig_no >> 4]; + *ptr++ = hexchars[sig_no & 0xf]; + + /* Stack pointer. */ + *ptr++ = hexchars[SP]; + *ptr++ = ':'; + ptr = grub_gdb_mem2hex ((char *) &grub_gdb_regs[ESP], ptr, 4); + *ptr++ = ';'; + + /* Frame pointer. */ + *ptr++ = hexchars[FP]; + *ptr++ = ':'; + ptr = grub_gdb_mem2hex ((char *) &grub_gdb_regs[EBP], ptr, 4); + *ptr++ = ';'; + + /* Program counter. */ + *ptr++ = hexchars[PC]; + *ptr++ = ':'; + ptr = grub_gdb_mem2hex ((char *) &grub_gdb_regs[PC], ptr, 4); + *ptr++ = ';'; + + *ptr = '\0'; + + grub_gdb_putpacket (grub_gdb_outbuf); + + stepping = 0; + + while (1 == 1) + { + grub_gdb_outbuf[0] = 0; + ptr = grub_gdb_getpacket (); + + switch (*ptr++) + { + case '?': + grub_gdb_outbuf[0] = 'S'; + grub_gdb_outbuf[1] = hexchars[sig_no >> 4]; + grub_gdb_outbuf[2] = hexchars[sig_no % 16]; + grub_gdb_outbuf[3] = 0; + break; + + /* Return values of the CPU registers. */ + case 'g': + grub_gdb_mem2hex ((char *) grub_gdb_regs, grub_gdb_outbuf, + sizeof (grub_gdb_regs)); + break; + + /* Set values of the CPU registers -- return OK. */ + case 'G': + grub_gdb_hex2mem (ptr, (char *) grub_gdb_regs, + sizeof (grub_gdb_regs)); + grub_strcpy (grub_gdb_outbuf, "OK"); + break; + + /* Set the value of a single CPU register -- return OK. */ + case 'P': + { + int regno; + + if (grub_gdb_hex2int (&ptr, ®no) && *ptr++ == '=') + if (regno >= 0 && regno < GRUB_MACHINE_NR_REGS) + { + grub_gdb_hex2mem (ptr, (char *) &grub_gdb_regs[regno], 4); + grub_strcpy (grub_gdb_outbuf, "OK"); + break; + } + grub_strcpy (grub_gdb_outbuf, "E01"); + break; + } + + /* mAA..AA,LLLL: Read LLLL bytes at address AA..AA. */ + case 'm': + /* Try to read %x,%x. Set ptr = 0 if successful. */ + if (grub_gdb_hex2int (&ptr, &addr)) + if (*(ptr++) == ',') + if (grub_gdb_hex2int (&ptr, &length)) + { + ptr = 0; + grub_gdb_mem2hex ((char *) addr, grub_gdb_outbuf, length); + } + if (ptr) + { + grub_strcpy (grub_gdb_outbuf, "E01"); + } + break; + + /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA -- return OK. */ + case 'M': + /* Try to read %x,%x. Set ptr = 0 if successful. */ + if (grub_gdb_hex2int (&ptr, &addr)) + if (*(ptr++) == ',') + if (grub_gdb_hex2int (&ptr, &length)) + if (*(ptr++) == ':') + { + grub_gdb_hex2mem (ptr, (char *) addr, length); + grub_strcpy (grub_gdb_outbuf, "OK"); + ptr = 0; + } + if (ptr) + { + grub_strcpy (grub_gdb_outbuf, "E02"); + } + break; + + /* sAA..AA: Step one instruction from AA..AA(optional). */ + case 's': + stepping = 1; + + /* cAA..AA: Continue at address AA..AA(optional). */ + case 'c': + /* try to read optional parameter, pc unchanged if no parm */ + if (grub_gdb_hex2int (&ptr, &addr)) + grub_gdb_regs[PC] = addr; + + newPC = grub_gdb_regs[PC]; + + /* Clear the trace bit. */ + grub_gdb_regs[PS] &= 0xfffffeff; + + /* Set the trace bit if we're stepping. */ + if (stepping) + grub_gdb_regs[PS] |= 0x100; + + return; + break; + + /* Kill the program. */ + case 'k': + /* Do nothing. */ + return; + break; + } + + /* Reply to the request. */ + grub_gdb_putpacket (grub_gdb_outbuf); + } +} + diff -EbwBruN grub2.orig/gdb/gdb.c grub2/gdb/gdb.c --- grub2.orig/gdb/gdb.c 1970-01-01 01:00:00.000000000 +0100 +++ grub2/gdb/gdb.c 2006-05-23 00:01:15.000000000 +0200 @@ -0,0 +1,61 @@ +/* gdb.c - gdb remote stub module */ +/* + * Copyright (C) 2003 Free Software Foundation, Inc. + * Copyright (C) 2006 Lubomir Kundrak + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern int grub_serial_getkey (); +extern void serial_hw_put (int); + +static grub_err_t +grub_cmd_break (struct grub_arg_list *state __attribute__ ((unused)), + int argc __attribute__ ((unused)), + char **args __attribute__ ((unused))) +{ + grub_printf ("Now connect the remote debugger, please.\n"); + grub_gdb_breakpoint (); + return 0; +} + +GRUB_MOD_INIT (gdb) +{ + (void) mod; /* To stop warning. */ + + grub_gdb_getchar = &grub_serial_getkey; + grub_gdb_putchar = &serial_hw_put; + + grub_gdb_idtinit (); + grub_register_command ("break", grub_cmd_break, GRUB_COMMAND_FLAG_BOTH, + "break", "Break into debugger", 0); +} + +GRUB_MOD_FINI (gdb) +{ + grub_unregister_command ("break"); + /* FIXME: restore old IDTR. */ +} + diff -EbwBruN grub2.orig/gdb/i386/idt.c grub2/gdb/i386/idt.c --- grub2.orig/gdb/i386/idt.c 1970-01-01 01:00:00.000000000 +0100 +++ grub2/gdb/i386/idt.c 2006-05-23 07:34:50.000000000 +0200 @@ -0,0 +1,61 @@ +/* idt.c - routines for constructing IDT fot the GDB stub */ +/* + * Copyright (C) 2006 Lubomir Kundrak + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include + +struct gate grub_gdb_idt[GRUB_GDB_LAST_TRAP + 1]; + +/* Sets up a gate descriptor in the IDT table. */ +static void +grub_idt_gate (struct gate *gate, void (*offset) (), int selector, + int type, int dpl) +{ + gate->offset_lo = (int) offset & 0xffff; + gate->selector = selector & 0xffff; + gate->xx = 0; + gate->type = type & 0x1f; + gate->dpl = dpl & 0x3; + gate->present = 1; + gate->offset_hi = ((int) offset >> 16) & 0xffff; +} + +/* Set up interrupt and trap handler descriptors in IDT. */ +void +grub_gdb_idtinit () +{ + int i; + struct region r; + + for (i = 0; i <= GRUB_GDB_LAST_TRAP; i++) + { + grub_idt_gate (&grub_gdb_idt[i], + grub_gdb_trapvec[i], + GRUB_MEMORY_MACHINE_PROT_MODE_CSEG, + GRUB_CPU_TRAP_GATE, 0); + } + + r.base = (int) grub_gdb_idt; + r.limit = sizeof (grub_gdb_idt) - 1; + + grub_idt_load (&r); +} + diff -EbwBruN grub2.orig/gdb/i386/machdep.S grub2/gdb/i386/machdep.S --- grub2.orig/gdb/i386/machdep.S 1970-01-01 01:00:00.000000000 +0100 +++ grub2/gdb/i386/machdep.S 2006-05-22 23:25:24.000000000 +0200 @@ -0,0 +1,193 @@ +/* machdep.S - machine dependent assembly routines for the GDB stub */ +/* + * Copyright (C) 2006 Lubomir Kundrak + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#define ASM 1 +#include + +#define EC_PRESENT 1 +#define EC_ABSENT 0 + +#define GRUB_GDB_STACKSIZE 40000 + +/* + * The .data index for the address vector. + */ + +#define VECTOR 1 + +.globl grub_gdb_trap +.globl grub_gdb_regs + +.data +.globl grub_gdb_stack +.space GRUB_GDB_STACKSIZE +grub_gdb_stack: + +/* + * Supplemental macros for register saving/restoration + * on exception handler entry/leave. + */ + +.macro save32 reg ndx + movl \reg, grub_gdb_regs+(\ndx * 4) +.endm + +.macro save16 reg ndx + mov $0, %eax + movw \reg, grub_gdb_regs+(\ndx * 4) + movw %ax, grub_gdb_regs+(\ndx * 4 + 2) + movl grub_gdb_regs+(EAX * 4), %eax +.endm + +.macro load32 ndx reg + movl grub_gdb_regs+(\ndx * 4), \reg +.endm + +.macro load16 ndx reg + movw grub_gdb_regs+(\ndx * 4), \reg +.endm + +.macro save_context + save32 %eax EAX + save32 %ecx ECX + save32 %edx EDX + save32 %ebx EBX + save32 %ebp EBP + save32 %esi ESI + save32 %edi EDI + + popl %ebx + save32 %ebx EIP + popl %ebx + save32 %ebx CS + popl %ebx + save32 %ebx EFLAGS + + save32 %esp ESP + + save16 %ds DS + save16 %es ES + save16 %fs FS + save16 %gs GS + save16 %ss SS +.endm + +.macro load_context + load16 SS %ss + load32 ESP %esp + + load32 EBP %ebp + load32 ESI %esi + load32 EDI %edi + + load16 DS %ds + load16 ES %es + load16 FS %fs + load16 GS %gs + + load32 EFLAGS %eax + pushl %eax + load32 CS %eax + pushl %eax + load32 EIP %eax + pushl %eax + + load32 EBX %ebx + load32 EDX %edx + load32 ECX %ecx + load32 EAX %eax +.endm + +/* + * This macro creates handlers for a given range of exception numbers + * and adds their addresses to the grub_gdb_trapvec array. + */ + +.macro ent ec beg end=0 + + /* + * Wrapper body itself. + */ + + .text +1: + .if \ec + add $4,%esp + .endif + + save_context + mov $grub_gdb_stack, %esp + mov $\beg, %eax /* trap number */ + call grub_gdb_trap + load_context + iret + + /* + * Address entry in trapvec array. + */ + + .data VECTOR + .long 1b + + /* + * Next... (recursion). + */ + + .if \end-\beg > 0 + ent \ec "(\beg+1)" \end + .endif +.endm + +/* + * Here does the actual construction of the address array and handlers + * take place. + */ + +.data VECTOR +.globl grub_gdb_trapvec +grub_gdb_trapvec: + ent EC_ABSENT 0 7 + ent EC_PRESENT 8 + ent EC_ABSENT 9 + ent EC_PRESENT 10 14 + /* + * You may have to split this further or as(1) + * will complain about nesting being too deep. + */ + ent EC_ABSENT 15 GRUB_GDB_LAST_TRAP + +/* + * Random stuff + */ + +.text +.globl grub_gdb_breakpoint +grub_gdb_breakpoint: + int $3 + ret + +.globl grub_idt_load +grub_idt_load: + lidt (%eax) + ret + +.end + +OMG, Bunnies! + diff -EbwBruN grub2.orig/gdb/i386/signal.c grub2/gdb/i386/signal.c --- grub2.orig/gdb/i386/signal.c 1970-01-01 01:00:00.000000000 +0100 +++ grub2/gdb/i386/signal.c 2006-05-23 07:36:13.000000000 +0200 @@ -0,0 +1,53 @@ +/* idt.c - routines for constructing IDT fot the GDB stub */ +/* + * Copyright (C) 2006 Lubomir Kundrak + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include + +/* Converting CPU trap number to UNIX signal number as + described in System V ABI i386 Processor Supplement, 3-25. */ +int +grub_gdb_trap2sig (int trap_no) +{ + int signals[] = { + SIGFPE, /* 0: Divide error fault */ + SIGTRAP, /* 1: Single step trap fault */ + SIGABRT, /* 2: # Nonmaskable interrupt */ + SIGTRAP, /* 3: Breakpoint trap */ + SIGSEGV, /* 4: Overflow trap */ + SIGSEGV, /* 5: Bounds check fault */ + SIGILL, /* 6: Invalid opcode fault */ + SIGFPE, /* 7: No coprocessor fault */ + SIGABRT, /* 8: # Double fault abort */ + SIGSEGV, /* 9: Coprocessor overrun abort */ + SIGSEGV, /* 10: Invalid TSS fault */ + SIGSEGV, /* 11: Segment not present fault */ + SIGSEGV, /* 12: Stack exception fault */ + SIGSEGV, /* 13: General protection fault abort */ + SIGSEGV, /* 14: Page fault */ + SIGABRT, /* 15: (reserved) */ + SIGFPE, /* 16: Coprocessor error fault */ + SIGUSR1 /* other */ + }; + + return signals[trap_no < 17 ? trap_no : 17]; +} + diff -EbwBruN grub2.orig/include/grub/gdb.h grub2/include/grub/gdb.h --- grub2.orig/include/grub/gdb.h 1970-01-01 01:00:00.000000000 +0100 +++ grub2/include/grub/gdb.h 2006-05-23 00:00:15.000000000 +0200 @@ -0,0 +1,38 @@ +/* gdb.h - Various definitions for the remote GDB stub */ +/* + * Copyright (C) 2006 Lubomir Kundrak + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef GRUB_GDB_HEADER +#define GRUB_GDB_HEADER 1 + +#define SIGFPE 8 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGSEGV 11 +#define SIGILL 4 +#define SIGUSR1 30 +/* We probably don't need other ones. */ + +extern int (*grub_gdb_getchar) (); +extern void (*grub_gdb_putchar) (int); + +void grub_gdb_breakpoint (); +int grub_gdb_trap2sig (int); + +#endif /* ! GRUB_GDB_HEADER */ + diff -EbwBruN grub2.orig/include/grub/i386/gdb.h grub2/include/grub/i386/gdb.h --- grub2.orig/include/grub/i386/gdb.h 1970-01-01 01:00:00.000000000 +0100 +++ grub2/include/grub/i386/gdb.h 2006-05-23 07:34:06.000000000 +0200 @@ -0,0 +1,80 @@ +/* i386/gdb.h - i386 specific definitions for the remote GDB stub */ +/* + * Copyright (C) 2006 Lubomir Kundrak + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef GRUB_GDB_CPU_HEADER +#define GRUB_GDB_CPU_HEADER 1 + +#define GRUB_GDB_LAST_TRAP 31 +/* You may have to edit the bottom of machdep.S when adjusting + GRUB_GDB_LAST_TRAP. */ +#define GRUB_MACHINE_NR_REGS 16 + +#define EAX 0 +#define ECX 1 +#define EDX 2 +#define EBX 3 +#define ESP 4 +#define EBP 5 +#define ESI 6 +#define EDI 7 +#define EIP 8 +#define EFLAGS 9 +#define CS 10 +#define SS 11 +#define DS 12 +#define ES 13 +#define FS 14 +#define GS 15 + +#define PC EIP +#define FP EBP +#define SP ESP +#define PS EFLAGS + +#ifndef ASM + +#include + +#define GRUB_CPU_TRAP_GATE 15 + +struct gate +{ + unsigned offset_lo:16; + unsigned selector:16; + unsigned xx:8; + unsigned type:5; /* GRUB_CPU_TRAP_GATE */ + unsigned dpl:2; + unsigned present:1; + unsigned offset_hi:16; +} __attribute__ ((packed)); + +struct region +{ + unsigned limit:16; + unsigned base:32; +} __attribute__ ((packed)); + +extern void (*grub_gdb_trapvec[]) (); +extern void grub_gdb_breakpoint (); +extern void grub_idt_load (struct region *); +extern void grub_gdb_idtinit (); + +#endif /* ! ASM */ +#endif /* ! GRUB_GDB_CPU_HEADER */ + diff -EbwBruN grub2.orig/include/grub/i386/pc/kernel.h grub2/include/grub/i386/pc/kernel.h --- grub2.orig/include/grub/i386/pc/kernel.h 2006-04-26 10:09:07.000000000 +0200 +++ grub2/include/grub/i386/pc/kernel.h 2006-05-22 07:49:51.000000000 +0200 @@ -39,7 +39,7 @@ #define GRUB_KERNEL_MACHINE_PREFIX 0x1c /* The size of the first region which won't be compressed. */ -#define GRUB_KERNEL_MACHINE_RAW_SIZE 0x4A0 +#define GRUB_KERNEL_MACHINE_RAW_SIZE 0x4BC #ifndef ASM_FILE diff -EbwBruN grub2.orig/kern/dl.c grub2/kern/dl.c --- grub2.orig/kern/dl.c 2006-04-26 10:09:08.000000000 +0200 +++ grub2/kern/dl.c 2006-05-22 23:53:37.000000000 +0200 @@ -353,16 +353,18 @@ { case STT_NOTYPE: /* Resolve a global symbol. */ - if (sym->st_name != 0 && sym->st_shndx == 0) + if (sym->st_name == 0) + break; + + if (sym->st_shndx == 0) /* external */ { sym->st_value = (Elf_Addr) grub_dl_resolve_symbol (name); if (! sym->st_value) return grub_error (GRUB_ERR_BAD_MODULE, "the symbol `%s' not found", name); - } - else - sym->st_value = 0; break; + } + /* nonexternal, same as STT_OBJECT */ case STT_OBJECT: sym->st_value += (Elf_Addr) grub_dl_get_section_addr (mod, diff -EbwBruN grub2.orig/kern/i386/pc/startup.S grub2/kern/i386/pc/startup.S --- grub2.orig/kern/i386/pc/startup.S 2006-05-06 22:29:42.000000000 +0200 +++ grub2/kern/i386/pc/startup.S 2006-05-22 07:49:51.000000000 +0200 @@ -332,6 +332,14 @@ .word 0x27 /* limit */ .long gdt /* addr */ +/* IDT region descriptors */ +prot_idt: + .word 0xffff /* limit */ + .long 0x0 /* addr */ + +real_idt: + .word 0xffff /* limit */ + .long 0x0 /* addr */ /* * These next two routines, "real_to_prot" and "prot_to_real" are structured @@ -381,6 +389,8 @@ /* zero %eax */ xorl %eax, %eax + lidt prot_idt + /* return on the old (or initialized) stack! */ ret @@ -389,6 +399,9 @@ /* just in case, set GDT */ lgdt gdtdesc + sidt prot_idt + lidt real_idt + /* save the protected mode stack */ movl %esp, %eax movl %eax, protstack diff -EbwBruN grub2.orig/term/i386/pc/serial.c grub2/term/i386/pc/serial.c --- grub2.orig/term/i386/pc/serial.c 2006-04-26 10:09:08.000000000 +0200 +++ grub2/term/i386/pc/serial.c 2006-05-22 07:49:51.000000000 +0200 @@ -93,7 +93,7 @@ } /* Fetch a key. */ -static int +int serial_hw_fetch (void) { if (inb (serial_settings.port + UART_LSR) & UART_DATA_READY) @@ -103,7 +103,7 @@ } /* Put a chararacter. */ -static void +void serial_hw_put (const int c) { unsigned int timeout = 100000; @@ -261,7 +261,7 @@ } /* The serial version of getkey. */ -static int +int grub_serial_getkey (void) { int c; -- o Lubomir Kundrak *O* , http://skosi.org/~lkundrak/ (_) SKOSI -- Slovak OpenSource Initiative From MAILER-DAEMON Wed May 24 23:32:39 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fj6aV-00084Z-7r for mharc-grub-devel@gnu.org; Wed, 24 May 2006 23:32:39 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fj6aT-00084L-R0 for grub-devel@gnu.org; Wed, 24 May 2006 23:32:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fj6aT-000842-5S for grub-devel@gnu.org; Wed, 24 May 2006 23:32:37 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fj6aT-00083w-04 for grub-devel@gnu.org; Wed, 24 May 2006 23:32:37 -0400 Received: from [66.160.141.149] (helo=luna) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fj6f2-0000Xo-TY for grub-devel@gnu.org; Wed, 24 May 2006 23:37:21 -0400 Received: from p4 (Kingston-HSE-ppp3563402.sympatico.ca [65.93.95.45]) by luna (Postfix) with ESMTP id CF8B0C7A21 for ; Wed, 24 May 2006 23:32:35 -0400 (EDT) Message-ID: <002901c67fab$ddb416a0$da01a8c0@p4> From: "John S." To: Date: Wed, 24 May 2006 23:32:34 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0026_01C67F8A.558DD250" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: GUI Work 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: Thu, 25 May 2006 03:32:38 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0026_01C67F8A.558DD250 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am interested in getting involved with GRUB and was wondering what = work has been done on implementing a GUI for GRUB 2. If anyone is working on it right now, could you please let me know how I = can help. Thanks, John S. ------=_NextPart_000_0026_01C67F8A.558DD250 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 I am interested in getting involved with GRUB and was = wondering what=20 work has been done on implementing a GUI for GRUB 2.
If anyone is working on it right now, could you please let me know = how I=20 can help.

Thanks,
John S.
------=_NextPart_000_0026_01C67F8A.558DD250-- From MAILER-DAEMON Thu May 25 05:31:57 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FjCCD-0003iB-Id for mharc-grub-devel@gnu.org; Thu, 25 May 2006 05:31:57 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FjCCB-0003hw-Ca for grub-devel@gnu.org; Thu, 25 May 2006 05:31:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FjCCA-0003hg-3y for grub-devel@gnu.org; Thu, 25 May 2006 05:31:55 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjCC9-0003hd-Vs for grub-devel@gnu.org; Thu, 25 May 2006 05:31:54 -0400 Received: from [157.24.2.30] (helo=smtp1.cc.lut.fi) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjCGn-0007Nw-C6 for grub-devel@gnu.org; Thu, 25 May 2006 05:36:41 -0400 Received: from localhost (smtp1 [127.0.0.1]) by smtp1.cc.lut.fi (Postfix) with ESMTP id C256E70198 for ; Thu, 25 May 2006 12:31:52 +0300 (EEST) Received: from smtp1.cc.lut.fi ([127.0.0.1]) by localhost (smtp1.cc.lut.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 21323-03 for ; Thu, 25 May 2006 12:31:52 +0300 (EEST) Received: from [192.168.1.100] (lk4-a-4-1.lnet.lut.fi [157.24.102.107]) by smtp1.cc.lut.fi (Postfix) with ESMTP id 54D6F7015E for ; Thu, 25 May 2006 12:31:51 +0300 (EEST) Message-ID: <4475798D.4040407@nic.fi> Date: Thu, 25 May 2006 12:31:57 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: The development of GRUB 2 References: <002901c67fab$ddb416a0$da01a8c0@p4> In-Reply-To: <002901c67fab$ddb416a0$da01a8c0@p4> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: by lut.fi Content-Transfer-Encoding: quoted-printable Subject: Re: GUI Work 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: Thu, 25 May 2006 09:31:56 -0000 John S. wrote: > I am interested in getting involved with GRUB and was wondering what > work has been done on implementing a GUI for GRUB 2. > If anyone is working on it right now, could you please let me know how = I > can help. Hi, I have been doing preparations for it by introducing Video API to GRUB 2 (http://grub.enbug.org/VideoSubsystem). It is still being fine tuned, but basic design of the GUI could be started by now. If you search archives from this mailing list you can notice some messages about it. Here are some links that you should check out: http://lists.gnu.org/archive/html/grub-devel/2006-04/msg00056.html http://lists.gnu.org/archive/html/grub-devel/2006-05/msg00008.html Thanks, Vesa J=E4=E4skel=E4inen From MAILER-DAEMON Thu May 25 11:23:34 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FjHgU-00061H-L5 for mharc-grub-devel@gnu.org; Thu, 25 May 2006 11:23:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FjHgS-0005yv-8S for grub-devel@gnu.org; Thu, 25 May 2006 11:23:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FjHgQ-0005x4-1Z for grub-devel@gnu.org; Thu, 25 May 2006 11:23:31 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjHgP-0005ww-RS for grub-devel@gnu.org; Thu, 25 May 2006 11:23:29 -0400 Received: from [147.175.55.175] (helo=meta.morph.sk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjHl6-000346-Me for grub-devel@gnu.org; Thu, 25 May 2006 11:28:20 -0400 Received: by meta.morph.sk (Postfix, from userid 1018) id 0DFF8734; Thu, 25 May 2006 17:23:28 +0200 (CEST) Date: Thu, 25 May 2006 17:23:28 +0200 From: Lubomir Kundrak To: The development of GRUB 2 Message-ID: <20060525152328.GD12032@meta.morph.sk> Mail-Followup-To: Lubomir Kundrak , The development of GRUB 2 References: <20060522085146.GC70384@meta.morph.sk> <87odxqma72.fsf@xs4all.nl> <20060523104545.GB12032@meta.morph.sk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060523104545.GB12032@meta.morph.sk> User-Agent: Mutt/1.4.2.1i Subject: Re: Remote debugging GRUB over a serial line 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: Thu, 25 May 2006 15:23:32 -0000 Uff, I made a mistake -- of course following two files were wrongly described as newly added in the changelog. I am sorry for that: * include/grub/i386/pc/kernel.h: (GRUB_KERNEL_MACHINE_RAW_SIZE): Portion of uncopressible code grew a bit. * kern/i386/pc/startup.S: (real_idt, prot_idt) (real_to_prot, prot_to_real): Preservation of protected mode IDT in real mode calls -- o Lubomir Kundrak *O* , http://skosi.org/~lkundrak/ (_) SKOSI -- Slovak OpenSource Initiative From MAILER-DAEMON Thu May 25 20:34:48 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FjQHw-0004QA-G6 for mharc-grub-devel@gnu.org; Thu, 25 May 2006 20:34:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FjQHu-0004Ne-PJ for grub-devel@gnu.org; Thu, 25 May 2006 20:34:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FjQHs-0004N6-8t for grub-devel@gnu.org; Thu, 25 May 2006 20:34:45 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjQHs-0004N3-41 for grub-devel@gnu.org; Thu, 25 May 2006 20:34:44 -0400 Received: from [66.160.141.149] (helo=luna) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjQMe-0005ta-7u for grub-devel@gnu.org; Thu, 25 May 2006 20:39:40 -0400 Received: from [141.117.174.128] (unknown [141.117.174.128]) by luna (Postfix) with ESMTP id D7555C7A21 for ; Thu, 25 May 2006 20:34:39 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <4475798D.4040407@nic.fi> References: <002901c67fab$ddb416a0$da01a8c0@p4> <4475798D.4040407@nic.fi> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <31A7CB00-4E1A-485D-922A-606650A8F410@rockymedia.ca> Content-Transfer-Encoding: quoted-printable From: "John S." Date: Thu, 25 May 2006 20:34:38 -0400 To: The development of GRUB 2 X-Mailer: Apple Mail (2.746.2) Subject: Re: GUI Work 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, 26 May 2006 00:34:47 -0000 I'm trying to get myself started in all of this, but I have a ton of =20 questions. You'll have to forgive me if they are obvious, but this =20 is my first time looking at the grub source. Also I have never written code this low-level (on a PC) before. My =20 most relevant experience would probably be writing some ms-dos games, =20= which is similar but I'm assuming theres a ton of differences. So =20 please forgive me if I don't know all of the concepts yet. So here are the questions: How much of the video API has been written? What exactly does the file vbe.c do? I'm assuming it implements a =20 VESA BIOS Extension interface that we can use when writing the API =20 functions. Please correct me if I'm wrong. Also how much work is =20 required on this set of code? If the API has already been started which file is it in? if it has =20 not, which file should be created for it? how about /video/i386/pc/=20 api.c ? A ton of questions I know, but I'm a fast learner and should be =20 caught up soon enough. On 25-May-06, at 5:31 AM, Vesa J=E4=E4skel=E4inen wrote: > John S. wrote: >> I am interested in getting involved with GRUB and was wondering what >> work has been done on implementing a GUI for GRUB 2. >> If anyone is working on it right now, could you please let me know =20= >> how I >> can help. > > Hi, > > I have been doing preparations for it by introducing Video API to =20 > GRUB 2 > (http://grub.enbug.org/VideoSubsystem). It is still being fine tuned, > but basic design of the GUI could be started by now. > > If you search archives from this mailing list you can notice some > messages about it. Here are some links that you should check out: > > http://lists.gnu.org/archive/html/grub-devel/2006-04/msg00056.html > http://lists.gnu.org/archive/html/grub-devel/2006-05/msg00008.html > > Thanks, > Vesa J=E4=E4skel=E4inen > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel From MAILER-DAEMON Thu May 25 21:25:09 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FjR4f-0007mr-5p for mharc-grub-devel@gnu.org; Thu, 25 May 2006 21:25:09 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FjR4d-0007k5-8H for grub-devel@gnu.org; Thu, 25 May 2006 21:25:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FjR4X-0007i4-80 for grub-devel@gnu.org; Thu, 25 May 2006 21:25:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjR4W-0007ha-VC for grub-devel@gnu.org; Thu, 25 May 2006 21:25:01 -0400 Received: from [212.27.42.29] (helo=smtp3-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjR9H-0000sf-Dn for grub-devel@gnu.org; Thu, 25 May 2006 21:29:57 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp3-g19.free.fr (Postfix) with ESMTP id B933747F35; Fri, 26 May 2006 03:24:52 +0200 (CEST) From: =?iso-8859-1?Q?Eric_Salom=E9?= To: "'The development of GRUB 2'" Date: Fri, 26 May 2006 03:24:53 +0200 Message-ID: <000001c68063$3132d390$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal In-Reply-To: <000a01c67470$a2c4bf40$0b00a8c0@yoda> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Cc: Subject: grub-emu : Dynamic loading of modules & GDB interface 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, 26 May 2006 01:25:07 -0000 Hi Lubomir, Marco, Hi Folks, I've come to a "steady" point on my work about grub-emu dynamic loading of modules. I am open to new ideas as they come. Your comments are welcomed. Here are the diff from grub 1.93 relating all the changes I have made so far. Some may be useful to others. Fell free to add them to grub if needed. (1) - Enable dynamically loading of modules in grub-emu for the i386-pc. (2) - Provide changes for GDB to operate properly when loading modules in grub-emu. GRUB/GDB interface for dynamic loading of modules. (I believe that there is a few line changes that would be helpful for Lubomir Kundrak scripts. At least those few in dl.c that store the name of each ELF section in mod->seg->name when loading modules). See also Nota Bene. (3) - Add two or three functions I needed for other modules. You might not need those changes. (4) - Minor/Other changes You can browse the changes looking at "FILE" at start of line. or searching for (1), (2), (3), (4) tokens or look for "Nota Bene". There is one file outside Grub distribution (see FILE gdb-6.1/gdb/solib-svr4.c) Have a nice day. Best Regards, Eric Salom=E9 - Paris, France PS: Is there anyone working on bringing a VBE interface to grub-emu ? FILE conf/i386-pc.rmk (1) grub-emu includes kern/i386/dl.c and symlist2.c to be able to properly load modules. (1) I don't think it possible to dyn load modules in grub-emu with functions passing parameters in registers. So I compile without related options and I have adapted ASM files (those I know of) for both cases. Note that it still is possible later to do a final build run before/after distribution with the -mrtd -mregparm=3D3 options. So that everybody is happy (I hope). #define REGPARM is used in ASM files to let them know they are been compiled with or without passing parameters in registers. (see setjmp.S for an example). (1),(2) Add compile options for different cases (2) file kern/dl-gdb.c (NEW) is an example of grub_gdb...() functions (GRUB/GDB interface for dynamically loading of modules) to build "module.elf 0x321213 -s .data 0x321435 ..." string in mod->elf for example, or to send a "signal" to gdb to advertize for loads /unloads of modules. diff -EbwBruN ./conf/i386-pc.rmk ../../src/grub-1.93/conf/i386-pc.rmk --- ./conf/i386-pc.rmk 2005-12-25 16:59:50.000000000 +0100 +++ ../../src/grub-1.93/conf/i386-pc.rmk 2006-05-25 17:20:24.000000000 +0200 @@ -1,7 +1,25 @@ # -*- makefile -*- =20 +# For final built, passing parameters in registers +# That's about 2 % shorter code, and may be 10 % faster. + +#COMMON_ASFLAGS =3D -nostdinc -fno-builtin -DREGPARM +#COMMON_CFLAGS =3D -fno-builtin -mrtd -mregparm=3D3 -m32 + +# For building grub-emu to be run with a modified GDB (6.1) that allows +# ELF sections to be loaded at non-contigus memory locations + COMMON_ASFLAGS =3D -nostdinc -fno-builtin -COMMON_CFLAGS =3D -fno-builtin -mrtd -mregparm=3D3 -m32 +COMMON_CFLAGS =3D -fno-builtin -m32 -DGRUB_COMPAT_GDB + +# For standard building of grub-emu when no modified GDB is available +# See following links for help in debugging with GRUB / GDB +# http://NetBSD.sk/~lkundrak/misc/grub2-gdb/howto.html + +#COMMON_ASFLAGS =3D -nostdinc -fno-builtin +#COMMON_CFLAGS =3D -fno-builtin -m32=20 + + COMMON_LDFLAGS =3D -melf_i386 =20 # Images. @@ -89,6 +107,7 @@ fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/hfsplus.c \ io/gzio.c \ kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c \ + kern/dl-gdb.c \ normal/execute.c kern/file.c kern/fs.c normal/lexer.c \ kern/loader.c kern/main.c kern/misc.c kern/parser.c \ grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c \ @@ -99,8 +118,9 @@ partmap/acorn.c partmap/gpt.c \ util/console.c util/grub-emu.c util/misc.c \ util/i386/pc/biosdisk.c util/i386/pc/getroot.c \ - util/i386/pc/misc.c grub_emu_init.c + util/i386/pc/misc.c grub_emu_init.c kern/i386/dl.c symlist2.c =20 +grub_emu_CFLAGS =3D $(COMMON_CFLAGS) grub_emu_LDFLAGS =3D $(LIBCURSES) =20 FILE normal/i386/setjmp.S (1) Now use the #define REGPARM to tell if parameters are expected in registers, or in the stack. diff -EbwBruN ./normal/i386/setjmp.S ../../src/grub-1.93/normal/i386/setjmp.S --- ./normal/i386/setjmp.S 2004-04-04 15:46:03.000000000 +0200 +++ ../../src/grub-1.93/normal/i386/setjmp.S 2006-05-08 23:14:41.000000000 +0200 @@ -27,6 +27,9 @@ * int grub_setjmp (grub_jmp_buf env) */ FUNCTION(grub_setjmp) +#ifndef REGPARM + movl 4(%esp), %eax /* Get Param */ +#endif movl %ebx, 0(%eax) /* EBX */ movl %esi, 4(%eax) /* ESI */ movl %edi, 8(%eax) /* EDI */ @@ -42,6 +45,10 @@ * int grub_longjmp (grub_jmp_buf env, int val) */ FUNCTION(grub_longjmp) +#ifndef REGPARM + movl 4(%esp), %eax /* Get Param */ + movl 8(%esp), %edx /* Get Param */ +#endif movl 0(%eax), %ebx movl 4(%eax), %esi movl 8(%eax), %edi FILE kern/i386/pc/startup.S (1) ASM file moved to startup.S.regparm A new ASM file is also provided startup.S.memparm to be used when you compile without -mrtd -mregparm=3D3 options. =20 diff -EbwBruN ./kern/i386/pc/startup.S ../../src/grub-1.93/kern/i386/pc/startup.S --- ./kern/i386/pc/startup.S 2005-10-15 19:28:36.000000000 +0200 +++ ../../src/grub-1.93/kern/i386/pc/startup.S 2006-05-08 23:11:49.000000000 +0200 @@ -17,2154 +17,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ =20 +#ifdef REGPARM +#include "startup.S.regparm" +#else +#include "startup.S.memparm" +#endif =20 -/* - * Note: These functions defined in this file may be called from C. - * Be careful of that you must not modify some registers. Quote - * from gcc-2.95.2/gcc/config/i386/i386.h: -=09 - 1 for registers not available across function calls. - These must include the FIXED_REGISTERS and also any - registers that can be used without being saved. - The latter must include the registers where values are returned - and the register where structure-value addresses are passed. - Aside from that, you can include as many other registers as you like. - - ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg -{ 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } - */ - -/* - * Note: GRUB is compiled with the options -mrtd and -mregparm=3D3. - * So the first three arguments are passed in %eax, %edx, and %ecx, - * respectively, and if a function has a fixed number of arguments - * and the number if greater than three, the function must return - * with "ret $N" where N is ((the number of arguments) - 3) * 4. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - =09 -#define ABS(x) ((x) - EXT_C(start) + GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200) -=09 - .file "startup.S" - - .text - - /* Tell GAS to generate 16-bit instructions so that this code works - in real mode. */ - .code16 - - .globl start, _start -start: -_start: - /* - * Guarantee that "main" is loaded at 0x0:0x8200. - */ - ljmp $0, $ABS(codestart) - - /* - * Compatibility version number - * - * These MUST be at byte offset 6 and 7 of the executable - * DO NOT MOVE !!! - */ - . =3D EXT_C(start) + 0x6 - .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR - - /* - * This is a special data area 8 bytes from the beginning. - */ - - . =3D EXT_C(start) + 0x8 - -VARIABLE(grub_total_module_size) - .long 0 -VARIABLE(grub_kernel_image_size) - .long 0 -VARIABLE(grub_compressed_size) - .long 0 -VARIABLE(grub_install_dos_part) - .long 0xFFFFFFFF -VARIABLE(grub_install_bsd_part) - .long 0xFFFFFFFF -VARIABLE(grub_prefix) - .string "/boot/grub" - - /* - * Leave some breathing room for the prefix. - */ - - . =3D EXT_C(start) + 0x50 - -/* - * Support for booting GRUB from a Multiboot boot loader (e.g. GRUB itself). - * This uses the a.out kludge to load raw binary to the area starting at 1MB, - * and relocates itself after loaded. - */ -multiboot_header: - /* magic */ - .long 0x1BADB002 - /* flags */ - .long (1 << 16) - /* checksum */ - .long -0x1BADB002 - (1 << 16) - /* header addr */ - .long multiboot_header - _start + 0x100000 + 0x200 - /* load addr */ - .long 0x100000 - /* load end addr */ - .long 0 - /* bss end addr */ - .long 0 - /* entry addr */ - .long multiboot_entry - _start + 0x100000 + 0x200 -=09 -multiboot_entry: - .code32 - /* obtain the boot device */ - movl 12(%ebx), %edx - - /* relocate the code */ - movl $(GRUB_KERNEL_MACHINE_RAW_SIZE + 0x200), %ecx - addl EXT_C(grub_compressed_size) - _start + 0x100000 + 0x200, %ecx - movl $0x100000, %esi - movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %edi - cld - rep - movsb - /* jump to the real address */ - movl $multiboot_trampoline, %eax - jmp *%eax -=09 -multiboot_trampoline: - /* fill the boot information */ - movl %edx, %eax - shrl $8, %eax - xorl %ebx, %ebx - cmpb $0xFF, %ah - je 1f - movb %ah, %bl - movl %ebx, EXT_C(grub_install_dos_part) -1: - cmpb $0xFF, %al - je 2f - movb %al, %bl - movl %ebx, EXT_C(grub_install_bsd_part) -2: - shrl $24, %edx - /* enter the usual booting */ - call prot_to_real - .code16 -=09 -/* the real mode code continues... */ -codestart: - cli /* we're not safe here! */ - - /* set up %ds, %ss, and %es */ - xorw %ax, %ax - movw %ax, %ds - movw %ax, %ss - movw %ax, %es - - /* set up the real mode/BIOS stack */ - movl $GRUB_MEMORY_MACHINE_REAL_STACK, %ebp - movl %ebp, %esp - - sti /* we're safe again */ - - /* save boot drive reference */ - ADDR32 movb %dl, EXT_C(grub_boot_drive) - - /* reset disk system (%ah =3D 0) */ - int $0x13 -=09 - /* transition to protected mode */ - DATA32 call real_to_prot - - /* The ".code32" directive takes GAS out of 16-bit mode. */ - .code32 - - incl %eax - call EXT_C(grub_gate_a20) -=09 - /* decompress the compressed part and put the result at 1MB */ - movl $0x100000, %esi - movl $(START_SYMBOL + GRUB_KERNEL_MACHINE_RAW_SIZE), %edi - - pushl %esi - pushl EXT_C(grub_compressed_size) - pushl %edi - call lzo1x_decompress - addl $12, %esp - - /* copy back the decompressed part */ - movl %eax, %ecx - cld - rep - movsb - - /* copy modules before cleaning out the bss */ - movl EXT_C(grub_total_module_size), %ecx - movl EXT_C(grub_kernel_image_size), %esi - addl %ecx, %esi - addl $START_SYMBOL, %esi - decl %esi - movl $END_SYMBOL, %edi - addl %ecx, %edi - decl %edi - std - rep - movsb -=09 - /* clean out the bss */ - movl $BSS_START_SYMBOL, %edi - - /* compute the bss length */ - movl $END_SYMBOL, %ecx - subl %edi, %ecx - =09 - /* clean out */ - xorl %eax, %eax - cld - rep - stosb -=09 - /* - * Call the start of main body of C code. - */ - call EXT_C(grub_main) - - -/* - * This is the area for all of the special variables. - */ - - .p2align 2 /* force 4-byte alignment */ - -protstack: - .long GRUB_MEMORY_MACHINE_PROT_STACK - -VARIABLE(grub_boot_drive) - .long 0 - -VARIABLE(grub_start_addr) - .long START_SYMBOL - -VARIABLE(grub_end_addr) - .long END_SYMBOL -=09 -VARIABLE(grub_apm_bios_info) - .word 0 /* version */ - .word 0 /* cseg */ - .long 0 /* offset */ - .word 0 /* cseg_16 */ - .word 0 /* dseg_16 */ - .word 0 /* cseg_len */ - .word 0 /* cseg_16_len */ - .word 0 /* dseg_16_len */ -=09 -/* - * This is the Global Descriptor Table - * - * An entry, a "Segment Descriptor", looks like this: - * - * 31 24 19 16 7 0 - * ------------------------------------------------------------ - * | | |B| |A| | | |1|0|E|W|A| | - * | BASE 31..24 |G|/|L|V| LIMIT |P|DPL| TYPE | BASE 23:16 | 4 - * | | |D| |L| 19..16| | |1|1|C|R|A| | - * ------------------------------------------------------------ - * | | | - * | BASE 15..0 | LIMIT 15..0 | 0 - * | | | - * ------------------------------------------------------------ - * - * Note the ordering of the data items is reversed from the above - * description. - */ - - .p2align 2 /* force 4-byte alignment */ -gdt: - .word 0, 0 - .byte 0, 0, 0, 0 - - /* -- code segment -- - * base =3D 0x00000000, limit =3D 0xFFFFF (4 KiB Granularity), present - * type =3D 32bit code execute/read, DPL =3D 0 - */ - .word 0xFFFF, 0 - .byte 0, 0x9A, 0xCF, 0 - - /* -- data segment -- - * base =3D 0x00000000, limit 0xFFFFF (4 KiB Granularity), present - * type =3D 32 bit data read/write, DPL =3D 0=20 - */ - .word 0xFFFF, 0 - .byte 0, 0x92, 0xCF, 0 - - /* -- 16 bit real mode CS -- - * base =3D 0x00000000, limit 0x0FFFF (1 B Granularity), present - * type =3D 16 bit code execute/read only/conforming, DPL =3D 0 - */ - .word 0xFFFF, 0 - .byte 0, 0x9E, 0, 0 - - /* -- 16 bit real mode DS -- - * base =3D 0x00000000, limit 0x0FFFF (1 B Granularity), present - * type =3D 16 bit data read/write, DPL =3D 0 - */ - .word 0xFFFF, 0 - .byte 0, 0x92, 0, 0 - - -/* this is the GDT descriptor */ -gdtdesc: - .word 0x27 /* limit */ - .long gdt /* addr */ - -=09 -/* - * These next two routines, "real_to_prot" and "prot_to_real" are structured - * in a very specific way. Be very careful when changing them. - * - * NOTE: Use of either one messes up %eax and %ebp. - */ - -real_to_prot: - .code16 - cli - - /* load the GDT register */ - DATA32 ADDR32 lgdt gdtdesc - - /* turn on protected mode */ - movl %cr0, %eax - orl $GRUB_MEMORY_MACHINE_CR0_PE_ON, %eax - movl %eax, %cr0 - - /* jump to relocation, flush prefetch queue, and reload %cs */ - DATA32 ljmp $GRUB_MEMORY_MACHINE_PROT_MODE_CSEG, $protcseg - - .code32 -protcseg: - /* reload other segment registers */ - movw $GRUB_MEMORY_MACHINE_PROT_MODE_DSEG, %ax - movw %ax, %ds - movw %ax, %es - movw %ax, %fs - movw %ax, %gs - movw %ax, %ss - - /* put the return address in a known safe location */ - movl (%esp), %eax - movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK - - /* get protected mode stack */ - movl protstack, %eax - movl %eax, %esp - movl %eax, %ebp - - /* get return address onto the right stack */ - movl GRUB_MEMORY_MACHINE_REAL_STACK, %eax - movl %eax, (%esp) - - /* zero %eax */ - xorl %eax, %eax - - /* return on the old (or initialized) stack! */ - ret - - -prot_to_real: - /* just in case, set GDT */ - lgdt gdtdesc - - /* save the protected mode stack */ - movl %esp, %eax - movl %eax, protstack - - /* get the return address */ - movl (%esp), %eax - movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK - - /* set up new stack */ - movl $GRUB_MEMORY_MACHINE_REAL_STACK, %eax - movl %eax, %esp - movl %eax, %ebp - - /* set up segment limits */ - movw $GRUB_MEMORY_MACHINE_PSEUDO_REAL_DSEG, %ax - movw %ax, %ds - movw %ax, %es - movw %ax, %fs - movw %ax, %gs - movw %ax, %ss - - /* this might be an extra step */ - /* jump to a 16 bit segment */ - ljmp $GRUB_MEMORY_MACHINE_PSEUDO_REAL_CSEG, $tmpcseg - -tmpcseg: - .code16 - - /* clear the PE bit of CR0 */ - movl %cr0, %eax - andl $(~GRUB_MEMORY_MACHINE_CR0_PE_ON), %eax - movl %eax, %cr0 - - /* flush prefetch queue, reload %cs */ - DATA32 ljmp $0, $realcseg - -realcseg: - /* we are in real mode now - * set up the real mode segment registers : DS, SS, ES - */ - /* zero %eax */ - xorl %eax, %eax - - movw %ax, %ds - movw %ax, %es - movw %ax, %fs - movw %ax, %gs - movw %ax, %ss - - /* restore interrupts */ - sti - - /* return on new stack! */ - DATA32 ret - - .code32 - - -/* - * grub_gate_a20(int on) - * - * Gate address-line 20 for high memory. - * - * This routine is probably overconservative in what it does, but so what? - * - * It also eats any keystrokes in the keyboard buffer. :-( - */ - -FUNCTION(grub_gate_a20) - movl %eax, %edx - -gate_a20_test_current_state:=09 - /* first of all, test if already in a good state */ - call gate_a20_check_state - cmpb %al, %dl - jnz gate_a20_try_bios - ret - -gate_a20_try_bios: - /* second, try a BIOS call */ - pushl %ebp - call prot_to_real - - .code16 - movw $0x2400, %ax - testb %dl, %dl - jz 1f - incw %ax -1: int $0x15 - - DATA32 call real_to_prot - .code32 - - popl %ebp - call gate_a20_check_state - cmpb %al, %dl - jnz gate_a20_try_keyboard_controller - ret -=09 -gate_a20_flush_keyboard_buffer: - inb $0x64 - andb $0x02, %al - jnz gate_a20_flush_keyboard_buffer -2:=09 - inb $0x64 - andb $0x01, %al - jz 3f - inb $0x60 - jmp 2b -3: - ret -=09 -gate_a20_try_keyboard_controller:=09 - /* third, try the keyboard controller */ - call gate_a20_flush_keyboard_buffer - - movb $0xd1, %al - outb $0x64 -4:=09 - inb $0x64 - andb $0x02, %al - jnz 4b - - movb $0xdd, %al - testb %dl, %dl - jz 5f - orb $0x02, %al -5: outb $0x60 - call gate_a20_flush_keyboard_buffer - - /* output a dummy command (USB keyboard hack) */ - movb $0xff, %al - outb $0x64 - call gate_a20_flush_keyboard_buffer - - call gate_a20_check_state - cmpb %al, %dl - jnz gate_a20_try_system_control_port_a - ret - -gate_a20_try_system_control_port_a: - /* fourth, try the system control port A */ - inb $0x92 - andb $(~0x03), %al - testb %dl, %dl - jz 6f - orb $0x02, %al -6: outb $0x92 - - /* When turning off Gate A20, do not check the state strictly, - because a failure is not fatal usually, and Gate A20 is always - on some modern machines. */ - testb %dl, %dl - jz 7f=09 - call gate_a20_check_state - cmpb %al, %dl - /* everything failed, so restart from the beginning */ - jnz gate_a20_try_bios -7: ret -=09 -gate_a20_check_state: - /* iterate the checking for a while */ - movl $100, %ecx -1:=09 - call 3f - cmpb %al, %dl - jz 2f - loop 1b -2: - ret -3:=09 - pushl %ebx - pushl %ecx - xorl %eax, %eax - /* compare the byte at 0x8000 with that at 0x108000 */ - movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %ebx - pushl %ebx - /* save the original byte in CL */ - movb (%ebx), %cl - /* store the value at 0x108000 in AL */ - addl $0x100000, %ebx - movb (%ebx), %al - /* try to set one less value at 0x8000 */ - popl %ebx - movb %al, %ch - decb %ch - movb %ch, (%ebx) - /* serialize */ - outb %al, $0x80 - outb %al, $0x80 - /* obtain the value at 0x108000 in CH */ - pushl %ebx - addl $0x100000, %ebx - movb (%ebx), %ch - /* this result is 1 if A20 is on or 0 if it is off */ - subb %ch, %al - xorb $1, %al - /* restore the original */ - popl %ebx - movb %cl, (%ebx) - popl %ecx - popl %ebx - ret - -#include "lzo1x.S" - - -/* - * This call is special... it never returns... in fact it should simply - * hang at this point! - */ - -FUNCTION(grub_stop) - call prot_to_real - - /* - * This next part is sort of evil. It takes advantage of the - * byte ordering on the x86 to work in either 16-bit or 32-bit - * mode, so think about it before changing it. - */ - -FUNCTION(grub_hard_stop) - hlt - jmp EXT_C(grub_hard_stop) - - -/* - * grub_stop_floppy() - * - * Stop the floppy drive from spinning, so that other software is - * jumped to with a known state. - */ -FUNCTION(grub_stop_floppy) - movw $0x3F2, %dx - xorb %al, %al - outb %al, %dx - ret - -/* - * grub_reboot() - * - * Reboot the system. At the moment, rely on BIOS. - */ -FUNCTION(grub_reboot) - call prot_to_real - .code16 - /* cold boot */ - movw $0x0472, %di - movw %ax, (%di) - ljmp $0xFFFF, $0x0000 - .code32 -=09 -/* - * grub_halt(int no_apm) - * - * Halt the system, using APM if possible. If NO_APM is true, don't use - * APM even if it is available. - */ -FUNCTION(grub_halt) - /* see if zero */ - testl %eax, %eax - jnz EXT_C(grub_stop) - - call prot_to_real - .code16 -=09 - /* detect APM */ - movw $0x5300, %ax - xorw %bx, %bx - int $0x15 - jc EXT_C(grub_hard_stop) - /* don't check %bx for buggy BIOSes... */ - - /* disconnect APM first */ - movw $0x5304, %ax - xorw %bx, %bx - int $0x15 - - /* connect APM */ - movw $0x5301, %ax - xorw %bx, %bx - int $0x15 - jc EXT_C(grub_hard_stop) - - /* set APM protocol level - 1.1 or bust. (this covers APM 1.2 also) */ - movw $0x530E, %ax - xorw %bx, %bx - movw $0x0101, %cx - int $0x15 - jc EXT_C(grub_hard_stop) -=09 - /* set the power state to off */ - movw $0x5307, %ax - movw $1, %bx - movw $3, %cx - int $0x15 - - /* shouldn't reach here */ - jmp EXT_C(grub_hard_stop) - .code32 -=09 -=09 -/* - * void grub_chainloader_real_boot (int drive, void *part_addr) - * - * This starts another boot loader. - */ - -FUNCTION(grub_chainloader_real_boot) - pushl %edx - pushl %eax - - call EXT_C(grub_dl_unload_all) - - /* set up to pass boot drive */ - popl %edx - - /* ESI must point to a partition table entry */ - popl %esi - - /* Turn off Gate A20 */ - xorl %eax, %eax - call EXT_C(grub_gate_a20) -=09 - call prot_to_real - .code16 - ljmp $0, $GRUB_MEMORY_MACHINE_BOOT_LOADER_ADDR - .code32 - - -/* - * void grub_linux_boot_zimage (void) - */ -VARIABLE(grub_linux_prot_size) - .long 0 -VARIABLE(grub_linux_tmp_addr) - .long 0 -VARIABLE(grub_linux_real_addr) - .long 0 -=09 -FUNCTION(grub_linux_boot_zimage) - /* copy the kernel */ - movl EXT_C(grub_linux_prot_size), %ecx - addl $3, %ecx - shrl $2, %ecx - movl $GRUB_LINUX_BZIMAGE_ADDR, %esi - movl $GRUB_LINUX_ZIMAGE_ADDR, %edi - cld - rep - movsl - -FUNCTION(grub_linux_boot_bzimage) - call EXT_C(grub_dl_unload_all) -=09 - movl EXT_C(grub_linux_real_addr), %ebx - - /* copy the real mode code */ - movl EXT_C(grub_linux_tmp_addr), %esi - movl %ebx, %edi - movl $GRUB_LINUX_SETUP_MOVE_SIZE, %ecx - cld - rep - movsb - - /* change %ebx to the segment address */ - shrl $4, %ebx - movl %ebx, %eax - addl $0x20, %eax - movw %ax, linux_setup_seg - - /* XXX new stack pointer in safe area for calling functions */ - movl $0x4000, %esp - call EXT_C(grub_stop_floppy) - - /* final setup for linux boot */ - call prot_to_real - .code16 - - cli - movw %bx, %ss - movw $GRUB_LINUX_SETUP_STACK, %sp - - movw %bx, %ds - movw %bx, %es - movw %bx, %fs - movw %bx, %gs - - /* ljmp */ - .byte 0xea - .word 0 -linux_setup_seg: - .word 0 - .code32 - - =09 -/* - * This starts the multiboot kernel. - */ - -FUNCTION(grub_multiboot_real_boot) - /* Push the entry address on the stack. */ - pushl %eax - /* Move the address of the multiboot information structure to ebx. */ - movl %edx,%ebx -=09 - /* Unload all modules and stop the floppy driver. */ - call EXT_C(grub_dl_unload_all) - call EXT_C(grub_stop_floppy) - - /* Interrupts should be disabled. */ - cli -=09 - /* Move the magic value into eax and jump to the kernel. */ - movl $GRUB_MB_MAGIC2,%eax - popl %ecx - jmp *%ecx -=09 -=09 -/* - * int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap) - * - * Call IBM/MS INT13 Extensions (int 13 %ah=3DAH) for DRIVE. DAP - * is passed for disk address packet. If an error occurs, return - * non-zero, otherwise zero. - */ - -FUNCTION(grub_biosdisk_rw_int13_extensions) - pushl %ebp - pushl %esi - - /* compute the address of disk_address_packet */ - movw %cx, %si - xorw %cx, %cx - shrl $4, %ecx /* save the segment to cx */ - - /* ah */ - movb %al, %dh - /* enter real mode */ - call prot_to_real -=09 - .code16 - movb %dh, %ah - movw %cx, %ds - int $0x13 /* do the operation */ - movb %ah, %dl /* save return value */ - /* clear the data segment */ - xorw %ax, %ax - movw %ax, %ds - /* back to protected mode */ - DATA32 call real_to_prot - .code32 - - movb %dl, %al /* return value in %eax */ - - popl %esi - popl %ebp - - ret -=09 -/* - * int grub_biosdisk_rw_standard (int ah, int drive, int coff, int hoff, - * int soff, int nsec, int segment) - * - * Call standard and old INT13 (int 13 %ah=3DAH) for DRIVE. = Read/write - * NSEC sectors from COFF/HOFF/SOFF into SEGMENT. If an error occurs, - * return non-zero, otherwise zero. - */ - -FUNCTION(grub_biosdisk_rw_standard) - pushl %ebp - movl %esp, %ebp - - pushl %ebx - pushl %edi - pushl %esi - - /* set up CHS information */ - - /* set %ch to low eight bits of cylinder */ - xchgb %cl, %ch - /* set bits 6-7 of %cl to high two bits of cylinder */ - shlb $6, %cl - /* set bits 0-5 of %cl to sector */ - addb 0xc(%ebp), %cl - /* set %dh to head */ - movb 0x8(%ebp), %dh - /* set %ah to AH */ - movb %al, %ah - /* set %al to NSEC */ - movb 0x10(%ebp), %al - /* save %ax in %di */ - movw %ax, %di - /* save SEGMENT in %bx */ - movw 0x14(%ebp), %bx - =09 - /* enter real mode */ - call prot_to_real - - .code16 - movw %bx, %es - xorw %bx, %bx - movw $3, %si /* attempt at least three times */ - -1:=09 - movw %di, %ax - int $0x13 /* do the operation */ - jnc 2f /* check if successful */ - - movb %ah, %bl /* save return value */ - /* if fail, reset the disk system */ - xorw %ax, %ax - int $0x13 -=09 - decw %si - cmpw $0, %si - je 2f - xorb %bl, %bl - jmp 1b /* retry */ -2:=09 - /* back to protected mode */ - DATA32 call real_to_prot - .code32 - - movb %bl, %al /* return value in %eax */ -=09 - popl %esi - popl %edi - popl %ebx - popl %ebp - - ret $(4 * 4) - - -/* - * int grub_biosdisk_check_int13_extensions (int drive) - * - * Check if LBA is supported for DRIVE. If it is supported, then return - * the major version of extensions, otherwise zero. - */ - -FUNCTION(grub_biosdisk_check_int13_extensions) - pushl %ebp - pushl %ebx - - /* drive */ - movb %al, %dl - /* enter real mode */ - call prot_to_real - - .code16 - movb $0x41, %ah - movw $0x55aa, %bx - int $0x13 /* do the operation */ -=09 - /* check the result */ - jc 1f - cmpw $0xaa55, %bx - jne 1f - - movb %ah, %bl /* save the major version into %bl */ - - /* check if AH=3D0x42 is supported */ - andw $1, %cx - jnz 2f -=09 -1: - xorb %bl, %bl -2: - /* back to protected mode */ - DATA32 call real_to_prot - .code32 - - movb %bl, %al /* return value in %eax */ - - popl %ebx - popl %ebp - - ret - - -/* - * int grub_biosdisk_get_diskinfo_int13_extensions (int drive, void *drp) - * - * Return the geometry of DRIVE in a drive parameters, DRP. If an error - * occurs, then return non-zero, otherwise zero. - */ - -FUNCTION(grub_biosdisk_get_diskinfo_int13_extensions) - pushl %ebp - pushl %ebx - pushl %esi - - /* compute the address of drive parameters */ - movw %dx, %si - xorw %dx, %dx - shrl $4, %edx - movw %dx, %bx /* save the segment into %bx */ - /* drive */ - movb %al, %dl - /* enter real mode */ - call prot_to_real - - .code16 - movb $0x48, %ah - movw %bx, %ds - int $0x13 /* do the operation */ - movb %ah, %bl /* save return value in %bl */ - /* clear the data segment */ - xorw %ax, %ax - movw %ax, %ds - /* back to protected mode */ - DATA32 call real_to_prot - .code32 - - movb %bl, %al /* return value in %eax */ - - popl %esi - popl %ebx - popl %ebp -=09 - ret - - -/* - * int grub_biosdisk_get_diskinfo_standard (int drive, - * unsigned long *cylinders, - * unsigned long *heads, - * unsigned long *sectors) - * - * Return the geometry of DRIVE in CYLINDERS, HEADS and SECTORS. If an - * error occurs, then return non-zero, otherwise zero. - */ - -FUNCTION(grub_biosdisk_get_diskinfo_standard) - pushl %ebp - pushl %ebx - pushl %edi - - /* push CYLINDERS */ - pushl %edx - /* push HEADS */ - pushl %ecx - /* SECTORS is on the stack */ -=09 - /* drive */ - movb %al, %dl - /* enter real mode */ - call prot_to_real - - .code16 - movb $0x8, %ah - int $0x13 /* do the operation */ - /* check if successful */ - testb %ah, %ah - jnz 1f - /* bogus BIOSes may not return an error number */ - testb $0x3f, %cl /* 0 sectors means no disk */ - jnz 1f /* if non-zero, then succeed */ - /* XXX 0x60 is one of the unused error numbers */ - movb $0x60, %ah -1: - movb %ah, %bl /* save return value in %bl */ - /* back to protected mode */ - DATA32 call real_to_prot - .code32 - - /* pop HEADS */ - popl %edi - movb %dh, %al - incl %eax /* the number of heads is counted from zero */ - movl %eax, (%edi) - - /* pop CYLINDERS */ - popl %edi - movb %ch, %al - movb %cl, %ah - shrb $6, %ah /* the number of cylinders is counted from zero */ - incl %eax - movl %eax, (%edi) - - /* SECTORS */ - movl 0x10(%esp), %edi - andb $0x3f, %cl - movzbl %cl, %eax - movl %eax, (%edi) -=09 - xorl %eax, %eax - movb %bl, %al /* return value in %eax */ - - popl %edi - popl %ebx - popl %ebp - - ret $4 - - -/* - * int grub_biosdisk_get_num_floppies (void) - */ -FUNCTION(grub_biosdisk_get_num_floppies) - pushl %ebp - - xorl %edx, %edx - call prot_to_real -=09 - .code16 - /* reset the disk system first */ - int $0x13 -1: - stc -=09 - /* call GET DISK TYPE */ - movb $0x15, %ah - int $0x13 - - jc 2f - - /* check if this drive exists */=09 - testb $0x3, %ah - jz 2f - - incb %dl - cmpb $2, %dl - jne 1b -2: - DATA32 call real_to_prot - .code32 - - movl %edx, %eax - popl %ebp - ret -=09 -=09 -/* - * - * grub_get_memsize(i) : return the memory size in KB. i =3D=3D 0 for conventional - * memory, i =3D=3D 1 for extended memory - * BIOS call "INT 12H" to get conventional memory size - * BIOS call "INT 15H, AH=3D88H" to get extended memory size - * Both have the return value in AX. - * - */ - -FUNCTION(grub_get_memsize) - pushl %ebp - - movl %eax, %edx - - call prot_to_real /* enter real mode */ - .code16 - - testl %edx, %edx - jnz xext - - int $0x12 - jmp xdone - -xext: - movb $0x88, %ah - int $0x15 - -xdone: - movw %ax, %dx - - DATA32 call real_to_prot - .code32 - - movw %dx, %ax - - popl %ebp - ret - - -/* - * - * grub_get_eisa_mmap() : return packed EISA memory map, lower 16 bits is - * memory between 1M and 16M in 1K parts, upper 16 bits is - * memory above 16M in 64K parts. If error, return zero. - * BIOS call "INT 15H, AH=3DE801H" to get EISA memory map, - * AX =3D memory between 1M and 16M in 1K parts. - * BX =3D memory above 16M in 64K parts. - * - */ - -FUNCTION(grub_get_eisa_mmap) - pushl %ebp - pushl %ebx - - call prot_to_real /* enter real mode */ - .code16 - - movw $0xe801, %ax - int $0x15 - - shll $16, %ebx - movw %ax, %bx - - DATA32 call real_to_prot - .code32 - - cmpb $0x86, %bh - je xnoteisa - - movl %ebx, %eax - -xnoteisa: - popl %ebx - popl %ebp - ret - -/* - * - * grub_get_mmap_entry(addr, cont) : address and old continuation value (zero to - * start), for the Query System Address Map BIOS call. - * - * Sets the first 4-byte int value of "addr" to the size returned by - * the call. If the call fails, sets it to zero. - * - * Returns: new (non-zero) continuation value, 0 if done. - */ - -FUNCTION(grub_get_mmap_entry) - pushl %ebp - pushl %ebx - pushl %edi - pushl %esi - - /* push ADDR */ - pushl %eax -=09 - /* place address (+4) in ES:DI */ - addl $4, %eax - movl %eax, %edi - andl $0xf, %edi - shrl $4, %eax - movl %eax, %esi - - /* set continuation value */ - movl %edx, %ebx - - /* set default maximum buffer size */ - movl $0x14, %ecx - - /* set EDX to 'SMAP' */ - movl $0x534d4150, %edx - - call prot_to_real /* enter real mode */ - .code16 - - movw %si, %es - movl $0xe820, %eax - int $0x15 - - DATA32 jc xnosmap - - cmpl $0x534d4150, %eax - jne xnosmap - - cmpl $0x14, %ecx - jl xnosmap - - cmpl $0x400, %ecx - jg xnosmap - - jmp xsmap - -xnosmap: - xorl %ecx, %ecx - -xsmap: - DATA32 call real_to_prot - .code32 - - /* write length of buffer (zero if error) into ADDR */ - popl %eax - movl %ecx, (%eax) - - /* set return value to continuation */ - movl %ebx, %eax - - popl %esi - popl %edi - popl %ebx - popl %ebp - ret - -=09 -/* - * void grub_console_real_putchar (int c) - * - * Put the character C on the console. Because GRUB wants to write a - * character with an attribute, this implementation is a bit tricky. - * If C is a control character (CR, LF, BEL, BS), use INT 10, AH =3D = 0Eh - * (TELETYPE OUTPUT). Otherwise, save the original position, put a space, - * save the current position, restore the original position, write the - * character and the attribute, and restore the current position. - * - * The reason why this is so complicated is that there is no easy way to - * get the height of the screen, and the TELETYPE OUPUT BIOS call doesn't - * support setting a background attribute. - */ -FUNCTION(grub_console_real_putchar) - movl %eax, %edx - pusha - movb EXT_C(grub_console_cur_color), %bl -=09 - call prot_to_real - .code16 - movb %dl, %al - xorb %bh, %bh - - /* use teletype output if control character */ - cmpb $0x7, %al - je 1f - cmpb $0x8, %al - je 1f - cmpb $0xa, %al - je 1f - cmpb $0xd, %al - je 1f - - /* save the character and the attribute on the stack */ - pushw %ax - pushw %bx -=09 - /* get the current position */ - movb $0x3, %ah - int $0x10 - - /* check the column with the width */ - cmpb $79, %dl - jl 2f -=09 - /* print CR and LF, if next write will exceed the width */=09 - movw $0x0e0d, %ax - int $0x10 - movb $0x0a, %al - int $0x10 -=09 - /* get the current position */ - movb $0x3, %ah - int $0x10 - -2:=09 - /* restore the character and the attribute */ - popw %bx - popw %ax -=09 - /* write the character with the attribute */ - movb $0x9, %ah - movw $1, %cx - int $0x10 - - /* move the cursor forward */ - incb %dl - movb $0x2, %ah - int $0x10 - - jmp 3f - -1: movw $1, %bx - movb $0xe, %ah - int $0x10 -=09 -3: DATA32 call real_to_prot - .code32 -=09 - popa - ret -=09 - -/* - * int grub_console_getkey (void) - * BIOS call "INT 16H Function 00H" to read character from keyboard - * Call with %ah =3D 0x0 - * Return: %ah =3D keyboard scan code - * %al =3D ASCII character - */ - -/* this table is used in translate_keycode below */ -translation_table: - .word GRUB_CONSOLE_KEY_LEFT, 2 - .word GRUB_CONSOLE_KEY_RIGHT, 6 - .word GRUB_CONSOLE_KEY_UP, 16 - .word GRUB_CONSOLE_KEY_DOWN, 14 - .word GRUB_CONSOLE_KEY_HOME, 1 - .word GRUB_CONSOLE_KEY_END, 5 - .word GRUB_CONSOLE_KEY_DC, 4 - .word GRUB_CONSOLE_KEY_BACKSPACE, 8 - .word GRUB_CONSOLE_KEY_PPAGE, 7 - .word GRUB_CONSOLE_KEY_NPAGE, 3 - .word 0 -=09 -/* - * translate_keycode translates the key code %dx to an ascii code. - */ - .code16 - -translate_keycode: - pushw %bx - pushw %si -=09 - movw $ABS(translation_table), %si -=09 -1: lodsw - /* check if this is the end */ - testw %ax, %ax - jz 2f - /* load the ascii code into %ax */ - movw %ax, %bx - lodsw - /* check if this matches the key code */ - cmpw %bx, %dx - jne 1b - /* translate %dx, if successful */ - movw %ax, %dx - -2: popw %si - popw %bx - ret - - .code32 -=09 -FUNCTION(grub_console_getkey) - pushl %ebp - - call prot_to_real - .code16 - - int $0x16 - - movw %ax, %dx /* real_to_prot uses %eax */ - call translate_keycode - =09 - DATA32 call real_to_prot - .code32 - - movw %dx, %ax - - popl %ebp - ret - - -/* - * int grub_console_checkkey (void) - * if there is a character pending, return it; otherwise return -1 - * BIOS call "INT 16H Function 01H" to check whether a character is pending - * Call with %ah =3D 0x1 - * Return: - * If key waiting to be input: - * %ah =3D keyboard scan code - * %al =3D ASCII character - * Zero flag =3D clear - * else - * Zero flag =3D set - */ -FUNCTION(grub_console_checkkey) - pushl %ebp - xorl %edx, %edx -=09 - call prot_to_real /* enter real mode */ - .code16 - - movb $0x1, %ah - int $0x16 - - jz notpending -=09 - movw %ax, %dx - DATA32 jmp pending - -notpending: - decl %edx - -pending: - DATA32 call real_to_prot - .code32 - - movl %edx, %eax - - popl %ebp - ret - -=09 -/* - * grub_uint16_t grub_console_getxy (void) - * BIOS call "INT 10H Function 03h" to get cursor position - * Call with %ah =3D 0x03 - * %bh =3D page - * Returns %ch =3D starting scan line - * %cl =3D ending scan line - * %dh =3D row (0 is top) - * %dl =3D column (0 is left) - */ - - -FUNCTION(grub_console_getxy) - pushl %ebp - pushl %ebx /* save EBX */ - - call prot_to_real - .code16 - - xorb %bh, %bh /* set page to 0 */ - movb $0x3, %ah - int $0x10 /* get cursor position */ - - DATA32 call real_to_prot - .code32 - - movb %dl, %ah - movb %dh, %al - - popl %ebx - popl %ebp - ret - - -/* - * void grub_console_gotoxy(grub_uint8_t x, grub_uint8_t y) - * BIOS call "INT 10H Function 02h" to set cursor position - * Call with %ah =3D 0x02 - * %bh =3D page - * %dh =3D row (0 is top) - * %dl =3D column (0 is left) - */ - - -FUNCTION(grub_console_gotoxy) - pushl %ebp - pushl %ebx /* save EBX */ - - movb %dl, %dh /* %dh =3D y */ - movb %al, %dl /* %dl =3D x */ - - call prot_to_real - .code16 - - xorb %bh, %bh /* set page to 0 */ - movb $0x2, %ah - int $0x10 /* set cursor position */ - - DATA32 call real_to_prot - .code32 - - popl %ebx - popl %ebp - ret - -=09 -/* - * void grub_console_cls (void) - * BIOS call "INT 10H Function 09h" to write character and attribute - * Call with %ah =3D 0x09 - * %al =3D (character) - * %bh =3D (page number) - * %bl =3D (attribute) - * %cx =3D (number of times) - */ - -FUNCTION(grub_console_cls) - pushl %ebp - pushl %ebx /* save EBX */ - - call prot_to_real - .code16 - - /* move the cursor to the beginning */ - movb $0x02, %ah - xorb %bh, %bh - xorw %dx, %dx - int $0x10 - - /* write spaces to the entire screen */ - movw $0x0920, %ax - movw $0x07, %bx - movw $(80 * 25), %cx - int $0x10 - - /* move back the cursor */ - movb $0x02, %ah - int $0x10 - - DATA32 call real_to_prot - .code32 - - popl %ebx - popl %ebp - ret - -=09 -/* - * void grub_console_setcursor (int on) - * BIOS call "INT 10H Function 01h" to set cursor type - * Call with %ah =3D 0x01 - * %ch =3D cursor starting scanline - * %cl =3D cursor ending scanline - */ - -console_cursor_state: - .byte 1 -console_cursor_shape: - .word 0 -=09 -FUNCTION(grub_console_setcursor) - pushl %ebp - pushl %ebx - - /* push ON */ - pushl %eax -=09 - /* check if the standard cursor shape has already been saved */ - movw console_cursor_shape, %ax - testw %ax, %ax - jne 1f - - call prot_to_real - .code16 - - movb $0x03, %ah - xorb %bh, %bh - int $0x10 - - DATA32 call real_to_prot - .code32 - - movw %cx, console_cursor_shape -1: - /* set %cx to the designated cursor shape */ - movw $0x2000, %cx - popl %eax - testl %eax, %eax - jz 2f - movw console_cursor_shape, %cx -2:=09 - call prot_to_real - .code16 - - movb $0x1, %ah - int $0x10=20 - - DATA32 call real_to_prot - .code32 - - popl %ebx - popl %ebp - ret - =09 -/* - * grub_getrtsecs() - * if a seconds value can be read, read it and return it (BCD), - * otherwise return 0xFF - * BIOS call "INT 1AH Function 02H" to check whether a character is pending - * Call with %ah =3D 0x2 - * Return: - * If RT Clock can give correct values - * %ch =3D hour (BCD) - * %cl =3D minutes (BCD) - * %dh =3D seconds (BCD) - * %dl =3D daylight savings time (00h std, 01h daylight) - * Carry flag =3D clear - * else - * Carry flag =3D set - * (this indicates that the clock is updating, or - * that it isn't running) - */ -FUNCTION(grub_getrtsecs) - pushl %ebp - - call prot_to_real /* enter real mode */ - .code16 - - clc - movb $0x2, %ah - int $0x1a - - DATA32 jnc gottime - movb $0xff, %dh - -gottime: - DATA32 call real_to_prot - .code32 - - movb %dh, %al - - popl %ebp - ret - -=09 -/* - * grub_get_rtc() - * return the real time in ticks, of which there are about - * 18-20 per second - */ -FUNCTION(grub_get_rtc) - pushl %ebp - - call prot_to_real /* enter real mode */ - .code16 - - /* %ax is already zero */ - int $0x1a - - DATA32 call real_to_prot - .code32 - - movl %ecx, %eax - shll $16, %eax - movw %dx, %ax - - popl %ebp - ret - - -/* - * unsigned char grub_vga_set_mode (unsigned char mode) - */ -FUNCTION(grub_vga_set_mode) - pushl %ebp - pushl %ebx - movl %eax, %ecx - - call prot_to_real - .code16 - /* get current mode */ - xorw %bx, %bx - movb $0x0f, %ah - int $0x10 - movb %al, %dl - - /* set the new mode */ - movb %cl, %al - xorb %ah, %ah - int $0x10 - - DATA32 call real_to_prot - .code32 - - movb %dl, %al - popl %ebx - popl %ebp - ret - - -/* - * unsigned char *grub_vga_get_font (void) - */ -FUNCTION(grub_vga_get_font) - pushl %ebp - pushl %ebx - - call prot_to_real - .code16 - movw $0x1130, %ax - movb $0x06, %bh - int $0x10 - movw %es, %bx - movw %bp, %dx - DATA32 call real_to_prot - .code32 - - movzwl %bx, %ecx - shll $4, %ecx - movw %dx, %ax - addl %ecx, %eax - - popl %ebx - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_get_controller_info (struct grub_vbe_info_block *controller_info) - * - * Register allocations for parameters: - * %eax *controller_info - */ -FUNCTION(grub_vbe_get_controller_info) - pushl %ebp - pushl %edi - - movw %ax, %di /* Store *controller_info to %edx:%di. */ - xorw %ax, %ax - shrl $4, %eax - mov %eax, %edx /* prot_to_real destroys %eax. */ -=09 - call prot_to_real - .code16 - - pushw %es - - movw %dx, %es /* *controller_info is now on %es:%di. */ - movw $0x4f00, %ax - int $0x10 - - movw %ax, %dx /* real_to_prot destroys %eax. */ - - popw %es - - DATA32 call real_to_prot - .code32 - - movl %edx, %eax - andl $0x0FFFF, %eax /* Return value in %eax. */ -=09 - popl %edi - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_get_mode_info (grub_uint32_t mode, - * struct grub_vbe_mode_info_block *mode_info) - * - * Register allocations for parameters: - * %eax mode - * %edx *mode_info - */ -FUNCTION(grub_vbe_get_mode_info) - pushl %ebp - pushl %edi - - movl %eax, %ecx /* Store mode number to %ecx. */ - - movw %dx, %di /* Store *mode_info to %edx:%di. */ - xorw %dx, %dx - shrl $4, %edx - - call prot_to_real - .code16 - - pushw %es - - movw %dx, %es /* *mode_info is now on %es:%di. */ - movw $0x4f01, %ax - int $0x10 - - movw %ax, %dx /* real_to_prot destroys %eax. */ - - popw %es - - DATA32 call real_to_prot - .code32 - - movl %edx, %eax - andl $0x0FFFF, %eax /* Return value in %eax. */ - - popl %edi - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_set_mode (grub_uint32_t mode, - * struct grub_vbe_crtc_info_block *crtc_info) - * - * Register allocations for parameters: - * %eax mode - * %edx *crtc_info - */ -FUNCTION(grub_vbe_set_mode) - pushl %ebp - pushl %ebx - - movl %eax, %ebx /* Store mode in %ebx. */ - - movw %dx, %di /* Store *crtc_info to %edx:%di. */ - xorw %dx, %dx - shrl $4, %edx - - call prot_to_real - .code16 - - pushw %es - - movw %dx, %es /* *crtc_info is now on %es:%di. */ - - movw $0x4f02, %ax - int $0x10 - - movw %ax, %dx /* real_to_prot destroys %eax. */ - - popw %es - - DATA32 call real_to_prot - .code32 -=09 - movw %dx, %ax - andl $0xFFFF, %eax /* Return value in %eax. */ - - popl %ebx - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_get_mode (grub_uint32_t *mode) - * - * Register allocations for parameters: - * %eax *mode - */ -FUNCTION(grub_vbe_get_mode) - pushl %ebp - pushl %ebx - pushl %eax /* Push *mode to stack. */ - - call prot_to_real - .code16 - - movw $0x4f03, %ax - int $0x10 - - movw %ax, %dx /* real_to_prot destroys %eax. */ - - DATA32 call real_to_prot - .code32 - - popl %edi /* Pops *mode from stack to %edi. */ - andl $0xFFFF, %ebx - movl %ebx, (%edi) - - movw %dx, %ax - andl $0xFFFF, %eax /* Return value in %eax. */ - - popl %ebx - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_set_memory_window (grub_uint32_t window, - * grub_uint32_t position); - * - * Register allocations for parameters: - * %eax window - * %edx position - */ -FUNCTION(grub_vbe_set_memory_window) - pushl %ebp - pushl %ebx - - movl %eax, %ebx - - call prot_to_real - .code16 - - movw $0x4f05, %ax - andw $0x00ff, %bx /* BL =3D window, BH =3D 0, Set memory window. */ - int $0x10 - - movw %ax, %dx /* real_to_prot destroys %eax. */ - - DATA32 call real_to_prot - .code32 -=09 - movw %dx, %ax - andl $0xFFFF, %eax /* Return value in %eax. */ - - popl %ebx - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_get_memory_window (grub_uint32_t window, - * grub_uint32_t *position); - * - * Register allocations for parameters: - * %eax window - * %edx *position - */ -FUNCTION(grub_vbe_get_memory_window) - pushl %ebp - pushl %ebx - pushl %edx /* Push *position to stack. */ - - movl %eax, %ebx /* Store window in %ebx. */ - - call prot_to_real - .code16 - - movw $0x4f05, %ax - andw $0x00ff, %bx /* BL =3D window. */ - orw $0x0100, %bx /* BH =3D 1, Get memory window. */ - int $0x10 - - movw %ax, %bx /* real_to_prot destroys %eax. */ - - DATA32 call real_to_prot - .code32 - - popl %edi /* pops *position from stack to %edi. */ - andl $0xFFFF, %edx - movl %edx, (%edi) /* Return position to caller. */ - - movw %bx, %ax - andl $0xFFFF, %eax /* Return value in %eax. */ - - popl %ebx - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_set_scanline_length (grub_uint32_t length) - * - * Register allocations for parameters: - * %eax length - */ -FUNCTION(grub_vbe_set_scanline_length) - pushl %ebp - pushl %ebx - - movl %eax, %ecx /* Store length in %ecx. */ - - call prot_to_real - .code16 - - movw $0x4f06, %ax - movw $0x0002, %bx /* BL =3D 2, Set Scan Line in Bytes. */ - int $0x10 - - movw %ax, %dx /* real_to_prot destroys %eax. */ - - DATA32 call real_to_prot - .code32 -=09 - movw %dx, %ax - andl $0xFFFF, %eax /* Return value in %eax. */ - - popl %ebx - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_get_scanline_length (grub_uint32_t *length) - * - * Register allocations for parameters: - * %eax *length - */ -FUNCTION(grub_vbe_get_scanline_length) - pushl %ebp - pushl %ebx - pushl %edx /* Push *length to stack. */ - - call prot_to_real - .code16 - - movw $0x4f06, %ax - movw $0x0001, %bx /* BL =3D 1, Get Scan Line Length (in bytes). */ - int $0x10 - - movw %ax, %dx /* real_to_prot destroys %eax. */ - - DATA32 call real_to_prot - .code32 - - popl %edi /* Pops *length from stack to %edi. */ - andl $0xFFFF, %ebx - movl %ebx, (%edi) /* Return length to caller. */ - - movw %dx, %ax - andl $0xFFFF, %eax /* Return value in %eax. */ - - popl %ebx - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_set_display_start (grub_uint32_t x, - * grub_uint32_t y) - * - * Register allocations for parameters: - * %eax x - * %edx y - */ -FUNCTION(grub_vbe_set_display_start) - pushl %ebp - pushl %ebx - - movl %eax, %ecx /* Store x in %ecx. */ - - call prot_to_real - .code16 - - movw $0x4f07, %ax - movw $0x0080, %bx /* BL =3D 80h, Set Display Start=20 - during Vertical Retrace. */ - int $0x10 - - movw %ax, %dx /* real_to_prot destroys %eax. */ - - DATA32 call real_to_prot - .code32 -=09 - movw %dx, %ax - andl $0xFFFF, %eax /* Return value in %eax. */ - - popl %ebx - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_get_display_start (grub_uint32_t *x, - * grub_uint32_t *y) - * - * Register allocations for parameters: - * %eax *x - * %edx *y - */ -FUNCTION(grub_vbe_get_display_start) - pushl %ebp - pushl %ebx - pushl %eax /* Push *x to stack. */ - pushl %edx /* Push *y to stack. */ - - call prot_to_real - .code16 - - movw $0x4f07, %ax - movw $0x0001, %bx /* BL =3D 1, Get Display Start. */ - int $0x10 - - movw %ax, %bx /* real_to_prot destroys %eax. */ - - DATA32 call real_to_prot - .code32 - - popl %edi /* Pops *y from stack to %edi. */ - andl $0xFFFF, %edx - movl %edx, (%edi) /* Return y-position to caller. */ - - popl %edi /* Pops *x from stack to %edi. */ - andl $0xFFFF, %ecx - movl %ecx, (%edi) /* Return x-position to caller. */ - - movw %bx, %ax - andl $0xFFFF, %eax /* Return value in %eax. */ - - popl %ebx - popl %ebp - ret - -/* - * grub_vbe_status_t grub_vbe_set_palette_data (grub_uint32_t color_count, - * grub_uint32_t start_index, - * struct grub_vbe_palette_data *palette_data) - * - * Register allocations for parameters: - * %eax color_count - * %edx start_index - * %ecx *palette_data - */ -FUNCTION(grub_vbe_set_palette_data) - pushl %ebp - pushl %ebx - - movl %eax, %ebx /* Store color_count in %ebx. */ - - movw %cx, %di /* Store *palette_data to %ecx:%di. */ - xorw %cx, %cx - shrl $4, %ecx - - call prot_to_real - .code16 - - pushw %es - - movw %cx, %es /* *palette_data is now on %es:%di. */ - movw %bx, %cx /* color_count is now on %cx. */ - - movw $0x4f09, %ax - xorw %bx, %bx /* BL =3D 0, Set Palette Data. */ - int $0x10 - - movw %ax, %dx /* real_to_prot destroys %eax. */ - - popw %es - - DATA32 call real_to_prot - .code32 -=09 - movw %dx, %ax - andl $0xFFFF, %eax /* Return value in %eax. */ - - popl %ebx - popl %ebp - ret FILE kern/i386/pc/startup.S.memparm (NEW) (1) Same as old startup.S file, except parameters are passed in stack=20 for global functions. diff -EbwBruN ./kern/i386/pc/startup.S.memparm ../../src/grub-1.93/kern/i386/pc/startup.S.memparm --- ./kern/i386/pc/startup.S.memparm 1970-01-01 01:00:00.000000000 +0100 +++ ../../src/grub-1.93/kern/i386/pc/startup.S.memparm 2006-05-04 00:04:26.000000000 +0200 @@ -0,0 +1,2209 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 1999,2000,2001,2002,2003,2005 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +/* + * Note: These functions defined in this file may be called from C. + * Be careful of that you must not modify some registers. Quote + * from gcc-2.95.2/gcc/config/i386/i386.h: +=09 + 1 for registers not available across function calls. + These must include the FIXED_REGISTERS and also any + registers that can be used without being saved. + The latter must include the registers where values are returned + and the register where structure-value addresses are passed. + Aside from that, you can include as many other registers as you like. + + ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg +{ 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } + */ + +/* + * Note: GRUB is compiled with the options -mrtd and -mregparm=3D3. + * So the first three arguments are passed in %eax, %edx, and %ecx, + * respectively, and if a function has a fixed number of arguments + * and the number if greater than three, the function must return + * with "ret $N" where N is ((the number of arguments) - 3) * 4. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + =09 +#define ABS(x) ((x) - EXT_C(start) + GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200) +=09 + .file "startup.S" + + .text + + /* Tell GAS to generate 16-bit instructions so that this code works + in real mode. */ + .code16 + + .globl start, _start +start: +_start: + /* + * Guarantee that "main" is loaded at 0x0:0x8200. + */ + ljmp $0, $ABS(codestart) + + /* + * Compatibility version number + * + * These MUST be at byte offset 6 and 7 of the executable + * DO NOT MOVE !!! + */ + . =3D EXT_C(start) + 0x6 + .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR + + /* + * This is a special data area 8 bytes from the beginning. + */ + + . =3D EXT_C(start) + 0x8 + +VARIABLE(grub_total_module_size) + .long 0 +VARIABLE(grub_kernel_image_size) + .long 0 +VARIABLE(grub_compressed_size) + .long 0 +VARIABLE(grub_install_dos_part) + .long 0xFFFFFFFF +VARIABLE(grub_install_bsd_part) + .long 0xFFFFFFFF +VARIABLE(grub_prefix) + .string "/boot/grub" + + /* + * Leave some breathing room for the prefix. + */ + + . =3D EXT_C(start) + 0x50 + +/* + * Support for booting GRUB from a Multiboot boot loader (e.g. GRUB itself). + * This uses the a.out kludge to load raw binary to the area starting at 1MB, + * and relocates itself after loaded. + */ +multiboot_header: + /* magic */ + .long 0x1BADB002 + /* flags */ + .long (1 << 16) + /* checksum */ + .long -0x1BADB002 - (1 << 16) + /* header addr */ + .long multiboot_header - _start + 0x100000 + 0x200 + /* load addr */ + .long 0x100000 + /* load end addr */ + .long 0 + /* bss end addr */ + .long 0 + /* entry addr */ + .long multiboot_entry - _start + 0x100000 + 0x200 +=09 +multiboot_entry: + .code32 + /* obtain the boot device */ + movl 12(%ebx), %edx + + /* relocate the code */ + movl $(GRUB_KERNEL_MACHINE_RAW_SIZE + 0x200), %ecx + addl EXT_C(grub_compressed_size) - _start + 0x100000 + 0x200, %ecx + movl $0x100000, %esi + movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %edi + cld + rep + movsb + /* jump to the real address */ + movl $multiboot_trampoline, %eax + jmp *%eax +=09 +multiboot_trampoline: + /* fill the boot information */ + movl %edx, %eax + shrl $8, %eax + xorl %ebx, %ebx + cmpb $0xFF, %ah + je 1f + movb %ah, %bl + movl %ebx, EXT_C(grub_install_dos_part) +1: + cmpb $0xFF, %al + je 2f + movb %al, %bl + movl %ebx, EXT_C(grub_install_bsd_part) +2: + shrl $24, %edx + /* enter the usual booting */ + call prot_to_real + .code16 +=09 +/* the real mode code continues... */ +codestart: + cli /* we're not safe here! */ + + /* set up %ds, %ss, and %es */ + xorw %ax, %ax + movw %ax, %ds + movw %ax, %ss + movw %ax, %es + + /* set up the real mode/BIOS stack */ + movl $GRUB_MEMORY_MACHINE_REAL_STACK, %ebp + movl %ebp, %esp + + sti /* we're safe again */ + + /* save boot drive reference */ + ADDR32 movb %dl, EXT_C(grub_boot_drive) + + /* reset disk system (%ah =3D 0) */ + int $0x13 +=09 + /* transition to protected mode */ + DATA32 call real_to_prot + + /* The ".code32" directive takes GAS out of 16-bit mode. */ + .code32 + + incl %eax + call EXT_C(grub_gate_a20) +=09 + /* decompress the compressed part and put the result at 1MB */ + movl $0x100000, %esi + movl $(START_SYMBOL + GRUB_KERNEL_MACHINE_RAW_SIZE), %edi + + pushl %esi + pushl EXT_C(grub_compressed_size) + pushl %edi + call lzo1x_decompress + addl $12, %esp + + /* copy back the decompressed part */ + movl %eax, %ecx + cld + rep + movsb + + /* copy modules before cleaning out the bss */ + movl EXT_C(grub_total_module_size), %ecx + movl EXT_C(grub_kernel_image_size), %esi + addl %ecx, %esi + addl $START_SYMBOL, %esi + decl %esi + movl $END_SYMBOL, %edi + addl %ecx, %edi + decl %edi + std + rep + movsb +=09 + /* clean out the bss */ + movl $BSS_START_SYMBOL, %edi + + /* compute the bss length */ + movl $END_SYMBOL, %ecx + subl %edi, %ecx + =09 + /* clean out */ + xorl %eax, %eax + cld + rep + stosb +=09 + /* + * Call the start of main body of C code. + */ + call EXT_C(grub_main) + + +/* + * This is the area for all of the special variables. + */ + + .p2align 2 /* force 4-byte alignment */ + +protstack: + .long GRUB_MEMORY_MACHINE_PROT_STACK + +VARIABLE(grub_boot_drive) + .long 0 + +VARIABLE(grub_start_addr) + .long START_SYMBOL + +VARIABLE(grub_end_addr) + .long END_SYMBOL +=09 +VARIABLE(grub_apm_bios_info) + .word 0 /* version */ + .word 0 /* cseg */ + .long 0 /* offset */ + .word 0 /* cseg_16 */ + .word 0 /* dseg_16 */ + .word 0 /* cseg_len */ + .word 0 /* cseg_16_len */ + .word 0 /* dseg_16_len */ +=09 +/* + * This is the Global Descriptor Table + * + * An entry, a "Segment Descriptor", looks like this: + * + * 31 24 19 16 7 0 + * ------------------------------------------------------------ + * | | |B| |A| | | |1|0|E|W|A| | + * | BASE 31..24 |G|/|L|V| LIMIT |P|DPL| TYPE | BASE 23:16 | 4 + * | | |D| |L| 19..16| | |1|1|C|R|A| | + * ------------------------------------------------------------ + * | | | + * | BASE 15..0 | LIMIT 15..0 | 0 + * | | | + * ------------------------------------------------------------ + * + * Note the ordering of the data items is reversed from the above + * description. + */ + + .p2align 2 /* force 4-byte alignment */ +gdt: + .word 0, 0 + .byte 0, 0, 0, 0 + + /* -- code segment -- + * base =3D 0x00000000, limit =3D 0xFFFFF (4 KiB Granularity), present + * type =3D 32bit code execute/read, DPL =3D 0 + */ + .word 0xFFFF, 0 + .byte 0, 0x9A, 0xCF, 0 + + /* -- data segment -- + * base =3D 0x00000000, limit 0xFFFFF (4 KiB Granularity), present + * type =3D 32 bit data read/write, DPL =3D 0=20 + */ + .word 0xFFFF, 0 + .byte 0, 0x92, 0xCF, 0 + + /* -- 16 bit real mode CS -- + * base =3D 0x00000000, limit 0x0FFFF (1 B Granularity), present + * type =3D 16 bit code execute/read only/conforming, DPL =3D 0 + */ + .word 0xFFFF, 0 + .byte 0, 0x9E, 0, 0 + + /* -- 16 bit real mode DS -- + * base =3D 0x00000000, limit 0x0FFFF (1 B Granularity), present + * type =3D 16 bit data read/write, DPL =3D 0 + */ + .word 0xFFFF, 0 + .byte 0, 0x92, 0, 0 + + +/* this is the GDT descriptor */ +gdtdesc: + .word 0x27 /* limit */ + .long gdt /* addr */ + +=09 +/* + * These next two routines, "real_to_prot" and "prot_to_real" are structured + * in a very specific way. Be very careful when changing them. + * + * NOTE: Use of either one messes up %eax and %ebp. + */ + +real_to_prot: + .code16 + cli + + /* load the GDT register */ + DATA32 ADDR32 lgdt gdtdesc + + /* turn on protected mode */ + movl %cr0, %eax + orl $GRUB_MEMORY_MACHINE_CR0_PE_ON, %eax + movl %eax, %cr0 + + /* jump to relocation, flush prefetch queue, and reload %cs */ + DATA32 ljmp $GRUB_MEMORY_MACHINE_PROT_MODE_CSEG, $protcseg + + .code32 +protcseg: + /* reload other segment registers */ + movw $GRUB_MEMORY_MACHINE_PROT_MODE_DSEG, %ax + movw %ax, %ds + movw %ax, %es + movw %ax, %fs + movw %ax, %gs + movw %ax, %ss + + /* put the return address in a known safe location */ + movl (%esp), %eax + movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK + + /* get protected mode stack */ + movl protstack, %eax + movl %eax, %esp + movl %eax, %ebp + + /* get return address onto the right stack */ + movl GRUB_MEMORY_MACHINE_REAL_STACK, %eax + movl %eax, (%esp) + + /* zero %eax */ + xorl %eax, %eax + + /* return on the old (or initialized) stack! */ + ret + + +prot_to_real: + /* just in case, set GDT */ + lgdt gdtdesc + + /* save the protected mode stack */ + movl %esp, %eax + movl %eax, protstack + + /* get the return address */ + movl (%esp), %eax + movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK + + /* set up new stack */ + movl $GRUB_MEMORY_MACHINE_REAL_STACK, %eax + movl %eax, %esp + movl %eax, %ebp + + /* set up segment limits */ + movw $GRUB_MEMORY_MACHINE_PSEUDO_REAL_DSEG, %ax + movw %ax, %ds + movw %ax, %es + movw %ax, %fs + movw %ax, %gs + movw %ax, %ss + + /* this might be an extra step */ + /* jump to a 16 bit segment */ + ljmp $GRUB_MEMORY_MACHINE_PSEUDO_REAL_CSEG, $tmpcseg + +tmpcseg: + .code16 + + /* clear the PE bit of CR0 */ + movl %cr0, %eax + andl $(~GRUB_MEMORY_MACHINE_CR0_PE_ON), %eax + movl %eax, %cr0 + + /* flush prefetch queue, reload %cs */ + DATA32 ljmp $0, $realcseg + +realcseg: + /* we are in real mode now + * set up the real mode segment registers : DS, SS, ES + */ + /* zero %eax */ + xorl %eax, %eax + + movw %ax, %ds + movw %ax, %es + movw %ax, %fs + movw %ax, %gs + movw %ax, %ss + + /* restore interrupts */ + sti + + /* return on new stack! */ + DATA32 ret + + .code32 + + +/* + * grub_gate_a20(int on) + * + * Gate address-line 20 for high memory. + * + * This routine is probably overconservative in what it does, but so what? + * + * It also eats any keystrokes in the keyboard buffer. :-( + */ + +FUNCTION(grub_gate_a20) + movl %eax, %edx + +gate_a20_test_current_state:=09 + /* first of all, test if already in a good state */ + call gate_a20_check_state + cmpb %al, %dl + jnz gate_a20_try_bios + ret + +gate_a20_try_bios: + /* second, try a BIOS call */ + pushl %ebp + call prot_to_real + + .code16 + movw $0x2400, %ax + testb %dl, %dl + jz 1f + incw %ax +1: int $0x15 + + DATA32 call real_to_prot + .code32 + + popl %ebp + call gate_a20_check_state + cmpb %al, %dl + jnz gate_a20_try_keyboard_controller + ret +=09 +gate_a20_flush_keyboard_buffer: + inb $0x64 + andb $0x02, %al + jnz gate_a20_flush_keyboard_buffer +2:=09 + inb $0x64 + andb $0x01, %al + jz 3f + inb $0x60 + jmp 2b +3: + ret +=09 +gate_a20_try_keyboard_controller:=09 + /* third, try the keyboard controller */ + call gate_a20_flush_keyboard_buffer + + movb $0xd1, %al + outb $0x64 +4:=09 + inb $0x64 + andb $0x02, %al + jnz 4b + + movb $0xdd, %al + testb %dl, %dl + jz 5f + orb $0x02, %al +5: outb $0x60 + call gate_a20_flush_keyboard_buffer + + /* output a dummy command (USB keyboard hack) */ + movb $0xff, %al + outb $0x64 + call gate_a20_flush_keyboard_buffer + + call gate_a20_check_state + cmpb %al, %dl + jnz gate_a20_try_system_control_port_a + ret + +gate_a20_try_system_control_port_a: + /* fourth, try the system control port A */ + inb $0x92 + andb $(~0x03), %al + testb %dl, %dl + jz 6f + orb $0x02, %al +6: outb $0x92 + + /* When turning off Gate A20, do not check the state strictly, + because a failure is not fatal usually, and Gate A20 is always + on some modern machines. */ + testb %dl, %dl + jz 7f=09 + call gate_a20_check_state + cmpb %al, %dl + /* everything failed, so restart from the beginning */ + jnz gate_a20_try_bios +7: ret +=09 +gate_a20_check_state: + /* iterate the checking for a while */ + movl $100, %ecx +1:=09 + call 3f + cmpb %al, %dl + jz 2f + loop 1b +2: + ret +3:=09 + pushl %ebx + pushl %ecx + xorl %eax, %eax + /* compare the byte at 0x8000 with that at 0x108000 */ + movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %ebx + pushl %ebx + /* save the original byte in CL */ + movb (%ebx), %cl + /* store the value at 0x108000 in AL */ + addl $0x100000, %ebx + movb (%ebx), %al + /* try to set one less value at 0x8000 */ + popl %ebx + movb %al, %ch + decb %ch + movb %ch, (%ebx) + /* serialize */ + outb %al, $0x80 + outb %al, $0x80 + /* obtain the value at 0x108000 in CH */ + pushl %ebx + addl $0x100000, %ebx + movb (%ebx), %ch + /* this result is 1 if A20 is on or 0 if it is off */ + subb %ch, %al + xorb $1, %al + /* restore the original */ + popl %ebx + movb %cl, (%ebx) + popl %ecx + popl %ebx + ret + +#include "lzo1x.S" + + +/* + * This call is special... it never returns... in fact it should simply + * hang at this point! + */ + +FUNCTION(grub_stop) + call prot_to_real + + /* + * This next part is sort of evil. It takes advantage of the + * byte ordering on the x86 to work in either 16-bit or 32-bit + * mode, so think about it before changing it. + */ + +FUNCTION(grub_hard_stop) + hlt + jmp EXT_C(grub_hard_stop) + + +/* + * grub_stop_floppy() + * + * Stop the floppy drive from spinning, so that other software is + * jumped to with a known state. + */ +FUNCTION(grub_stop_floppy) + movw $0x3F2, %dx + xorb %al, %al + outb %al, %dx + ret + +/* + * grub_reboot() + * + * Reboot the system. At the moment, rely on BIOS. + */ +FUNCTION(grub_reboot) + call prot_to_real + .code16 + /* cold boot */ + movw $0x0472, %di + movw %ax, (%di) + ljmp $0xFFFF, $0x0000 + .code32 +=09 +/* + * grub_halt(int no_apm) + * + * Halt the system, using APM if possible. If NO_APM is true, don't use + * APM even if it is available. + */ +FUNCTION(grub_halt) + /* see if zero */ + mov 4(%esp), %eax + testl %eax, %eax + jnz EXT_C(grub_stop) + + call prot_to_real + .code16 +=09 + /* detect APM */ + movw $0x5300, %ax + xorw %bx, %bx + int $0x15 + jc EXT_C(grub_hard_stop) + /* don't check %bx for buggy BIOSes... */ + + /* disconnect APM first */ + movw $0x5304, %ax + xorw %bx, %bx + int $0x15 + + /* connect APM */ + movw $0x5301, %ax + xorw %bx, %bx + int $0x15 + jc EXT_C(grub_hard_stop) + + /* set APM protocol level - 1.1 or bust. (this covers APM 1.2 also) */ + movw $0x530E, %ax + xorw %bx, %bx + movw $0x0101, %cx + int $0x15 + jc EXT_C(grub_hard_stop) +=09 + /* set the power state to off */ + movw $0x5307, %ax + movw $1, %bx + movw $3, %cx + int $0x15 + + /* shouldn't reach here */ + jmp EXT_C(grub_hard_stop) + .code32 +=09 +=09 +/* + * void grub_chainloader_real_boot (int drive, void *part_addr) + * + * This starts another boot loader. + */ + +FUNCTION(grub_chainloader_real_boot) + pushl %edx + pushl %eax + + call EXT_C(grub_dl_unload_all) + + /* set up to pass boot drive */ + mov 4(%esp),%edx + + /* ESI must point to a partition table entry */ + mov 8(%esp),%esi + + /* Turn off Gate A20 */ + xorl %eax, %eax + call EXT_C(grub_gate_a20) +=09 + call prot_to_real + .code16 + ljmp $0, $GRUB_MEMORY_MACHINE_BOOT_LOADER_ADDR + .code32 + + +/* + * void grub_linux_boot_zimage (void) + */ +VARIABLE(grub_linux_prot_size) + .long 0 +VARIABLE(grub_linux_tmp_addr) + .long 0 +VARIABLE(grub_linux_real_addr) + .long 0 +=09 +FUNCTION(grub_linux_boot_zimage) + /* copy the kernel */ + movl EXT_C(grub_linux_prot_size), %ecx + addl $3, %ecx + shrl $2, %ecx + movl $GRUB_LINUX_BZIMAGE_ADDR, %esi + movl $GRUB_LINUX_ZIMAGE_ADDR, %edi + cld + rep + movsl + +FUNCTION(grub_linux_boot_bzimage) + call EXT_C(grub_dl_unload_all) +=09 + movl EXT_C(grub_linux_real_addr), %ebx + + /* copy the real mode code */ + movl EXT_C(grub_linux_tmp_addr), %esi + movl %ebx, %edi + movl $GRUB_LINUX_SETUP_MOVE_SIZE, %ecx + cld + rep + movsb + + /* change %ebx to the segment address */ + shrl $4, %ebx + movl %ebx, %eax + addl $0x20, %eax + movw %ax, linux_setup_seg + + /* XXX new stack pointer in safe area for calling functions */ + movl $0x4000, %esp + call EXT_C(grub_stop_floppy) + + /* final setup for linux boot */ + call prot_to_real + .code16 + + cli + movw %bx, %ss + movw $GRUB_LINUX_SETUP_STACK, %sp + + movw %bx, %ds + movw %bx, %es + movw %bx, %fs + movw %bx, %gs + + /* ljmp */ + .byte 0xea + .word 0 +linux_setup_seg: + .word 0 + .code32 + + =09 +/* + * This starts the multiboot kernel. + */ + +FUNCTION(grub_multiboot_real_boot) + /* Push the entry address on the stack. */ + /* Move the address of the multiboot information structure to ebx. */ + movl 8(%esp),%ebx +=09 + /* Unload all modules and stop the floppy driver. */ + call EXT_C(grub_dl_unload_all) + call EXT_C(grub_stop_floppy) + + /* Interrupts should be disabled. */ + cli +=09 + /* Move the magic value into eax and jump to the kernel. */ + movl $GRUB_MB_MAGIC2,%eax + movl 4(%esp),%ecx + jmp *%ecx +=09 +=09 +/* + * int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap) + * + * Call IBM/MS INT13 Extensions (int 13 %ah=3DAH) for DRIVE. DAP + * is passed for disk address packet. If an error occurs, return + * non-zero, otherwise zero. + */ + +FUNCTION(grub_biosdisk_rw_int13_extensions) + movw 0x4(%esp), %ax + movw 0x8(%esp), %dx + mov 0xC(%esp), %ecx + pushl %ebp + pushl %esi + + /* compute the address of disk_address_packet */ + movw %cx, %si + xorw %cx, %cx + shrl $4, %ecx /* save the segment to cx */ + + /* ah */ + movb %al, %dh + /* enter real mode */ + call prot_to_real +=09 + .code16 + movb %dh, %ah + movw %cx, %ds + int $0x13 /* do the operation */ + movb %ah, %dl /* save return value */ + /* clear the data segment */ + xorw %ax, %ax + movw %ax, %ds + /* back to protected mode */ + DATA32 call real_to_prot + .code32 + + movb %dl, %al /* return value in %eax */ + + popl %esi + popl %ebp + + ret +=09 +/* + * int grub_biosdisk_rw_standard (int ah, int drive, int coff, int hoff, + * int soff, int nsec, int segment) + * + * Call standard and old INT13 (int 13 %ah=3DAH) for DRIVE. = Read/write + * NSEC sectors from COFF/HOFF/SOFF into SEGMENT. If an error occurs, + * return non-zero, otherwise zero. + */ + +FUNCTION(grub_biosdisk_rw_standard) + pushl %ebp + movl %esp, %ebp + + pushl %ebx + pushl %edi + pushl %esi + + /* set up CHS information */ + movw 0x8(%ebp), %ax + movw 0xC(%ebp), %dx + movw 0x10(%ebp), %cx + + /* set %ch to low eight bits of cylinder */ + xchgb %cl, %ch + /* set bits 6-7 of %cl to high two bits of cylinder */ + shlb $6, %cl + /* set bits 0-5 of %cl to sector */ + addb 0x18(%ebp), %cl + /* set %dh to head */ + movb 0x14(%ebp), %dh + /* set %ah to AH */ + movb %al, %ah + /* set %al to NSEC */ + movb 0x1c(%ebp), %al + /* save %ax in %di */ + movw %ax, %di + /* save SEGMENT in %bx */ + movw 0x20(%ebp), %bx + =09 + /* enter real mode */ + call prot_to_real + + .code16 + movw %bx, %es + xorw %bx, %bx + movw $3, %si /* attempt at least three times */ + +1:=09 + movw %di, %ax + int $0x13 /* do the operation */ + jnc 2f /* check if successful */ + + movb %ah, %bl /* save return value */ + /* if fail, reset the disk system */ + xorw %ax, %ax + int $0x13 +=09 + decw %si + cmpw $0, %si + je 2f + xorb %bl, %bl + jmp 1b /* retry */ +2:=09 + /* back to protected mode */ + DATA32 call real_to_prot + .code32 + + movb %bl, %al /* return value in %eax */ +=09 + popl %esi + popl %edi + popl %ebx + popl %ebp + + ret $(4 * 4) + + +/* + * int grub_biosdisk_check_int13_extensions (int drive) + * + * Check if LBA is supported for DRIVE. If it is supported, then return + * the major version of extensions, otherwise zero. + */ + +FUNCTION(grub_biosdisk_check_int13_extensions) + movw 0x4(%esp), %ax + pushl %ebp + pushl %ebx + + /* drive */ + movb %al, %dl + /* enter real mode */ + call prot_to_real + + .code16 + movb $0x41, %ah + movw $0x55aa, %bx + int $0x13 /* do the operation */ +=09 + /* check the result */ + jc 1f + cmpw $0xaa55, %bx + jne 1f + + movb %ah, %bl /* save the major version into %bl */ + + /* check if AH=3D0x42 is supported */ + andw $1, %cx + jnz 2f +=09 +1: + xorb %bl, %bl +2: + /* back to protected mode */ + DATA32 call real_to_prot + .code32 + + movb %bl, %al /* return value in %eax */ + + popl %ebx + popl %ebp + + ret + + +/* + * int grub_biosdisk_get_diskinfo_int13_extensions (int drive, void *drp) + * + * Return the geometry of DRIVE in a drive parameters, DRP. If an error + * occurs, then return non-zero, otherwise zero. + */ + +FUNCTION(grub_biosdisk_get_diskinfo_int13_extensions) + movw 0x4(%esp), %ax + mov 0x8(%esp), %edx + pushl %ebp + pushl %ebx + pushl %esi + + /* compute the address of drive parameters */ + movw %dx, %si + xorw %dx, %dx + shrl $4, %edx + movw %dx, %bx /* save the segment into %bx */ + /* drive */ + movb %al, %dl + /* enter real mode */ + call prot_to_real + + .code16 + movb $0x48, %ah + movw %bx, %ds + int $0x13 /* do the operation */ + movb %ah, %bl /* save return value in %bl */ + /* clear the data segment */ + xorw %ax, %ax + movw %ax, %ds + /* back to protected mode */ + DATA32 call real_to_prot + .code32 + + movb %bl, %al /* return value in %eax */ + + popl %esi + popl %ebx + popl %ebp +=09 + ret + + +/* + * int grub_biosdisk_get_diskinfo_standard (int drive, + * unsigned long *cylinders, + * unsigned long *heads, + * unsigned long *sectors) + * + * Return the geometry of DRIVE in CYLINDERS, HEADS and SECTORS. If an + * error occurs, then return non-zero, otherwise zero. + */ + +FUNCTION(grub_biosdisk_get_diskinfo_standard) + movw 0x4(%esp), %ax + mov 0x8(%esp), %edx + mov 0xC(%esp), %ecx + pushl %ebp + pushl %ebx + pushl %edi + + /* push CYLINDERS */ + pushl %edx + /* push HEADS */ + pushl %ecx + /* SECTORS is on the stack */ +=09 + /* drive */ + movb %al, %dl + /* enter real mode */ + call prot_to_real + + .code16 + movb $0x8, %ah + int $0x13 /* do the operation */ + /* check if successful */ + testb %ah, %ah + jnz 1f + /* bogus BIOSes may not return an error number */ + testb $0x3f, %cl /* 0 sectors means no disk */ + jnz 1f /* if non-zero, then succeed */ + /* XXX 0x60 is one of the unused error numbers */ + movb $0x60, %ah +1: + movb %ah, %bl /* save return value in %bl */ + /* back to protected mode */ + DATA32 call real_to_prot + .code32 + + /* pop HEADS */ + popl %edi + movb %dh, %al + incl %eax /* the number of heads is counted from zero */ + movl %eax, (%edi) + + /* pop CYLINDERS */ + popl %edi + movb %ch, %al + movb %cl, %ah + shrb $6, %ah /* the number of cylinders is counted from zero */ + incl %eax + movl %eax, (%edi) + + /* SECTORS */ + movl 0x1c(%esp), %edi + andb $0x3f, %cl + movzbl %cl, %eax + movl %eax, (%edi) +=09 + xorl %eax, %eax + movb %bl, %al /* return value in %eax */ + + popl %edi + popl %ebx + popl %ebp + + ret $4 + + +/* + * int grub_biosdisk_get_num_floppies (void) + */ +FUNCTION(grub_biosdisk_get_num_floppies) + pushl %ebp + + xorl %edx, %edx + call prot_to_real +=09 + .code16 + /* reset the disk system first */ + int $0x13 +1: + stc +=09 + /* call GET DISK TYPE */ + movb $0x15, %ah + int $0x13 + + jc 2f + + /* check if this drive exists */=09 + testb $0x3, %ah + jz 2f + + incb %dl + cmpb $2, %dl + jne 1b +2: + DATA32 call real_to_prot + .code32 + + movl %edx, %eax + popl %ebp + ret +=09 +=09 +/* + * + * grub_get_memsize(i) : return the memory size in KB. i =3D=3D 0 for conventional + * memory, i =3D=3D 1 for extended memory + * BIOS call "INT 12H" to get conventional memory size + * BIOS call "INT 15H, AH=3D88H" to get extended memory size + * Both have the return value in AX. + * + */ + +FUNCTION(grub_get_memsize) + mov 0x4(%esp), %eax + pushl %ebp + + movl %eax, %edx + + call prot_to_real /* enter real mode */ + .code16 + + testl %edx, %edx + jnz xext + + int $0x12 + jmp xdone + +xext: + movb $0x88, %ah + int $0x15 + +xdone: + movw %ax, %dx + + DATA32 call real_to_prot + .code32 + + movw %dx, %ax + + popl %ebp + ret + + +/* + * + * grub_get_eisa_mmap() : return packed EISA memory map, lower 16 bits is + * memory between 1M and 16M in 1K parts, upper 16 bits is + * memory above 16M in 64K parts. If error, return zero. + * BIOS call "INT 15H, AH=3DE801H" to get EISA memory map, + * AX =3D memory between 1M and 16M in 1K parts. + * BX =3D memory above 16M in 64K parts. + * + */ + +FUNCTION(grub_get_eisa_mmap) + pushl %ebp + pushl %ebx + + call prot_to_real /* enter real mode */ + .code16 + + movw $0xe801, %ax + int $0x15 + + shll $16, %ebx + movw %ax, %bx + + DATA32 call real_to_prot + .code32 + + cmpb $0x86, %bh + je xnoteisa + + movl %ebx, %eax + +xnoteisa: + popl %ebx + popl %ebp + ret + +/* + * + * grub_get_mmap_entry(addr, cont) : address and old continuation value (zero to + * start), for the Query System Address Map BIOS call. + * + * Sets the first 4-byte int value of "addr" to the size returned by + * the call. If the call fails, sets it to zero. + * + * Returns: new (non-zero) continuation value, 0 if done. + */ + +FUNCTION(grub_get_mmap_entry) + mov 0x4(%esp), %eax + mov 0x8(%esp), %edx + pushl %ebp + pushl %ebx + pushl %edi + pushl %esi + + /* push ADDR */ + pushl %eax +=09 + /* place address (+4) in ES:DI */ + addl $4, %eax + movl %eax, %edi + andl $0xf, %edi + shrl $4, %eax + movl %eax, %esi + + /* set continuation value */ + movl %edx, %ebx + + /* set default maximum buffer size */ + movl $0x14, %ecx + + /* set EDX to 'SMAP' */ + movl $0x534d4150, %edx + + call prot_to_real /* enter real mode */ + .code16 + + movw %si, %es + movl $0xe820, %eax + int $0x15 + + DATA32 jc xnosmap + + cmpl $0x534d4150, %eax + jne xnosmap + + cmpl $0x14, %ecx + jl xnosmap + + cmpl $0x400, %ecx + jg xnosmap + + jmp xsmap + +xnosmap: + xorl %ecx, %ecx + +xsmap: + DATA32 call real_to_prot + .code32 + + /* write length of buffer (zero if error) into ADDR */ + popl %eax + movl %ecx, (%eax) + + /* set return value to continuation */ + movl %ebx, %eax + + popl %esi + popl %edi + popl %ebx + popl %ebp + ret + +=09 +/* + * void grub_console_real_putchar (int c) + * + * Put the character C on the console. Because GRUB wants to write a + * character with an attribute, this implementation is a bit tricky. + * If C is a control character (CR, LF, BEL, BS), use INT 10, AH =3D = 0Eh + * (TELETYPE OUTPUT). Otherwise, save the original position, put a space, + * save the current position, restore the original position, write the + * character and the attribute, and restore the current position. + * + * The reason why this is so complicated is that there is no easy way to + * get the height of the screen, and the TELETYPE OUPUT BIOS call doesn't + * support setting a background attribute. + */ +FUNCTION(grub_console_real_putchar) + mov 0x4(%esp), %eax + movl %eax, %edx + pusha + movb EXT_C(grub_console_cur_color), %bl +=09 + call prot_to_real + .code16 + movb %dl, %al + xorb %bh, %bh + + /* use teletype output if control character */ + cmpb $0x7, %al + je 1f + cmpb $0x8, %al + je 1f + cmpb $0xa, %al + je 1f + cmpb $0xd, %al + je 1f + + /* save the character and the attribute on the stack */ + pushw %ax + pushw %bx +=09 + /* get the current position */ + movb $0x3, %ah + int $0x10 + + /* check the column with the width */ + cmpb $79, %dl + jl 2f +=09 + /* print CR and LF, if next write will exceed the width */=09 + movw $0x0e0d, %ax + int $0x10 + movb $0x0a, %al + int $0x10 +=09 + /* get the current position */ + movb $0x3, %ah + int $0x10 + +2:=09 + /* restore the character and the attribute */ + popw %bx + popw %ax +=09 + /* write the character with the attribute */ + movb $0x9, %ah + movw $1, %cx + int $0x10 + + /* move the cursor forward */ + incb %dl + movb $0x2, %ah + int $0x10 + + jmp 3f + +1: movw $1, %bx + movb $0xe, %ah + int $0x10 +=09 +3: DATA32 call real_to_prot + .code32 +=09 + popa + ret +=09 + +/* + * int grub_console_getkey (void) + * BIOS call "INT 16H Function 00H" to read character from keyboard + * Call with %ah =3D 0x0 + * Return: %ah =3D keyboard scan code + * %al =3D ASCII character + */ + +/* this table is used in translate_keycode below */ +translation_table: + .word GRUB_CONSOLE_KEY_LEFT, 2 + .word GRUB_CONSOLE_KEY_RIGHT, 6 + .word GRUB_CONSOLE_KEY_UP, 16 + .word GRUB_CONSOLE_KEY_DOWN, 14 + .word GRUB_CONSOLE_KEY_HOME, 1 + .word GRUB_CONSOLE_KEY_END, 5 + .word GRUB_CONSOLE_KEY_DC, 4 + .word GRUB_CONSOLE_KEY_BACKSPACE, 8 + .word GRUB_CONSOLE_KEY_PPAGE, 7 + .word GRUB_CONSOLE_KEY_NPAGE, 3 + .word 0 +=09 +/* + * translate_keycode translates the key code %dx to an ascii code. + */ + .code16 + +translate_keycode: + pushw %bx + pushw %si +=09 + movw $ABS(translation_table), %si +=09 +1: lodsw + /* check if this is the end */ + testw %ax, %ax + jz 2f + /* load the ascii code into %ax */ + movw %ax, %bx + lodsw + /* check if this matches the key code */ + cmpw %bx, %dx + jne 1b + /* translate %dx, if successful */ + movw %ax, %dx + +2: popw %si + popw %bx + ret + + .code32 +=09 +FUNCTION(grub_console_getkey) + pushl %ebp + + call prot_to_real + .code16 + + int $0x16 + + movw %ax, %dx /* real_to_prot uses %eax */ + call translate_keycode + =09 + DATA32 call real_to_prot + .code32 + + movw %dx, %ax + + popl %ebp + ret + + +/* + * int grub_console_checkkey (void) + * if there is a character pending, return it; otherwise return -1 + * BIOS call "INT 16H Function 01H" to check whether a character is pending + * Call with %ah =3D 0x1 + * Return: + * If key waiting to be input: + * %ah =3D keyboard scan code + * %al =3D ASCII character + * Zero flag =3D clear + * else + * Zero flag =3D set + */ +FUNCTION(grub_console_checkkey) + pushl %ebp + xorl %edx, %edx +=09 + call prot_to_real /* enter real mode */ + .code16 + + movb $0x1, %ah + int $0x16 + + jz notpending +=09 + movw %ax, %dx + DATA32 jmp pending + +notpending: + decl %edx + +pending: + DATA32 call real_to_prot + .code32 + + movl %edx, %eax + + popl %ebp + ret + +=09 +/* + * grub_uint16_t grub_console_getxy (void) + * BIOS call "INT 10H Function 03h" to get cursor position + * Call with %ah =3D 0x03 + * %bh =3D page + * Returns %ch =3D starting scan line + * %cl =3D ending scan line + * %dh =3D row (0 is top) + * %dl =3D column (0 is left) + */ + + +FUNCTION(grub_console_getxy) + pushl %ebp + pushl %ebx /* save EBX */ + + call prot_to_real + .code16 + + xorb %bh, %bh /* set page to 0 */ + movb $0x3, %ah + int $0x10 /* get cursor position */ + + DATA32 call real_to_prot + .code32 + + movb %dl, %ah + movb %dh, %al + + popl %ebx + popl %ebp + ret + + +/* + * void grub_console_gotoxy(grub_uint8_t x, grub_uint8_t y) + * BIOS call "INT 10H Function 02h" to set cursor position + * Call with %ah =3D 0x02 + * %bh =3D page + * %dh =3D row (0 is top) + * %dl =3D column (0 is left) + */ + + +FUNCTION(grub_console_gotoxy) + mov 0x4(%esp), %eax + mov 0x8(%esp), %edx + pushl %ebp + pushl %ebx /* save EBX */ + + movb %dl, %dh /* %dh =3D y */ + movb %al, %dl /* %dl =3D x */ + + call prot_to_real + .code16 + + xorb %bh, %bh /* set page to 0 */ + movb $0x2, %ah + int $0x10 /* set cursor position */ + + DATA32 call real_to_prot + .code32 + + popl %ebx + popl %ebp + ret + +=09 +/* + * void grub_console_cls (void) + * BIOS call "INT 10H Function 09h" to write character and attribute + * Call with %ah =3D 0x09 + * %al =3D (character) + * %bh =3D (page number) + * %bl =3D (attribute) + * %cx =3D (number of times) + */ + +FUNCTION(grub_console_cls) + pushl %ebp + pushl %ebx /* save EBX */ + + call prot_to_real + .code16 + + /* move the cursor to the beginning */ + movb $0x02, %ah + xorb %bh, %bh + xorw %dx, %dx + int $0x10 + + /* write spaces to the entire screen */ + movw $0x0920, %ax + movw $0x07, %bx + movw $(80 * 25), %cx + int $0x10 + + /* move back the cursor */ + movb $0x02, %ah + int $0x10 + + DATA32 call real_to_prot + .code32 + + popl %ebx + popl %ebp + ret + +=09 +/* + * void grub_console_setcursor (int on) + * BIOS call "INT 10H Function 01h" to set cursor type + * Call with %ah =3D 0x01 + * %ch =3D cursor starting scanline + * %cl =3D cursor ending scanline + */ + +console_cursor_state: + .byte 1 +console_cursor_shape: + .word 0 +=09 +FUNCTION(grub_console_setcursor) + mov 0x4(%esp), %eax + pushl %ebp + pushl %ebx + + /* push ON */ + pushl %eax +=09 + /* check if the standard cursor shape has already been saved */ + movw console_cursor_shape, %ax + testw %ax, %ax + jne 1f + + call prot_to_real + .code16 + + movb $0x03, %ah + xorb %bh, %bh + int $0x10 + + DATA32 call real_to_prot + .code32 + + movw %cx, console_cursor_shape +1: + /* set %cx to the designated cursor shape */ + movw $0x2000, %cx + popl %eax + testl %eax, %eax + jz 2f + movw console_cursor_shape, %cx +2:=09 + call prot_to_real + .code16 + + movb $0x1, %ah + int $0x10=20 + + DATA32 call real_to_prot + .code32 + + popl %ebx + popl %ebp + ret + =09 +/* + * grub_getrtsecs() + * if a seconds value can be read, read it and return it (BCD), + * otherwise return 0xFF + * BIOS call "INT 1AH Function 02H" to check whether a character is pending + * Call with %ah =3D 0x2 + * Return: + * If RT Clock can give correct values + * %ch =3D hour (BCD) + * %cl =3D minutes (BCD) + * %dh =3D seconds (BCD) + * %dl =3D daylight savings time (00h std, 01h daylight) + * Carry flag =3D clear + * else + * Carry flag =3D set + * (this indicates that the clock is updating, or + * that it isn't running) + */ +FUNCTION(grub_getrtsecs) + pushl %ebp + + call prot_to_real /* enter real mode */ + .code16 + + clc + movb $0x2, %ah + int $0x1a + + DATA32 jnc gottime + movb $0xff, %dh + +gottime: + DATA32 call real_to_prot + .code32 + + movb %dh, %al + + popl %ebp + ret + +=09 +/* + * grub_get_rtc() + * return the real time in ticks, of which there are about + * 18-20 per second + */ +FUNCTION(grub_get_rtc) + pushl %ebp + + call prot_to_real /* enter real mode */ + .code16 + + /* %ax is already zero */ + int $0x1a + + DATA32 call real_to_prot + .code32 + + movl %ecx, %eax + shll $16, %eax + movw %dx, %ax + + popl %ebp + ret + + +/* + * unsigned char grub_vga_set_mode (unsigned char mode) + */ +FUNCTION(grub_vga_set_mode) + mov 0x4(%esp), %eax + pushl %ebp + pushl %ebx + movl %eax, %ecx + + call prot_to_real + .code16 + /* get current mode */ + xorw %bx, %bx + movb $0x0f, %ah + int $0x10 + movb %al, %dl + + /* set the new mode */ + movb %cl, %al + xorb %ah, %ah + int $0x10 + + DATA32 call real_to_prot + .code32 + + movb %dl, %al + popl %ebx + popl %ebp + ret + + +/* + * unsigned char *grub_vga_get_font (void) + */ +FUNCTION(grub_vga_get_font) + pushl %ebp + pushl %ebx + + call prot_to_real + .code16 + movw $0x1130, %ax + movb $0x06, %bh + int $0x10 + movw %es, %bx + movw %bp, %dx + DATA32 call real_to_prot + .code32 + + movzwl %bx, %ecx + shll $4, %ecx + movw %dx, %ax + addl %ecx, %eax + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_controller_info (struct grub_vbe_info_block *controller_info) + * + * Register allocations for parameters: + * %eax *controller_info + */ +FUNCTION(grub_vbe_get_controller_info) + mov 0x4(%esp), %eax + pushl %ebp + pushl %edi + + movw %ax, %di /* Store *controller_info to %edx:%di. */ + xorw %ax, %ax + shrl $4, %eax + mov %eax, %edx /* prot_to_real destroys %eax. */ +=09 + call prot_to_real + .code16 + + pushw %es + + movw %dx, %es /* *controller_info is now on %es:%di. */ + movw $0x4f00, %ax + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + popw %es + + DATA32 call real_to_prot + .code32 + + movl %edx, %eax + andl $0x0FFFF, %eax /* Return value in %eax. */ +=09 + popl %edi + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_mode_info (grub_uint32_t mode, + * struct grub_vbe_mode_info_block *mode_info) + * + * Register allocations for parameters: + * %eax mode + * %edx *mode_info + */ +FUNCTION(grub_vbe_get_mode_info) + mov 0x4(%esp), %eax + mov 0x8(%esp), %edx + pushl %ebp + pushl %edi + + movl %eax, %ecx /* Store mode number to %ecx. */ + + movw %dx, %di /* Store *mode_info to %edx:%di. */ + xorw %dx, %dx + shrl $4, %edx + + call prot_to_real + .code16 + + pushw %es + + movw %dx, %es /* *mode_info is now on %es:%di. */ + movw $0x4f01, %ax + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + popw %es + + DATA32 call real_to_prot + .code32 + + movl %edx, %eax + andl $0x0FFFF, %eax /* Return value in %eax. */ + + popl %edi + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_set_mode (grub_uint32_t mode, + * struct grub_vbe_crtc_info_block *crtc_info) + * + * Register allocations for parameters: + * %eax mode + * %edx *crtc_info + */ +FUNCTION(grub_vbe_set_mode) + mov 0x4(%esp), %eax + mov 0x8(%esp), %edx + pushl %ebp + pushl %ebx + + movl %eax, %ebx /* Store mode in %ebx. */ + + movw %dx, %di /* Store *crtc_info to %edx:%di. */ + xorw %dx, %dx + shrl $4, %edx + + call prot_to_real + .code16 + + pushw %es + + movw %dx, %es /* *crtc_info is now on %es:%di. */ + + movw $0x4f02, %ax + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + popw %es + + DATA32 call real_to_prot + .code32 +=09 + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_mode (grub_uint32_t *mode) + * + * Register allocations for parameters: + * %eax *mode + */ +FUNCTION(grub_vbe_get_mode) + mov 0x4(%esp), %eax + pushl %ebp + pushl %ebx + pushl %eax /* Push *mode to stack. */ + + call prot_to_real + .code16 + + movw $0x4f03, %ax + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 + + popl %edi /* Pops *mode from stack to %edi. */ + andl $0xFFFF, %ebx + movl %ebx, (%edi) + + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_set_memory_window (grub_uint32_t window, + * grub_uint32_t position); + * + * Register allocations for parameters: + * %eax window + * %edx position + */ +FUNCTION(grub_vbe_set_memory_window) + mov 0x4(%esp), %eax + mov 0x8(%esp), %edx + pushl %ebp + pushl %ebx + + movl %eax, %ebx + + call prot_to_real + .code16 + + movw $0x4f05, %ax + andw $0x00ff, %bx /* BL =3D window, BH =3D 0, Set memory window. */ + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 +=09 + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_memory_window (grub_uint32_t window, + * grub_uint32_t *position); + * + * Register allocations for parameters: + * %eax window + * %edx *position + */ +FUNCTION(grub_vbe_get_memory_window) + mov 0x4(%esp), %eax + mov 0x8(%esp), %edx + pushl %ebp + pushl %ebx + pushl %edx /* Push *position to stack. */ + + movl %eax, %ebx /* Store window in %ebx. */ + + call prot_to_real + .code16 + + movw $0x4f05, %ax + andw $0x00ff, %bx /* BL =3D window. */ + orw $0x0100, %bx /* BH =3D 1, Get memory window. */ + int $0x10 + + movw %ax, %bx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 + + popl %edi /* pops *position from stack to %edi. */ + andl $0xFFFF, %edx + movl %edx, (%edi) /* Return position to caller. */ + + movw %bx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_set_scanline_length (grub_uint32_t length) + * + * Register allocations for parameters: + * %eax length + */ +FUNCTION(grub_vbe_set_scanline_length) + mov 0x4(%esp), %eax + pushl %ebp + pushl %ebx + + movl %eax, %ecx /* Store length in %ecx. */ + + call prot_to_real + .code16 + + movw $0x4f06, %ax + movw $0x0002, %bx /* BL =3D 2, Set Scan Line in Bytes. */ + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 +=09 + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_scanline_length (grub_uint32_t *length) + * + * Register allocations for parameters: + * %eax *length + */ +FUNCTION(grub_vbe_get_scanline_length) + mov 0x4(%esp), %eax + pushl %ebp + pushl %ebx + pushl %edx /* Push *length to stack. */ + + call prot_to_real + .code16 + + movw $0x4f06, %ax + movw $0x0001, %bx /* BL =3D 1, Get Scan Line Length (in bytes). */ + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 + + popl %edi /* Pops *length from stack to %edi. */ + andl $0xFFFF, %ebx + movl %ebx, (%edi) /* Return length to caller. */ + + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_set_display_start (grub_uint32_t x, + * grub_uint32_t y) + * + * Register allocations for parameters: + * %eax x + * %edx y + */ +FUNCTION(grub_vbe_set_display_start) + mov 0x4(%esp), %eax + mov 0x8(%esp), %edx + pushl %ebp + pushl %ebx + + movl %eax, %ecx /* Store x in %ecx. */ + + call prot_to_real + .code16 + + movw $0x4f07, %ax + movw $0x0080, %bx /* BL =3D 80h, Set Display Start=20 + during Vertical Retrace. */ + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 +=09 + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_display_start (grub_uint32_t *x, + * grub_uint32_t *y) + * + * Register allocations for parameters: + * %eax *x + * %edx *y + */ +FUNCTION(grub_vbe_get_display_start) + mov 0x4(%esp), %eax + mov 0x8(%esp), %edx + pushl %ebp + pushl %ebx + pushl %eax /* Push *x to stack. */ + pushl %edx /* Push *y to stack. */ + + call prot_to_real + .code16 + + movw $0x4f07, %ax + movw $0x0001, %bx /* BL =3D 1, Get Display Start. */ + int $0x10 + + movw %ax, %bx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 + + popl %edi /* Pops *y from stack to %edi. */ + andl $0xFFFF, %edx + movl %edx, (%edi) /* Return y-position to caller. */ + + popl %edi /* Pops *x from stack to %edi. */ + andl $0xFFFF, %ecx + movl %ecx, (%edi) /* Return x-position to caller. */ + + movw %bx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_set_palette_data (grub_uint32_t color_count, + * grub_uint32_t start_index, + * struct grub_vbe_palette_data *palette_data) + * + * Register allocations for parameters: + * %eax color_count + * %edx start_index + * %ecx *palette_data + */ +FUNCTION(grub_vbe_set_palette_data) + mov 0x4(%esp), %eax + mov 0x8(%esp), %edx + mov 0xC(%esp), %ecx + pushl %ebp + pushl %ebx + + movl %eax, %ebx /* Store color_count in %ebx. */ + + movw %cx, %di /* Store *palette_data to %ecx:%di. */ + xorw %cx, %cx + shrl $4, %ecx + + call prot_to_real + .code16 + + pushw %es + + movw %cx, %es /* *palette_data is now on %es:%di. */ + movw %bx, %cx /* color_count is now on %cx. */ + + movw $0x4f09, %ax + xorw %bx, %bx /* BL =3D 0, Set Palette Data. */ + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + popw %es + + DATA32 call real_to_prot + .code32 +=09 + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret FILE kern/i386/pc/startup.S.regparm (NEW) (1) The old startup.S file. Only renamed. diff -EbwBruN ./kern/i386/pc/startup.S.regparm ../../src/grub-1.93/kern/i386/pc/startup.S.regparm --- ./kern/i386/pc/startup.S.regparm 1970-01-01 01:00:00.000000000 +0100 +++ ../../src/grub-1.93/kern/i386/pc/startup.S.regparm 2006-05-03 22:39:20.000000000 +0200 @@ -0,0 +1,2170 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 1999,2000,2001,2002,2003,2005 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +/* + * Note: These functions defined in this file may be called from C. + * Be careful of that you must not modify some registers. Quote + * from gcc-2.95.2/gcc/config/i386/i386.h: +=09 + 1 for registers not available across function calls. + These must include the FIXED_REGISTERS and also any + registers that can be used without being saved. + The latter must include the registers where values are returned + and the register where structure-value addresses are passed. + Aside from that, you can include as many other registers as you like. + + ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg +{ 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } + */ + +/* + * Note: GRUB is compiled with the options -mrtd and -mregparm=3D3. + * So the first three arguments are passed in %eax, %edx, and %ecx, + * respectively, and if a function has a fixed number of arguments + * and the number if greater than three, the function must return + * with "ret $N" where N is ((the number of arguments) - 3) * 4. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + =09 +#define ABS(x) ((x) - EXT_C(start) + GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200) +=09 + .file "startup.S" + + .text + + /* Tell GAS to generate 16-bit instructions so that this code works + in real mode. */ + .code16 + + .globl start, _start +start: +_start: + /* + * Guarantee that "main" is loaded at 0x0:0x8200. + */ + ljmp $0, $ABS(codestart) + + /* + * Compatibility version number + * + * These MUST be at byte offset 6 and 7 of the executable + * DO NOT MOVE !!! + */ + . =3D EXT_C(start) + 0x6 + .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR + + /* + * This is a special data area 8 bytes from the beginning. + */ + + . =3D EXT_C(start) + 0x8 + +VARIABLE(grub_total_module_size) + .long 0 +VARIABLE(grub_kernel_image_size) + .long 0 +VARIABLE(grub_compressed_size) + .long 0 +VARIABLE(grub_install_dos_part) + .long 0xFFFFFFFF +VARIABLE(grub_install_bsd_part) + .long 0xFFFFFFFF +VARIABLE(grub_prefix) + .string "/boot/grub" + + /* + * Leave some breathing room for the prefix. + */ + + . =3D EXT_C(start) + 0x50 + +/* + * Support for booting GRUB from a Multiboot boot loader (e.g. GRUB itself). + * This uses the a.out kludge to load raw binary to the area starting at 1MB, + * and relocates itself after loaded. + */ +multiboot_header: + /* magic */ + .long 0x1BADB002 + /* flags */ + .long (1 << 16) + /* checksum */ + .long -0x1BADB002 - (1 << 16) + /* header addr */ + .long multiboot_header - _start + 0x100000 + 0x200 + /* load addr */ + .long 0x100000 + /* load end addr */ + .long 0 + /* bss end addr */ + .long 0 + /* entry addr */ + .long multiboot_entry - _start + 0x100000 + 0x200 +=09 +multiboot_entry: + .code32 + /* obtain the boot device */ + movl 12(%ebx), %edx + + /* relocate the code */ + movl $(GRUB_KERNEL_MACHINE_RAW_SIZE + 0x200), %ecx + addl EXT_C(grub_compressed_size) - _start + 0x100000 + 0x200, %ecx + movl $0x100000, %esi + movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %edi + cld + rep + movsb + /* jump to the real address */ + movl $multiboot_trampoline, %eax + jmp *%eax +=09 +multiboot_trampoline: + /* fill the boot information */ + movl %edx, %eax + shrl $8, %eax + xorl %ebx, %ebx + cmpb $0xFF, %ah + je 1f + movb %ah, %bl + movl %ebx, EXT_C(grub_install_dos_part) +1: + cmpb $0xFF, %al + je 2f + movb %al, %bl + movl %ebx, EXT_C(grub_install_bsd_part) +2: + shrl $24, %edx + /* enter the usual booting */ + call prot_to_real + .code16 +=09 +/* the real mode code continues... */ +codestart: + cli /* we're not safe here! */ + + /* set up %ds, %ss, and %es */ + xorw %ax, %ax + movw %ax, %ds + movw %ax, %ss + movw %ax, %es + + /* set up the real mode/BIOS stack */ + movl $GRUB_MEMORY_MACHINE_REAL_STACK, %ebp + movl %ebp, %esp + + sti /* we're safe again */ + + /* save boot drive reference */ + ADDR32 movb %dl, EXT_C(grub_boot_drive) + + /* reset disk system (%ah =3D 0) */ + int $0x13 +=09 + /* transition to protected mode */ + DATA32 call real_to_prot + + /* The ".code32" directive takes GAS out of 16-bit mode. */ + .code32 + + incl %eax + call EXT_C(grub_gate_a20) +=09 + /* decompress the compressed part and put the result at 1MB */ + movl $0x100000, %esi + movl $(START_SYMBOL + GRUB_KERNEL_MACHINE_RAW_SIZE), %edi + + pushl %esi + pushl EXT_C(grub_compressed_size) + pushl %edi + call lzo1x_decompress + addl $12, %esp + + /* copy back the decompressed part */ + movl %eax, %ecx + cld + rep + movsb + + /* copy modules before cleaning out the bss */ + movl EXT_C(grub_total_module_size), %ecx + movl EXT_C(grub_kernel_image_size), %esi + addl %ecx, %esi + addl $START_SYMBOL, %esi + decl %esi + movl $END_SYMBOL, %edi + addl %ecx, %edi + decl %edi + std + rep + movsb +=09 + /* clean out the bss */ + movl $BSS_START_SYMBOL, %edi + + /* compute the bss length */ + movl $END_SYMBOL, %ecx + subl %edi, %ecx + =09 + /* clean out */ + xorl %eax, %eax + cld + rep + stosb +=09 + /* + * Call the start of main body of C code. + */ + call EXT_C(grub_main) + + +/* + * This is the area for all of the special variables. + */ + + .p2align 2 /* force 4-byte alignment */ + +protstack: + .long GRUB_MEMORY_MACHINE_PROT_STACK + +VARIABLE(grub_boot_drive) + .long 0 + +VARIABLE(grub_start_addr) + .long START_SYMBOL + +VARIABLE(grub_end_addr) + .long END_SYMBOL +=09 +VARIABLE(grub_apm_bios_info) + .word 0 /* version */ + .word 0 /* cseg */ + .long 0 /* offset */ + .word 0 /* cseg_16 */ + .word 0 /* dseg_16 */ + .word 0 /* cseg_len */ + .word 0 /* cseg_16_len */ + .word 0 /* dseg_16_len */ +=09 +/* + * This is the Global Descriptor Table + * + * An entry, a "Segment Descriptor", looks like this: + * + * 31 24 19 16 7 0 + * ------------------------------------------------------------ + * | | |B| |A| | | |1|0|E|W|A| | + * | BASE 31..24 |G|/|L|V| LIMIT |P|DPL| TYPE | BASE 23:16 | 4 + * | | |D| |L| 19..16| | |1|1|C|R|A| | + * ------------------------------------------------------------ + * | | | + * | BASE 15..0 | LIMIT 15..0 | 0 + * | | | + * ------------------------------------------------------------ + * + * Note the ordering of the data items is reversed from the above + * description. + */ + + .p2align 2 /* force 4-byte alignment */ +gdt: + .word 0, 0 + .byte 0, 0, 0, 0 + + /* -- code segment -- + * base =3D 0x00000000, limit =3D 0xFFFFF (4 KiB Granularity), present + * type =3D 32bit code execute/read, DPL =3D 0 + */ + .word 0xFFFF, 0 + .byte 0, 0x9A, 0xCF, 0 + + /* -- data segment -- + * base =3D 0x00000000, limit 0xFFFFF (4 KiB Granularity), present + * type =3D 32 bit data read/write, DPL =3D 0=20 + */ + .word 0xFFFF, 0 + .byte 0, 0x92, 0xCF, 0 + + /* -- 16 bit real mode CS -- + * base =3D 0x00000000, limit 0x0FFFF (1 B Granularity), present + * type =3D 16 bit code execute/read only/conforming, DPL =3D 0 + */ + .word 0xFFFF, 0 + .byte 0, 0x9E, 0, 0 + + /* -- 16 bit real mode DS -- + * base =3D 0x00000000, limit 0x0FFFF (1 B Granularity), present + * type =3D 16 bit data read/write, DPL =3D 0 + */ + .word 0xFFFF, 0 + .byte 0, 0x92, 0, 0 + + +/* this is the GDT descriptor */ +gdtdesc: + .word 0x27 /* limit */ + .long gdt /* addr */ + +=09 +/* + * These next two routines, "real_to_prot" and "prot_to_real" are structured + * in a very specific way. Be very careful when changing them. + * + * NOTE: Use of either one messes up %eax and %ebp. + */ + +real_to_prot: + .code16 + cli + + /* load the GDT register */ + DATA32 ADDR32 lgdt gdtdesc + + /* turn on protected mode */ + movl %cr0, %eax + orl $GRUB_MEMORY_MACHINE_CR0_PE_ON, %eax + movl %eax, %cr0 + + /* jump to relocation, flush prefetch queue, and reload %cs */ + DATA32 ljmp $GRUB_MEMORY_MACHINE_PROT_MODE_CSEG, $protcseg + + .code32 +protcseg: + /* reload other segment registers */ + movw $GRUB_MEMORY_MACHINE_PROT_MODE_DSEG, %ax + movw %ax, %ds + movw %ax, %es + movw %ax, %fs + movw %ax, %gs + movw %ax, %ss + + /* put the return address in a known safe location */ + movl (%esp), %eax + movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK + + /* get protected mode stack */ + movl protstack, %eax + movl %eax, %esp + movl %eax, %ebp + + /* get return address onto the right stack */ + movl GRUB_MEMORY_MACHINE_REAL_STACK, %eax + movl %eax, (%esp) + + /* zero %eax */ + xorl %eax, %eax + + /* return on the old (or initialized) stack! */ + ret + + +prot_to_real: + /* just in case, set GDT */ + lgdt gdtdesc + + /* save the protected mode stack */ + movl %esp, %eax + movl %eax, protstack + + /* get the return address */ + movl (%esp), %eax + movl %eax, GRUB_MEMORY_MACHINE_REAL_STACK + + /* set up new stack */ + movl $GRUB_MEMORY_MACHINE_REAL_STACK, %eax + movl %eax, %esp + movl %eax, %ebp + + /* set up segment limits */ + movw $GRUB_MEMORY_MACHINE_PSEUDO_REAL_DSEG, %ax + movw %ax, %ds + movw %ax, %es + movw %ax, %fs + movw %ax, %gs + movw %ax, %ss + + /* this might be an extra step */ + /* jump to a 16 bit segment */ + ljmp $GRUB_MEMORY_MACHINE_PSEUDO_REAL_CSEG, $tmpcseg + +tmpcseg: + .code16 + + /* clear the PE bit of CR0 */ + movl %cr0, %eax + andl $(~GRUB_MEMORY_MACHINE_CR0_PE_ON), %eax + movl %eax, %cr0 + + /* flush prefetch queue, reload %cs */ + DATA32 ljmp $0, $realcseg + +realcseg: + /* we are in real mode now + * set up the real mode segment registers : DS, SS, ES + */ + /* zero %eax */ + xorl %eax, %eax + + movw %ax, %ds + movw %ax, %es + movw %ax, %fs + movw %ax, %gs + movw %ax, %ss + + /* restore interrupts */ + sti + + /* return on new stack! */ + DATA32 ret + + .code32 + + +/* + * grub_gate_a20(int on) + * + * Gate address-line 20 for high memory. + * + * This routine is probably overconservative in what it does, but so what? + * + * It also eats any keystrokes in the keyboard buffer. :-( + */ + +FUNCTION(grub_gate_a20) + movl %eax, %edx + +gate_a20_test_current_state:=09 + /* first of all, test if already in a good state */ + call gate_a20_check_state + cmpb %al, %dl + jnz gate_a20_try_bios + ret + +gate_a20_try_bios: + /* second, try a BIOS call */ + pushl %ebp + call prot_to_real + + .code16 + movw $0x2400, %ax + testb %dl, %dl + jz 1f + incw %ax +1: int $0x15 + + DATA32 call real_to_prot + .code32 + + popl %ebp + call gate_a20_check_state + cmpb %al, %dl + jnz gate_a20_try_keyboard_controller + ret +=09 +gate_a20_flush_keyboard_buffer: + inb $0x64 + andb $0x02, %al + jnz gate_a20_flush_keyboard_buffer +2:=09 + inb $0x64 + andb $0x01, %al + jz 3f + inb $0x60 + jmp 2b +3: + ret +=09 +gate_a20_try_keyboard_controller:=09 + /* third, try the keyboard controller */ + call gate_a20_flush_keyboard_buffer + + movb $0xd1, %al + outb $0x64 +4:=09 + inb $0x64 + andb $0x02, %al + jnz 4b + + movb $0xdd, %al + testb %dl, %dl + jz 5f + orb $0x02, %al +5: outb $0x60 + call gate_a20_flush_keyboard_buffer + + /* output a dummy command (USB keyboard hack) */ + movb $0xff, %al + outb $0x64 + call gate_a20_flush_keyboard_buffer + + call gate_a20_check_state + cmpb %al, %dl + jnz gate_a20_try_system_control_port_a + ret + +gate_a20_try_system_control_port_a: + /* fourth, try the system control port A */ + inb $0x92 + andb $(~0x03), %al + testb %dl, %dl + jz 6f + orb $0x02, %al +6: outb $0x92 + + /* When turning off Gate A20, do not check the state strictly, + because a failure is not fatal usually, and Gate A20 is always + on some modern machines. */ + testb %dl, %dl + jz 7f=09 + call gate_a20_check_state + cmpb %al, %dl + /* everything failed, so restart from the beginning */ + jnz gate_a20_try_bios +7: ret +=09 +gate_a20_check_state: + /* iterate the checking for a while */ + movl $100, %ecx +1:=09 + call 3f + cmpb %al, %dl + jz 2f + loop 1b +2: + ret +3:=09 + pushl %ebx + pushl %ecx + xorl %eax, %eax + /* compare the byte at 0x8000 with that at 0x108000 */ + movl $GRUB_BOOT_MACHINE_KERNEL_ADDR, %ebx + pushl %ebx + /* save the original byte in CL */ + movb (%ebx), %cl + /* store the value at 0x108000 in AL */ + addl $0x100000, %ebx + movb (%ebx), %al + /* try to set one less value at 0x8000 */ + popl %ebx + movb %al, %ch + decb %ch + movb %ch, (%ebx) + /* serialize */ + outb %al, $0x80 + outb %al, $0x80 + /* obtain the value at 0x108000 in CH */ + pushl %ebx + addl $0x100000, %ebx + movb (%ebx), %ch + /* this result is 1 if A20 is on or 0 if it is off */ + subb %ch, %al + xorb $1, %al + /* restore the original */ + popl %ebx + movb %cl, (%ebx) + popl %ecx + popl %ebx + ret + +#include "lzo1x.S" + + +/* + * This call is special... it never returns... in fact it should simply + * hang at this point! + */ + +FUNCTION(grub_stop) + call prot_to_real + + /* + * This next part is sort of evil. It takes advantage of the + * byte ordering on the x86 to work in either 16-bit or 32-bit + * mode, so think about it before changing it. + */ + +FUNCTION(grub_hard_stop) + hlt + jmp EXT_C(grub_hard_stop) + + +/* + * grub_stop_floppy() + * + * Stop the floppy drive from spinning, so that other software is + * jumped to with a known state. + */ +FUNCTION(grub_stop_floppy) + movw $0x3F2, %dx + xorb %al, %al + outb %al, %dx + ret + +/* + * grub_reboot() + * + * Reboot the system. At the moment, rely on BIOS. + */ +FUNCTION(grub_reboot) + call prot_to_real + .code16 + /* cold boot */ + movw $0x0472, %di + movw %ax, (%di) + ljmp $0xFFFF, $0x0000 + .code32 +=09 +/* + * grub_halt(int no_apm) + * + * Halt the system, using APM if possible. If NO_APM is true, don't use + * APM even if it is available. + */ +FUNCTION(grub_halt) + /* see if zero */ + testl %eax, %eax + jnz EXT_C(grub_stop) + + call prot_to_real + .code16 +=09 + /* detect APM */ + movw $0x5300, %ax + xorw %bx, %bx + int $0x15 + jc EXT_C(grub_hard_stop) + /* don't check %bx for buggy BIOSes... */ + + /* disconnect APM first */ + movw $0x5304, %ax + xorw %bx, %bx + int $0x15 + + /* connect APM */ + movw $0x5301, %ax + xorw %bx, %bx + int $0x15 + jc EXT_C(grub_hard_stop) + + /* set APM protocol level - 1.1 or bust. (this covers APM 1.2 also) */ + movw $0x530E, %ax + xorw %bx, %bx + movw $0x0101, %cx + int $0x15 + jc EXT_C(grub_hard_stop) +=09 + /* set the power state to off */ + movw $0x5307, %ax + movw $1, %bx + movw $3, %cx + int $0x15 + + /* shouldn't reach here */ + jmp EXT_C(grub_hard_stop) + .code32 +=09 +=09 +/* + * void grub_chainloader_real_boot (int drive, void *part_addr) + * + * This starts another boot loader. + */ + +FUNCTION(grub_chainloader_real_boot) + pushl %edx + pushl %eax + + call EXT_C(grub_dl_unload_all) + + /* set up to pass boot drive */ + popl %edx + + /* ESI must point to a partition table entry */ + popl %esi + + /* Turn off Gate A20 */ + xorl %eax, %eax + call EXT_C(grub_gate_a20) +=09 + call prot_to_real + .code16 + ljmp $0, $GRUB_MEMORY_MACHINE_BOOT_LOADER_ADDR + .code32 + + +/* + * void grub_linux_boot_zimage (void) + */ +VARIABLE(grub_linux_prot_size) + .long 0 +VARIABLE(grub_linux_tmp_addr) + .long 0 +VARIABLE(grub_linux_real_addr) + .long 0 +=09 +FUNCTION(grub_linux_boot_zimage) + /* copy the kernel */ + movl EXT_C(grub_linux_prot_size), %ecx + addl $3, %ecx + shrl $2, %ecx + movl $GRUB_LINUX_BZIMAGE_ADDR, %esi + movl $GRUB_LINUX_ZIMAGE_ADDR, %edi + cld + rep + movsl + +FUNCTION(grub_linux_boot_bzimage) + call EXT_C(grub_dl_unload_all) +=09 + movl EXT_C(grub_linux_real_addr), %ebx + + /* copy the real mode code */ + movl EXT_C(grub_linux_tmp_addr), %esi + movl %ebx, %edi + movl $GRUB_LINUX_SETUP_MOVE_SIZE, %ecx + cld + rep + movsb + + /* change %ebx to the segment address */ + shrl $4, %ebx + movl %ebx, %eax + addl $0x20, %eax + movw %ax, linux_setup_seg + + /* XXX new stack pointer in safe area for calling functions */ + movl $0x4000, %esp + call EXT_C(grub_stop_floppy) + + /* final setup for linux boot */ + call prot_to_real + .code16 + + cli + movw %bx, %ss + movw $GRUB_LINUX_SETUP_STACK, %sp + + movw %bx, %ds + movw %bx, %es + movw %bx, %fs + movw %bx, %gs + + /* ljmp */ + .byte 0xea + .word 0 +linux_setup_seg: + .word 0 + .code32 + + =09 +/* + * This starts the multiboot kernel. + */ + +FUNCTION(grub_multiboot_real_boot) + /* Push the entry address on the stack. */ + pushl %eax + /* Move the address of the multiboot information structure to ebx. */ + movl %edx,%ebx +=09 + /* Unload all modules and stop the floppy driver. */ + call EXT_C(grub_dl_unload_all) + call EXT_C(grub_stop_floppy) + + /* Interrupts should be disabled. */ + cli +=09 + /* Move the magic value into eax and jump to the kernel. */ + movl $GRUB_MB_MAGIC2,%eax + popl %ecx + jmp *%ecx +=09 +=09 +/* + * int grub_biosdisk_rw_int13_extensions (int ah, int drive, void *dap) + * + * Call IBM/MS INT13 Extensions (int 13 %ah=3DAH) for DRIVE. DAP + * is passed for disk address packet. If an error occurs, return + * non-zero, otherwise zero. + */ + +FUNCTION(grub_biosdisk_rw_int13_extensions) + pushl %ebp + pushl %esi + + /* compute the address of disk_address_packet */ + movw %cx, %si + xorw %cx, %cx + shrl $4, %ecx /* save the segment to cx */ + + /* ah */ + movb %al, %dh + /* enter real mode */ + call prot_to_real +=09 + .code16 + movb %dh, %ah + movw %cx, %ds + int $0x13 /* do the operation */ + movb %ah, %dl /* save return value */ + /* clear the data segment */ + xorw %ax, %ax + movw %ax, %ds + /* back to protected mode */ + DATA32 call real_to_prot + .code32 + + movb %dl, %al /* return value in %eax */ + + popl %esi + popl %ebp + + ret +=09 +/* + * int grub_biosdisk_rw_standard (int ah, int drive, int coff, int hoff, + * int soff, int nsec, int segment) + * + * Call standard and old INT13 (int 13 %ah=3DAH) for DRIVE. = Read/write + * NSEC sectors from COFF/HOFF/SOFF into SEGMENT. If an error occurs, + * return non-zero, otherwise zero. + */ + +FUNCTION(grub_biosdisk_rw_standard) + pushl %ebp + movl %esp, %ebp + + pushl %ebx + pushl %edi + pushl %esi + + /* set up CHS information */ + + /* set %ch to low eight bits of cylinder */ + xchgb %cl, %ch + /* set bits 6-7 of %cl to high two bits of cylinder */ + shlb $6, %cl + /* set bits 0-5 of %cl to sector */ + addb 0xc(%ebp), %cl + /* set %dh to head */ + movb 0x8(%ebp), %dh + /* set %ah to AH */ + movb %al, %ah + /* set %al to NSEC */ + movb 0x10(%ebp), %al + /* save %ax in %di */ + movw %ax, %di + /* save SEGMENT in %bx */ + movw 0x14(%ebp), %bx + =09 + /* enter real mode */ + call prot_to_real + + .code16 + movw %bx, %es + xorw %bx, %bx + movw $3, %si /* attempt at least three times */ + +1:=09 + movw %di, %ax + int $0x13 /* do the operation */ + jnc 2f /* check if successful */ + + movb %ah, %bl /* save return value */ + /* if fail, reset the disk system */ + xorw %ax, %ax + int $0x13 +=09 + decw %si + cmpw $0, %si + je 2f + xorb %bl, %bl + jmp 1b /* retry */ +2:=09 + /* back to protected mode */ + DATA32 call real_to_prot + .code32 + + movb %bl, %al /* return value in %eax */ +=09 + popl %esi + popl %edi + popl %ebx + popl %ebp + + ret $(4 * 4) + + +/* + * int grub_biosdisk_check_int13_extensions (int drive) + * + * Check if LBA is supported for DRIVE. If it is supported, then return + * the major version of extensions, otherwise zero. + */ + +FUNCTION(grub_biosdisk_check_int13_extensions) + pushl %ebp + pushl %ebx + + /* drive */ + movb %al, %dl + /* enter real mode */ + call prot_to_real + + .code16 + movb $0x41, %ah + movw $0x55aa, %bx + int $0x13 /* do the operation */ +=09 + /* check the result */ + jc 1f + cmpw $0xaa55, %bx + jne 1f + + movb %ah, %bl /* save the major version into %bl */ + + /* check if AH=3D0x42 is supported */ + andw $1, %cx + jnz 2f +=09 +1: + xorb %bl, %bl +2: + /* back to protected mode */ + DATA32 call real_to_prot + .code32 + + movb %bl, %al /* return value in %eax */ + + popl %ebx + popl %ebp + + ret + + +/* + * int grub_biosdisk_get_diskinfo_int13_extensions (int drive, void *drp) + * + * Return the geometry of DRIVE in a drive parameters, DRP. If an error + * occurs, then return non-zero, otherwise zero. + */ + +FUNCTION(grub_biosdisk_get_diskinfo_int13_extensions) + pushl %ebp + pushl %ebx + pushl %esi + + /* compute the address of drive parameters */ + movw %dx, %si + xorw %dx, %dx + shrl $4, %edx + movw %dx, %bx /* save the segment into %bx */ + /* drive */ + movb %al, %dl + /* enter real mode */ + call prot_to_real + + .code16 + movb $0x48, %ah + movw %bx, %ds + int $0x13 /* do the operation */ + movb %ah, %bl /* save return value in %bl */ + /* clear the data segment */ + xorw %ax, %ax + movw %ax, %ds + /* back to protected mode */ + DATA32 call real_to_prot + .code32 + + movb %bl, %al /* return value in %eax */ + + popl %esi + popl %ebx + popl %ebp +=09 + ret + + +/* + * int grub_biosdisk_get_diskinfo_standard (int drive, + * unsigned long *cylinders, + * unsigned long *heads, + * unsigned long *sectors) + * + * Return the geometry of DRIVE in CYLINDERS, HEADS and SECTORS. If an + * error occurs, then return non-zero, otherwise zero. + */ + +FUNCTION(grub_biosdisk_get_diskinfo_standard) + pushl %ebp + pushl %ebx + pushl %edi + + /* push CYLINDERS */ + pushl %edx + /* push HEADS */ + pushl %ecx + /* SECTORS is on the stack */ +=09 + /* drive */ + movb %al, %dl + /* enter real mode */ + call prot_to_real + + .code16 + movb $0x8, %ah + int $0x13 /* do the operation */ + /* check if successful */ + testb %ah, %ah + jnz 1f + /* bogus BIOSes may not return an error number */ + testb $0x3f, %cl /* 0 sectors means no disk */ + jnz 1f /* if non-zero, then succeed */ + /* XXX 0x60 is one of the unused error numbers */ + movb $0x60, %ah +1: + movb %ah, %bl /* save return value in %bl */ + /* back to protected mode */ + DATA32 call real_to_prot + .code32 + + /* pop HEADS */ + popl %edi + movb %dh, %al + incl %eax /* the number of heads is counted from zero */ + movl %eax, (%edi) + + /* pop CYLINDERS */ + popl %edi + movb %ch, %al + movb %cl, %ah + shrb $6, %ah /* the number of cylinders is counted from zero */ + incl %eax + movl %eax, (%edi) + + /* SECTORS */ + movl 0x10(%esp), %edi + andb $0x3f, %cl + movzbl %cl, %eax + movl %eax, (%edi) +=09 + xorl %eax, %eax + movb %bl, %al /* return value in %eax */ + + popl %edi + popl %ebx + popl %ebp + + ret $4 + + +/* + * int grub_biosdisk_get_num_floppies (void) + */ +FUNCTION(grub_biosdisk_get_num_floppies) + pushl %ebp + + xorl %edx, %edx + call prot_to_real +=09 + .code16 + /* reset the disk system first */ + int $0x13 +1: + stc +=09 + /* call GET DISK TYPE */ + movb $0x15, %ah + int $0x13 + + jc 2f + + /* check if this drive exists */=09 + testb $0x3, %ah + jz 2f + + incb %dl + cmpb $2, %dl + jne 1b +2: + DATA32 call real_to_prot + .code32 + + movl %edx, %eax + popl %ebp + ret +=09 +=09 +/* + * + * grub_get_memsize(i) : return the memory size in KB. i =3D=3D 0 for conventional + * memory, i =3D=3D 1 for extended memory + * BIOS call "INT 12H" to get conventional memory size + * BIOS call "INT 15H, AH=3D88H" to get extended memory size + * Both have the return value in AX. + * + */ + +FUNCTION(grub_get_memsize) + pushl %ebp + + movl %eax, %edx + + call prot_to_real /* enter real mode */ + .code16 + + testl %edx, %edx + jnz xext + + int $0x12 + jmp xdone + +xext: + movb $0x88, %ah + int $0x15 + +xdone: + movw %ax, %dx + + DATA32 call real_to_prot + .code32 + + movw %dx, %ax + + popl %ebp + ret + + +/* + * + * grub_get_eisa_mmap() : return packed EISA memory map, lower 16 bits is + * memory between 1M and 16M in 1K parts, upper 16 bits is + * memory above 16M in 64K parts. If error, return zero. + * BIOS call "INT 15H, AH=3DE801H" to get EISA memory map, + * AX =3D memory between 1M and 16M in 1K parts. + * BX =3D memory above 16M in 64K parts. + * + */ + +FUNCTION(grub_get_eisa_mmap) + pushl %ebp + pushl %ebx + + call prot_to_real /* enter real mode */ + .code16 + + movw $0xe801, %ax + int $0x15 + + shll $16, %ebx + movw %ax, %bx + + DATA32 call real_to_prot + .code32 + + cmpb $0x86, %bh + je xnoteisa + + movl %ebx, %eax + +xnoteisa: + popl %ebx + popl %ebp + ret + +/* + * + * grub_get_mmap_entry(addr, cont) : address and old continuation value (zero to + * start), for the Query System Address Map BIOS call. + * + * Sets the first 4-byte int value of "addr" to the size returned by + * the call. If the call fails, sets it to zero. + * + * Returns: new (non-zero) continuation value, 0 if done. + */ + +FUNCTION(grub_get_mmap_entry) + pushl %ebp + pushl %ebx + pushl %edi + pushl %esi + + /* push ADDR */ + pushl %eax +=09 + /* place address (+4) in ES:DI */ + addl $4, %eax + movl %eax, %edi + andl $0xf, %edi + shrl $4, %eax + movl %eax, %esi + + /* set continuation value */ + movl %edx, %ebx + + /* set default maximum buffer size */ + movl $0x14, %ecx + + /* set EDX to 'SMAP' */ + movl $0x534d4150, %edx + + call prot_to_real /* enter real mode */ + .code16 + + movw %si, %es + movl $0xe820, %eax + int $0x15 + + DATA32 jc xnosmap + + cmpl $0x534d4150, %eax + jne xnosmap + + cmpl $0x14, %ecx + jl xnosmap + + cmpl $0x400, %ecx + jg xnosmap + + jmp xsmap + +xnosmap: + xorl %ecx, %ecx + +xsmap: + DATA32 call real_to_prot + .code32 + + /* write length of buffer (zero if error) into ADDR */ + popl %eax + movl %ecx, (%eax) + + /* set return value to continuation */ + movl %ebx, %eax + + popl %esi + popl %edi + popl %ebx + popl %ebp + ret + +=09 +/* + * void grub_console_real_putchar (int c) + * + * Put the character C on the console. Because GRUB wants to write a + * character with an attribute, this implementation is a bit tricky. + * If C is a control character (CR, LF, BEL, BS), use INT 10, AH =3D = 0Eh + * (TELETYPE OUTPUT). Otherwise, save the original position, put a space, + * save the current position, restore the original position, write the + * character and the attribute, and restore the current position. + * + * The reason why this is so complicated is that there is no easy way to + * get the height of the screen, and the TELETYPE OUPUT BIOS call doesn't + * support setting a background attribute. + */ +FUNCTION(grub_console_real_putchar) + movl %eax, %edx + pusha + movb EXT_C(grub_console_cur_color), %bl +=09 + call prot_to_real + .code16 + movb %dl, %al + xorb %bh, %bh + + /* use teletype output if control character */ + cmpb $0x7, %al + je 1f + cmpb $0x8, %al + je 1f + cmpb $0xa, %al + je 1f + cmpb $0xd, %al + je 1f + + /* save the character and the attribute on the stack */ + pushw %ax + pushw %bx +=09 + /* get the current position */ + movb $0x3, %ah + int $0x10 + + /* check the column with the width */ + cmpb $79, %dl + jl 2f +=09 + /* print CR and LF, if next write will exceed the width */=09 + movw $0x0e0d, %ax + int $0x10 + movb $0x0a, %al + int $0x10 +=09 + /* get the current position */ + movb $0x3, %ah + int $0x10 + +2:=09 + /* restore the character and the attribute */ + popw %bx + popw %ax +=09 + /* write the character with the attribute */ + movb $0x9, %ah + movw $1, %cx + int $0x10 + + /* move the cursor forward */ + incb %dl + movb $0x2, %ah + int $0x10 + + jmp 3f + +1: movw $1, %bx + movb $0xe, %ah + int $0x10 +=09 +3: DATA32 call real_to_prot + .code32 +=09 + popa + ret +=09 + +/* + * int grub_console_getkey (void) + * BIOS call "INT 16H Function 00H" to read character from keyboard + * Call with %ah =3D 0x0 + * Return: %ah =3D keyboard scan code + * %al =3D ASCII character + */ + +/* this table is used in translate_keycode below */ +translation_table: + .word GRUB_CONSOLE_KEY_LEFT, 2 + .word GRUB_CONSOLE_KEY_RIGHT, 6 + .word GRUB_CONSOLE_KEY_UP, 16 + .word GRUB_CONSOLE_KEY_DOWN, 14 + .word GRUB_CONSOLE_KEY_HOME, 1 + .word GRUB_CONSOLE_KEY_END, 5 + .word GRUB_CONSOLE_KEY_DC, 4 + .word GRUB_CONSOLE_KEY_BACKSPACE, 8 + .word GRUB_CONSOLE_KEY_PPAGE, 7 + .word GRUB_CONSOLE_KEY_NPAGE, 3 + .word 0 +=09 +/* + * translate_keycode translates the key code %dx to an ascii code. + */ + .code16 + +translate_keycode: + pushw %bx + pushw %si +=09 + movw $ABS(translation_table), %si +=09 +1: lodsw + /* check if this is the end */ + testw %ax, %ax + jz 2f + /* load the ascii code into %ax */ + movw %ax, %bx + lodsw + /* check if this matches the key code */ + cmpw %bx, %dx + jne 1b + /* translate %dx, if successful */ + movw %ax, %dx + +2: popw %si + popw %bx + ret + + .code32 +=09 +FUNCTION(grub_console_getkey) + pushl %ebp + + call prot_to_real + .code16 + + int $0x16 + + movw %ax, %dx /* real_to_prot uses %eax */ + call translate_keycode + =09 + DATA32 call real_to_prot + .code32 + + movw %dx, %ax + + popl %ebp + ret + + +/* + * int grub_console_checkkey (void) + * if there is a character pending, return it; otherwise return -1 + * BIOS call "INT 16H Function 01H" to check whether a character is pending + * Call with %ah =3D 0x1 + * Return: + * If key waiting to be input: + * %ah =3D keyboard scan code + * %al =3D ASCII character + * Zero flag =3D clear + * else + * Zero flag =3D set + */ +FUNCTION(grub_console_checkkey) + pushl %ebp + xorl %edx, %edx +=09 + call prot_to_real /* enter real mode */ + .code16 + + movb $0x1, %ah + int $0x16 + + jz notpending +=09 + movw %ax, %dx + DATA32 jmp pending + +notpending: + decl %edx + +pending: + DATA32 call real_to_prot + .code32 + + movl %edx, %eax + + popl %ebp + ret + +=09 +/* + * grub_uint16_t grub_console_getxy (void) + * BIOS call "INT 10H Function 03h" to get cursor position + * Call with %ah =3D 0x03 + * %bh =3D page + * Returns %ch =3D starting scan line + * %cl =3D ending scan line + * %dh =3D row (0 is top) + * %dl =3D column (0 is left) + */ + + +FUNCTION(grub_console_getxy) + pushl %ebp + pushl %ebx /* save EBX */ + + call prot_to_real + .code16 + + xorb %bh, %bh /* set page to 0 */ + movb $0x3, %ah + int $0x10 /* get cursor position */ + + DATA32 call real_to_prot + .code32 + + movb %dl, %ah + movb %dh, %al + + popl %ebx + popl %ebp + ret + + +/* + * void grub_console_gotoxy(grub_uint8_t x, grub_uint8_t y) + * BIOS call "INT 10H Function 02h" to set cursor position + * Call with %ah =3D 0x02 + * %bh =3D page + * %dh =3D row (0 is top) + * %dl =3D column (0 is left) + */ + + +FUNCTION(grub_console_gotoxy) + pushl %ebp + pushl %ebx /* save EBX */ + + movb %dl, %dh /* %dh =3D y */ + movb %al, %dl /* %dl =3D x */ + + call prot_to_real + .code16 + + xorb %bh, %bh /* set page to 0 */ + movb $0x2, %ah + int $0x10 /* set cursor position */ + + DATA32 call real_to_prot + .code32 + + popl %ebx + popl %ebp + ret + +=09 +/* + * void grub_console_cls (void) + * BIOS call "INT 10H Function 09h" to write character and attribute + * Call with %ah =3D 0x09 + * %al =3D (character) + * %bh =3D (page number) + * %bl =3D (attribute) + * %cx =3D (number of times) + */ + +FUNCTION(grub_console_cls) + pushl %ebp + pushl %ebx /* save EBX */ + + call prot_to_real + .code16 + + /* move the cursor to the beginning */ + movb $0x02, %ah + xorb %bh, %bh + xorw %dx, %dx + int $0x10 + + /* write spaces to the entire screen */ + movw $0x0920, %ax + movw $0x07, %bx + movw $(80 * 25), %cx + int $0x10 + + /* move back the cursor */ + movb $0x02, %ah + int $0x10 + + DATA32 call real_to_prot + .code32 + + popl %ebx + popl %ebp + ret + +=09 +/* + * void grub_console_setcursor (int on) + * BIOS call "INT 10H Function 01h" to set cursor type + * Call with %ah =3D 0x01 + * %ch =3D cursor starting scanline + * %cl =3D cursor ending scanline + */ + +console_cursor_state: + .byte 1 +console_cursor_shape: + .word 0 +=09 +FUNCTION(grub_console_setcursor) + pushl %ebp + pushl %ebx + + /* push ON */ + pushl %eax +=09 + /* check if the standard cursor shape has already been saved */ + movw console_cursor_shape, %ax + testw %ax, %ax + jne 1f + + call prot_to_real + .code16 + + movb $0x03, %ah + xorb %bh, %bh + int $0x10 + + DATA32 call real_to_prot + .code32 + + movw %cx, console_cursor_shape +1: + /* set %cx to the designated cursor shape */ + movw $0x2000, %cx + popl %eax + testl %eax, %eax + jz 2f + movw console_cursor_shape, %cx +2:=09 + call prot_to_real + .code16 + + movb $0x1, %ah + int $0x10=20 + + DATA32 call real_to_prot + .code32 + + popl %ebx + popl %ebp + ret + =09 +/* + * grub_getrtsecs() + * if a seconds value can be read, read it and return it (BCD), + * otherwise return 0xFF + * BIOS call "INT 1AH Function 02H" to check whether a character is pending + * Call with %ah =3D 0x2 + * Return: + * If RT Clock can give correct values + * %ch =3D hour (BCD) + * %cl =3D minutes (BCD) + * %dh =3D seconds (BCD) + * %dl =3D daylight savings time (00h std, 01h daylight) + * Carry flag =3D clear + * else + * Carry flag =3D set + * (this indicates that the clock is updating, or + * that it isn't running) + */ +FUNCTION(grub_getrtsecs) + pushl %ebp + + call prot_to_real /* enter real mode */ + .code16 + + clc + movb $0x2, %ah + int $0x1a + + DATA32 jnc gottime + movb $0xff, %dh + +gottime: + DATA32 call real_to_prot + .code32 + + movb %dh, %al + + popl %ebp + ret + +=09 +/* + * grub_get_rtc() + * return the real time in ticks, of which there are about + * 18-20 per second + */ +FUNCTION(grub_get_rtc) + pushl %ebp + + call prot_to_real /* enter real mode */ + .code16 + + /* %ax is already zero */ + int $0x1a + + DATA32 call real_to_prot + .code32 + + movl %ecx, %eax + shll $16, %eax + movw %dx, %ax + + popl %ebp + ret + + +/* + * unsigned char grub_vga_set_mode (unsigned char mode) + */ +FUNCTION(grub_vga_set_mode) + pushl %ebp + pushl %ebx + movl %eax, %ecx + + call prot_to_real + .code16 + /* get current mode */ + xorw %bx, %bx + movb $0x0f, %ah + int $0x10 + movb %al, %dl + + /* set the new mode */ + movb %cl, %al + xorb %ah, %ah + int $0x10 + + DATA32 call real_to_prot + .code32 + + movb %dl, %al + popl %ebx + popl %ebp + ret + + +/* + * unsigned char *grub_vga_get_font (void) + */ +FUNCTION(grub_vga_get_font) + pushl %ebp + pushl %ebx + + call prot_to_real + .code16 + movw $0x1130, %ax + movb $0x06, %bh + int $0x10 + movw %es, %bx + movw %bp, %dx + DATA32 call real_to_prot + .code32 + + movzwl %bx, %ecx + shll $4, %ecx + movw %dx, %ax + addl %ecx, %eax + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_controller_info (struct grub_vbe_info_block *controller_info) + * + * Register allocations for parameters: + * %eax *controller_info + */ +FUNCTION(grub_vbe_get_controller_info) + pushl %ebp + pushl %edi + + movw %ax, %di /* Store *controller_info to %edx:%di. */ + xorw %ax, %ax + shrl $4, %eax + mov %eax, %edx /* prot_to_real destroys %eax. */ +=09 + call prot_to_real + .code16 + + pushw %es + + movw %dx, %es /* *controller_info is now on %es:%di. */ + movw $0x4f00, %ax + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + popw %es + + DATA32 call real_to_prot + .code32 + + movl %edx, %eax + andl $0x0FFFF, %eax /* Return value in %eax. */ +=09 + popl %edi + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_mode_info (grub_uint32_t mode, + * struct grub_vbe_mode_info_block *mode_info) + * + * Register allocations for parameters: + * %eax mode + * %edx *mode_info + */ +FUNCTION(grub_vbe_get_mode_info) + pushl %ebp + pushl %edi + + movl %eax, %ecx /* Store mode number to %ecx. */ + + movw %dx, %di /* Store *mode_info to %edx:%di. */ + xorw %dx, %dx + shrl $4, %edx + + call prot_to_real + .code16 + + pushw %es + + movw %dx, %es /* *mode_info is now on %es:%di. */ + movw $0x4f01, %ax + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + popw %es + + DATA32 call real_to_prot + .code32 + + movl %edx, %eax + andl $0x0FFFF, %eax /* Return value in %eax. */ + + popl %edi + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_set_mode (grub_uint32_t mode, + * struct grub_vbe_crtc_info_block *crtc_info) + * + * Register allocations for parameters: + * %eax mode + * %edx *crtc_info + */ +FUNCTION(grub_vbe_set_mode) + pushl %ebp + pushl %ebx + + movl %eax, %ebx /* Store mode in %ebx. */ + + movw %dx, %di /* Store *crtc_info to %edx:%di. */ + xorw %dx, %dx + shrl $4, %edx + + call prot_to_real + .code16 + + pushw %es + + movw %dx, %es /* *crtc_info is now on %es:%di. */ + + movw $0x4f02, %ax + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + popw %es + + DATA32 call real_to_prot + .code32 +=09 + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_mode (grub_uint32_t *mode) + * + * Register allocations for parameters: + * %eax *mode + */ +FUNCTION(grub_vbe_get_mode) + pushl %ebp + pushl %ebx + pushl %eax /* Push *mode to stack. */ + + call prot_to_real + .code16 + + movw $0x4f03, %ax + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 + + popl %edi /* Pops *mode from stack to %edi. */ + andl $0xFFFF, %ebx + movl %ebx, (%edi) + + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_set_memory_window (grub_uint32_t window, + * grub_uint32_t position); + * + * Register allocations for parameters: + * %eax window + * %edx position + */ +FUNCTION(grub_vbe_set_memory_window) + pushl %ebp + pushl %ebx + + movl %eax, %ebx + + call prot_to_real + .code16 + + movw $0x4f05, %ax + andw $0x00ff, %bx /* BL =3D window, BH =3D 0, Set memory window. */ + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 +=09 + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_memory_window (grub_uint32_t window, + * grub_uint32_t *position); + * + * Register allocations for parameters: + * %eax window + * %edx *position + */ +FUNCTION(grub_vbe_get_memory_window) + pushl %ebp + pushl %ebx + pushl %edx /* Push *position to stack. */ + + movl %eax, %ebx /* Store window in %ebx. */ + + call prot_to_real + .code16 + + movw $0x4f05, %ax + andw $0x00ff, %bx /* BL =3D window. */ + orw $0x0100, %bx /* BH =3D 1, Get memory window. */ + int $0x10 + + movw %ax, %bx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 + + popl %edi /* pops *position from stack to %edi. */ + andl $0xFFFF, %edx + movl %edx, (%edi) /* Return position to caller. */ + + movw %bx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_set_scanline_length (grub_uint32_t length) + * + * Register allocations for parameters: + * %eax length + */ +FUNCTION(grub_vbe_set_scanline_length) + pushl %ebp + pushl %ebx + + movl %eax, %ecx /* Store length in %ecx. */ + + call prot_to_real + .code16 + + movw $0x4f06, %ax + movw $0x0002, %bx /* BL =3D 2, Set Scan Line in Bytes. */ + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 +=09 + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_scanline_length (grub_uint32_t *length) + * + * Register allocations for parameters: + * %eax *length + */ +FUNCTION(grub_vbe_get_scanline_length) + pushl %ebp + pushl %ebx + pushl %edx /* Push *length to stack. */ + + call prot_to_real + .code16 + + movw $0x4f06, %ax + movw $0x0001, %bx /* BL =3D 1, Get Scan Line Length (in bytes). */ + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 + + popl %edi /* Pops *length from stack to %edi. */ + andl $0xFFFF, %ebx + movl %ebx, (%edi) /* Return length to caller. */ + + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_set_display_start (grub_uint32_t x, + * grub_uint32_t y) + * + * Register allocations for parameters: + * %eax x + * %edx y + */ +FUNCTION(grub_vbe_set_display_start) + pushl %ebp + pushl %ebx + + movl %eax, %ecx /* Store x in %ecx. */ + + call prot_to_real + .code16 + + movw $0x4f07, %ax + movw $0x0080, %bx /* BL =3D 80h, Set Display Start=20 + during Vertical Retrace. */ + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 +=09 + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_get_display_start (grub_uint32_t *x, + * grub_uint32_t *y) + * + * Register allocations for parameters: + * %eax *x + * %edx *y + */ +FUNCTION(grub_vbe_get_display_start) + pushl %ebp + pushl %ebx + pushl %eax /* Push *x to stack. */ + pushl %edx /* Push *y to stack. */ + + call prot_to_real + .code16 + + movw $0x4f07, %ax + movw $0x0001, %bx /* BL =3D 1, Get Display Start. */ + int $0x10 + + movw %ax, %bx /* real_to_prot destroys %eax. */ + + DATA32 call real_to_prot + .code32 + + popl %edi /* Pops *y from stack to %edi. */ + andl $0xFFFF, %edx + movl %edx, (%edi) /* Return y-position to caller. */ + + popl %edi /* Pops *x from stack to %edi. */ + andl $0xFFFF, %ecx + movl %ecx, (%edi) /* Return x-position to caller. */ + + movw %bx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret + +/* + * grub_vbe_status_t grub_vbe_set_palette_data (grub_uint32_t color_count, + * grub_uint32_t start_index, + * struct grub_vbe_palette_data *palette_data) + * + * Register allocations for parameters: + * %eax color_count + * %edx start_index + * %ecx *palette_data + */ +FUNCTION(grub_vbe_set_palette_data) + pushl %ebp + pushl %ebx + + movl %eax, %ebx /* Store color_count in %ebx. */ + + movw %cx, %di /* Store *palette_data to %ecx:%di. */ + xorw %cx, %cx + shrl $4, %ecx + + call prot_to_real + .code16 + + pushw %es + + movw %cx, %es /* *palette_data is now on %es:%di. */ + movw %bx, %cx /* color_count is now on %cx. */ + + movw $0x4f09, %ax + xorw %bx, %bx /* BL =3D 0, Set Palette Data. */ + int $0x10 + + movw %ax, %dx /* real_to_prot destroys %eax. */ + + popw %es + + DATA32 call real_to_prot + .code32 +=09 + movw %dx, %ax + andl $0xFFFF, %eax /* Return value in %eax. */ + + popl %ebx + popl %ebp + ret FILE symlist2.c (NEW) (1) This file SHOULD be generated by a tool. It is not, yet.=20 This is the symlist.c file that will use grub-emu.=20 It seems that some symbols known by grub are not available=20 for grub-emu. (they don't exist in the files compiled for grub-emu) So for the time being, I connect these symbols to a NULL function=20 (or variable). Booting OS or using VBE *may* not work as expected in grub-emu :-) =20 diff -EbwBruN ./symlist2.c ../../src/grub-1.93/symlist2.c --- ./symlist2.c 1970-01-01 01:00:00.000000000 +0100 +++ ../../src/grub-1.93/symlist2.c 2006-05-24 05:08:02.000000000 +0200 @@ -0,0 +1,215 @@ +/* This file is automatically generated by gensymlist.sh. DO NOT EDIT! */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2002 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern int grub_null(); +extern int grub_null_var; + +void +grub_register_exported_symbols (void) +{ + struct symtab { const char *name; void *addr; }; + struct symtab *p; + static struct symtab tab[] =3D + { + {"grub_device_open", grub_device_open}, + {"grub_device_close", grub_device_close}, + {"grub_device_iterate", grub_device_iterate}, + {"grub_disk_dev_register", grub_disk_dev_register}, + {"grub_disk_dev_unregister", grub_disk_dev_unregister}, + {"grub_disk_dev_iterate", grub_disk_dev_iterate}, + {"grub_disk_open", grub_disk_open}, + {"grub_disk_close", grub_disk_close}, + {"grub_disk_read", grub_disk_read}, + {"grub_disk_write", grub_disk_write}, + {"grub_dl_check_header", grub_dl_check_header}, + {"grub_dl_load_file", grub_dl_load_file}, + {"grub_dl_load", grub_dl_load}, + {"grub_dl_unload", grub_dl_unload}, + {"grub_dl_ref", grub_dl_ref}, + {"grub_dl_unref", grub_dl_unref}, + {"grub_dl_iterate", grub_dl_iterate}, + {"grub_dl_get", grub_dl_get}, + {"grub_dl_register_symbol", grub_dl_register_symbol}, + {"grub_dl_resolve_symbol", grub_dl_resolve_symbol}, + {"grub_env_set", grub_env_set}, + {"grub_env_get", grub_env_get}, + {"grub_env_unset", grub_env_unset}, + {"grub_env_iterate", grub_env_iterate}, + {"grub_register_variable_hook", grub_register_variable_hook}, + {"grub_error", grub_error}, + {"grub_fatal", grub_fatal}, + {"grub_error_push", grub_error_push}, + {"grub_error_pop", grub_error_pop}, + {"grub_print_error", grub_print_error}, + {"grub_file_get_device_name", grub_file_get_device_name}, + {"grub_file_open", grub_file_open}, + {"grub_file_read", grub_file_read}, + {"grub_file_seek", grub_file_seek}, + {"grub_file_close", grub_file_close}, + {"grub_fs_register", grub_fs_register}, + {"grub_fs_unregister", grub_fs_unregister}, + {"grub_fs_iterate", grub_fs_iterate}, + {"grub_fs_probe", grub_fs_probe}, + {"grub_loader_is_loaded", grub_loader_is_loaded}, + {"grub_loader_set", grub_loader_set}, + {"grub_loader_unset", grub_loader_unset}, + {"grub_loader_boot", grub_loader_boot}, + {"grub_memmove", grub_memmove}, + {"grub_rescue_get_command", grub_rescue_get_command}, + {"grub_strcpy", grub_strcpy}, + {"grub_strncpy", grub_strncpy}, + {"grub_stpcpy", grub_stpcpy}, + {"grub_strcat", grub_strcat}, + {"grub_strncat", grub_strncat}, + {"memmove", memmove}, + {"memcpy", memcpy}, + {"grub_memcmp", grub_memcmp}, + {"grub_strcmp", grub_strcmp}, + {"grub_strncmp", grub_strncmp}, + {"grub_strncasecmp", grub_strncasecmp}, + {"grub_strchr", grub_strchr}, + {"grub_strrchr", grub_strrchr}, + {"grub_strword", grub_strword}, + {"grub_iswordseparator", grub_iswordseparator}, + {"grub_isspace", grub_isspace}, + {"grub_isprint", grub_isprint}, + {"grub_isalpha", grub_isalpha}, + {"grub_isgraph", grub_isgraph}, + {"grub_isdigit", grub_isdigit}, + {"grub_tolower", grub_tolower}, + {"grub_strtoul", grub_strtoul}, + {"grub_strdup", grub_strdup}, + {"grub_strndup", grub_strndup}, + {"grub_memset", grub_memset}, + {"grub_strlen", grub_strlen}, + {"grub_printf", grub_printf}, + {"grub_real_dprintf", grub_real_dprintf}, + {"grub_vprintf", grub_vprintf}, + {"grub_sprintf", grub_sprintf}, + {"grub_vsprintf", grub_vsprintf}, + {"grub_stop", grub_stop}, + {"grub_utf16_to_utf8", grub_utf16_to_utf8}, + {"grub_utf8_to_ucs4", grub_utf8_to_ucs4}, + {"grub_malloc", grub_malloc}, + {"grub_mmap", grub_mmap}, + {"grub_free", grub_free}, + {"grub_realloc", grub_realloc}, + {"grub_memalign", grub_memalign}, + {"grub_parser_cmdline_state", grub_parser_cmdline_state}, + {"grub_parser_split_cmdline", grub_parser_split_cmdline}, + {"grub_partition_probe", grub_partition_probe}, + {"grub_partition_iterate", grub_partition_iterate}, + {"grub_partition_get_name", grub_partition_get_name}, + {"grub_partition_map_iterate", grub_partition_map_iterate}, + {"grub_partition_map_register", grub_partition_map_register}, + {"grub_partition_map_unregister", grub_partition_map_unregister}, + {"grub_rescue_register_command", grub_rescue_register_command}, + {"grub_rescue_unregister_command", grub_rescue_unregister_command}, + {"grub_term_register", grub_term_register}, + {"grub_term_unregister", grub_term_unregister}, + {"grub_term_iterate", grub_term_iterate}, + {"grub_term_set_current", grub_term_set_current}, + {"grub_term_get_current", grub_term_get_current}, + {"grub_putchar", grub_putchar}, + {"grub_putcode", grub_putcode}, + {"grub_getcharwidth", grub_getcharwidth}, + {"grub_getkey", grub_getkey}, + {"grub_checkkey", grub_checkkey}, + {"grub_getwh", grub_getwh}, + {"grub_getxy", grub_getxy}, + {"grub_gotoxy", grub_gotoxy}, + {"grub_cls", grub_cls}, + {"grub_setcolorstate", grub_setcolorstate}, + {"grub_setcolor", grub_setcolor}, + {"grub_setcursor", grub_setcursor}, + {"grub_getcursor", grub_getcursor}, + {"grub_refresh", grub_refresh}, + {"grub_set_more", grub_set_more}, + {"grub_console_checkkey", grub_checkkey}, + {"grub_console_getkey", grub_getkey}, + {"grub_reboot", grub_reboot}, + {"grub_halt", grub_halt}, + {"grub_break", grub_break}, + {"grub_linux_boot_zimage", grub_null}, + {"grub_linux_boot_bzimage", grub_null}, + {"grub_chainloader_real_boot", grub_null}, + {"grub_multiboot_real_boot", grub_null}, + {"grub_get_rtc", grub_get_rtc}, + {"grub_vga_set_mode", grub_null}, + {"grub_vga_get_font", grub_null}, + {"grub_vbe_get_controller_info", grub_null}, + {"grub_vbe_get_mode_info", grub_null}, + {"grub_vbe_set_mode", grub_null}, + {"grub_vbe_get_mode", grub_null}, + {"grub_vbe_set_memory_window", grub_null}, + {"grub_vbe_get_memory_window", grub_null}, + {"grub_vbe_set_scanline_length", grub_null}, + {"grub_vbe_get_scanline_length", grub_null}, + {"grub_vbe_set_display_start", grub_null}, + {"grub_vbe_get_display_start", grub_null}, + {"grub_vbe_set_palette_data", grub_null}, + {"grub_errno", &grub_errno}, + {"grub_errmsg", &grub_errmsg}, + {"grub_fs_autoload_hook", &grub_fs_autoload_hook}, + {"grub_lower_mem", &grub_null_var}, + {"grub_upper_mem", &grub_null_var}, + {"grub_os_area_addr", &grub_null_var}, + {"grub_os_area_size", &grub_null_var}, + {"grub_linux_prot_size", &grub_null_var}, + {"grub_linux_tmp_addr", &grub_null_var}, + {"grub_linux_real_addr", &grub_null_var}, + {0, 0} + }; + + for (p =3D tab; p->name; p++) + grub_dl_register_symbol (p->name, p->addr, 0); +} FILE util/grub-emu.c (1) grub_arch_dl_check_header() and grub_arch_dl_relocate_symbols() are deleted from this file. grub-emu now use the same functions as those used by grub (from kern/i386/dl.c). diff -EbwBruN ./util/grub-emu.c ../../src/grub-1.93/util/grub-emu.c --- ./util/grub-emu.c 2005-11-13 16:47:09.000000000 +0100 +++ ../../src/grub-1.93/util/grub-emu.c 2006-05-13 11:23:07.000000000 +0200 @@ -56,24 +56,7 @@ grub_addr_t grub_arch_modules_addr (void) { - return 0; -} - -grub_err_t -grub_arch_dl_check_header (void *ehdr) -{ - (void) ehdr; - - return GRUB_ERR_BAD_MODULE; -} - -grub_err_t -grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr) -{ - (void) mod; - (void) ehdr; - - return GRUB_ERR_BAD_MODULE; + return 000; } =20 void @@ -200,6 +183,8 @@ =20 grub_fini_all (); =20 + grub_dl_unload_all(); + grub_machine_fini (); =20 return 0; FILE util/misc.c (3) grub_mmap() (NEW). Used by one of the modules I work on. FIXME : heap starts at arbitary location. (1) grub_null() (NEW). Template for undefined symbols in grub-emu. (1) grub_null_var (NEW). Template for undefined symbols in grub-emu. (1) grub_register_export_symbols() used by grub-emu is now taken from kern/i386/dl.c, as for grub. (4) minor change in free(), though you don't care on Linux. diff -EbwBruN ./util/misc.c ../../src/grub-1.93/util/misc.c --- ./util/misc.c 2005-02-27 22:19:06.000000000 +0100 +++ ../../src/grub-1.93/util/misc.c 2006-05-08 23:17:40.000000000 +0200 @@ -212,10 +212,24 @@ return xmalloc (size); } =20 +#include + +static char * heapstart=3D(char*) 0x01200000; +void * +grub_mmap (grub_size_t size) +{ + void * heap; + heap=3D(void *)mmap(heapstart, size, + PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); + heapstart+=3Dsize;=20 + printf("Using mmap (size %d)\n", size); + return heap; +} + void grub_free (void *ptr) { - free (ptr); + if (ptr) free (ptr); } =20 void * @@ -244,11 +258,6 @@ } =20 void -grub_register_exported_symbols (void) -{ -} - -void grub_stop (void) { exit (1); @@ -271,3 +280,10 @@ grub_size_t len __attribute__ ((unused))) { } + +int grub_null() +{ + return 0; +} + +int grub_null_var =3D 0; FILE genmk.rb (2) Add the build of .elf files for modules=20 See Lubomir Kundrak previous emails. diff -EbwBruN ./genmk.rb ../../src/grub-1.93/genmk.rb --- ./genmk.rb 2005-11-18 15:56:55.000000000 +0100 +++ ../../src/grub-1.93/genmk.rb 2006-05-13 19:39:34.000000000 +0200 @@ -108,18 +108,22 @@ mod_obj =3D mod_src.suffix('o') defsym =3D 'def-' + @name.suffix('lst') undsym =3D 'und-' + @name.suffix('lst') + elf =3D @name.suffix('elf') mod_name =3D File.basename(@name, '.mod') symbolic_name =3D mod_name.sub(/\.[^\.]*$/, '') =20 - "CLEANFILES +=3D #{@name} #{mod_obj} #{mod_src} #{pre_obj} #{objs_str} #{defsym} #{undsym} + "CLEANFILES +=3D #{@name} #{mod_obj} #{mod_src} #{pre_obj} #{objs_str} #{defsym} #{undsym} #{elf} MOSTLYCLEANFILES +=3D #{deps_str} DEFSYMFILES +=3D #{defsym} UNDSYMFILES +=3D #{undsym} =20 -#{@name}: #{pre_obj} #{mod_obj} +#{elf}: #{pre_obj} #{mod_obj} -rm -f $@ $(LD) $(#{prefix}_LDFLAGS) $(LDFLAGS) -r -d -o $@ $^ - $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@ + +#{@name}: #{elf} + -rm -f $@ + $(OBJCOPY) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $^ $@ =20 #{pre_obj}: #{objs_str} -rm -f $@ FILE include/grub/dl.h (2) Add mod->seg->name[LG_SEGMENT_NAME] LG_SEGMENT_NAME =3D 30 is arbitrary. FIXME if you know a limit for ELF section names. (2) Add mod->elf so that it's easy to tell GDB a new module is loaded or unloaded. (2) Add 6 grub_gdb..() functions to be found in dl-gdb.c to provide a GDB interface when loading/unloading modules. (actually defined only with #define GRUB_UTIL but might be useful for the serial line GDB interface developped by Lubomir), See the example of dl-gdb.c file I provided for Linux. (4) grub_mod_init() uses parameter mod. At least for the normal module. Seemed that it makes a difference depending on compiler used. =09 diff -EbwBruN ./include/grub/dl.h ../../src/grub-1.93/include/grub/dl.h --- ./include/grub/dl.h 2005-11-27 13:21:12.000000000 +0100 +++ ../../src/grub-1.93/include/grub/dl.h 2006-05-25 16:41:34.000000000 +0200 @@ -26,12 +26,12 @@ #include =20 #define GRUB_MOD_INIT(name) \ -static void grub_mod_init (grub_dl_t mod __attribute__ ((unused))) __attribute__ ((used)); \ +static void grub_mod_init (grub_dl_t mod) __attribute__ ((used)); \ void grub_##name##_init (void); \ void \ grub_##name##_init (void) { grub_mod_init (0); } \ static void \ -grub_mod_init (grub_dl_t mod __attribute__ ((unused))) +grub_mod_init (grub_dl_t mod) =20 #define GRUB_MOD_FINI(name) \ static void grub_mod_fini (void) __attribute__ ((used)); \ @@ -47,12 +47,14 @@ #define GRUB_MOD_DEP(name) \ __asm__ (".section .moddeps,\"S\"\n.string \"" #name "\"\n.previous") =20 +#define LG_SEGMENT_NAME 30 struct grub_dl_segment { struct grub_dl_segment *next; void *addr; grub_size_t size; unsigned section; + char name [LG_SEGMENT_NAME]; }; typedef struct grub_dl_segment *grub_dl_segment_t; =20 @@ -65,6 +67,13 @@ }; typedef struct grub_dl_dep *grub_dl_dep_t; =20 +#ifdef GRUB_UTIL +#include +#include +#define GRUB_PREFIX_SOFILE NULL +#include +#endif /* GRUB_UTIL */ + struct grub_dl { char *name; @@ -73,13 +82,27 @@ grub_dl_segment_t segment; void (*init) (struct grub_dl *mod); void (*fini) (void); +#ifdef GRUB_UTIL + char elf [255]; /* builting .elf file reference */ + char * current; /* current position in buffer elf to write on */ + struct link_map lm; /* to be added to libld's link maps */ +#endif /* GRUB_UTIL */ }; typedef struct grub_dl *grub_dl_t; =20 +#ifdef GRUB_UTIL +int grub_gdb_preload_mod (grub_dl_t mod, const char * filename); +int grub_gdb_load_mod (grub_dl_t mod); +void grub_gdb_addseg (grub_dl_t mod, char * segname, + ElfW(Addr) segaddr, int segsize); +void grub_gdb_unload_mod (grub_dl_t mod); +void grub_gdb_done (void); +#endif + grub_err_t EXPORT_FUNC(grub_dl_check_header) (void *ehdr, grub_size_t size); grub_dl_t EXPORT_FUNC(grub_dl_load_file) (const char *filename); grub_dl_t EXPORT_FUNC(grub_dl_load) (const char *name); -grub_dl_t grub_dl_load_core (void *addr, grub_size_t size); +grub_dl_t EXPORT_FUNC(grub_dl_load_core) (void *addr, grub_size_t size, const char * filename); int EXPORT_FUNC(grub_dl_unload) (grub_dl_t mod); void grub_dl_unload_unneeded (void); void grub_dl_unload_all (void); FILE include/grub/link.h (NEW) (2) needed by dl-gdb.c diff -EbwBruN ./include/grub/link.h ../../src/grub-1.93/include/grub/link.h --- ./include/grub/link.h 1970-01-01 01:00:00.000000000 +0100 +++ ../../src/grub-1.93/include/grub/link.h 2006-05-13 01:02:39.000000000 +0200 @@ -0,0 +1,94 @@ +/* Data structure for communication from the run-time dynamic linker for + loaded ELF shared objects. + Copyright (C) 1995-2001, 2004, 2005, 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _LINK_H +#define _LINK_H 1 +#include "elf.h" + +/* We use this macro to refer to ELF types independent of the native wordsize. + * `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */ +#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type) +#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) +#define _ElfW_1(e,w,t) e##w##t + +/* #include Defines __ELF_NATIVE_CLASS. */ + +#include +#define __ELF_NATIVE_CLASS __WORDSIZE + +/* Rendezvous structure used by the run-time dynamic linker to communicate + details of shared object loading to the debugger. If the executable's + dynamic section has a DT_DEBUG element, the run-time linker sets that + element's value to the address where this structure can be found. */ + +struct r_debug + { + int r_version; /* Version number for this protocol. */ + + struct link_map *r_map; /* Head of the chain of loaded objects. */ + + /* This is the address of a function internal to the run-time linker, + that will always be called when the linker begins to map in a + library or unmap it, and again when the mapping change is complete. + The debugger can set a breakpoint at this address if it wants to + notice shared object mapping changes. */ + ElfW(Addr) r_brk; + enum + { + /* This state value describes the mapping change taking place when + the `r_brk' address is called. */ + RT_CONSISTENT, /* Mapping change is complete. */ + RT_ADD, /* Beginning to add a new object. */ + RT_DELETE /* Beginning to remove an object mapping. */ + } r_state; + + ElfW(Addr) r_ldbase; /* Base address the linker is loaded at. */ + }; + +/* This is the instance of that structure used by the dynamic linker. */ +extern struct r_debug _r_debug; + +/* This symbol refers to the "dynamic structure" in the `.dynamic' section + of whatever module refers to `_DYNAMIC'. So, to find its own + `struct r_debug', a program could do: + for (dyn =3D _DYNAMIC; dyn->d_tag !=3D DT_NULL; ++dyn) + if (dyn->d_tag =3D=3D DT_DEBUG) + r_debug =3D (struct r_debug *) dyn->d_un.d_ptr; + */ +extern ElfW(Dyn) _DYNAMIC[]; + +/* Structure describing a loaded shared object. The `l_next' and `l_prev' + members form a chain of all the shared objects loaded at startup. + + These data structures exist in space used by the run-time dynamic linker; + modifying them may have disastrous results. */ + +struct link_map + { + /* These first few members are part of the protocol with the debugger. + This is the same format used in SVR4. */ + + ElfW(Addr) l_addr; /* Base address shared object is loaded at. */ + char *l_name; /* Absolute file name object was found in. */ + ElfW(Dyn) *l_ld; /* Dynamic section of the shared object. */ + struct link_map *l_next, *l_prev; /* Chain of loaded objects. */ + }; + +#endif /* link.h */ FILE kern/dl.c (2) Add mod->seg->name (section name) (2) With #define GRUB_UTIL only=20 When module is loaded, calls are made to : - grub_gdb_preload_mod() to init things - grub_gdb_add_seg() for each section - grub_gdb_load_mod() when module is in memory - grub_gdb_done() when module is ready to run before (mod->init()) When module is unloaded, calls are made to : - grub_gdb_unload_mod() to advertize of the change - grub_gdb_done() when module is unloaded =09 Examples for these functions are in kern/dl-gdb.c I am not sure of the best strategy for .elf files. Should they reside with the sources files where we compile grub or should they be in same directory of the loaded module. So I actually propagate filename parameter to some functions that don't need it in the first case. (4) "set debug=3Dsymbols" now prints detailled info on symbols loaded diff -EbwBruN ./kern/dl.c ../../src/grub-1.93/kern/dl.c --- ./kern/dl.c 2005-12-10 06:24:59.000000000 +0100 +++ ../../src/grub-1.93/kern/dl.c 2006-05-25 19:44:50.000000000 +0200 @@ -267,6 +267,10 @@ { unsigned i; Elf_Shdr *s; + char * stab; /* String table */ + + s =3D (Elf_Shdr *) ((char *) e + e->e_shoff + (e->e_shentsize * e->e_shstrndx)); + stab =3D (char *) e + s->sh_offset; =20 for (i =3D 0, s =3D (Elf_Shdr *)((char *) e + e->e_shoff); i < e->e_shnum; @@ -302,6 +306,13 @@ } =20 seg->addr =3D addr; + grub_strncpy (seg->name, stab + s->sh_name, + min(LG_SEGMENT_NAME, grub_strlen(stab + s->sh_name) + 1)); + *(seg->name + LG_SEGMENT_NAME - 1) =3D '\0'; +#ifdef GRUB_UTIL + grub_gdb_addseg (mod, seg->name, + seg->addr, (int) s->sh_size); +#endif } else seg->addr =3D 0; @@ -316,7 +327,7 @@ return GRUB_ERR_NONE; } =20 -static grub_err_t +grub_err_t grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e) { unsigned i; @@ -359,6 +370,10 @@ if (! sym->st_value) return grub_error (GRUB_ERR_BAD_MODULE, "the symbol `%s' not found", name); + else { + grub_dprintf ("symbols", + "%s: Resolved Symbol %s\n", mod->name, name); + } } else sym->st_value =3D 0; @@ -368,16 +383,28 @@ sym->st_value +=3D (Elf_Addr) grub_dl_get_section_addr (mod, =20 sym->st_shndx); if (bind !=3D STB_LOCAL) - if (grub_dl_register_symbol (name, (void *) sym->st_value, mod)) + if (grub_dl_register_symbol (name, (void *) sym->st_value, mod)) { + grub_dprintf("symbols", + "Err registering %s (%d)\n", name, grub_errno); return grub_errno; + } else { + grub_dprintf("symbols", + "%s: Registering %s\n", mod->name, name); + } break; =20 case STT_FUNC: sym->st_value +=3D (Elf_Addr) grub_dl_get_section_addr (mod, =20 sym->st_shndx); if (bind !=3D STB_LOCAL) - if (grub_dl_register_symbol (name, (void *) sym->st_value, mod)) + if (grub_dl_register_symbol (name, (void *) sym->st_value, mod)) { + grub_dprintf("symbols", + "Err registering %s (%d)\n", name, grub_errno); return grub_errno; + } else { + grub_dprintf("symbols", + "%s: Registering %s\n", mod->name, name); + } =20 if (grub_strcmp (name, "grub_mod_init") =3D=3D 0) mod->init =3D (void (*) (grub_dl_t)) sym->st_value; @@ -512,6 +539,9 @@ if (seg->size) { grub_dprintf ("modules", "flushing 0x%x bytes at %p\n", seg->size, seg->addr); + grub_dprintf("symbols",=20 + "%s: Section %d loaded at 0x%x (size 0x%x)\n", + mod->name, seg->section, (int) seg->addr, seg->size); grub_arch_sync_caches (seg->addr, seg->size); } } @@ -519,7 +549,7 @@ =20 /* Load a module from core memory. */ grub_dl_t -grub_dl_load_core (void *addr, grub_size_t size) +grub_dl_load_core (void *addr, grub_size_t size, const char * filename) { Elf_Ehdr *e; grub_dl_t mod; @@ -553,10 +583,17 @@ mod->init =3D 0; mod->fini =3D 0; =20 + grub_dprintf ("modules", "relocating to %p\n", mod); if (grub_dl_resolve_name (mod, e) +#ifdef GRUB_UTIL + || grub_gdb_preload_mod(mod, filename) +#endif || grub_dl_resolve_dependencies (mod, e) || grub_dl_load_segments (mod, e) +#ifdef GRUB_UTIL + || grub_gdb_load_mod(mod) +#endif || grub_dl_resolve_symbols (mod, e) || grub_arch_dl_relocate_symbols (mod, e)) { @@ -567,6 +604,10 @@ =20 grub_dl_flush_cache (mod); =20 +#ifdef GRUB_UTIL=20 + grub_gdb_done(); +#endif + grub_dprintf ("modules", "module name: %s\n", mod->name); grub_dprintf ("modules", "init function: %p\n", mod->init); grub_dl_call_init (mod); @@ -601,7 +642,7 @@ if (grub_file_read (file, core, size) !=3D (int) size) goto failed; =20 - mod =3D grub_dl_load_core (core, size); + mod =3D grub_dl_load_core (core, size, filename); if (! mod) goto failed; =20 @@ -660,6 +701,10 @@ if (mod->fini) (mod->fini) (); =20 +#ifdef GRUB_UTIL + grub_gdb_unload_mod(mod); +#endif + grub_dl_remove (mod); grub_dl_unregister_symbols (mod); =20 @@ -680,6 +725,10 @@ grub_free (seg); } =20 +#ifdef GRUB_UTIL + grub_gdb_done(); +#endif + grub_free (mod->name); grub_free (mod); return 1; FILE kern/dl-gdb.c (NEW) (2) Example of what can be done to tell GDB about dynamically loaded/unloaded modules mod->elf contains the string=20 "module.elf 0x2324 -s .text 0x2324 -s .data ..." when grub_gdb_load_mod() is called. With #define GRUB_COMPAT_GDB, you'll need to upgrade gdb 6.1 with a modified version of solib-svr4.c GDB will load/unload symbols as it would for any .so library, and manage pending breakpoints. =20 diff -EbwBruN ./kern/dl-gdb.c ../../src/grub-1.93/kern/dl-gdb.c --- ./kern/dl-gdb.c 1970-01-01 01:00:00.000000000 +0100 +++ ../../src/grub-1.93/kern/dl-gdb.c 2006-05-25 17:24:36.000000000 +0200 @@ -0,0 +1,169 @@ +/* dl-gdb.c Interface between Grub and GDB for dynamically loaded modules */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifdef GRUB_UTIL=20 + +#ifdef GRUB_COMPAT_GDB + +static struct r_debug * grub_gdb_debug_reg() { + static struct r_debug * r_debug =3D NULL; + ElfW(Dyn) * dyn; + if (r_debug =3D=3D NULL)=20 + for (dyn =3D _DYNAMIC; dyn->d_tag !=3D DT_NULL; ++dyn) + if (dyn->d_tag =3D=3D DT_DEBUG)=20 + r_debug =3D (struct r_debug *) dyn->d_un.d_ptr; +=09 + return r_debug; +} + +extern void _dl_debug_state(void); + +static void grub_gdb_debug_sig (int signal) { + struct r_debug * r_debug =3D grub_gdb_debug_reg(); + + if (r_debug && + r_debug->r_state !=3D signal) { + r_debug->r_state =3D signal; + _dl_debug_state(); + } +} + +int grub_gdb_load_mod (grub_dl_t mod) { + struct r_debug * r_debug =3D grub_gdb_debug_reg(); + struct link_map * lm; + for (lm =3D r_debug->r_map; /* There is already a map loaded */ + lm->l_next; lm =3D lm->l_next) ; + lm->l_next =3D & mod->lm; + mod->lm.l_prev =3D lm; + mod->lm.l_next =3D NULL; + grub_dprintf ("symbols", "Loaded %s\n", mod->elf); + grub_gdb_debug_sig(RT_ADD); + return 0; +} + +void grub_gdb_unload_mod(grub_dl_t mod) { + if (mod->lm.l_prev && mod->segment) { + mod->lm.l_prev->l_next =3D mod->lm.l_next; + if (mod->lm.l_next) + mod->lm.l_next->l_prev =3D mod->lm.l_prev; + mod->lm.l_prev =3D NULL; + grub_gdb_debug_sig(RT_DELETE); + } +} + +void grub_gdb_done() { + grub_gdb_debug_sig(RT_CONSISTENT); +} + +#else /* GRUB_COMPAT_GDB */ + +int grub_gdb_load_mod (grub_dl_t mod) { + /* This function is intended to be caught by .gdbinit scripts */ + grub_dprintf ("symbols", "Loaded %s\n", mod->elf); + return 0; +} + +void grub_gdb_unload_mod(grub_dl_t mod) { + /* Don't know how to unload GDB symbols without GRUB_COMPAT_GDB */ +} + +void grub_gdb_done() { +} + +#endif /* else GRUB_COMPAT_GDB */ + +int grub_gdb_preload_mod (grub_dl_t mod, const char * filename) { + /* Compute name of .elf file for that module, + * to be read by GDB since module is loaded. + *=20 + * Suppress leading (device) part of filename + * (FIXME : We should be using some device map to replace (device)) + * + * Add GRUB_PREFIX_SOFILE instead of directory of current filename + * if that symbol is defined. + *=20 + * Suppress .mod extension + * Add .elf extension + * + * Use mod->name instead of filename if that last one is NULL + */ + + char * ptr; + char * cur; + char * name; + + if (mod =3D=3D NULL) return 1; + + mod->lm.l_addr =3D (ElfW(Addr)) NULL; + mod->lm.l_name =3D mod->elf; + mod->lm.l_ld =3D _DYNAMIC; + mod->lm.l_next =3D NULL; + mod->lm.l_prev =3D NULL; + + name =3D (char *) filename; + if (name =3D=3D NULL) name =3D mod->name; + cur =3D mod->elf; + if (GRUB_PREFIX_SOFILE) { + strcpy(cur, GRUB_PREFIX_SOFILE); + cur +=3D strlen(cur); + *cur++ =3D '/'; + ptr =3D strrchr(name, '/'); + if (ptr) + ptr++; + else + ptr =3D name; + strcpy (cur, ptr); + cur +=3D strlen(cur); + mod->current =3D cur; + } else { + ptr =3D NULL; + if (*name =3D=3D '(')=20 + /* FIXME : We should be doing device mapping */ + ptr =3D strchr(name, ')'); + if (! ptr) + ptr =3D name; + else=20 + ptr++; + strcpy(cur, ptr); + cur +=3D strlen(cur); + } + if (strcmp(cur - 4, ".mod") =3D=3D 0) + strcpy(cur - 4, ".elf"); + else { + strcpy (cur, ".elf"); + cur +=3D strlen(cur); + } + mod->current =3D cur; + return 0; +} =20 + +void grub_gdb_addseg (grub_dl_t mod, char * segname, + ElfW(Addr) segaddr, int segsize __attribute__ ((unused))) { + if (mod && mod->current) { + + /* .text segment is the first one we should see loaded + * in all ELF files */ + if (strcmp(segname, ".text") =3D=3D 0) { + sprintf (mod->current, " 0x%x -s %s 0x%x", + segaddr, segname, segaddr); + mod->lm.l_addr =3D segaddr; + } else { + sprintf (mod->current, " -s %s 0x%x", segname, segaddr); + } + mod->current +=3D strlen (mod->current); + } +} + +#endif /* GRUB_UTIL */ FILE gdb-6.1/gdb/solib-svr4.c (2) This file is from the GDB 6.1 distribution. Changes made to this file allow ELF sections to be loaded at non-contigus memory locations (the way Grub does for modules). That way, GDB don't make the difference between a .so library and a Grub module being loaded when you compile with the -DGRUB_COMPAT_GDB option. Nota Bene : We could also change the way grub allocate memory for=20 loading modules (allocate one bunch of memory for all sections to be loaded), at the cost of a two-passes loop in grub_dl_load_segments() and gain only one call to grub_memalign(). That would ease a lot GRUB/GDB interface for dynamic loading of=20 modules and Lubomir scripts. Unless there is a plan to allocate data sections a different way of text sections to avoid execution of code in data. (Is that possible anyway ?). --- solib-svr4.c 2004-02-21 19:34:45.000000000 +0100 +++ ../../gdb-6.1.mod/gdb/solib-svr4.c 2006-05-25 01:09:52.000000000 +0200 @@ -68,6 +68,11 @@ rather than void *, so that we may use byte offsets to find the various fields without the need for a cast. */ char *lm; + int nsecs; + struct lm_sec { + char name [20]; + int addr; + } tab_secs[30]; }; =20 /* On SVR4 systems, a list of symbols in the dynamic linker where @@ -720,6 +725,7 @@ themselves. The declaration of `struct so_list' says which fields we provide values for. */ =20 +static char * opt_pattern =3D " -s "; static struct so_list * svr4_current_sos (void) { @@ -739,6 +745,12 @@ return 0; } =20 + if (opt_pattern) + { + char *re_err =3D re_comp(opt_pattern); + if (re_err) + error ("Invalid regexp: %s", re_err); + } /* Walk the inferior's link map list, and build our list of `struct so_list' nodes. */ lm =3D first_link_map_member (); =20 @@ -797,6 +809,59 @@ free_so (new); else { + /* Check to see if name contains -s options + * that refers to absolute load address for specific sections + * + * name 0x27287 -s .text 0x27287 -s .data 0x128743 ... + * + * to update tab_secs[] info + */ + new->lm_info->nsecs =3D 0; + if (opt_pattern && re_exec (new->so_name)) + { + /* Scan the name and get successive section info + * The scan relies on the fact there is no missing field=20 + * in the options scanned ... + */ + int nsecs =3D 0; + char * ptr; + char * prev =3D NULL; + char * pprev =3D NULL; + char * lastchar_in_name =3D NULL; + int state =3D 0; + for (ptr =3D new->so_name; *ptr; ptr++) { + if (*ptr =3D=3D ' ' && state =3D=3D 0) { + pprev =3D prev; + prev =3D ptr; + state =3D 1; + continue; + } + if (*ptr =3D=3D ' ' && state =3D=3D 1) { + continue; + } + if (*ptr =3D=3D '-' && state =3D=3D 1) { + state =3D 2; + continue; + } + if (*ptr =3D=3D 's' && state =3D=3D 2) { + state =3D 3; + continue; + } + if (*ptr =3D=3D ' ' && state =3D=3D 3) { + if (! lastchar_in_name)=20 + lastchar_in_name =3D pprev; + if (sscanf (ptr, " %s %li", + new->lm_info->tab_secs[nsecs].name, + &new->lm_info->tab_secs[nsecs].addr) !=3D 2) + break; + nsecs++; + } + state =3D 0; + } + if (lastchar_in_name) + *lastchar_in_name =3D '\0'; + new->lm_info->nsecs =3D nsecs; + } new->next =3D 0; *link_ptr =3D new; link_ptr =3D &new->next; @@ -1420,8 +1485,18 @@ svr4_relocate_section_addresses (struct so_list *so, struct section_table *sec) { + int i; sec->addr =3D svr4_truncate_ptr (sec->addr + LM_ADDR (so)); sec->endaddr =3D svr4_truncate_ptr (sec->endaddr + LM_ADDR (so)); + for (i =3D 0; i < so->lm_info->nsecs; i++) { + if (strcmp( so->lm_info->tab_secs[i].name, + sec->the_bfd_section->name) =3D=3D 0) { + sec->endaddr -=3D sec->addr; + sec->addr =3D so->lm_info->tab_secs[i].addr; + sec->endaddr +=3D sec->addr; + break; + } + } } =20 =20 FILE kern/main.c (2) grub_dl_load_core() has now a "filename" parameter (NULL as it is not relevant in this call). diff -EbwBruN ./kern/main.c ../../src/grub-1.93/kern/main.c --- ./kern/main.c 2005-08-12 21:53:32.000000000 +0200 +++ ../../src/grub-1.93/kern/main.c 2006-05-13 01:08:22.000000000 +0200 @@ -49,7 +49,7 @@ header =3D (struct grub_module_header *) ((char *) header + header->size)) { if (! grub_dl_load_core ((char *) header + header->offset, - (header->size - header->offset))) + (header->size - header->offset), NULL)) grub_fatal ("%s", grub_errmsg); } =20 FILE kern/misc.c (3) grub_break() dummy function for debugging only. Not very useful. diff -EbwBruN ./kern/misc.c ../../src/grub-1.93/kern/misc.c --- ./kern/misc.c 2005-10-28 05:14:33.000000000 +0200 +++ ../../src/grub-1.93/kern/misc.c 2006-05-02 22:45:37.000000000 +0200 @@ -875,3 +875,8 @@ =20 return p - dest; } + +extern int grub_printf (const char * fmt, ...); +void grub_break (const char * fct, int index) { + grub_printf ("%s: Break reached at %d\n", fct, index); +} FILE kern/mm.c=20 (3) grub_mmap() (NEW), as it was needed by one of the modules=20 I work on. diff -EbwBruN ./kern/mm.c ../../src/grub-1.93/kern/mm.c --- ./kern/mm.c 2005-08-21 20:42:54.000000000 +0200 +++ ../../src/grub-1.93/kern/mm.c 2006-05-01 17:33:01.000000000 +0200 @@ -287,6 +287,12 @@ return grub_memalign (0, size); } =20 +void * +grub_mmap (grub_size_t size) +{ + return grub_memalign (0, size); +} + /* Deallocate the pointer PTR. */ void grub_free (void *ptr) FILE kern/rescue.c=20 (3) grub_rescue_get_command() (NEW), as it was needed by one of the modules I work on. diff -EbwBruN ./kern/rescue.c ../../src/grub-1.93/kern/rescue.c --- ./kern/rescue.c 2005-10-24 12:23:46.000000000 +0200 +++ ../../src/grub-1.93/kern/rescue.c 2006-05-24 05:03:26.000000000 +0200 @@ -690,3 +690,17 @@ } } } + +void * grub_rescue_get_command(const char * name) { + grub_rescue_command_t cmd; + /* Find the command and and return the function. */ + for (cmd =3D grub_rescue_command_list; cmd; cmd =3D cmd->next) + { + if (grub_strcmp (name, cmd->name) =3D=3D 0) + { + return (cmd->func); + break; + } + } + return NULL; +} =20 FILE include/grub/misc.h (3) grub_break() is only a dummy for debugging. Not really useful. =09 diff -EbwBruN ./include/grub/misc.h ../../src/grub-1.93/include/grub/misc.h --- ./include/grub/misc.h 2005-10-24 12:23:46.000000000 +0200 +++ ../../src/grub-1.93/include/grub/misc.h 2006-05-25 16:54:31.000000000 +0200 @@ -76,4 +76,8 @@ const grub_uint8_t *src, grub_size_t size); =20 +void EXPORT_FUNC(grub_break) (const char * fct, int i); + +#define min(a,b) (a < b ? a : b) +#define max(a,b) (a < b ? b : a) #endif /* ! GRUB_MISC_HEADER */ FILE include/grub/mm.h (3) NEW grub_mmap() needed (mostly with GRUB_UTIL) by one of the module I work on. diff -EbwBruN ./include/grub/mm.h ../../src/grub-1.93/include/grub/mm.h --- ./include/grub/mm.h 2005-08-22 19:28:59.000000000 +0200 +++ ../../src/grub-1.93/include/grub/mm.h 2006-04-26 20:41:10.000000000 +0200 @@ -29,6 +29,7 @@ #endif =20 void grub_mm_init_region (void *addr, grub_size_t size); +void *EXPORT_FUNC(grub_mmap) (grub_size_t size); void *EXPORT_FUNC(grub_malloc) (grub_size_t size); void EXPORT_FUNC(grub_free) (void *ptr); void *EXPORT_FUNC(grub_realloc) (void *ptr, grub_size_t size); FILE include/grub/rescue.h (3) NEW grub_rescue_get_command() gives func address of a rescue command found by name. Needed by one of the modules I work on. diff -EbwBruN ./include/grub/rescue.h ../../src/grub-1.93/include/grub/rescue.h --- ./include/grub/rescue.h 2004-04-04 15:46:00.000000000 +0200 +++ ../../src/grub-1.93/include/grub/rescue.h 2006-05-24 04:57:20.000000000 +0200 @@ -34,4 +34,7 @@ /* Unregister a rescue mode command. */ void EXPORT_FUNC(grub_rescue_unregister_command) (const char *name); =20 +/* Get a rescue mode command. */ +void * EXPORT_FUNC(grub_rescue_get_command) (const char *name); + #endif /* ! GRUB_RESCUE_HEADER */ FILE include/grub/util/misc.h (3) grub_break() is only a dummy for debugging. Not really useful. diff -EbwBruN ./include/grub/util/misc.h ../../src/grub-1.93/include/grub/util/misc.h --- ./include/grub/util/misc.h 2005-02-15 01:07:01.000000000 +0100 +++ ../../src/grub-1.93/include/grub/util/misc.h 2006-05-02 22:43:05.000000000 +0200 @@ -45,4 +45,5 @@ void grub_util_write_image_at (const void *img, size_t size, off_t offset, FILE *out); =20 +void grub_break (const char * fct, int index); #endif /* ! GRUB_UTIL_MISC_HEADER */ FILE fs/ext2.c (4) minor sanity change. # For genmoddep. diff -EbwBruN ./fs/ext2.c ../../src/grub-1.93/fs/ext2.c --- ./fs/ext2.c 2005-11-13 16:47:09.000000000 +0100 +++ ../../src/grub-1.93/fs/ext2.c 2006-05-01 12:44:30.000000000 +0200 @@ -171,7 +171,7 @@ }; =20 #ifndef GRUB_UTIL -static grub_dl_t my_mod; +static grub_dl_t my_mod =3D (grub_dl_t) 0; #endif =20 /* Read into BLKGRP the blockgroup descriptor of blockgroup GROUP of _________________________________________ Eric Salom=E9 - Paris - France From MAILER-DAEMON Fri May 26 08:57:41 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fjbsr-0006xI-J7 for mharc-grub-devel@gnu.org; Fri, 26 May 2006 08:57:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fjbsq-0006wk-Dr for grub-devel@gnu.org; Fri, 26 May 2006 08:57:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fjbsp-0006wM-4V for grub-devel@gnu.org; Fri, 26 May 2006 08:57:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fjbso-0006wJ-Ri for grub-devel@gnu.org; Fri, 26 May 2006 08:57:38 -0400 Received: from [212.27.42.27] (helo=smtp1-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fjbxh-0006En-Th for grub-devel@gnu.org; Fri, 26 May 2006 09:02:42 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp1-g19.free.fr (Postfix) with ESMTP id 6E6DC9A2FD for ; Fri, 26 May 2006 14:57:37 +0200 (CEST) From: =?iso-8859-1?Q?Eric_Salom=E9?= To: Date: Fri, 26 May 2006 14:57:36 +0200 Message-ID: <000501c680c3$f6c4f9c0$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Subject: Roboot's BOF 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, 26 May 2006 12:57:41 -0000 Roboot's birth of feather Dear all, I=92d like to talk about some ideas that came to me a few months ago = when I heard about Grub (legacy) and gave it a try on my PC (Linux + Windows). I thought (like others) Grub needed some enhancements and I see most of them are already on their way with Grub 2. Thoughts, ideas are like free software, they get better when shared, so let=92s try this one : Grub legacy=92s lack of scripting feature, but also a need for = modularity, expandability + a project I care for (and personal experience among other things), mix that and it gets :=20 why not try Grub + Forth to see how it goes ? Let=92s call it =93Roboot=94. I=92ve spend some free time doing a =93thing that works for me=94 as a = start. Technically, It turns out as a boot loader (using Grub=92s stage1 =96 stage1.5) embedded with full ANSI Forth compiler/interpreter that calls Grub=92s library routines to do keyboard/screen/disk input/output, etc.=20 Calling Grub=92s menu functions or any registered Grub C functions can = be mixed in Forth scripts to get powerful scripting features.=20 It computes 1 + 1 and it loads OS among other things. Also works with underlying Linux OS on i386. And no, it doesn=92t read/execute Fcode device drivers yet (if there is any sparc fan among us). All of current Grub 2 development sources will be useful to next versions of =93Roboot=94 if any, including : - better memory management - modularity in supported input/output devices - support for dynamic loading of C routines (Roboot already have Forth modules dynamic loading) - even scripting routines (though it won=92t be used the same) I still had some spare time to see how it goes. So that I have a running Grub 2 module, built on =93BigForth=94 by Bernd Paysan, that adds a = Forth engine to current version of Grub 2 development. It also runs on grub-emu under i386-pc. =09 I kind of believe that =93Roboot=94 tries might be useful to = current/next versions of Grub in some way. What=92s your opinion ? Best Regards, Eric Salom=E9 - Paris, France From MAILER-DAEMON Fri May 26 11:21:56 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fje8S-0003KD-JX for mharc-grub-devel@gnu.org; Fri, 26 May 2006 11:21:56 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fje8Q-0003K0-Ph for grub-devel@gnu.org; Fri, 26 May 2006 11:21:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fje8P-0003Jk-FZ for grub-devel@gnu.org; Fri, 26 May 2006 11:21:54 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fje8P-0003Jh-6d for grub-devel@gnu.org; Fri, 26 May 2006 11:21:53 -0400 Received: from [157.24.2.30] (helo=smtp1.cc.lut.fi) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjeDJ-0003vM-Q2 for grub-devel@gnu.org; Fri, 26 May 2006 11:26:58 -0400 Received: from localhost (smtp1 [127.0.0.1]) by smtp1.cc.lut.fi (Postfix) with ESMTP id AAF12702EF for ; Fri, 26 May 2006 18:21:49 +0300 (EEST) Received: from smtp1.cc.lut.fi ([127.0.0.1]) by localhost (smtp1.cc.lut.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12068-09 for ; Fri, 26 May 2006 18:21:49 +0300 (EEST) Received: from [192.168.1.100] (lk4-a-4-1.lnet.lut.fi [157.24.102.107]) by smtp1.cc.lut.fi (Postfix) with ESMTP id 6299B70277 for ; Fri, 26 May 2006 18:21:48 +0300 (EEST) Message-ID: <44771D14.5050608@nic.fi> Date: Fri, 26 May 2006 18:21:56 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: The development of GRUB 2 References: <002901c67fab$ddb416a0$da01a8c0@p4> <4475798D.4040407@nic.fi> <31A7CB00-4E1A-485D-922A-606650A8F410@rockymedia.ca> In-Reply-To: <31A7CB00-4E1A-485D-922A-606650A8F410@rockymedia.ca> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: by lut.fi Content-Transfer-Encoding: quoted-printable Subject: Re: GUI Work 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, 26 May 2006 15:21:55 -0000 John S. wrote: > I'm trying to get myself started in all of this, but I have a ton of > questions. You'll have to forgive me if they are obvious, but this is > my first time looking at the grub source. >=20 > Also I have never written code this low-level (on a PC) before. My mos= t > relevant experience would probably be writing some ms-dos games, which > is similar but I'm assuming theres a ton of differences. So please > forgive me if I don't know all of the concepts yet. You don't actually have to care too much about low-level details. What is required is to write "high-level" GUI using low-level systems provided= . > So here are the questions: >=20 > How much of the video API has been written? Bitmap support is missing from CVS, but otherwise most of the functionality should work. There might be some changes, but I have to think more on some issues raised on this list. > What exactly does the file vbe.c do? I'm assuming it implements a VESA > BIOS Extension interface that we can use when writing the API > functions. Please correct me if I'm wrong. Also how much work is > required on this set of code? vbe.c implements VESA Bios Extension 2.0+ driver for GRUB Video Subsystem. You are not supposed to use this driver directly. Use Video API instead. It abstracts used video driver, so we can use same GUI code on all supported platforms. > If the API has already been started which file is it in? if it has not= , > which file should be created for it? how about /video/i386/pc/api.c ? See video/video.c. There is also term/videoterm.c and commands/videotest.c that exercises Video API. Thanks, Vesa J=E4=E4skel=E4inen From MAILER-DAEMON Fri May 26 11:57:18 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fjegg-00005N-Ok for mharc-grub-devel@gnu.org; Fri, 26 May 2006 11:57:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fjegf-000050-IZ for grub-devel@gnu.org; Fri, 26 May 2006 11:57:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fjege-0008WF-Pm for grub-devel@gnu.org; Fri, 26 May 2006 11:57:17 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fjege-0008W8-Gh for grub-devel@gnu.org; Fri, 26 May 2006 11:57:16 -0400 Received: from [80.190.231.112] (helo=khepri.openbios.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FjelZ-0007bJ-7d for grub-devel@gnu.org; Fri, 26 May 2006 12:02:21 -0400 Received: from stepan by khepri.openbios.org with local (Exim 4.51) id 1Fjegc-0001Ve-D3 for grub-devel@gnu.org; Fri, 26 May 2006 17:57:14 +0200 Date: Fri, 26 May 2006 17:57:14 +0200 From: Stefan Reinauer To: The development of GRUB 2 Message-ID: <20060526155713.GA12992@coresystems.de> References: <000501c680c3$f6c4f9c0$0b00a8c0@yoda> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <000501c680c3$f6c4f9c0$0b00a8c0@yoda> X-Operating-System: Linux 2.6.16-rc3-20060213123227-smp on an x86_64 User-Agent: Mutt/1.5.9i X-Duff: Orig. Duff, Duff Lite, Duff Dry, Duff Dark, Raspberry Duff, Lady Duff, Red Duff, Tartar Control Duff Subject: Re: Roboot's BOF 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, 26 May 2006 15:57:17 -0000 * Eric Salomé [060526 14:57]: > Grub legacy's lack of scripting feature, but also a need for modularity, > expandability + a project I care for (and personal experience among > other things), mix that and it gets : > why not try Grub + Forth to see how it goes ? > > Let's call it "Roboot". Something very similar exists already. Its called OpenBIOS. See www.openbios.org for more details. Stefan -- coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br. Tel.: +49 761 7668825 • Fax: +49 761 7664613 Email: info@coresystems.de • http://www.coresystems.de/ From MAILER-DAEMON Fri May 26 12:53:36 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FjfZA-0006oH-1e for mharc-grub-devel@gnu.org; Fri, 26 May 2006 12:53:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FjfZ8-0006nh-4G for grub-devel@gnu.org; Fri, 26 May 2006 12:53:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FjfZ6-0006nV-Jl for grub-devel@gnu.org; Fri, 26 May 2006 12:53:33 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjfZ6-0006nS-De for grub-devel@gnu.org; Fri, 26 May 2006 12:53:32 -0400 Received: from [204.127.131.116] (helo=mtiwmhc12.worldnet.att.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fjfe2-0003pz-2p for grub-devel@gnu.org; Fri, 26 May 2006 12:58:38 -0400 Received: from who7 (h-67-100-52-161.nycmny83.dynamic.covad.net[67.100.52.161]) by worldnet.att.net (mtiwmhc12) with SMTP id <200605261653301120065163e>; Fri, 26 May 2006 16:53:30 +0000 From: "Gregg C Levine" To: "'The development of GRUB 2'" Date: Fri, 26 May 2006 12:51:53 -0400 Message-ID: <001a01c680e4$b3e27760$6501a8c0@who7> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: <20060526155713.GA12992@coresystems.de> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal Subject: RE: Roboot's BOF 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, 26 May 2006 16:53:34 -0000 Hello! Stefan, Eric, when I saw the earlier message, to which that you Stefan = made your contribution I was about to bring to the list's, and of course = Eric's attention your OpenBIOS project at www.openbios.org . Now seeing = that you have done so, I am going to call it a coincidence. And also = comment that like minds do think alike. Yes, Eric, you should indeed in your spare time, do look at the items = hosted on the OpenBIOS project pages, they make for an interesting = application of the Forth language to the world of the BIOS and its = methods.=20 -- Gregg C Levine hansolofalcon@worldnet.att.net --- "Remember the Force will be with you. Always." Obi-Wan Kenobi=20 > -----Original Message----- > From: grub-devel-bounces+hansolofalcon=3Dworldnet.att.net@gnu.org = [mailto:grub- > devel-bounces+hansolofalcon=3Dworldnet.att.net@gnu.org] On Behalf Of = Stefan > Reinauer > Sent: Friday, May 26, 2006 11:57 AM > To: The development of GRUB 2 > Subject: Re: Roboot's BOF >=20 > * Eric Salom=C3=83=C2=A9 [060526 14:57]: > > Grub legacy's lack of scripting feature, but also a need for = modularity, > > expandability + a project I care for (and personal experience among > > other things), mix that and it gets : > > why not try Grub + Forth to see how it goes ? > > > > Let's call it "Roboot". >=20 > Something very similar exists already. Its called OpenBIOS. See > www.openbios.org for more details. >=20 > Stefan >=20 > -- > coresystems GmbH =C3=A2=E2=82=AC=C2=A2 Brahmsstr. 16 = =C3=A2=E2=82=AC=C2=A2 D-79104 Freiburg i. Br. > Tel.: +49 761 7668825 =C3=A2=E2=82=AC=C2=A2 Fax: +49 761 7664613 > Email: info@coresystems.de =C3=A2=E2=82=AC=C2=A2 = http://www.coresystems.de/ >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel From MAILER-DAEMON Fri May 26 14:26:22 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fjh0w-0008BV-K8 for mharc-grub-devel@gnu.org; Fri, 26 May 2006 14:26:22 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fjh0u-00089L-KX for grub-devel@gnu.org; Fri, 26 May 2006 14:26:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fjh0s-00087K-Qc for grub-devel@gnu.org; Fri, 26 May 2006 14:26:19 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fjh0q-000847-2b; Fri, 26 May 2006 14:26:16 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fjh5m-0002E8-Ly; Fri, 26 May 2006 14:31:22 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id AE4EF3CAA659C; Fri, 26 May 2006 21:58:43 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 960143CAA659B; Fri, 26 May 2006 21:58:41 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: grub-devel@gnu.org Date: Fri, 26 May 2006 20:26:10 +0200 User-Agent: KMail/1.8.2 References: <200604221943.35240.okuji@enbug.org> <200605020324.21619.okuji@enbug.org> <200605060844.02009.okuji@enbug.org> In-Reply-To: <200605060844.02009.okuji@enbug.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605262026.10804.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.500000, version=0.17.2 Cc: bug-grub@gnu.org Subject: Re: Google's Summer of Code 2006 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, 26 May 2006 18:26:21 -0000 Hello, As announced here: http://code.google.com/soc/gnu/about.html GNU GRUB has been allowed to accept Jeroen's application for LVM and RAID support. Congratulations, Jeroen! I thank all the people who submitted applications for GRUB. I hope we will have chances to hack GRUB together, whether you are accepted or not. Cheers, Okuji From MAILER-DAEMON Fri May 26 15:05:01 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FjhcL-0002zT-Bq for mharc-grub-devel@gnu.org; Fri, 26 May 2006 15:05:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FjhcJ-0002ye-Jb for grub-devel@gnu.org; Fri, 26 May 2006 15:04:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FjhcH-0002y0-Si for grub-devel@gnu.org; Fri, 26 May 2006 15:04:59 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FjhcH-0002xc-OH for grub-devel@gnu.org; Fri, 26 May 2006 15:04:57 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FjhhE-0005gW-J4 for grub-devel@gnu.org; Fri, 26 May 2006 15:10:04 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 6E5DA3CAA659C for ; Fri, 26 May 2006 22:37:27 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id E5D5C3CAA659B for ; Fri, 26 May 2006 22:37:26 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Fri, 26 May 2006 21:04:55 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605262104.55720.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.431376, version=0.17.2 Subject: configure host and target 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, 26 May 2006 19:04:59 -0000 According to a suggestion by an autoconf developer, I think we should change the build system in this way: - Use "host" to represent an environment in which utilities (tools) run. This is a natural interpretation of the meaning of "host" in autoconf. - Use "target" to represent a native environment in which the grub kernel and modules run. This is not very natural, but a bit easier to understand. - Use CPPFLAGS, CFLAGS, LDFLAGS, etc. for the "host". This is more intuitive. - Use TARGET_CPPFLAGS, TARGET_CFLAGS, etc. for the "target". Usually, the user does not need to tweak these flags manually, so they are not necessary to be very intuitive. If there is no objection, I will work on this issue very soon. Okuji From MAILER-DAEMON Sat May 27 05:12:47 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fjuql-00061n-NG for mharc-grub-devel@gnu.org; Sat, 27 May 2006 05:12:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fjuqk-00061B-0c for grub-devel@gnu.org; Sat, 27 May 2006 05:12:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fjuqi-00060r-TD for grub-devel@gnu.org; Sat, 27 May 2006 05:12:45 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fjuqi-00060o-QR for grub-devel@gnu.org; Sat, 27 May 2006 05:12:44 -0400 Received: from [212.27.42.29] (helo=smtp3-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fjuvn-0002F3-P7 for grub-devel@gnu.org; Sat, 27 May 2006 05:17:59 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp3-g19.free.fr (Postfix) with ESMTP id 25BC9489E9 for ; Sat, 27 May 2006 11:12:42 +0200 (CEST) From: =?iso-8859-1?Q?Eric_Salom=E9?= To: "'The development of GRUB 2'" Date: Sat, 27 May 2006 11:12:42 +0200 Message-ID: <001d01c6816d$b59929d0$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <20060526155713.GA12992@coresystems.de> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Importance: Normal Subject: RE : Roboot's BOF 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, 27 May 2006 09:12:46 -0000 > > Let's call it "Roboot". >=20 > Something very similar exists already. Its called OpenBIOS. See > www.openbios.org for more details. >=20 > Stefan I've glanced over the Internet looking for OpenBIOS and other software.=20 I've found an OpenBIOS version 1.1 that fullfills well its goals.=20 (Can't open www.openbios.org on my PC :-( so I don't know what's new). Using Forth at boot time isn't a fresh new idea, but I believe (as you do) it's a very good one. As a start, I thought it might be interesting to have a Forth engine make use of the Grub 2's commands.=20 Let's say it can be thought of as a script helper for situations that won't be handled by the scripting language of Grub 2. Well, it's done. But there is more than that. In fact my belief is there is a life before booting OS, and a life after the OS gives up (on user=92s request or = when it can=92t go on any more (windows=92 blue screen)). A life full of many things to do: - boot an (other) OS - connect to the net to request for Roboot=92s Web assistance - partition disks and other flavours - examine current configuration, diagnostic misfits - add a new OS in the PC=20 - advertise central server of boot events - look for email incoming and decide not to boot if there=92s nothing new - have a calculator, play cards, etc. You might be interested in ?=20 I don't know what Marco, Yoshinori and others would like to do for Grub 3 to X, so I just ask. Even if it happens to be two different projects, I kind of believe one will gain from the other. _________________________________________ Eric Salom=E9 - Paris - France From MAILER-DAEMON Sat May 27 08:09:50 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fjxc6-0000sy-Bd for mharc-grub-devel@gnu.org; Sat, 27 May 2006 08:09:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fjxc4-0000qg-8Q for grub-devel@gnu.org; Sat, 27 May 2006 08:09:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fjxc1-0000nx-89 for grub-devel@gnu.org; Sat, 27 May 2006 08:09:46 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fjxc0-0000nV-Mc for grub-devel@gnu.org; Sat, 27 May 2006 08:09:44 -0400 Received: from [194.109.24.33] (helo=smtp-vbr13.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fjxh7-0005cI-2t for grub-devel@gnu.org; Sat, 27 May 2006 08:15:01 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr13.xs4all.nl (8.13.6/8.13.6) with ESMTP id k4RC9cqM089104 for ; Sat, 27 May 2006 14:09:40 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <001d01c6816d$b59929d0$0b00a8c0@yoda> From: Marco Gerards Date: Sat, 27 May 2006 14:12:30 +0200 In-Reply-To: <001d01c6816d$b59929d0$0b00a8c0@yoda> (Eric =?iso-8859-1?Q?Sa?= =?iso-8859-1?Q?lom=E9's?= message of "Sat, 27 May 2006 11:12:42 +0200") Message-ID: <87d5dzfyz5.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: RE : Roboot's BOF 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, 27 May 2006 12:09:49 -0000 Eric Salom=E9 writes: > But there is more than that. In fact my belief is there is a life before > booting OS, and a life after the OS gives up (on user=92s request or when > it can=92t go on any more (windows=92 blue screen)). A life full of many > things to do: > - boot an (other) OS > - connect to the net to request for Roboot=92s Web assistance > - partition disks and other flavours > - examine current configuration, diagnostic misfits > - add a new OS in the PC=20 > - advertise central server of boot events > - look for email incoming and decide not to boot if there=92s > nothing new > - have a calculator, play cards, etc. Personally, I do not see how this will add anything to what GRUB 2 is capable of, or what we planned to change in GRUB. With the scripting support planned (and partially implemented), you can do most of these things. Some other more fancy things can be done by writing a module in C or whatever. Please tell me if I misunderstood your goals. It would be easy to add a command to GRUB 2 that makes it possible to parse other languages. What you need is a new parser. You could create some new AST nodes or so and add all this to GRUB 2 from within your module. All this should integrate quite well. This way, you would be able to create new commands, functions, etc in another language. Personally I prefer to see an add-in module, even one maintained outside of GRUB, than a complete fork. But you would have to keep in mind that we can make interface changes when we see the need for this. > I don't know what Marco, Yoshinori and others would like to do for Grub > 3 to X, so I just ask. First I would like to see GRUB 2 being finished. It is not there yet. :-) -- Marco From MAILER-DAEMON Sat May 27 12:49:25 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fk1yf-0001RG-Rm for mharc-grub-devel@gnu.org; Sat, 27 May 2006 12:49:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fk1ye-0001Pb-1Y for grub-devel@gnu.org; Sat, 27 May 2006 12:49:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fk1yc-0001Ns-2H for grub-devel@gnu.org; Sat, 27 May 2006 12:49:23 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fk1yb-0001No-Ob for grub-devel@gnu.org; Sat, 27 May 2006 12:49:21 -0400 Received: from [207.152.70.127] (helo=baz.foobar-qux.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fk23l-0001vn-0v for grub-devel@gnu.org; Sat, 27 May 2006 12:54:41 -0400 Received: from baz.foobar-qux.org (localhost.foobar-qux.org [127.0.0.1]) by baz.foobar-qux.org (8.13.3/8.13.3) with ESMTP id k4RMxLev042867 for ; Sat, 27 May 2006 17:59:21 -0500 (CDT) (envelope-from hde@gnu.org) Received: (from hde@localhost) by baz.foobar-qux.org (8.13.3/8.13.3/Submit) id k4RMxK5a042864; Sat, 27 May 2006 17:59:20 -0500 (CDT) (envelope-from hde@gnu.org) X-Authentication-Warning: baz.foobar-qux.org: hde set sender to hde@gnu.org using -f Sender: hde@baz.foobar-qux.org Mail-Copies-To: hde@gnu.org To: grub-devel@gnu.org From: hde@gnu.org (Harley D. Eades III) Date: 27 May 2006 17:59:19 -0500 Message-ID: <86d5dzkraw.fsf@baz.foobar-qux.org> Lines: 21 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: RE: 226 F May 26 Yoshinori K. Okuji ( 25) [ configure host and target 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, 27 May 2006 16:49:24 -0000 > According to a suggestion by an autoconf developer, I think we should change > the build system in this way: > > - Use "host" to represent an environment in which utilities (tools) run. This > is a natural interpretation of the meaning of "host" in autoconf. > > - Use "target" to represent a native environment in which the grub kernel and > modules run. This is not very natural, but a bit easier to understand. > > - Use CPPFLAGS, CFLAGS, LDFLAGS, etc. for the "host". This is more intuitive. > > - Use TARGET_CPPFLAGS, TARGET_CFLAGS, etc. for the "target". Usually, the user > does not need to tweak these flags manually, so they are not necessary to be > very intuitive. > > If there is no objection, I will work on this issue very soon. I like this design, it makes the build system a lot easier to understand. It will also make porting to other OS's less painful. :) Nice job. Harley From MAILER-DAEMON Mon May 29 13:57:16 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FklzQ-0001ot-PE for mharc-grub-devel@gnu.org; Mon, 29 May 2006 13:57:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FklzO-0001iS-Qa for grub-devel@gnu.org; Mon, 29 May 2006 13:57:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FklzN-0001gd-Tw for grub-devel@gnu.org; Mon, 29 May 2006 13:57:14 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FklzN-0001gU-RV for grub-devel@gnu.org; Mon, 29 May 2006 13:57:13 -0400 Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fkm50-0006UV-1h for grub-devel@gnu.org; Mon, 29 May 2006 14:03:02 -0400 Received: from tschwinge by fencepost.gnu.org with local (Exim 4.34) id 1FklzN-0005Ew-9K for grub-devel@gnu.org; Mon, 29 May 2006 13:57:13 -0400 Date: Mon, 29 May 2006 13:57:13 -0400 From: Thomas Schwinge To: The development of GRUB 2 Message-ID: <20060529175713.GA29280@fencepost> References: <200605262104.55720.okuji@enbug.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200605262104.55720.okuji@enbug.org> User-Agent: Mutt/1.5.6+20040907i Subject: Re: configure host and target 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: Mon, 29 May 2006 17:57:15 -0000 On Fri, May 26, 2006 at 09:04:55PM +0200, Yoshinori K. Okuji wrote: > According to a suggestion by an autoconf developer, I think we should change > the build system in this way: > > [...] > > If there is no objection, I will work on this issue very soon. To give some feedback: I support this idea. Regards, Thomas From MAILER-DAEMON Tue May 30 16:24:15 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlAlD-0005w0-PN for mharc-grub-devel@gnu.org; Tue, 30 May 2006 16:24:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlAlB-0005vV-Mh for grub-devel@gnu.org; Tue, 30 May 2006 16:24:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlAl9-0005vB-61 for grub-devel@gnu.org; Tue, 30 May 2006 16:24:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlAl9-0005v8-1c for grub-devel@gnu.org; Tue, 30 May 2006 16:24:11 -0400 Received: from [212.27.42.27] (helo=smtp1-g19.free.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlAr0-0003FD-L9 for grub-devel@gnu.org; Tue, 30 May 2006 16:30:14 -0400 Received: from yoda (std93-4-82-229-216-106.fbx.proxad.net [82.229.216.106]) by smtp1-g19.free.fr (Postfix) with ESMTP id 21E929ADFF for ; Tue, 30 May 2006 22:24:08 +0200 (CEST) From: =?iso-8859-1?Q?Eric_Salom=E9?= To: "'The development of GRUB 2'" Date: Tue, 30 May 2006 22:24:08 +0200 Message-ID: <000f01c68427$0156bb10$0b00a8c0@yoda> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 In-Reply-To: <87d5dzfyz5.fsf@xs4all.nl> Importance: Normal Subject: RE : RE : Roboot's BOF 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: Tue, 30 May 2006 20:24:14 -0000 > It would be easy to add a command to GRUB 2 that makes it possible to > parse other languages. What you need is a new parser. You could > create some new AST nodes or so and add all this to GRUB 2 from within > your module. All this should integrate quite well. This way, you > would be able to create new commands, functions, etc in another > language. I give this "integrate work" a try and so far so good. Had found nothing that would have been *mandatory* to change in grub 2's kernel. If I find on the way some good ideas to share I'll express them on this mailing-list for comments.=20 > Personally I prefer to see an add-in module, even one maintained > outside of GRUB, than a complete fork. But you would have to keep in > mind that we can make interface changes when we see the need for this. That's what roboot aim to be, an add-in module. I understand we will have to face some interface changes from time to time but I am ready for that too ... and that will make things even better. > > I don't know what Marco, Yoshinori and others would like to do for Grub > > 3 to X, so I just ask. >=20 > First I would like to see GRUB 2 being finished. It is not there > yet. :-) =20 > -- > Marco > Well, we are all working on that part too ! and I am full of hope we are going to make it. I am quite confused with drivers dealing with BIOS, but I don't want to feel helpless, so I'll try to do something useful with grub-emu and let you know if I can work on grub's kernel (is there anything missing you'd like to add ?).=20 By the way, is there anybody working on having the vbe interface working on grub-emu ? Any hint to help me start work on it ? Best regards, _________________________________________ Eric Salom=E9 - Paris - France From MAILER-DAEMON Tue May 30 16:28:22 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlApC-0006WF-Pd for mharc-grub-devel@gnu.org; Tue, 30 May 2006 16:28:22 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlApA-0006W9-Sa for grub-devel@gnu.org; Tue, 30 May 2006 16:28:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlAp7-0006Vx-QX for grub-devel@gnu.org; Tue, 30 May 2006 16:28:19 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlAp7-0006Vu-M2 for grub-devel@gnu.org; Tue, 30 May 2006 16:28:17 -0400 Received: from [157.24.2.30] (helo=smtp1.cc.lut.fi) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlAuz-0003Vc-8I for grub-devel@gnu.org; Tue, 30 May 2006 16:34:21 -0400 Received: from localhost (smtp1 [127.0.0.1]) by smtp1.cc.lut.fi (Postfix) with ESMTP id 7D99970132 for ; Tue, 30 May 2006 23:28:14 +0300 (EEST) Received: from smtp1.cc.lut.fi ([127.0.0.1]) by localhost (smtp1.cc.lut.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27924-10 for ; Tue, 30 May 2006 23:28:14 +0300 (EEST) Received: from [192.168.1.100] (lk4-a-4-1.lnet.lut.fi [157.24.102.107]) by smtp1.cc.lut.fi (Postfix) with ESMTP id EBAAB7011E for ; Tue, 30 May 2006 23:28:13 +0300 (EEST) Message-ID: <447CAADE.2080103@nic.fi> Date: Tue, 30 May 2006 23:28:14 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: The development of GRUB 2 References: <000f01c68427$0156bb10$0b00a8c0@yoda> In-Reply-To: <000f01c68427$0156bb10$0b00a8c0@yoda> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: by lut.fi Content-Transfer-Encoding: quoted-printable Subject: Re: RE : RE : Roboot's BOF 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: Tue, 30 May 2006 20:28:21 -0000 Eric Salom=E9 wrote: > By the way, is there anybody working on having the vbe interface workin= g > on grub-emu ? Any hint to help me start work on it ? Not that I know. Write video driver for it. See video/ folder for more details and in wiki (when it comes back): http://grub.enbug.org/VideoSubsystem Video API is still being fine tuned, so try to keep in sync of it. From MAILER-DAEMON Tue May 30 17:08:29 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlBS1-0002L8-6d for mharc-grub-devel@gnu.org; Tue, 30 May 2006 17:08:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlBRy-0002HH-Vt for grub-devel@gnu.org; Tue, 30 May 2006 17:08:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlBRy-0002H5-Ig for grub-devel@gnu.org; Tue, 30 May 2006 17:08:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlBRy-0002H2-CQ for grub-devel@gnu.org; Tue, 30 May 2006 17:08:26 -0400 Received: from [157.24.2.30] (helo=smtp1.cc.lut.fi) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlBXp-00060m-T9 for grub-devel@gnu.org; Tue, 30 May 2006 17:14:30 -0400 Received: from localhost (smtp1 [127.0.0.1]) by smtp1.cc.lut.fi (Postfix) with ESMTP id ED7E6701C5 for ; Wed, 31 May 2006 00:08:24 +0300 (EEST) Received: from smtp1.cc.lut.fi ([127.0.0.1]) by localhost (smtp1.cc.lut.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30840-09 for ; Wed, 31 May 2006 00:08:24 +0300 (EEST) Received: from [192.168.1.100] (lk4-a-4-1.lnet.lut.fi [157.24.102.107]) by smtp1.cc.lut.fi (Postfix) with ESMTP id 9414470128 for ; Wed, 31 May 2006 00:08:24 +0300 (EEST) Message-ID: <447CB449.9080901@nic.fi> Date: Wed, 31 May 2006 00:08:25 +0300 From: =?UTF-8?B?VmVzYSBKw6TDpHNrZWzDpGluZW4=?= User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: The development of GRUB 2 X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/mixed; boundary="------------040505060909000509090702" X-Virus-Scanned: by lut.fi Subject: [patch] Fix for building correct code on i386-pc (CVS-HEAD) 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: Tue, 30 May 2006 21:08:27 -0000 This is a multi-part message in MIME format. --------------040505060909000509090702 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, ... thanks. Attached patch fixes problems for compiling correct code on i386-pc... other platforms needs to be modified similarly too... Thanks, Vesa J=C3=A4=C3=A4skel=C3=A4inen --------------040505060909000509090702 Content-Type: text/plain; name="grub2-compilation-fix.diff" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="grub2-compilation-fix.diff" SW5kZXg6IGNvbmYvY29tbW9uLnJtawo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvc291cmNl cy9ncnViL2dydWIyL2NvbmYvY29tbW9uLnJtayx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS43 CmRpZmYgLXUgLX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9DRkxBR1MpCit2aWRlb3Rlc3RfbW9kX1RBUkdFVF9DRkxBR1MgPSAkKENPTU1P Tl9UQVJHRVRfQ0ZMQUdTKQogdmlkZW90ZXN0X21vZF9MREZMQUdTID0gJChDT01NT05fTERG TEFHUykKIAogaW5jbHVkZSAkKHNyY2RpcikvY29uZi9jb21tb24ubWsK --------------040505060909000509090702-- From MAILER-DAEMON Tue May 30 17:15:13 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlBYX-0004pL-Bs for mharc-grub-devel@gnu.org; Tue, 30 May 2006 17:15:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlBYW-0004pF-Sh for grub-devel@gnu.org; Tue, 30 May 2006 17:15:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlBYT-0004oe-IF for grub-devel@gnu.org; Tue, 30 May 2006 17:15:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlBYT-0004ob-Ee for grub-devel@gnu.org; Tue, 30 May 2006 17:15:09 -0400 Received: from [66.111.4.27] (helo=out3.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlBeL-0006Tq-MU for grub-devel@gnu.org; Tue, 30 May 2006 17:21:13 -0400 Received: from frontend3.internal (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 90A55D68D2C for ; Tue, 30 May 2006 17:15:05 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by frontend3.internal (MEProxy); Tue, 30 May 2006 17:15:06 -0400 X-Sasl-enc: 482NkOgQDn/vI+YYwd/wgPPW39uZEQbCfYZXtLM3Yylu 1149023706 Received: from basalt-009053041185.austin.ibm.com (pixpat.austin.ibm.com [192.35.232.241]) by mail.messagingengine.com (Postfix) with ESMTP id 27882102A for ; Tue, 30 May 2006 17:15:05 -0400 (EDT) From: Hollis Blanchard To: The development of GRUB 2 In-Reply-To: <447CB449.9080901@nic.fi> References: <447CB449.9080901@nic.fi> Content-Type: text/plain; charset=utf-8 Date: Tue, 30 May 2006 16:15:51 -0500 Message-Id: <1149023752.7177.86.camel@basalt.austin.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 (2.6.1-1.fc5.2) Content-Transfer-Encoding: quoted-printable Subject: Re: [patch] Fix for building correct code on i386-pc (CVS-HEAD) 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: Tue, 30 May 2006 21:15:13 -0000 On Wed, 2006-05-31 at 00:08 +0300, Vesa J=C3=A4=C3=A4skel=C3=A4inen wrote= : > Attached patch fixes problems for compiling correct code on i386-pc... > other platforms needs to be modified similarly too... I'm confused by this; could you explain? If _TARGET_CFLAGS is used for everything to be run on the target, perhaps we should just rename _CFLAGS to _TARGET_CFLAGS. Also, in the future, could you please supply best-guess code for other architectures? It's ok if you don't know, but in this case it seems it would be easy enough to duplicate your i386-pc.mk changes for the other .mk files. > Index: conf/common.rmk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /sources/grub/grub2/conf/common.rmk,v > retrieving revision 1.7 > diff -u -r1.7 common.rmk > --- conf/common.rmk 27 May 2006 21:09:25 -0000 1.7 > +++ conf/common.rmk 30 May 2006 21:00:02 -0000 > @@ -27,61 +27,73 @@ > # For fshelp.mod. > fshelp_mod_SOURCES =3D fs/fshelp.c > fshelp_mod_CFLAGS =3D $(COMMON_CFLAGS) > +fshelp_mod_TARGET_CFLAGS =3D $(COMMON_TARGET_CFLAGS) > fshelp_mod_LDFLAGS =3D $(COMMON_LDFLAGS) ... > --- conf/i386-pc.rmk 28 May 2006 23:01:43 -0000 1.65 > +++ conf/i386-pc.rmk 30 May 2006 21:00:02 -0000 > @@ -2,6 +2,7 @@ > =20 > COMMON_ASFLAGS =3D -nostdinc -fno-builtin > COMMON_CFLAGS =3D -fno-builtin -mrtd -mregparm=3D3 -m32 > +COMMON_TARGET_CFLAGS =3D -fno-builtin -mrtd -mregparm=3D3 -m32 > COMMON_LDFLAGS =3D -melf_i386 -nostdlib From MAILER-DAEMON Tue May 30 17:49:29 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlC5h-00073O-DP for mharc-grub-devel@gnu.org; Tue, 30 May 2006 17:49:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlC5f-00071B-5n for grub-devel@gnu.org; Tue, 30 May 2006 17:49:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlC5b-00070z-M6 for grub-devel@gnu.org; Tue, 30 May 2006 17:49:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlC5b-00070w-GE for grub-devel@gnu.org; Tue, 30 May 2006 17:49:23 -0400 Received: from [207.152.70.127] (helo=baz.foobar-qux.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FlCBT-0000LJ-KZ for grub-devel@gnu.org; Tue, 30 May 2006 17:55:27 -0400 Received: from baz.foobar-qux.org (localhost.foobar-qux.org [127.0.0.1]) by baz.foobar-qux.org (8.13.3/8.13.3) with ESMTP id k4V3xcfD056549 for ; Tue, 30 May 2006 22:59:38 -0500 (CDT) (envelope-from hde@gnu.org) Received: (from hde@localhost) by baz.foobar-qux.org (8.13.3/8.13.3/Submit) id k4V3xbK8056546; Tue, 30 May 2006 22:59:37 -0500 (CDT) (envelope-from hde@gnu.org) X-Authentication-Warning: baz.foobar-qux.org: hde set sender to hde@gnu.org using -f Sender: hde@baz.foobar-qux.org Mail-Copies-To: hde@gnu.org To: The development of GRUB 2 References: <447CB449.9080901@nic.fi> <1149023752.7177.86.camel@basalt.austin.ibm.com> From: hde@gnu.org (Harley D. Eades III) Date: 30 May 2006 22:59:37 -0500 In-Reply-To: <1149023752.7177.86.camel@basalt.austin.ibm.com> Message-ID: <86r72aetee.fsf@baz.foobar-qux.org> Lines: 24 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [patch] Fix for building correct code on i386-pc (CVS-HEAD) 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: Tue, 30 May 2006 21:49:27 -0000 Hollis Blanchard writes: > On Wed, 2006-05-31 at 00:08 +0300, Vesa J=C3=A4=C3=A4skel=C3=A4inen wrote: > > Attached patch fixes problems for compiling correct code on i386-pc... > > other platforms needs to be modified similarly too... >=20 > I'm confused by this; could you explain? If _TARGET_CFLAGS is used for > everything to be run on the target, perhaps we should just rename > _CFLAGS to _TARGET_CFLAGS. >=20 > Also, in the future, could you please supply best-guess code for other > architectures? It's ok if you don't know, but in this case it seems it > would be easy enough to duplicate your i386-pc.mk changes for the > other .mk files. I am also confused. Is this keeping to the changes presented by Okuji? I don't think it is best to move from CFLAGS to something different, this would make it odd when porting to other OS, it also seems off convention.=20=20 Okuji's post: http://lists.gnu.org/archive/html/grub-devel/2006-05/msg00106.html Cheers Harley From MAILER-DAEMON Tue May 30 17:59:22 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlCFG-00018U-Qe for mharc-grub-devel@gnu.org; Tue, 30 May 2006 17:59:22 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlCFE-00018P-Sw for grub-devel@gnu.org; Tue, 30 May 2006 17:59:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlCFC-00018D-Gh for grub-devel@gnu.org; Tue, 30 May 2006 17:59:19 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlCFC-00018A-Aw for grub-devel@gnu.org; Tue, 30 May 2006 17:59:18 -0400 Received: from [66.111.4.27] (helo=out3.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlCL4-00017W-Nx for grub-devel@gnu.org; Tue, 30 May 2006 18:05:22 -0400 Received: from frontend3.internal (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id A3BBFD6873F for ; Tue, 30 May 2006 17:59:16 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by frontend3.internal (MEProxy); Tue, 30 May 2006 17:59:17 -0400 X-Sasl-enc: os6z77CnDwRWfDTkvqxgoEvQFosq7olLRTeMlFrWJ2nL 1149026357 Received: from basalt-009053041185.austin.ibm.com (pixpat.austin.ibm.com [192.35.232.241]) by mail.messagingengine.com (Postfix) with ESMTP id 624294E4 for ; Tue, 30 May 2006 17:59:17 -0400 (EDT) From: Hollis Blanchard To: The development of GRUB 2 In-Reply-To: <86r72aetee.fsf@baz.foobar-qux.org> References: <447CB449.9080901@nic.fi> <1149023752.7177.86.camel@basalt.austin.ibm.com> <86r72aetee.fsf@baz.foobar-qux.org> Content-Type: text/plain Date: Tue, 30 May 2006 17:00:03 -0500 Message-Id: <1149026404.7177.103.camel@basalt.austin.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 (2.6.1-1.fc5.2) Content-Transfer-Encoding: 7bit Subject: Re: [patch] Fix for building correct code on i386-pc (CVS-HEAD) 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: Tue, 30 May 2006 21:59:21 -0000 On Tue, 2006-05-30 at 22:59 -0500, Harley D. Eades III wrote: > > http://lists.gnu.org/archive/html/grub-devel/2006-05/msg00106.html "host" and "target" are unclear to me here. For example, grub-emu would be compiled for the "host", but grub itself would be for the "target"? When would you ever want to build things differently like that? Or is this just so you can specify "host" build flags which are totally separate from "target" flags (since the target is built as a freestanding executable)? In that case, in Vesa's patch, CFLAGS shouldn't need any of these, right? -fno-builtin -mrtd -mregparm=3 -Hollis From MAILER-DAEMON Tue May 30 18:07:10 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlCMn-00050e-Tp for mharc-grub-devel@gnu.org; Tue, 30 May 2006 18:07:09 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlCMm-00050S-Fh for grub-devel@gnu.org; Tue, 30 May 2006 18:07:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlCMk-00050G-1w for grub-devel@gnu.org; Tue, 30 May 2006 18:07:07 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlCMj-00050D-RN for grub-devel@gnu.org; Tue, 30 May 2006 18:07:05 -0400 Received: from [194.109.24.25] (helo=smtp-vbr5.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlCSc-0001ie-A3 for grub-devel@gnu.org; Tue, 30 May 2006 18:13:10 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr5.xs4all.nl (8.13.6/8.13.6) with ESMTP id k4UM71x3068756 for ; Wed, 31 May 2006 00:07:02 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <447CB449.9080901@nic.fi> Mail-Copies-To: mgerards@xs4all.nl Date: Wed, 31 May 2006 00:10:07 +0200 In-Reply-To: <447CB449.9080901@nic.fi> (Vesa =?iso-8859-1?Q?J=E4=E4skel=E4?= =?iso-8859-1?Q?inen's?= message of "Wed, 31 May 2006 00:08:25 +0300") Message-ID: <87wtc3f9kw.fsf@xs4all.nl> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: [patch] Fix for building correct code on i386-pc (CVS-HEAD) 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: Tue, 30 May 2006 22:07:08 -0000 Vesa J=E4=E4skel=E4inen writes: Hi Vesa, > Attached patch fixes problems for compiling correct code on i386-pc... > other platforms needs to be modified similarly too... Isn't this also required for the kernel? How about replacing the module specific CLFAGs, instead of adding TARGET_CFLAG? I assume the old one isn't used anymore... -- Marco From MAILER-DAEMON Tue May 30 20:28:48 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlEZr-0006SY-Vd for mharc-grub-devel@gnu.org; Tue, 30 May 2006 20:28:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlEZp-0006S0-Rp for grub-devel@gnu.org; Tue, 30 May 2006 20:28:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlEZn-0006RL-26 for grub-devel@gnu.org; Tue, 30 May 2006 20:28:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlEZm-0006RH-U1 for grub-devel@gnu.org; Tue, 30 May 2006 20:28:42 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlEfg-0002Du-TZ for grub-devel@gnu.org; Tue, 30 May 2006 20:34:49 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id E335E3CACA35A for ; Wed, 31 May 2006 04:03:00 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 6A0AB3CACA359 for ; Wed, 31 May 2006 04:03:00 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Wed, 31 May 2006 02:28:39 +0200 User-Agent: KMail/1.8.2 References: <447CB449.9080901@nic.fi> In-Reply-To: <447CB449.9080901@nic.fi> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200605310228.39428.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.491247, version=0.17.2 Subject: Re: [patch] Fix for building correct code on i386-pc (CVS-HEAD) 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: Wed, 31 May 2006 00:28:46 -0000 On Tuesday 30 May 2006 23:08, Vesa J=E4=E4skel=E4inen wrote: > Attached patch fixes problems for compiling correct code on i386-pc... > other platforms needs to be modified similarly too... Sorry. This is my mistake. I've fixed it differently right now. Okuji From MAILER-DAEMON Tue May 30 20:32:00 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlEcy-0007Fb-5x for mharc-grub-devel@gnu.org; Tue, 30 May 2006 20:32:00 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlEcv-0007ER-Mh for grub-devel@gnu.org; Tue, 30 May 2006 20:31:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlEcu-0007E0-Uq for grub-devel@gnu.org; Tue, 30 May 2006 20:31:56 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlEcu-0007Do-GQ for grub-devel@gnu.org; Tue, 30 May 2006 20:31:56 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlEio-0002Rl-Gq for grub-devel@gnu.org; Tue, 30 May 2006 20:38:02 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id 054503CACA35A for ; Wed, 31 May 2006 04:06:16 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id A9E573CACA359 for ; Wed, 31 May 2006 04:06:10 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Wed, 31 May 2006 02:31:49 +0200 User-Agent: KMail/1.8.2 References: <447CB449.9080901@nic.fi> <86r72aetee.fsf@baz.foobar-qux.org> <1149026404.7177.103.camel@basalt.austin.ibm.com> In-Reply-To: <1149026404.7177.103.camel@basalt.austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605310231.49399.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.488507, version=0.17.2 Subject: Re: [patch] Fix for building correct code on i386-pc (CVS-HEAD) 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: Wed, 31 May 2006 00:31:58 -0000 On Wednesday 31 May 2006 00:00, Hollis Blanchard wrote: > On Tue, 2006-05-30 at 22:59 -0500, Harley D. Eades III wrote: > > http://lists.gnu.org/archive/html/grub-devel/2006-05/msg00106.html > > "host" and "target" are unclear to me here. For example, grub-emu would > be compiled for the "host", but grub itself would be for the "target"? > When would you ever want to build things differently like that? This is one of the requested features for GRUB. In GRUB Legacy, some group developed GRUB on Sparc, but for PC by cross-compiling (actually, this was Alcatel). It is a good thing that you can install GRUB for an architecture on another. Okuji From MAILER-DAEMON Tue May 30 21:02:27 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlF6R-0001sk-76 for mharc-grub-devel@gnu.org; Tue, 30 May 2006 21:02:27 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlF6P-0001sF-MH for grub-devel@gnu.org; Tue, 30 May 2006 21:02:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlF6O-0001s3-AY for grub-devel@gnu.org; Tue, 30 May 2006 21:02:24 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlF6O-0001s0-5H for grub-devel@gnu.org; Tue, 30 May 2006 21:02:24 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlFCI-0004MZ-6h for grub-devel@gnu.org; Tue, 30 May 2006 21:08:30 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id A60133CACA35A for ; Wed, 31 May 2006 04:36:43 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id D003A3CACA359 for ; Wed, 31 May 2006 04:36:41 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Wed, 31 May 2006 03:02:20 +0200 User-Agent: KMail/1.8.2 References: <200605262104.55720.okuji@enbug.org> In-Reply-To: <200605262104.55720.okuji@enbug.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605310302.20147.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.498098, version=0.17.2 Subject: Re: configure host and target 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: Wed, 31 May 2006 01:02:25 -0000 I describe the new build system a bit here. Maybe this should be written in somewhere else (such as INSTALL) as well... GRUB uses "target" and "host". "build" is not explicitly used. A target represents a native environment where GRUB runs. In reality, the target type affects: - the cpu type - the executable format (for now, must be ELF) The vendor and the operating system in a target type does not really matter, except for the choice of programs and supported executable formats, because you should specify a platform (such as firmware) by --with-platform to configure. A host type specifies an environment where utilities are executed. Unless you are cross-compiling GRUB, you do not have to care very much. The usage of compiler flags is the following: - CC, CFLAGS, CPPFLAGS, ASFLAGS and LDFLAGS are used for the host type. - If you need to specify non-standard locations for header files or libraries, you should specify CPPFLAGS or LDFLAGS. - If you cross-compile GRUB, you can set CC explicitly, but optionally. - You do not need to struggle with CFLAGS or ASFLAGS. This is required only if you intend to debug GRUB, or you want to optimize GRUB differently for an unknown reason. - TARGET_CC, TARGET_CFLAGS, TARGET_CPPFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS are used for the target type. - You might need to specify TARGET_CC explicitly, if you cross-compile GRUB. - You should not touch other TARGET_* variables, unless you understand what you are doing. Besides these flags, GRUB uses target-specific flags (here, "target" means a Makefile target, but not a target type in autoconf). This allows us to apply flags specific to each object. This design is based on automake, since the makefile generator in GRUB was influenced by automake significantly. For example, when compiling normal.mod, normal_mod_CFLAGS, normal_mod_LDFLAGS, etc. are applied as well as TARGET_CFLAGS, TARGET_LDFLAGS, etc. This part is important only for developers, as the user is not supposed to tweak these target-specific flags manually. Okuji From MAILER-DAEMON Tue May 30 21:18:20 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlFLo-0006o2-8B for mharc-grub-devel@gnu.org; Tue, 30 May 2006 21:18:20 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlFLm-0006nq-TW for grub-devel@gnu.org; Tue, 30 May 2006 21:18:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlFLk-0006nE-86 for grub-devel@gnu.org; Tue, 30 May 2006 21:18:17 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlFLk-0006nA-3R for grub-devel@gnu.org; Tue, 30 May 2006 21:18:16 -0400 Received: from [64.233.162.200] (helo=nz-out-0102.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlFRe-0005Fz-Ed for grub-devel@gnu.org; Tue, 30 May 2006 21:24:22 -0400 Received: by nz-out-0102.google.com with SMTP id k1so1052384nzf for ; Tue, 30 May 2006 18:18:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=j9W5MbCv5J1zHQYashwx8klJQ88uUPBzm0fp4udTfPU33YvDoU74tOCEnR9IDR4Q+Qm9NpHJgQ95IBx8d7dcjncobpv0D6vKoKjiJsDIs4h/7mRFa72apTWakNjnAQiPrJ3fTPdrCZD+Pz0Sb+mdmqYYXJCrq/zOIoHeBPrmiug= Received: by 10.64.53.8 with SMTP id b8mr2042343qba; Tue, 30 May 2006 18:18:14 -0700 (PDT) Received: by 10.64.49.17 with HTTP; Tue, 30 May 2006 18:18:14 -0700 (PDT) Message-ID: <5876e7e80605301818r2fff0c44j811a3a132983ea7b@mail.gmail.com> Date: Tue, 30 May 2006 20:18:14 -0500 From: "=?ISO-8859-1?Q?Jes=FAs_Velazquez?=" To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1449_13033951.1149038294555" Subject: Initrd file not loaded 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: Wed, 31 May 2006 01:18:19 -0000 ------=_Part_1449_13033951.1149038294555 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi guys: We are trying to use Grub2 for booting RedHat Enterprise Linux 4 update 2 o= n Xeon Platforms. But, we found that the initrd file is not loaded by grub an= d the kernel can't mount /. The linux kernel doesn't recognize the boot disk and It dies. Do you know how the Linux Kernel knows where the initrd file is in memory?= . Is this a known issue?, Has it happened before?. Thanks Jes=FAs ------=_Part_1449_13033951.1149038294555 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

Hi guys:

We are trying to use Grub2 for booting RedH= at Enterprise Linux 4 update 2 on Xeon Platforms. But, we found that the in= itrd=20 file is not loaded by grub and the kernel can't moun= t /. The linux kernel doesn't recognize the boot disk and It dies.

 Do you know ho= w the Linux Kernel knows where the initrd file is in memory?. Is this a kno= wn issue?, Has it happened before?.

Thanks

Jes=FAs

------=_Part_1449_13033951.1149038294555-- From MAILER-DAEMON Wed May 31 01:27:17 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlJEj-0005io-JM for mharc-grub-devel@gnu.org; Wed, 31 May 2006 01:27:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlJEg-0005iS-RC for grub-devel@gnu.org; Wed, 31 May 2006 01:27:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlJEe-0005iG-FP for grub-devel@gnu.org; Wed, 31 May 2006 01:27:13 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlJEe-0005iD-9u for grub-devel@gnu.org; Wed, 31 May 2006 01:27:12 -0400 Received: from [130.102.149.128] (helo=mailhub2.uq.edu.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlJKa-0006Jc-OD for grub-devel@gnu.org; Wed, 31 May 2006 01:33:21 -0400 Received: from smtp2.uq.edu.au (smtp2.uq.edu.au [130.102.149.129]) by mailhub2.uq.edu.au (8.13.6/8.13.6) with ESMTP id k4V5RA67014654 for ; Wed, 31 May 2006 15:27:10 +1000 (EST) Received: from orps-it1.research.uq.edu.au (orps-it1.research.uq.edu.au [192.168.173.208]) by smtp2.uq.edu.au (8.13.6/8.13.6) with ESMTP id k4V5R9Xt014649 for ; Wed, 31 May 2006 15:27:09 +1000 (EST) Date: Wed, 31 May 2006 15:27:09 +1000 From: Adam Nielsen To: grub-devel@gnu.org Message-ID: <20060531152709.4fbc30b2@orps-it1.research.uq.edu.au> X-Mailer: Sylpheed-Claws 1.9.100 (GTK+ 2.6.1; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.51 on UQ Mailhub on 130.102.149.128 Subject: grub-mkimage skipped by "make install" 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: Wed, 31 May 2006 05:27:14 -0000 Hi all, I'm just attempting to switch from LILO to GRUB, and after running "make install" and trying to figure out what to do next from the old docs (I can't find anything that explains roughly how to install GRUB2, so I could be doing this wrong) I get this error: $ grub-install /dev/sda /usr/sbin/grub-mkimage: Not found. Copying grub-mkimage from the compilation directory to /usr/sbin fixed the problem (I ran ./configure --prefix=/usr) so it looks like 'make install' isn't copying this file. I just thought someone out there might like to correct this if it's not supposed to happen! Cheers, Adam. From MAILER-DAEMON Wed May 31 04:59:37 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlMYC-0007uP-UW for mharc-grub-devel@gnu.org; Wed, 31 May 2006 04:59:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlMYA-0007tW-4U for grub-devel@gnu.org; Wed, 31 May 2006 04:59:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlMY7-0007sv-Sq for grub-devel@gnu.org; Wed, 31 May 2006 04:59:32 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlMY7-0007ss-NE for grub-devel@gnu.org; Wed, 31 May 2006 04:59:31 -0400 Received: from [212.71.128.78] (helo=drak.ucw.cz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FlMe6-0007Vp-BK for grub-devel@gnu.org; Wed, 31 May 2006 05:05:42 -0400 Received: from drak.ucw.cz (localhost [127.0.0.1]) by drak.ucw.cz (Postfix) with ESMTP id 28EA390 for ; Wed, 31 May 2006 10:59:29 +0200 (CEST) Received: from 213.192.3.1 (SquirrelMail authenticated user ebik) by drak.ucw.cz with HTTP; Wed, 31 May 2006 10:59:29 +0200 (CEST) Message-ID: <1287.213.192.3.1.1149065969.squirrel@drak.ucw.cz> In-Reply-To: <200605310302.20147.okuji@enbug.org> References: <200605262104.55720.okuji@enbug.org> <200605310302.20147.okuji@enbug.org> Date: Wed, 31 May 2006 10:59:29 +0200 (CEST) From: =?iso-8859-2?Q?Tom=E1=B9_Ebenlendr?= To: "The development of GRUB 2" User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-2 X-Priority: 3 (Normal) Importance: Normal Content-Transfer-Encoding: quoted-printable Subject: Re: configure host and target 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: Wed, 31 May 2006 08:59:34 -0000 So if I understand it correctly: Grub & modules (i.e., everything that is run w/o OS) is target. Grub-emu (i.e., everythhing that is run in some OS) is host. We don't have "make-tools" in c-code nor asm. (This is host in some projects: tools that are first compiled and then used while compiling another parts) On 31 Kv=ECten 2006, 3:02, Yoshinori K. Okuji napsal(a): > I describe the new build system a bit here. Maybe this should be writte= n > in > somewhere else (such as INSTALL) as well... > > GRUB uses "target" and "host". "build" is not explicitly used. A target > represents a native environment where GRUB runs. In reality, the target > type > affects: > > - the cpu type > > - the executable format (for now, must be ELF) > > The vendor and the operating system in a target type does not really > matter, > except for the choice of programs and supported executable formats, > because > you should specify a platform (such as firmware) by --with-platform to > configure. > > A host type specifies an environment where utilities are executed. Unle= ss > you > are cross-compiling GRUB, you do not have to care very much. > > The usage of compiler flags is the following: > > - CC, CFLAGS, CPPFLAGS, ASFLAGS and LDFLAGS are used for the host type. > > - If you need to specify non-standard locations for header files or > libraries, > you should specify CPPFLAGS or LDFLAGS. > > - If you cross-compile GRUB, you can set CC explicitly, but optionally. > > - You do not need to struggle with CFLAGS or ASFLAGS. This is required > only if > you intend to debug GRUB, or you want to optimize GRUB differently for = an > unknown reason. > > - TARGET_CC, TARGET_CFLAGS, TARGET_CPPFLAGS, TARGET_ASFLAGS and > TARGET_LDFLAGS > are used for the target type. > > - You might need to specify TARGET_CC explicitly, if you cross-compile > GRUB. > > - You should not touch other TARGET_* variables, unless you understand > what > you are doing. > > Besides these flags, GRUB uses target-specific flags (here, "target" me= ans > a > Makefile target, but not a target type in autoconf). This allows us to > apply > flags specific to each object. This design is based on automake, since = the > makefile generator in GRUB was influenced by automake significantly. > > For example, when compiling normal.mod, normal_mod_CFLAGS, > normal_mod_LDFLAGS, > etc. are applied as well as TARGET_CFLAGS, TARGET_LDFLAGS, etc. This pa= rt > is > important only for developers, as the user is not supposed to tweak the= se > target-specific flags manually. > > Okuji > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > > --=20 Tomas 'Ebi' Ebenlendr http://get.to/ebik From MAILER-DAEMON Wed May 31 17:00:59 2006 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FlXoJ-0002IE-3F for mharc-grub-devel@gnu.org; Wed, 31 May 2006 17:00:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlXoH-0002Hl-Lj for grub-devel@gnu.org; Wed, 31 May 2006 17:00:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlXoF-0002HZ-SL for grub-devel@gnu.org; Wed, 31 May 2006 17:00:56 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlXoF-0002HW-O2 for grub-devel@gnu.org; Wed, 31 May 2006 17:00:55 -0400 Received: from [82.94.249.43] (helo=neonescio.viaisn.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FlXuL-0004Jw-HH for grub-devel@gnu.org; Wed, 31 May 2006 17:07:13 -0400 Received: from dijkstra.dekkers.cx ([2001:838:3ce::1] ident=Debian-exim) by neonescio.viaisn.org with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA:32 CV=0) (Exim 4.50 #1) id 1FlXoC-0002Rk-30 for grub-devel@gnu.org; Wed, 31 May 2006 23:00:52 +0200 Received: from localhost ([127.0.0.1] helo=dijkstra.dekkers.cx ident=jeroen) by dijkstra.dekkers.cx with esmtp (Exim 4.62) (envelope-from ) id 1FlXoB-0002u6-Da for grub-devel@gnu.org; Wed, 31 May 2006 23:00:51 +0200 Date: Wed, 31 May 2006 23:00:51 +0200 Message-ID: <87bqtdykn0.wl%jeroen@vrijschrift.org> From: Jeroen Dekkers To: The development of GRUB 2 In-Reply-To: <200605310231.49399.okuji@enbug.org> References: <447CB449.9080901@nic.fi> <86r72aetee.fsf@baz.foobar-qux.org> <1149026404.7177.103.camel@basalt.austin.ibm.com> <200605310231.49399.okuji@enbug.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: [PATCH] Fix for configure on x86_64 (Was: Re: [patch] Fix for building correct code on i386-pc (CVS-HEAD)) 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: Wed, 31 May 2006 21:00:57 -0000 At Wed, 31 May 2006 02:31:49 +0200, Yoshinori K. Okuji wrote: > > On Wednesday 31 May 2006 00:00, Hollis Blanchard wrote: > > On Tue, 2006-05-30 at 22:59 -0500, Harley D. Eades III wrote: > > > http://lists.gnu.org/archive/html/grub-devel/2006-05/msg00106.html > > > > "host" and "target" are unclear to me here. For example, grub-emu would > > be compiled for the "host", but grub itself would be for the "target"? > > When would you ever want to build things differently like that? > > This is one of the requested features for GRUB. In GRUB Legacy, some group > developed GRUB on Sparc, but for PC by cross-compiling (actually, this was > Alcatel). It is a good thing that you can install GRUB for an architecture on > another. It's actually a necessary feature for GRUB on amd64. On amd64 you have 64-bit executables but GRUB will run in 32-bit mode. When trying to compile on amd64 I already ran into some problems related to that. First of all on amd64 all binaries are run in 64-bit mode, so the host CFLAGS variable shouldn't have -m32. Secondly LIBS is for the host only and shouldn't be defined when running target tests. As last we set CFLAGS, CC, etc. to the TARGET_*, then we run some checks and change the TARGET_* flags without updating CC, CFLAGS, etc to the new version. The attached patch should fix those problems. I've tested it on i386-pc and x86_64. 2006-05-31 Jeroen Dekkers * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS for the target-specific tests. Make sure that we also have the up-to-date target variables for those tests. Index: configure.ac =================================================================== RCS file: /cvsroot/grub/grub2/configure.ac,v retrieving revision 1.29 diff -u -p -r1.29 configure.ac --- configure.ac 30 May 2006 00:32:29 -0000 1.29 +++ configure.ac 31 May 2006 19:51:10 -0000 @@ -41,7 +41,6 @@ AC_CANONICAL_HOST AC_CANONICAL_TARGET case "$host_cpu" in - x86_64) host_m32=1 ;; powerpc64) host_m32=1 ;; esac @@ -186,10 +185,12 @@ tmp_CC="$CC" tmp_CFLAGS="$CFLAGS" tmp_LDFLAGS="$LDFLAGS" tmp_CPPFLAGS="$CPPFLAGS" +tmp_LIBS="$LIBS" CC="$TARGET_CC" CFLAGS="$TARGET_CFLAGS" CPPFLAGS="$TARGET_CPPFLAGS" LDFLAGS="$TARGET_LDFLAGS" +LIBS="" if test "x$TARGET_CFLAGS" = x; then # debug flags. @@ -232,6 +233,12 @@ AC_SUBST(TARGET_CFLAGS) AC_SUBST(TARGET_CPPFLAGS) AC_SUBST(TARGET_LDFLAGS) +# Set them to their new values for the tests below. +CC="$TARGET_CC" +CFLAGS="$TARGET_CFLAGS" +CPPFLAGS="$TARGET_CPPFLAGS" +LDFLAGS="$TARGET_LDFLAGS" + # Defined in aclocal.m4. grub_PROG_OBJCOPY_ABSOLUTE grub_ASM_USCORE @@ -252,6 +259,7 @@ CC="$tmp_CC" CFLAGS="$tmp_CFLAGS" CPPFLAGS="$tmp_CPPFLAGS" LDFLAGS="$tmp_LDFLAGS" +LIBS="$tmp_LIBS" # Check for options. AC_ARG_ENABLE([mm-debug],