From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KXC2Y-0008Jc-Dx for mharc-grub-devel@gnu.org; Sun, 24 Aug 2008 05:37:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXC2R-0008Ia-6c for grub-devel@gnu.org; Sun, 24 Aug 2008 05:37:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXC2M-0008H9-7E for grub-devel@gnu.org; Sun, 24 Aug 2008 05:37:33 -0400 Received: from [199.232.76.173] (port=36136 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXC2I-0008Gw-R8 for grub-devel@gnu.org; Sun, 24 Aug 2008 05:37:29 -0400 Received: from mta-out.inet.fi ([195.156.147.13]:36690 helo=jenni1.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXC2I-0005Pk-Hs for grub-devel@gnu.org; Sun, 24 Aug 2008 05:37:26 -0400 Received: from [127.0.0.1] (88.193.32.97) by jenni1.inet.fi (8.5.014) id 488F1534011CC88D for grub-devel@gnu.org; Sun, 24 Aug 2008 12:37:24 +0300 Message-ID: <48B12BE0.9080303@nic.fi> Date: Sun, 24 Aug 2008 12:37:36 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: The development of GRUB 2 References: <23656916.573861217512511895.JavaMail.chaac@nic.fi> <48A80BF9.3090000@nic.fi> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-Printable X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] Move assembly code out of the kernel 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, 24 Aug 2008 09:37:37 -0000 Bean wrote: > On Sun, Aug 17, 2008 at 7:31 PM, Vesa J=E4=E4skel=E4inen = wrote: >> chaac@nic.fi wrote: >>> I have made generic function that does basically the same thing for b= ios >>> service 0x10 (video). In that modification you prepare registers >>> structure that will be configured during real mode switching. I am ye= t >>> to commit it for review, but I think it would be more generic way to = do >>> this. When I come back from my holiday I will commit the code for rev= iew. >>> >>> So please wait a bit before committing this :) >=20 > Hi, >=20 > I'm thinking perhaps we can make it more generic and support multiple > INT in one function. One way to do this is not use INT, but retrieve > the address from IVT and do a far call. On return, pop the flag on > stack. This would also make it easily to support far call, In that > case, we just don't pop the flag. Hmm. I have faint memory that this has been done previously somewhere :)... need to think this a bit more. > I also notice that you do the protected/real mode switch in > grub_bioscall_int10h, why not use the prot_to_real and real_to_prot ? > If you need to keep the value of %eax, you can store it in a structure > and pass it using other register like %ecx. I wanted it to be easily manageable so I can alter everything in order to get it working at the first :) But basically the points were: - I needed to put registers to the stack and thus need to differentiate esp and ebp. - When returning I need to store those registers to structure provided by caller. - There was no need to "corrupt" stack area with return address, and I needed stack for different purpose Thanks, Vesa J=E4=E4skel=E4inen