From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JI1X5-0000ax-ET for mharc-grub-devel@gnu.org; Thu, 24 Jan 2008 07:50:15 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JI1X3-0000aX-Si for grub-devel@gnu.org; Thu, 24 Jan 2008 07:50:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JI1X2-0000Zs-8x for grub-devel@gnu.org; Thu, 24 Jan 2008 07:50:13 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JI1X2-0000Zp-3C for grub-devel@gnu.org; Thu, 24 Jan 2008 07:50:12 -0500 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JI1X1-0005Kg-MQ for grub-devel@gnu.org; Thu, 24 Jan 2008 07:50:11 -0500 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JI1Wx-0007Oj-03 for grub-devel@gnu.org; Thu, 24 Jan 2008 13:50:09 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JI1Uz-0001JR-On for grub-devel@gnu.org; Thu, 24 Jan 2008 13:48:05 +0100 Date: Thu, 24 Jan 2008 13:48:05 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080124124805.GI2249@thorin> References: <20080123195839.GA24785@thorin> <200801240957.45953.okuji@enbug.org> <20080124114703.GB2249@thorin> <878x2f5t8v.fsf@xs4all.nl> <20080124122647.GD2249@thorin> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080124122647.GD2249@thorin> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: grub_dl_unload_all() 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, 24 Jan 2008 12:50:14 -0000 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Jan 24, 2008 at 01:26:47PM +0100, Robert Millan wrote: > > I had preliminar (working!) code to implement this, but it's a hack. We really > need to think this over first, as it might imply some redesign of the memory > manager, etc. In the meantime what do you think of doing the same powerpc does? -- Robert Millan I know my rights; I want my phone call! What use is a phone call… if you are unable to speak? (as seen on /.) --Dxnq1zWXvFF0Q93v Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="module_unload.diff" * kern/i386/loader.S (grub_multiboot2_real_boot) [GRUB_MACHINE_IEEE1275]: Copy `grub_ieee1275_entry_fn' handler to %edx. Avoid calling grub_dl_unload_all() or grub_stop_floppy(), since grub_dl_unload_all() is not usable at this point. diff -ur grub2/kern/i386/loader.S tmp/kern/i386/loader.S --- grub2/kern/i386/loader.S 2008-01-05 13:14:05.000000000 +0100 +++ tmp/kern/i386/loader.S 2008-01-23 21:12:14.000000000 +0100 @@ -16,6 +16,7 @@ * along with GRUB. If not, see . */ +#include /* * Note: These functions defined in this file may be called from C. @@ -151,9 +152,13 @@ /* Move the address of the multiboot information structure to ebx. */ movl %edx,%ebx +#ifdef GRUB_MACHINE_IEEE1275 + movl EXT_C(grub_ieee1275_entry_fn), %edx +#else /* Unload all modules and stop the floppy driver. */ call EXT_C(grub_dl_unload_all) call EXT_C(grub_stop_floppy) +#endif /* Interrupts should be disabled. */ cli --Dxnq1zWXvFF0Q93v--