From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MJGqw-0007iv-VK for mharc-grub-devel@gnu.org; Tue, 23 Jun 2009 21:00:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJGqv-0007iq-LB for grub-devel@gnu.org; Tue, 23 Jun 2009 21:00:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJGqq-0007fd-8n for grub-devel@gnu.org; Tue, 23 Jun 2009 21:00:40 -0400 Received: from [199.232.76.173] (port=56985 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJGqq-0007fa-3u for grub-devel@gnu.org; Tue, 23 Jun 2009 21:00:36 -0400 Received: from aybabtu.com ([69.60.117.155]:56735) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MJGqp-0000rD-Me for grub-devel@gnu.org; Tue, 23 Jun 2009 21:00:35 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MJFnh-00084D-Ix for grub-devel@gnu.org; Wed, 24 Jun 2009 01:53:17 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MJGqm-000521-6v for grub-devel@gnu.org; Wed, 24 Jun 2009 03:00:32 +0200 Date: Wed, 24 Jun 2009 03:00:32 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090624010032.GA19305@thorin> References: <20090621181748.GA21152@thorin> <20090622230751.GD11998@thorin> <1245720581.30815.11.camel@mj> <20090623113850.GB24028@thorin> <20090623121325.GA3130@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090623121325.GA3130@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.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) Subject: Re: clean patch for i386-qemu port (Re: [PATCH] i386-qemu port) 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, 24 Jun 2009 01:00:42 -0000 Another solution is to just leave the modules where they are (I/O map at top of memory), and load them directly from that location. This allows us to put the kernel in low memory without size problems. However, our module loader assumes the memory that contains the ELFs is writable (for example, grub_dl_resolve_symbols() modifies sym->st_value). A possible solution to this could be to make grub_dl_load_core() create a copy of the module and work on the copy. This could even be ifdef'ed, but I doubt the performance hit would be significant. Another possibility could be to copy them into the heap in grub_arch_modules_addr(), but this forces us to leak the memory that contains them. Or grub_arch_modules_addr() could copy them to 0x100000, but then we'd have the beginning of the heap as limit. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."