From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1T9Gjh-00012b-9a for mharc-grub-devel@gnu.org; Wed, 05 Sep 2012 10:37:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9GjV-00011b-Jw for grub-devel@gnu.org; Wed, 05 Sep 2012 10:37:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9GjM-0001uK-1U for grub-devel@gnu.org; Wed, 05 Sep 2012 10:37:33 -0400 Received: from foxnic.zionetrix.net ([212.85.154.181]:52034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9GjL-0001tm-Nn for grub-devel@gnu.org; Wed, 05 Sep 2012 10:37:23 -0400 Received: by foxnic.zionetrix.net (Postfix, from userid 5001) id D5564179CF; Wed, 5 Sep 2012 16:37:19 +0200 (CEST) Received: from localhost (unknown [93.182.129.86]) by foxnic.zionetrix.net (Postfix) with ESMTPSA id 3EB9E179C2; Wed, 5 Sep 2012 16:37:14 +0200 (CEST) Date: Wed, 5 Sep 2012 14:37:04 +0000 From: Ague Mill To: The development of GNU GRUB Subject: Re: kexec GRUB, multiboot port and qemu Message-ID: <20120905143704.GA4579@localhost> References: <20120826233020.GD4286@localhost> <5046E6DE.5050907@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline In-Reply-To: <5046E6DE.5050907@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 212.85.154.181 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 14:37:43 -0000 --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 05, 2012 at 07:45:02AM +0200, Vladimir '=CF=86-coder/phcoder' S= erbinenko wrote: > > Actually, after some long hours of hacking, it looks like GRUB could > > be all what we needed to nail this issue. Have a look at the current > > state of affairs [2] if you are interested in the details. >=20 > kexec'ing GRUB for this is an overkill it's much easier to have just a > small loop for this. Also note that i386 GRUB is unable to access memory > beyond 4G. It's not a problem for loading kernels but is a problem for > your application. Thanks for having a look. But I suggest you take 2 more minutes to check . You will see that memory beyond 4G is zero'ed by setting up PAE and moving a window of 32 MB all the way through. That is why GRUB is of particular interest. It is a small framework that gives some support to output a nice progress bar, room for page mapping trickery, and APM, ACPI, EFI or other ways to halt the machine. Similar paging tricks with only Linux userspace code may be doable with advanced mmap() usage, but using GRUB looks to work quite well. :) Adding a 'wipe_memory' command to upstream GRUB would allow users to put that in front of their `grub.cfg` and have their memory erased on every reboot, without having to care about which operating system they have used. This might be a fringe use case, but I can imagine some people doing it. > > Here is how I start qemu after: > >=20 > > qemu -kernel /tmp/multiboot.img -vga std -m 256 > >=20 > > And I get the following error: > >=20 > > Missing Multiboot memory information > > Aborted. > >=20 > >=20 >=20 > qemu has a bug of always putting mbi at 0x9500 even if this location is > used by binary. As GRUB itself will be loaded at 0x8200, I understand why I see a corrupted MBI. I have also noticed that grub4dos will refuse to load a multiboot image with an entry point below 0x100000 (1 MB).=20 How difficult do you think it would be to change the current multiboot port to use such address instead of the current 0x8200? Would it be a changed that could be accepted upstream? As I'd be happy to give it a shot, would you have some guidance on which part of the code might need to be adjusted? =20 Thanks for your time! --=20 Ague --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABCgAGBQJQR2OMAAoJEMr7v5HdHbluuA8P/2DYlnD/c8lrEbPKqknSF+fJ ct84g8PJRI/+RqabfsWY5wQUlBnVubT3fSKXkWiF7HNx+wOelRLUaypwsecVmmMx QEaRTxxOXpQ7+dYGqhO+L+jIEZ0QYcaBRHzle7pgDEjPA6tjDNBXnOc65xtR2MHo C4+TRuLDYfRv3CmPVjwlkS7+LU26t2YJfxKTjKgFLYs5RvF9GmwxeYdx+SxGWdOv LpegwNzM2Y4BnbqgNJvYLHvx9eT+/oAAmRz+3vysuT4P30xxTFr4FiBKkLu1Y2qW BztzYOdpSV+HbzZER+MDx73qeHRLqfsezuD8OXIe/Qfdn9H3ibREkmIUHZsuMpgv WCGZAJUvKrlmpOjtCWAy+Z/b9cWCzbPSBiO2AWlBQhaOLMWllDn9mhqnmmfmlF94 i4IIMi4a33SsHm84hwuVAqGX9kF5fZ+C9mFrseETj38138QAqi8h2vYatOK4bKmU StQujxpsiWbCS0g0n+NugPw3G38UoeVoTECLlsnQ+gJZAOuU4wicOU3oeJg/Ppf9 WO4q5OE7XV3qbJQiUNvwQG5Mx8s6ASnzqZYJI6/dvRiR1lPTDo1X3lQhLpQCwWfE OojZrDGmpJE3BfucAVq5LGN0CPMb6CtErMWnPTdFGylc8yjdSYGcD6KI/htNabEf hOIMy/d20KCWpSYHfR0T =0lq3 -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT--