Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JI0Zv-0001Sv-O9 for mharc-grub-devel@gnu.org; Thu, 24 Jan 2008 06:49:07 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JI0Zt-0001Sp-Br for grub-devel@gnu.org; Thu, 24 Jan 2008 06:49:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JI0Zq-0001SL-SI for grub-devel@gnu.org; Thu, 24 Jan 2008 06:49:04 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JI0Zq-0001SH-Pl for grub-devel@gnu.org; Thu, 24 Jan 2008 06:49:02 -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 1JI0Zq-0006jJ-Cy for grub-devel@gnu.org; Thu, 24 Jan 2008 06:49:02 -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 1JI0Zk-0007J6-Fn for grub-devel@gnu.org; Thu, 24 Jan 2008 12:48:58 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JI0Xv-0000nl-Gv for grub-devel@gnu.org; Thu, 24 Jan 2008 12:47:03 +0100 Date: Thu, 24 Jan 2008 12:47:03 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20080124114703.GB2249@thorin> References: <20080123195839.GA24785@thorin> <200801240957.45953.okuji@enbug.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200801240957.45953.okuji@enbug.org> 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 11:49:05 -0000 On Thu, Jan 24, 2008 at 09:57:45AM +0100, Yoshinori K. Okuji wrote: > > How important is it to unload all modules? What do you suggest? Do we fix > > everything to unload all modules (is that even possible?)? Do we unload > > all modules on i386-pc "because we can" and not do this on ieee1275 > > platforms? > > It is important so that we can make sure that all cleanups are executed before > transferring control. For example, if serial settings have been tweaked by > GRUB, they should be reverted to the original state. At least, this is > considered to be a good manner. Another example is video settings. Let's say, > GRUB changes video mode to show a fancy menu. Some operating systems may not > work well in graphical mode, then GRUB must turn it back to text mode. I remember about the video mode issue, but IIRC it only affects i386-pc. Also, I don't think anyone will assume serial port to be in a particular state during boot. Do we have similar concerns on ieee1275 ? Anyway, any suggestions on how we can archieve this? Unless I missed something, the ieee1275/multiboot2 loader puts the OS image at its link address, whatever it may be, which leaves us with no provisions in case it overwrote something. It's unlikely that it overwrites our boot routine, but when we try to unload all modules, things break. Makes it sound like we'll have to: - add a relocator in our final jump routine - put OS image in dynamic memory - put the relocator/final routine in dynamic memory - unload all modules - jump to the relocator/final routine, passing it the parameters indicating it has to copy OS image from dynamic memory to the target area, whichever it may be. (in both cases of dynamic alloc, ensuring they won't overlap with target OS load area) Is this _really_ the only way to solve this problem? -- 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 /.)