From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K2hpY-0007ir-VD for mharc-grub-devel@gnu.org; Sun, 01 Jun 2008 03:18:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K2hpW-0007iY-Tx for grub-devel@gnu.org; Sun, 01 Jun 2008 03:18:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K2hpU-0007hN-Ts for grub-devel@gnu.org; Sun, 01 Jun 2008 03:18:14 -0400 Received: from [199.232.76.173] (port=44072 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2hpU-0007hK-QV for grub-devel@gnu.org; Sun, 01 Jun 2008 03:18:12 -0400 Received: from mta-out.inet.fi ([195.156.147.13]:56401 helo=jenni2.rokki.sonera.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K2hpU-0002P0-Bi for grub-devel@gnu.org; Sun, 01 Jun 2008 03:18:12 -0400 Received: from [127.0.0.1] (88.193.32.97) by jenni2.rokki.sonera.fi (8.5.014) id 483E832F002102D7 for grub-devel@gnu.org; Sun, 1 Jun 2008 10:18:10 +0300 Message-ID: <48424D3A.7090109@nic.fi> Date: Sun, 01 Jun 2008 10:18:18 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: The development of GRUB 2 References: <1211903962.29738.21.camel@dv> <20080528142438.GK26495@thorin> <1212108905.4265.59.camel@dv> <1212113587.27442.7.camel@localhost> <-5961521231976305315@unknownmsgid> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: Quoted-Printable X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: Replacing the legacy "map" command 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, 01 Jun 2008 07:18:15 -0000 Javier Mart=EDn wrote: > Bit a bit, progress continues: I have some crappy UI semi-ready, to > improve on later, and I'm now battling with the INT13h handler to > perform the actual mapping - had to rescue the big old "Architecture > Programmer's Manual" in order to do PIC code without the amd64 > rip-relative addressing. However, I haven't yet found a way to install > some kind of "hook" so that it will be called when the boot command is > issued, preferable just before calling grub_X_real_boot. However, I > didn't go to great lengths to find it... Anyone here willing to > enlighten me or should I find my own way through the darkness (again > =AC=AC)? I'd like to change/add the smallest amount of code possible, b= ut > for the sake of modularity I prefer a pre-boot hook system rather than > a one-time solution. Hi Javier, There is no existing hook for this kind of stuff. So why not make one=20 pointer to boot area where you can register one?. Code would then check=20 if it is non-zero and call it before starting OS. Pointer would reside=20 on same asm module as low level boot code is to keep it close by and=20 helper on C-level to modify that pointer. You may want to support also=20 multiple callbacks some way. Thanks, Vesa J=E4=E4skel=E4inen