Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MAkSx-0004Eg-JK for mharc-grub-devel@gnu.org; Sun, 31 May 2009 08:48:43 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MAkSv-0004E4-76 for grub-devel@gnu.org; Sun, 31 May 2009 08:48:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MAkSq-0004BN-RC for grub-devel@gnu.org; Sun, 31 May 2009 08:48:40 -0400 Received: from [199.232.76.173] (port=33345 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MAkSq-0004BK-Lx for grub-devel@gnu.org; Sun, 31 May 2009 08:48:36 -0400 Received: from mail-ew0-f162.google.com ([209.85.219.162]:43360) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MAkSq-0005oc-2J for grub-devel@gnu.org; Sun, 31 May 2009 08:48:36 -0400 Received: by ewy6 with SMTP id 6so8939837ewy.42 for ; Sun, 31 May 2009 05:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=FHYwUbCV1Jpf6df42a6Tyc472v/zSaq4QGPQ60PrbUQ=; b=MxeZv0K24HeRRw0WNjAhPAlV8evXwk/Vq/1FXtkGq78iwv3gjcf7SR3hUS8I13X56c Trs6qrz7LYLB2zfENwoTypo1do1qd8YhiWZGvmHiZvqKpEFr2vH6Gl8qHrRB1N0Rnekd E5piJSLkpyUAa5VJbfk6+KXYYs9wYop4LKVLI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=BgAePwI2MK0NGvCvxMJWr/F9hSL/bPdmwJDF2QkywisgRlstJnAGYZ4cN+i+P4x15i jWCJ19WoJ0yndF5w863aJUWsfdoX7ExGKP5rouObwDAZgPfk2o3Kj0ptW88FJ/wyI9bR GiljUPnJV21OjGyH7qCQiv6gCyYyCtrmmI8XY= Received: by 10.210.17.2 with SMTP id 2mr2653320ebq.58.1243774115383; Sun, 31 May 2009 05:48:35 -0700 (PDT) Received: from ?192.168.1.100? (89.141.11.145.dyn.user.ono.com [89.141.11.145]) by mx.google.com with ESMTPS id 28sm725906eyg.4.2009.05.31.05.48.34 (version=SSLv3 cipher=RC4-MD5); Sun, 31 May 2009 05:48:34 -0700 (PDT) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: References: <49E3E0FB.1070907@verizon.net> <1241883761.22837.97.camel@accesodirecto.casa> <1242265918.21129.27.camel@mj> <1242309828.12546.15.camel@mj> <1242325022.6056.7.camel@mj> <1243764078.22342.10.camel@accesodirecto.casa> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-3Ve2qPFdOSDgVxpoWoXy" Date: Sun, 31 May 2009 14:48:34 +0200 Message-Id: <1243774114.8044.2.camel@accesodirecto.casa> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: status grub2 port of grub-legasy map command 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, 31 May 2009 12:48:41 -0000 --=-3Ve2qPFdOSDgVxpoWoXy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El dom, 31-05-2009 a las 13:36 +0200, Vladimir 'phcoder' Serbinenko escribi=C3=B3:=20 > 2009/5/31 Javier Mart=C3=ADn : > > El s=C3=A1b, 30-05-2009 a las 17:28 +0200, Vladimir 'phcoder' Serbinenk= o > > escribi=C3=B3: > > Put it that way, I agree with your change. To the scrapper with > > parse_biosdisk then! > Sorry, I didn't mean to upset you. Here is a patch to do it You did not upset me at all! I'm sorry if I seemed rude or hostile. I truly meant to give you a go-ahead at scrapping that code. > Good luck with your exams Thank you very much, I'll need it. >=20 > Doing some tests I discovered that freedos MBR (but not the > bootsector) relies on %dl being preserved across int 0x13. In the > patch you can see additional hassle to preserve %dx. Do not do this. Some BIOS functions (like ah=3D08h) return data in dl. Clients should not expect data in registers to be preserved across interrupt calls. I don't know if there is something like a 8086/PC-BIOS ABI document that we can find to confirm the non-preservation of dl, but the FreeDOS MBR should be fixed then. > Another problem I discovered is that %dl (chainloader) and bootdrive > (multiboot) passed to payload is out of sync. > Does anyone has a suggestion how to do it cleanly. The problems are: > -chainloader/multiboot shouldn't depend on biosdisk if possible > -%dl should be set accordingly to mapping > -%dl should be correct even if grub2 uses its own drivers (now it's > set to nonsense) > I have some ideas on this subject but would like to hear what others thin= k. I managed to get the right %dl passed with the following procedure: let's say I want to boot FreeDOS on hd1, but I will drivemap it so that it will become hd0. Instead of doing this: root=3D(hd1,1) drivemap -s (hd0) (hd1) chainloader +1 I do the following: root=3D(hd0) drivemap -s (hd0) (hd1) chainloader (hd1,1)+1 This gets the right number into %dl (I have not checked multiboot), but I acknowledge that it's nothing more than a hack. I cannot see a way for drivemap to access that data and modify it according to the mappings without breaking modularity with multiboot and chainloader (and what about other loaders?). Regarding grub2 using its own drivers, we have no reliable way of conclusively saying that (ata2)=3D=3D(hd1), so we'd better say nothing at all and keep dl=3Dffh as we do currently.=20 --=20 -- Lazy, Oblivious, Recurrent Disaster -- Habbit --=-3Ve2qPFdOSDgVxpoWoXy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Esto es una parte de mensaje firmado digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAABAgAGBQJKInyeAAoJEKSl+Fbdeo72JJ8P/A667rp06biexFDSOyG9N4oT SFdWIuQRF9X3ms2YIRsCVySucBJAdY+PlAda1Pz8yqvUtbMghGGpmEgG78aa0GRL 74ndnYfO7aVzvkaQcXtVaWQbT55TcH604iOcu35qEE5T9Y8e9FsftHpHRaaJsq2c 4Cg2ehUPALwYDDSucA2V+6wL5Xfa/cg0gfx1XQFaRYjgL0ootnEXDpFFth1feeZP sI8EspVjv8mlAIquNThGggCYPQRimrXNR28sl5npKd6F9eePForS4wsgYyUj0LCO 24YB4W+9xg5Lhv25kNGkaG3qQu4aTBBb7TZ2ofC1bJz/IWQEf25UB+wekfFqnRnC T/j2rRdSueS4r6U6ViTuNN61tTazAurZCdlOWISeEQrXJA5krTR4JUO5Md7UH9yM IDBWWTBvxiZKr70KsP/JLRpc+tKMp4DETZa+StvOyS5PDdcHMfwQBxa0P0iGZxhA QmvlQlcaCFYhn5F8PGBgBk7erY9mkeRljQsZM1gaCKLvqppDO6nOtGp5+AVrKjPL 2xudwV8jXvCigMcGQfuTeA7nOJX0v8KjBR65O3d/8ZZFKsyOT8tHcsQSchZ42znD QTs35EO7q67xj9xp96k2BqUSVyVhrn9A+YBxPYb8uAAWu/lGQEiD+EPoC48brOUs tqw48IzGHq8zs2OxwSi9 =VSPH -----END PGP SIGNATURE----- --=-3Ve2qPFdOSDgVxpoWoXy--