From MAILER-DAEMON Tue Aug 02 20:54:50 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QoPjW-0004dp-0X for mharc-grub-devel@gnu.org; Tue, 02 Aug 2011 20:54:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoPjT-0004cL-5T for grub-devel@gnu.org; Tue, 02 Aug 2011 20:54:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoPjQ-0000Fo-Lt for grub-devel@gnu.org; Tue, 02 Aug 2011 20:54:47 -0400 Received: from ausc60ps301.us.dell.com ([143.166.148.206]:4595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoPjQ-0000FP-IQ for grub-devel@gnu.org; Tue, 02 Aug 2011 20:54:44 -0400 X-Loopcount0: from 10.9.160.253 Message-ID: <4E389C50.3080001@dell.com> Date: Tue, 02 Aug 2011 19:54:40 -0500 From: Mario Limonciello Organization: Dell Inc. User-Agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110627 Thunderbird/5.0 MIME-Version: 1.0 To: "grub-devel@gnu.org" Subject: [PATCH] Use realpath to clean up arguments to grub-probe X-Enigmail-Version: 1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig373271C0FFA05763EDC59698" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 143.166.148.206 Cc: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= 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, 03 Aug 2011 00:54:48 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig373271C0FFA05763EDC59698 Content-Type: multipart/mixed; boundary="------------040407040502070405030602" This is a multi-part message in MIME format. --------------040407040502070405030602 Content-Type: multipart/alternative; boundary="------------090905000405050602020702" --------------090905000405050602020702 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I've found that the EFI grub-install command can fail to properly figure = out devices when using the --root-directory command. This seems to be ro= oted from a call to grub-probe with a ".." in the path. This is fixed by using realpath to clean up the path passed in grub-probe= =2E Please see the attached patch. Thanks, --=20 *Mario Limonciello* Linux Engineer *Dell*| OS Engineering --------------090905000405050602020702 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,

I've found that the EFI grub-install command can fail to properly figure out devices when using the --root-directory command.=C2=A0 Thi= s seems to be rooted from a call to grub-probe with a ".." in the path.

This is fixed by using realpath to clean up the path passed in grub-probe.=C2=A0 Please see the attached patch.

Thanks,

--
Mario Limonciello
Linux Engineer
Dell | OS Engineering
--------------090905000405050602020702-- --------------040407040502070405030602 Content-Type: text/x-diff; name="realpath.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="realpath.patch" =3D=3D=3D modified file 'ChangeLog' --- ChangeLog 2011-07-26 15:19:47 +0000 +++ ChangeLog 2011-08-03 00:48:10 +0000 @@ -1,3 +1,8 @@ +2011-08-02 Mario Limonciello + + * util/grub-probe.c: Use realpath to clean up directory arguments + including '..' such as that used in grub-install for EFI. + 2011-07-26 Colin Watson =20 * configure.ac: The Loongson port requires grub-mkfont due to its =3D=3D=3D modified file 'util/grub-probe.c' --- util/grub-probe.c 2011-04-25 12:52:07 +0000 +++ util/grub-probe.c 2011-08-03 00:53:57 +0000 @@ -42,6 +42,9 @@ #include #include #include +#ifdef HAVE_LIMITS_H +#include +#endif =20 #define _GNU_SOURCE 1 #include @@ -181,7 +184,15 @@ #endif } else - device_name =3D grub_guess_root_device (path); + { +#ifdef PATH_MAX + grub_path =3D xmalloc (PATH_MAX); + realpath (path, grub_path); +#else + grub_path =3D realpath(path, NULL); +#endif + device_name =3D grub_guess_root_device (grub_path); + } =20 if (! device_name) grub_util_error ("cannot find a device for %s (is /dev mounted?)", p= ath); --------------040407040502070405030602-- --------------enig373271C0FFA05763EDC59698 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk44nFQACgkQ2CrZjkA73Yv/0QCfWpGo/jIgJjTNwHSaBOvTxyJB XyAAn20sbOiiT70sG7tpoNynfFKC3cN8 =AvUx -----END PGP SIGNATURE----- --------------enig373271C0FFA05763EDC59698-- From MAILER-DAEMON Wed Aug 03 07:21:18 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QoZVl-0003g1-Vr for mharc-grub-devel@gnu.org; Wed, 03 Aug 2011 07:21:17 -0400 Received: from eggs.gnu.org ([140.186.70.92]:52425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoZVj-0003fZ-Rv for grub-devel@gnu.org; Wed, 03 Aug 2011 07:21:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoZVj-0004rp-0L for grub-devel@gnu.org; Wed, 03 Aug 2011 07:21:15 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:35990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoZVi-0004rf-Te for grub-devel@gnu.org; Wed, 03 Aug 2011 07:21:14 -0400 Received: by iyb14 with SMTP id 14so1054804iyb.0 for ; Wed, 03 Aug 2011 04:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=KPWFhaq+AOvh0lYYh9RLecHjUf8bvyZ9iiwcmvPhDqs=; b=m9HrwZWK/w9HO1rgWevFfjoEaU5Z6ZSk4nBzfvMRJTXVfDzYm8L4t5LmF/azn4KDpE kJ6YpBH/CEnnzQsCIXGWf6GM/LvosQGEKA50h+OitM8fWNx0RuPhUrE4yg1eV8aUFdmQ PfvmOOZqBs7mZEzGDOzxbqmUeodAgnHIawpcQ= MIME-Version: 1.0 Received: by 10.42.161.1 with SMTP id r1mr3615810icx.448.1312370473823; Wed, 03 Aug 2011 04:21:13 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.42.178.73 with HTTP; Wed, 3 Aug 2011 04:21:13 -0700 (PDT) In-Reply-To: <20110726161932.GB3028@riva.dynamic.greenend.org.uk> References: <20110726131229.GA30427@riva.dynamic.greenend.org.uk> <20110726152502.GA3028@riva.dynamic.greenend.org.uk> <4E2EE59C.8080305@gmail.com> <20110726161932.GB3028@riva.dynamic.greenend.org.uk> Date: Wed, 3 Aug 2011 13:21:13 +0200 X-Google-Sender-Auth: 4MUMmLXKkDPGqa8Wr50K01m0WJ0 Message-ID: Subject: Re: Loongson 2E boot failure From: Robert Millan To: The development of GNU GRUB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 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, 03 Aug 2011 11:21:16 -0000 2011/7/26 Colin Watson : >> Looks like memory allocations are wrong. Try hardcoding heap at e.g. >> 81000000-82000000 > > Sorry, I've not had to mess with this before. =C2=A0Can you point me to w= hat > I'd need to change to hardcode a specific heap region? Try replacing grub_machine_mmap_iterate() with something like: grub_err_t grub_machine_mmap_iterate (grub_memory_hook_t hook) { hook (0x81000000, 82000000, GRUB_MEMORY_AVAILABLE); return GRUB_ERR_NONE; } --=20 Robert Millan From MAILER-DAEMON Sun Aug 07 21:28:38 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QqEdy-0003oH-0i for mharc-grub-devel@gnu.org; Sun, 07 Aug 2011 21:28:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]:60565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqEdv-0003nX-5I for grub-devel@gnu.org; Sun, 07 Aug 2011 21:28:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqEdt-0000fL-Ps for grub-devel@gnu.org; Sun, 07 Aug 2011 21:28:35 -0400 Received: from mail-iy0-f175.google.com ([209.85.210.175]:37482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqEdt-0000fH-J9 for grub-devel@gnu.org; Sun, 07 Aug 2011 21:28:33 -0400 Received: by iyn15 with SMTP id 15so6029179iyn.6 for ; Sun, 07 Aug 2011 18:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; bh=qTSbTl3WQL61+Y607hyRBFDpR4rTmq7BzZzXwIkQmtw=; b=dAz/vlxyQJhv9uJUV3fdHXMPc8ty8H3/cGxvGd3bYIw0wpnEZkh34FiL1RNv1UGc6Y NQW1Gki/U0Xw1Rq8aZZ8JCL5He2Ne90Xne3fQJ3FoJhIDgiJnAFcxDEXg4+sbNa0+Frg lu+bE6rMqnKBlBTfODq6ToGuFF8WUnXnHlWwE= Received: by 10.42.158.195 with SMTP id i3mr768866icx.205.1312766912756; Sun, 07 Aug 2011 18:28:32 -0700 (PDT) Received: from fawn.thebedells.dyndns.org (cpe-74-76-197-33.nycap.res.rr.com [74.76.197.33]) by mx.google.com with ESMTPS id n18sm2153098ibg.1.2011.08.07.18.28.31 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 07 Aug 2011 18:28:32 -0700 (PDT) From: Zachary Bedell Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: getroot for ZFS without libzfs? Date: Sun, 7 Aug 2011 21:28:30 -0400 Message-Id: <624ACA48-86E4-4ECB-A975-A47B1FB7F7E6@gmail.com> To: grub-devel@gnu.org Mime-Version: 1.0 (Apple Message framework v1244.3) X-Mailer: Apple Mail (2.1244.3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.175 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: Mon, 08 Aug 2011 01:28:36 -0000 Greetings all, I've been working for the last few weeks with Grub on a Linux system = using ZFS drivers from zfsonlinux.org. One change required to Grub has = been in adapting the way the the build process detects and links to = libzfs for the code in util/getroot.c. I'd like to see the changes = required included in Grub of course, but I have some concerns about the = licensing issues and also accessing the private libzfs. It appears that existing Grub code already links against libzfs for the = benefit of find_root_device_from_libzfs and other functions in = getroot.c. It also appears that libzfs is not used outside this file. = That linkage surprises me a bit as I would have expected GPL Grub linked = against CDDL libzfs to create a problem. Also libzfs is considered a = private API and not intended to be linked against, though admittedly = what I propose (reading on-disk structures directly) is arguably worse = than accessing a private library. As best I can tell, all of the ZFS-related functionality that getroot.c = requires was included in the GPL release that Sun made in Grub 0.97. I = think it should be relatively straight forward to modify getroot.c to = use the GPL'd ZFS code to directly access the disk and read the = necessary bits out of ZFS that it needs to configure itself. Assuming = that change is made, it should be possible to expunge Grub of all = references to libzfs and have its ZFS support operate purely on the = GPL'd dump from Sun. I'd like to dive in and make these changes, but I wanted to solicit = thoughts from other Grub devs before starting. Am I incorrect in my = belief that linking libzfs is a GPL problem for Grub? Is the CDDL/GPL = problem not reciprocal and this only a problem for CDDL ZFS using GPL = kernel and not the other way around? Does anyone see an issue with getroot.c reading the on-disk ZFS = structures directly? grub-probe already does this in its search for = uberblocks and labels, so I don't think changing getroot.c is making the = situation worse. Any other thoughts would be appreciated. Best regards, Zac Bedell From MAILER-DAEMON Tue Aug 09 09:34:42 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QqmSA-0008CC-Mx for mharc-grub-devel@gnu.org; Tue, 09 Aug 2011 09:34:42 -0400 Received: from eggs.gnu.org ([140.186.70.92]:54073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqmS7-00089c-C3 for grub-devel@gnu.org; Tue, 09 Aug 2011 09:34:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqmS2-0007YE-Gu for grub-devel@gnu.org; Tue, 09 Aug 2011 09:34:39 -0400 Received: from mail-iy0-f175.google.com ([209.85.210.175]:52145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqmS2-0007Xr-D2 for grub-devel@gnu.org; Tue, 09 Aug 2011 09:34:34 -0400 Received: by iyn15 with SMTP id 15so243394iyn.6 for ; Tue, 09 Aug 2011 06:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=y9xl10QHAEyfPui+5+xXn8AL9NkKvGH2f6gMJes6QAY=; b=HEDB4GXMYt74M+VSw3Wv3obRYPzKljxz9my7zpJzAYJTzzUZkQdbJW8y/imBjA4CRq X3AHdqaHBUF0r+HywuOT1iVBPYnpB3/4zmjlyk2kBGpp7mMPasAX5adc3kZF+s7Cr7PY aYPCzATmvQzzeBTKdqhHIp4u3jLjoff6PO6zY= MIME-Version: 1.0 Received: by 10.42.162.1 with SMTP id v1mr6664363icx.381.1312890878202; Tue, 09 Aug 2011 04:54:38 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.43.45.134 with HTTP; Tue, 9 Aug 2011 04:54:38 -0700 (PDT) In-Reply-To: <624ACA48-86E4-4ECB-A975-A47B1FB7F7E6@gmail.com> References: <624ACA48-86E4-4ECB-A975-A47B1FB7F7E6@gmail.com> Date: Tue, 9 Aug 2011 13:54:38 +0200 X-Google-Sender-Auth: bEcFyRRogZFm9IqU9nY3HLU6Mfc Message-ID: Subject: Re: getroot for ZFS without libzfs? From: Robert Millan To: The development of GNU GRUB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.175 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: Tue, 09 Aug 2011 13:34:40 -0000 Hi Zachary, 2011/8/8 Zachary Bedell : > It appears that existing Grub code already links against libzfs for the b= enefit of find_root_device_from_libzfs and other functions in getroot.c. = =C2=A0It also appears that libzfs is not used outside this file. =C2=A0That= linkage surprises me a bit as I would have expected GPL Grub linked agains= t CDDL libzfs to create a problem. Not really. This kind of use falls under the system library exception, see section 1 of the GPL. >=C2=A0Also libzfs is considered a private API and not intended to be linke= d against, though admittedly what I propose (reading on-disk structures dir= ectly) is arguably worse than accessing a private library. I don't think you can figure out the disks corresponding to a zpool just by reading disk structures. You can guess, but only the kernel knows for sure. The other API that is available to us is /dev/zfs. But is that device meant to be used directly? How stable is this interface? --=20 Robert Millan From MAILER-DAEMON Tue Aug 09 13:34:43 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QqqCR-0006Jl-PM for mharc-grub-devel@gnu.org; Tue, 09 Aug 2011 13:34:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqqCP-0006JB-Dm for grub-devel@gnu.org; Tue, 09 Aug 2011 13:34:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqqCO-0007KU-Bg for grub-devel@gnu.org; Tue, 09 Aug 2011 13:34:41 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:39837) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqqCO-0007KO-8j for grub-devel@gnu.org; Tue, 09 Aug 2011 13:34:40 -0400 Received: by vxj15 with SMTP id 15so231457vxj.0 for ; Tue, 09 Aug 2011 10:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=Lx1UWITlmvj7P0+S4q5qZ7kAkYzC3UBClp9ArsvviUA=; b=L2MqTlxnqod3Us3F/rhLWhob9mvOzuHPmGZoEE/zMKcea4YRMqNhdY33PsUElNdN/J IZtaplLZyoz1qD0emm1X160kPCySeWwsB5qyOzGvBW4TudBs+dqFTDXGPQLtWpfXDhY5 6wjMrur+UUGKA8TXnqO4uUppqw3vV1I8YrTv8= Received: by 10.52.93.12 with SMTP id cq12mr3516001vdb.159.1312911279387; Tue, 09 Aug 2011 10:34:39 -0700 (PDT) Received: from [192.1.12.151] ([207.29.40.2]) by mx.google.com with ESMTPS id er5sm117544vdb.26.2011.08.09.10.34.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Aug 2011 10:34:38 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1244.3) Subject: Re: getroot for ZFS without libzfs? From: Zachary Bedell In-Reply-To: Date: Tue, 9 Aug 2011 13:34:37 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <624ACA48-86E4-4ECB-A975-A47B1FB7F7E6@gmail.com> To: The development of GNU GRUB X-Mailer: Apple Mail (2.1244.3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.169 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: Tue, 09 Aug 2011 17:34:42 -0000 On Aug 9, 2011, at 7:54 AM, Robert Millan wrote: > 2011/8/8 Zachary Bedell : >> Also libzfs is considered a private API and not intended to be = linked against, though admittedly what I propose (reading on-disk = structures directly) is arguably worse than accessing a private library. >=20 > I don't think you can figure out the disks corresponding to a zpool > just by reading disk structures. You can guess, but only the kernel > knows for sure. It's all in there, and the structures are pretty well defined & stable. = You'd need to look at all the raw devices to begin with and see which if = any has a ZFS label (always in a well known location). Assuming any = does, you get the vdev_tree out of the label's nvlist, and from there = you can discover child and parent devices to rebuild the full tree. It = looks like the code in getroot.c is doing pretty much that by calling = the various nvlist_lookup_* functions from libzfs. Doing the same from = the pool isn't much more difficult, and the necessary nvlist-related = functions are already in zfs.c in Grub at this point. > The other API that is available to us is /dev/zfs. But is that device > meant to be used directly? How stable is this interface? /dev/zfs is probably less stable than libzfs, both of which are less = stable than the on-disk format. That said, libzfs is going to be stable = for the foreseeable future until/unless Oracle dumps more code. I do = know that the cryptography related work in Solaris 11 changed the = on-disk structures slightly, though in theory in a backwards compatible = way. Likewise, the particular functions of libzfs that Grub needs are = core enough to ZFS that I doubt they'd be broken in a future release. My reasons for looking at other options were primarily GPL driven, but = given that's not an issue, it's probably moot for now. It might be = slightly more elegant to use pure Grub code given that all of the = underlying functionality is there already, but the real benefits are = probably minimal. SO that said=85 It probably makes the most sense to withdraw my = thoughts of removing libzfs. In lieu of that, I have a patch which = allows ZFS detection to function on Linux. I'll post that under = separate subject momentarily as it's unrelated to libzfs in getroot.c. Best regards, Zac From MAILER-DAEMON Tue Aug 09 13:48:45 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QqqQ1-0001oc-8n for mharc-grub-devel@gnu.org; Tue, 09 Aug 2011 13:48:45 -0400 Received: from eggs.gnu.org ([140.186.70.92]:60391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqqPv-0001ny-IQ for grub-devel@gnu.org; Tue, 09 Aug 2011 13:48:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqqPr-00034u-BZ for grub-devel@gnu.org; Tue, 09 Aug 2011 13:48:39 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:50348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqqPr-00034o-7n for grub-devel@gnu.org; Tue, 09 Aug 2011 13:48:35 -0400 Received: by vxj15 with SMTP id 15so244939vxj.0 for ; Tue, 09 Aug 2011 10:48:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:content-type:subject:date:message-id:to:mime-version:x-mailer; bh=jMbBT2gNunJJvKBUhslVjh9015u/HgQYzb5BHysdmzA=; b=GAG3A+moNWBfhe3PDwx1NLYi2AIl3yplFIGT8FgihBC5s8XVROObJQvaymONPtwYzF HBwWrJaN0bbUzwqFvNTXrBoi5U15d+fR29DiW/LuYkaa9YBGr8PcAk0GItCqGLrfV8eY zPXAv43xNci/oKWl28KGcZzUg+jJaXJK/98RI= Received: by 10.52.177.102 with SMTP id cp6mr7008528vdc.321.1312912114262; Tue, 09 Aug 2011 10:48:34 -0700 (PDT) Received: from [192.1.12.151] ([207.29.40.2]) by mx.google.com with ESMTPS id fc7sm131317vdc.12.2011.08.09.10.48.33 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Aug 2011 10:48:33 -0700 (PDT) From: Zachary Bedell Content-Type: multipart/mixed; boundary="Apple-Mail=_C05A3C3A-ACBF-4FEB-AB37-8F6FC88812C5" Subject: [Patch] Enable libzfs detection on Linux Date: Tue, 9 Aug 2011 13:48:32 -0400 Message-Id: <37B025F9-45D9-4424-8458-6B40D2D5A249@gmail.com> To: The development of GNU GRUB Mime-Version: 1.0 (Apple Message framework v1244.3) X-Mailer: Apple Mail (2.1244.3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.169 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: Tue, 09 Aug 2011 17:48:43 -0000 --Apple-Mail=_C05A3C3A-ACBF-4FEB-AB37-8F6FC88812C5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Attached is a patch which allows Grub to detect and use libzfs on Linux = as provided by the ZfsOnLinux project. =20 Most of this work was originally done by Darik Horn (dajhorn on GitHub) = against the Grub 1.99 releases as patched by Ubuntu. I've forward = ported the patches to trunk and separated some of the Ubuntu-specific = stuff. These apply against trunk independent of the other ZFS work I've = been doing. Changes include: configure.ac: =20 * Add check for libspl to bring in Solaris Porting Library for Linux = support. * Include reference to Linux ZFS's config header to get necessary = defines for other ZFS headers on Linux. * Add checks for libavl, libefi, libunicode, libzpool -- Linux = decomposes these libraries which are lumped into libzfs on other = platforms. getroot.c: * Add ref to mnttab.h from libspl to allow getextmntent to work on = Linux. * Change the order of the grub_find_root_device_from_mountinfo vs = find_root_device_from_libzfs calls so that libzfs runs first, falling = down to mountinfo if zfs isn't detected. * Scan /proc/mounts and /etc/mtab in addition to /etc/mnttab to = discover mounted filesystems in grub_find_zpool_from_dir. grub.d/10_linux.in: * Detect ZFS root and include reference to zfsinfo.mod if needed. * Detect the bootfs dataset from the zpool attribute. * Adjust kernel parameters to omit root=3D and replace with boot=3Dzfs = and reference to the detected bootfs if available. * If bootfs isn't available from the pool, delegates to detection = (hopefully) present in the initrd. These patches have been in use by a number of folks using ZfsOnLinux for = some time, and they've been robust on those systems. I've tried to = ensure the changes won't impact non-Linux platforms, though I'm not sure = I trust my knowledge of autoconf enough to be positive there are no side = effects. The attached patch is intended for trunk, but I also have a version = rolled for the 1.99 branch if that would be useful. Best regards, Zac Bedell --Apple-Mail=_C05A3C3A-ACBF-4FEB-AB37-8F6FC88812C5 Content-Disposition: attachment; filename=grub-zfs-linux.patch Content-Type: application/octet-stream; name="grub-zfs-linux.patch" Content-Transfer-Encoding: 7bit diff --git a/configure.ac b/configure.ac index e6d7265..3137869 100644 --- a/configure.ac +++ b/configure.ac @@ -295,9 +295,14 @@ else AC_PATH_PROG(HELP2MAN, help2man) fi +# The Solaris Portability Layer is required to link grub against zfs-lib on Linux. +AC_CHECK_LIB([spl], [getextmntent], [ LIBS="$LIBS -pthread -lspl" + AC_DEFINE([HAVE_LIBSPL], [1], [Define to 1 if you have the SPL library.])],) + # Check for functions and headers. AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf getextmntent) -AC_CHECK_HEADERS(libzfs.h libnvpair.h sys/param.h sys/mount.h sys/mnttab.h sys/mkdev.h) +AC_CHECK_HEADERS(libzfs.h libnvpair.h sys/param.h sys/mount.h sys/mnttab.h sys/mkdev.h,[],[],[$ac_includes_default +#include ]) AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default #include @@ -922,17 +927,19 @@ AC_CHECK_LIB([lzma], [lzma_code], [Define to 1 if you have the LZMA library.])],) AC_SUBST([LIBLZMA]) -AC_CHECK_LIB([zfs], [libzfs_init], - [LIBZFS="-lzfs" - AC_DEFINE([HAVE_LIBZFS], [1], - [Define to 1 if you have the ZFS library.])],) -AC_SUBST([LIBZFS]) +# These libraries and zpool below are external to libzfs on Linux, +# but usually internal or intrinsic on other platforms. +AC_CHECK_LIB([avl], [avl_create], [LIBS="$LIBS -lavl"]) +AC_CHECK_LIB([efi], [efi_alloc_and_init], [LIBS="$LIBS -lefi"]) +AC_CHECK_LIB([unicode], [u8_strcmp], [LIBS="$LIBS -lunicode"]) -AC_CHECK_LIB([nvpair], [nvlist_print], - [LIBNVPAIR="-lnvpair" - AC_DEFINE([HAVE_LIBNVPAIR], [1], - [Define to 1 if you have the NVPAIR library.])],) +AC_CHECK_LIB([nvpair], [nvlist_print], [LIBS="$LIBS -lnvpair" LIBNVPAIR="$LIBS" + AC_DEFINE([HAVE_LIBNVPAIR], [1], [Define to 1 if you have the NVPAIR library.])],) AC_SUBST([LIBNVPAIR]) +AC_CHECK_LIB([zpool], [zfs_prop_init], [LIBS="$LIBS -lzpool"]) +AC_CHECK_LIB([zfs], [libzfs_init], [LIBS="$LIBS -lzfs" LIBZFS="$LIBS" + AC_DEFINE([HAVE_LIBZFS], [1], [Define to 1 if you have the ZFS library.])],) +AC_SUBST([LIBZFS]) LIBS="" diff --git a/util/getroot.c b/util/getroot.c index 7106458..0282a3d 100644 --- a/util/getroot.c +++ b/util/getroot.c @@ -34,6 +34,17 @@ #include #include #include +#if defined(HAVE_LIBSPL) && defined(__linux__) +# include +/* + * The Solaris Compatibility Layer provides getextmntent on Linux, which is + * required for grub-probe to recognize a native ZFS root filesystem on + * a Linux system. This typedef is required because including the SPL + * types.h here conflicts with an earlier Linux types.h inclusion. + */ + typedef unsigned int uint_t; +# include +#endif #ifdef HAVE_DEVICE_MAPPER # include @@ -598,16 +609,16 @@ grub_guess_root_device (const char *dir) struct stat st; dev_t dev; -#ifdef __linux__ - if (!os_dev) - os_dev = grub_find_root_device_from_mountinfo (dir, NULL); -#endif /* __linux__ */ - #if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR) if (!os_dev) os_dev = find_root_device_from_libzfs (dir); #endif +#ifdef __linux__ + if (!os_dev) + os_dev = grub_find_root_device_from_mountinfo (dir, NULL); +#endif /* __linux__ */ + if (os_dev) { char *tmp = os_dev; @@ -1407,7 +1418,15 @@ grub_find_zpool_from_dir (const char *dir, char **poolname, char **poolfs) if (stat (dir, &st) != 0) return; - FILE *mnttab = fopen ("/etc/mnttab", "r"); + FILE *mnttab; + mnttab = fopen ("/proc/mounts", "r"); + + if (! mnttab) + mnttab = fopen ("/etc/mtab", "r"); + + if (! mnttab) + mnttab = fopen ("/etc/mnttab", "r"); + if (! mnttab) return; diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index 97e7c65..20b204f 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -51,7 +51,10 @@ else LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} fi -if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" = xbtrfs ]; then +LINUX_ROOT_FS=`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true` +LINUX_ROOT_STAT=`stat -f --printf=%T / || true` + +if [ "x${LINUX_ROOT_FS}" = xbtrfs ] || [ "x${LINUX_ROOT_STAT}" = xbtrfs ]; then rootsubvol="`make_system_path_relative_to_its_root /`" rootsubvol="${rootsubvol#/}" if [ "x${rootsubvol}" != x ]; then @@ -59,6 +62,10 @@ if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" fi fi +if [ "x${LINUX_ROOT_FS}" = xzfs ]; then + GRUB_CMDLINE_LINUX="boot=zfs \$bootfs ${GRUB_CMDLINE_LINUX}" +fi + linux_entry () { os="$1" @@ -113,10 +120,20 @@ EOF fi printf '%s\n' "${prepare_boot_cache}" fi + if [ "x${LINUX_ROOT_FS}" = xzfs ]; then + cat << EOF + insmod zfsinfo + zfs-bootfs (\$root) bootfs +EOF + # ZFS doesn't want root=... or read-only. + rootentry="" + else + rootentry="root=${linux_root_device_thisversion} ro" + fi message="$(gettext_printf "Loading Linux %s ..." ${version})" cat << EOF echo '$message' - linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} + linux ${rel_dirname}/${basename} ${rootentry} ${args} EOF if test -n "${initrd}" ; then message="$(gettext_printf "Loading initial ramdisk ...")" --Apple-Mail=_C05A3C3A-ACBF-4FEB-AB37-8F6FC88812C5-- From MAILER-DAEMON Wed Aug 10 08:22:21 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qr7nh-0001IY-U7 for mharc-grub-devel@gnu.org; Wed, 10 Aug 2011 08:22:21 -0400 Received: from eggs.gnu.org ([140.186.70.92]:37193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr7na-0001Hz-Nm for grub-devel@gnu.org; Wed, 10 Aug 2011 08:22:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qr7nU-0003ZD-St for grub-devel@gnu.org; Wed, 10 Aug 2011 08:22:14 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:47512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qr7nU-0003Z9-P9 for grub-devel@gnu.org; Wed, 10 Aug 2011 08:22:08 -0400 Received: by gxk23 with SMTP id 23so680203gxk.0 for ; Wed, 10 Aug 2011 05:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=PGVZCzWQvFB+Ld/iehe1ecKl3n7sQCWpx4697wNx/HM=; b=YZdZtPQJyD+rsRgannqHNN0ukDDGuMgHW6hc9WkzaTUPDcHHbccZ1LfZJHcQmT2yhp r/vgZWzGjXD1JlgN/65wdrgOAnw3GTCgnKdkTFPep+R+LMoxY6ExHuiCb6MllreHd7ae HMozFZU7lXha+/x3rntVk9eVavEhp74X8aTjg= MIME-Version: 1.0 Received: by 10.42.147.65 with SMTP id m1mr8853411icv.46.1312978928161; Wed, 10 Aug 2011 05:22:08 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.43.45.134 with HTTP; Wed, 10 Aug 2011 05:22:08 -0700 (PDT) In-Reply-To: References: <624ACA48-86E4-4ECB-A975-A47B1FB7F7E6@gmail.com> Date: Wed, 10 Aug 2011 14:22:08 +0200 X-Google-Sender-Auth: NVYiSNfXBYck2MCgSkfid5lPhEQ Message-ID: Subject: Re: getroot for ZFS without libzfs? From: Robert Millan To: The development of GNU GRUB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.169 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, 10 Aug 2011 12:22:20 -0000 2011/8/9 Zachary Bedell : > You'd need to look at all the raw devices to begin with and see which if = any has a ZFS label Yes, but how do you know this is the label you wanted? Consider the case where there's more than one pool with this name. >> The other API that is available to us is /dev/zfs. =C2=A0But is that dev= ice >> meant to be used directly? =C2=A0How stable is this interface? > > /dev/zfs is probably less stable than libzfs Then I wouldn't use /dev/zfs. The less stable and standard is the ZFS API GRUB uses, the more likely is that one can argue it doesn't fall under the "system library" exception. Directly accessing on-disk structures is entirely different, since a data structure itself can't be copyrighted. > My reasons for looking at other options were primarily GPL driven, but gi= ven that's not an issue, it's probably moot for now. =C2=A0It might be slig= htly more elegant to use pure Grub code given that all of the underlying fu= nctionality is there already, I agree. But I'm still concerned about the technical problems. --=20 Robert Millan From MAILER-DAEMON Wed Aug 10 21:05:01 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QrJhl-000745-Pz for mharc-grub-devel@gnu.org; Wed, 10 Aug 2011 21:05:01 -0400 Received: from eggs.gnu.org ([140.186.70.92]:59044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrJhj-00073u-Es for grub-devel@gnu.org; Wed, 10 Aug 2011 21:05:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QrJhi-0001au-5J for grub-devel@gnu.org; Wed, 10 Aug 2011 21:04:59 -0400 Received: from mail-yx0-f169.google.com ([209.85.213.169]:48028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrJhh-0001ao-VV for grub-devel@gnu.org; Wed, 10 Aug 2011 21:04:58 -0400 Received: by yxn22 with SMTP id 22so1164472yxn.0 for ; Wed, 10 Aug 2011 18:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=nCS6WQXhgM+cSmEDiQqb/TwUIE9kN0a6YzT58n4A/1I=; b=rHAboqrzXcep3Q6tHBzv+PBuucTfkjrl4RPIXrQscEgf6Mhy+/i/CfeImBc/D7SUKD zWEZc3kiK4+j/x0xlusAz13Ayx3naNI+igBRKHMH7lpD14yyFpcpcYD67dD5XQLUTnev KSbLbUdL1xvHUIOmqH9uiGFhvRTM0m2v3qT4Y= Received: by 10.42.135.194 with SMTP id q2mr3737374ict.63.1313024696447; Wed, 10 Aug 2011 18:04:56 -0700 (PDT) Received: from fawn.thebedells.dyndns.org (cpe-74-76-197-33.nycap.res.rr.com [74.76.197.33]) by mx.google.com with ESMTPS id a9sm2252234icy.6.2011.08.10.18.04.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Aug 2011 18:04:54 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1244.3) Subject: Re: getroot for ZFS without libzfs? From: Zachary Bedell In-Reply-To: Date: Wed, 10 Aug 2011 21:04:52 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <0C06B528-4EA9-48D4-820F-C6B408EC4CF0@gmail.com> References: <624ACA48-86E4-4ECB-A975-A47B1FB7F7E6@gmail.com> To: The development of GNU GRUB X-Mailer: Apple Mail (2.1244.3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.169 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: Thu, 11 Aug 2011 01:05:01 -0000 On Aug 10, 2011, at 8:22 AM, Robert Millan wrote: > 2011/8/9 Zachary Bedell : >> You'd need to look at all the raw devices to begin with and see which = if any has a ZFS label >=20 > Yes, but how do you know this is the label you wanted? Consider the > case where there's more than one pool with this name. The pool can be identified positively via the guid which is in the = labels and available via `zpool list -H -o guid `. It's not = possible to have two pools imported at once with the same name, so = getting the root dataset via parsing /proc/mounts, /etc/mtab, or = /etc/mnttab then going to `zpool list` will give you the guid of the = root pool definitively. Then just parse all the device labels until you = find a label with a matching guid. (And probably keep scanning for all = of the devices with that guid to install Grub to all of them similar to = the MD support, but I'm getting ahead of myself=85) It would also be possible to check the imported status of the pool since = a conflicted name couldn't be imported normally (though multiple pools = available via SAN fabric would probably invalidate that). It may also = be possible to compare the hostid of the host that has it imported, = though I'm not sure it's possible to get the hostid reliably without = going to libzfs. There's logic in the Linux ZFS driver that diverges = from both Solaris and FreeBSD a bit as far as how the hostid is = calculated from the live system, so that's probably a tough option. Is calling out to zpool as a helper kosher? The -H flag to zpool pool = is basically Sun's idea of a public API in that it's intended to output = only the requested fields with no header information for automated = parsing. >>> The other API that is available to us is /dev/zfs. But is that = device >>> meant to be used directly? How stable is this interface? >>=20 >> /dev/zfs is probably less stable than libzfs >=20 > Then I wouldn't use /dev/zfs. The less stable and standard is the ZFS > API GRUB uses, the more likely is that one can argue it doesn't fall > under the "system library" exception. Definitely agree. The fact that libzfs is specifically listed as = private API not intended for linking against also makes me wonder if the = syslib exception is a concern for that. > Directly accessing on-disk structures is entirely different, since a > data structure itself can't be copyrighted. Right. And a bonus that the on-disk is well documented by Sun with the = explicitly stated purpose of interoperability. Assuming calling out to zpool would be acceptable, I think I'm going to = dive in this week and see if I can get it running. The libzfs related = autoconf stuff is the biggest area that Linux is "special" in, and it = would be nice to yank that all out. -Zac From MAILER-DAEMON Thu Aug 11 08:29:06 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QrUNm-00055d-7k for mharc-grub-devel@gnu.org; Thu, 11 Aug 2011 08:29:06 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrHmD-000179-PN for grub-devel@gnu.org; Wed, 10 Aug 2011 19:01:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QrHm9-0004mc-R8 for grub-devel@gnu.org; Wed, 10 Aug 2011 19:01:29 -0400 Received: from ultra7.eskimo.com ([204.122.16.70]:1303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrHm9-0004mI-KF for grub-devel@gnu.org; Wed, 10 Aug 2011 19:01:25 -0400 Received: from shell.eskimo.com (cahewson@shell.eskimo.com [204.122.16.72]) by ultra7.eskimo.com (8.14.0/8.14.3) with ESMTP id p7AN2npA024504 for ; Wed, 10 Aug 2011 16:02:49 -0700 Date: Wed, 10 Aug 2011 16:01:21 -0700 (PDT) From: "Charles A. Hewson" To: grub-devel@gnu.org Subject: error from make on luks branch Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="273206394-865542872-1313016531=:11998" Content-ID: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 204.122.16.70 X-Mailman-Approved-At: Thu, 11 Aug 2011 08:29:05 -0400 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, 10 Aug 2011 23:01:33 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --273206394-865542872-1313016531=:11998 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; format=flowed Content-ID: Hi all, Today I did bzr checkout, configure & make. GRUB_CRYPTODISK_ENABLE=y was set and exported. Did I miss some dependency? Will this work on 32-bit machine? I am new to bzr. Is something required besides checkout? What additional information can I provide? Charles -- Charles Hewson Seattle, WA. U.S.A. --273206394-865542872-1313016531=:11998 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME=error-msg Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: end of make output on squeeze Content-Disposition: ATTACHMENT; FILENAME=error-msg bWFrZVsyXTogRW50ZXJpbmcgZGlyZWN0b3J5IGAvaG9tZS9hbGFuL2x1a3Mn DQpnY2MgLURIQVZFX0NPTkZJR19IIC1JLiAgIC1XYWxsIC1XIC1JLi9pbmNs dWRlIC1ER1JVQl9VVElMPTEgLURHUlVCX0xJQkRJUj1cIi91c3IvbG9jYWwv bGliL2dydWJcIiAtRExPQ0FMRURJUj1cIi91c3IvbG9jYWwvc2hhcmUvbG9j YWxlXCIgIC1ER1JVQl9NQUNISU5FX1BDQklPUz0xIC1ER1JVQl9NQUNISU5F PUkzODZfUEMgLURHUlVCX0ZJTEU9XCJ1dGlsL21pc2MuY1wiIC1JLiAtSS4g LUkuIC1JLiAtSS4vaW5jbHVkZSAtSS4vaW5jbHVkZSAgLUkuL2dydWItY29y ZS9nbnVsaWIgLUkuL2dydWItY29yZS9nbnVsaWIgICAgICAgICAgICAgICAt V25vLXVuZGVmIC1Xbm8tc2lnbi1jb21wYXJlIC1Xbm8tdW51c2VkIC1Xbm8t dW51c2VkLXBhcmFtZXRlciAgICAgICAgICAgIC1NVCB1dGlsL2xpYmdydWJr ZXJuX2EtbWlzYy5vIC1NRCAtTVAgLU1GIHV0aWwvLmRlcHMtdXRpbC9saWJn cnVia2Vybl9hLW1pc2MuVHBvIC1jIC1vIHV0aWwvbGliZ3J1Ymtlcm5fYS1t aXNjLm8gYHRlc3QgLWYgJ3V0aWwvbWlzYy5jJyB8fCBlY2hvICcuLydgdXRp bC9taXNjLmMNCm12IC1mIHV0aWwvLmRlcHMtdXRpbC9saWJncnVia2Vybl9h LW1pc2MuVHBvIHV0aWwvLmRlcHMtdXRpbC9saWJncnVia2Vybl9hLW1pc2Mu U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ZWQgKGZpcnN0IHVzZSBpbiB0aGlzIGZ1bmN0aW9u KQ0KZ3J1Yi1jb3JlL2tlcm4vZW11L2dldHJvb3QuYzoxMTUyOiBlcnJvcjog ZXhwZWN0ZWQgJzsnIGJlZm9yZSAneycgdG9rZW4NCm1ha2VbMl06ICoqKiBb Z3J1Yi1jb3JlL2tlcm4vZW11L2xpYmdydWJrZXJuX2EtZ2V0cm9vdC5vXSBF cnJvciAxDQptYWtlWzJdOiBMZWF2aW5nIGRpcmVjdG9yeSBgL2hvbWUvYWxh bi9sdWtzJw0KbWFrZVsxXTogKioqIFthbGwtcmVjdXJzaXZlXSBFcnJvciAx DQptYWtlWzFdOiBMZWF2aW5nIGRpcmVjdG9yeSBgL2hvbWUvYWxhbi9sdWtz Jw0KbWFrZTogKioqIFthbGxdIEVycm9yIDINCmFsYW5AZGViaWFuLWdub21l On4vbHVrcyQgDQoNCg== --273206394-865542872-1313016531=:11998-- From MAILER-DAEMON Thu Aug 11 08:34:37 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QrUT7-0006TW-33 for mharc-grub-devel@gnu.org; Thu, 11 Aug 2011 08:34:37 -0400 Received: from eggs.gnu.org ([140.186.70.92]:56078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrUT4-0006TA-Gk for grub-devel@gnu.org; Thu, 11 Aug 2011 08:34:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QrUT3-00084I-AI for grub-devel@gnu.org; Thu, 11 Aug 2011 08:34:34 -0400 Received: from 19.mo5.mail-out.ovh.net ([46.105.35.78]:47519 helo=mo5.mail-out.ovh.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrUT3-00084E-1G for grub-devel@gnu.org; Thu, 11 Aug 2011 08:34:33 -0400 Received: from mail414.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo5.mail-out.ovh.net (Postfix) with SMTP id 6A8231024042 for ; Thu, 11 Aug 2011 14:34:41 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 11 Aug 2011 14:34:31 +0200 Received: from aannecy-651-1-65-169.w86-209.abo.wanadoo.fr (HELO ?192.168.1.6?) (piervit@pvittet.com@86.209.208.169) by ns0.ovh.net with SMTP; 11 Aug 2011 14:34:29 +0200 Message-ID: <4E43CC54.30107@pvittet.com> Date: Thu, 11 Aug 2011 14:34:28 +0200 From: Pierre Vittet User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110705 Thunderbird/3.1.11 MIME-Version: 1.0 To: grub-devel@gnu.org X-Ovh-Mailout: 178.32.228.5 (mo5.mail-out.ovh.net) Subject: GCC plugin to add warnings: testing on grub Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 14723674558188093582 X-Ovh-Remote: 86.209.208.169 (aannecy-651-1-65-169.w86-209.abo.wanadoo.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -105 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfedvtddrtdejucetggdotefuucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenshhouhhnugdjucdlqddvtddm X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 46.105.35.78 Cc: Alexandre Lissy , Basile Starynkevitch 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: Thu, 11 Aug 2011 12:34:35 -0000 Hello, My name is Pierre Vittet, I am working on a GCC plugin (for a GSOC), named Talpo, which allows the user to add specific compiler warnings, adapted to a project. I had an interesting talk with Vladimir Serbinenko during the LSM (http://2011.rmll.info/?lang=en) which encouraged me to run some tests on grub. For the moment there is 3 kind of possible tests in Talpo: -test_null : Test that a call to a given function is followed by a test on his returned pointer, else return a warning. -test_followed_by : Test that in a same function body, when we have a call to a given function, we also have a call to another given function, else return a warning. -test_immediately_followed_by : Test that a call to a given function, is immediately followed by a call to another given function, else, return a warning. I have launched the following tests when compiling grub: (testNull "grub_malloc") (testNull "grub_strdup") (testNull "grub_bufio_open") (testFollowedBy "grub_bufio_open" 0 "grub_bufio_close" 1) You can found compilation log at : http://pvittet.com/GSOC/log_grub_talpo.txt (too big to be in attachment). The 3 first tests, means that we want to check that the pointer returned by grub_malloc, grub_strdup, grub_bufio_open are tested to be (not) null. They return quite a lot of warnings which looks pertinent to me (even if a few are not). Test 4 means that when we have a call to grub_bufio_open, we want in the same function to have a grub_bufio_close on the variable returned by grub_bufio_open. The 0 means that we focus on the returned variable of grub_bufio_open and the 1 means that we want this variable to be first argument of a grub_bufio_close. I got two warnings, one is a false one (in term of logical, in function grub_buffile_open we do not want to close buffer after opening it). The second one is more interesting (in grub_net_fs_open in grub-core/net/net.c). We don't call grub_buffile_close but directly free file, so we might not correctly free field file->data. Talpo is not made to be "false warnings free" but should be right in most case, I am still improving it to restrict as much as possible false positives. What I need is to find useful tests, so if you have an idea of what would be pertinent to test in grub, I would like to launch the tests. Talpo is available under GPL here: https://gitorious.org/talpo. However it needs MELT (http://gcc-melt.org/) to works. MELT is actually in an unstable state and should wait until the end of the month before the 0.9 release go out. So I cannot advise you to have a try now except if you have time to spend for MELT. I hope this project sounds interesting to you! Thanks! Pierre Vittet PS: I runned my test on revision 3398 of grub. I had to disable -g flags when compiling (because it adds informations in GCC intermediate representation) which interfered with my plugin. From MAILER-DAEMON Thu Aug 11 08:40:17 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QrUYb-00084d-Iu for mharc-grub-devel@gnu.org; Thu, 11 Aug 2011 08:40:17 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrUYV-00083L-8K for grub-devel@gnu.org; Thu, 11 Aug 2011 08:40:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QrUYR-0000tU-6Q for grub-devel@gnu.org; Thu, 11 Aug 2011 08:40:11 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:56493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrUYQ-0000s5-Tc for grub-devel@gnu.org; Thu, 11 Aug 2011 08:40:07 -0400 Received: by wwf10 with SMTP id 10so1685507wwf.30 for ; Thu, 11 Aug 2011 05:40:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=CYzKEYKv5jdlT24C+ws9pMXkkLKthEv/6OjQhwncUW0=; b=jIAm/O0rGZw7BDfYCoQlyPex6c6UJ08bGzIQVwZRQsgXj436JYQKgKJk8JdVthk5n3 GEw7Ih8YyF/I/G2fK5CzS6XCEArzljWimh6lm9etfEX5KOevNmSYtnBzVIO4MdnGzo29 bt2YjF4st6yMyKRNCZE7t3XSD7p84fVt6r7OM= Received: by 10.216.61.145 with SMTP id w17mr1798790wec.59.1313066405471; Thu, 11 Aug 2011 05:40:05 -0700 (PDT) Received: from debian.x201.phnet (gprs17.swisscom-mobile.ch [193.247.250.17]) by mx.google.com with ESMTPS id ew4sm1529061wbb.8.2011.08.11.05.40.02 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Aug 2011 05:40:03 -0700 (PDT) Message-ID: <4E43CD99.60607@gmail.com> Date: Thu, 11 Aug 2011 14:39:53 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Iceowl/1.0b2 Icedove/3.1.11 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: error from make on luks branch References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigF58CC85B0C4D9C110A71CD3A" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 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: Thu, 11 Aug 2011 12:40:15 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF58CC85B0C4D9C110A71CD3A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11.08.2011 01:01, Charles A. Hewson wrote: > Hi all, > Today I did bzr checkout, configure & make. GRUB_CRYPTODISK_ENABLE=3Dy > was set and exported. Did I miss some dependency? Will this work on > 32-bit machine? I am new to bzr. Is something required besides > checkout? What additional information can I provide? Charles Luks branch isn't used anymore. What was in it is already merged into mainline > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigF58CC85B0C4D9C110A71CD3A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk5DzaAACgkQNak7dOguQgk8AAD/W6KnkDyUq2YAmwPqkeTvGVp1 Z/G2Nq9sjciBDUpOVRcA+gP+3P2MrVxy5MICjtWPY4V+lNcdRSvJVgXwNXngpODE =0rmo -----END PGP SIGNATURE----- --------------enigF58CC85B0C4D9C110A71CD3A-- From MAILER-DAEMON Thu Aug 11 08:43:59 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QrUcB-0000tN-Ns for mharc-grub-devel@gnu.org; Thu, 11 Aug 2011 08:43:59 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrUc4-0000qW-KZ for grub-devel@gnu.org; Thu, 11 Aug 2011 08:43:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QrUc0-0001eE-UI for grub-devel@gnu.org; Thu, 11 Aug 2011 08:43:52 -0400 Received: from mail-iy0-f175.google.com ([209.85.210.175]:43611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrUc0-0001e2-GL for grub-devel@gnu.org; Thu, 11 Aug 2011 08:43:48 -0400 Received: by iyn15 with SMTP id 15so2610168iyn.6 for ; Thu, 11 Aug 2011 05:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=JwvyGltrjdBVujvgl+LPgtsm/+EvIt6sFW1SDCGwkUE=; b=PCeapfeTSUDZEUh+MNFkHIBjnQJT3VQJxmofF4apbxgBZhccRBp2kWaMjaKedVXZLy pzMuYAA7sFP0gsBwI7O3/AArKhx5kvv5qlsM4sdSWVIwNM/LxPUKCVYJuwe1YKktRQAk Zymbourbsoo+tHbEVmNSIi7M60S0D70idvoUo= MIME-Version: 1.0 Received: by 10.231.12.201 with SMTP id y9mr12465074iby.61.1313066625215; Thu, 11 Aug 2011 05:43:45 -0700 (PDT) Received: by 10.231.161.142 with HTTP; Thu, 11 Aug 2011 05:43:44 -0700 (PDT) In-Reply-To: <4E43CD99.60607@gmail.com> References: <4E43CD99.60607@gmail.com> Date: Thu, 11 Aug 2011 08:43:44 -0400 Message-ID: Subject: Re: error from make on luks branch From: Craig Sparks To: The development of GNU GRUB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.175 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: Thu, 11 Aug 2011 12:43:56 -0000 Right on your the man vlad!!!!! 2011/8/11 Vladimir '=CF=86-coder/phcoder' Serbinenko : > On 11.08.2011 01:01, Charles A. Hewson wrote: >> Hi all, >> Today I did bzr checkout, configure & make. GRUB_CRYPTODISK_ENABLE=3Dy >> was set and exported. Did I miss some dependency? Will this work on >> 32-bit machine? I am new to bzr. Is something required besides >> checkout? What additional information can I provide? Charles > Luks branch isn't used anymore. What was in it is already merged into > mainline >> >> >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> https://lists.gnu.org/mailman/listinfo/grub-devel > > > -- > Regards > Vladimir '=CF=86-coder/phcoder' Serbinenko > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > > --=20 - Jackie *"Craig"* Sparks - *"Focus on Solutions not Problems"* Email0: Jackie.Craig.Sparks@gmail.com http://chunkhost.com/r/getachunk - Support my VPS host sign up now http://www.sparkscomm.com http://sparkscomm.com/wordpress/resume http://www.facebook.com/profile.php?ref=3Dprofile&id=3D100000140654932 https://www.scriptlance.com/cgi-bin/freelancers/feedback.cgi?p=3Drwtskraps http://twitter.com/#!/skraps_foo http://skraps.pastebin.com -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.10 (GNU/Linux) mQINBE1kJ5YBEAC1w4t0k7lLyBuikRUSZfvsigSR1IRASTuU5X2o443E/7fPYo/m kwDwc8uqzwCvvuV9ziZgv5+KFZ8eUUrTN1TTc8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BBgBAgAJBQJNZCeWAhsMAAoJEN3TA3S+FcwAUf8P/2zUCvOOX0viuC3nI0ZR 3bXWBobv5Fs0Fb3A6O8DVzXLsNsC3WoHdvqRlxHT4fHuKuDAjOj3XHsqntKe+omC PXSIrHGsKK3va3FnLSRMUqQ45zTXc2rNRW+FYMr0EsIAeBcWK17DbfSBuVJxUx0I Hs9AgJZ+w+YBcNnp0/gKyN7EjETdJJUo2t2zNv7FEf/hLIBFddYL2clxrlRlD+aR 5eQ/BNIJOu+T8jENb3zdbee+aC9ZJ5waFlDSBirFwsDOdJHTxXwZ1fb9YlQBmTNI mERLlI2VBIV5FdANpnsm9kczJiQGLZajfgylEglwJ3TSo4x1CM9Kwmo1XDK39ZV4 7rurtx5/Pzukd9Kyy6v3BLUkA8toE4U3y9TeHCQcC8IfjEJU8qMu1t0H++Yl0ikN sRpY1vfsEVv9txuKVQxXPxD6nZMe8Edhn5SMRtbe2XmM1NKT8WLvjNmd1wWWP6+E Ucx5/kcvxlPmDmmdLqUpTrRcTfs5iwKf3TiQyl4eFNXZs4tXy/Bv5JFTSx5l5PSD nBitamN/G+rYoYmdAvwiW3Cnf2LdYWYH2V3wNeTd1vthg3AeQPB9rhLbvtsjwmIP lZETXNjsVlJRB595j9vDfy8qiUzg93OO3pdKRzr1cxWyyt6uNzGiOPTJiN02lp6a VPd1isDqohZq35dMK3SYoOzH =3DNjkE -----END PGP PUBLIC KEY BLOCK----- From MAILER-DAEMON Fri Aug 12 07:29:38 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qrpvm-0002xA-HX for mharc-grub-devel@gnu.org; Fri, 12 Aug 2011 07:29:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrpvk-0002vl-TC for grub-devel@gnu.org; Fri, 12 Aug 2011 07:29:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qrpvj-00009S-Qd for grub-devel@gnu.org; Fri, 12 Aug 2011 07:29:36 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:63686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrpvj-000098-OL for grub-devel@gnu.org; Fri, 12 Aug 2011 07:29:35 -0400 Received: by vwm42 with SMTP id 42so2996528vwm.0 for ; Fri, 12 Aug 2011 04:29:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=VvBiEFobtWkql8wzcZZ6dm3b7mLkm3El/3ykzJE6lzs=; b=VfV52tpso8jOkwrpusnonoEKEv3S5WDq3U3w7A+BuPnh11T9vbkREy/VNecYuG//Yo qP8BSC1H8+7PipvY0AKu3ANoXL8TJwd9UsRy8YxAvkXKqUGrOfSy3DrZozHZnKHNIEmH l7ddT6Z3+QdP0DAFvwzzPHvrw+qndW8yceoVo= MIME-Version: 1.0 Received: by 10.220.100.69 with SMTP id x5mr226531vcn.19.1313148574440; Fri, 12 Aug 2011 04:29:34 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.220.94.196 with HTTP; Fri, 12 Aug 2011 04:29:34 -0700 (PDT) In-Reply-To: <0C06B528-4EA9-48D4-820F-C6B408EC4CF0@gmail.com> References: <624ACA48-86E4-4ECB-A975-A47B1FB7F7E6@gmail.com> <0C06B528-4EA9-48D4-820F-C6B408EC4CF0@gmail.com> Date: Fri, 12 Aug 2011 13:29:34 +0200 X-Google-Sender-Auth: ZkzKULVcA_7DWhZwmjQ9IEnTEhM Message-ID: Subject: Re: getroot for ZFS without libzfs? From: Robert Millan To: The development of GNU GRUB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.41 Cc: Vladimir Serbinenko 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: Fri, 12 Aug 2011 11:29:37 -0000 2011/8/11 Zachary Bedell : > The pool can be identified positively via the guid which is in the labels= and available via `zpool list -H -o guid `. I see. Thanks for the explanation. > Is calling out to zpool as a helper kosher? =C2=A0The -H flag to zpool po= ol is basically Sun's idea of a public API in that it's intended to output = only the requested fields with no header information for automated parsing. I think -H output looks sane enough (and more stable, so all the better). > Definitely agree. =C2=A0The fact that libzfs is specifically listed as pr= ivate API not intended for linking against also makes me wonder if the sysl= ib exception is a concern for that. But SUN/Oracle has linked GRUB with libzfs. This is a good indication that they trust this method to be safe (it's our copyright which would be infringed by them, not theirs by us). --=20 Robert Millan From MAILER-DAEMON Fri Aug 12 08:45:55 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qrr7b-0002Tz-GV for mharc-grub-devel@gnu.org; Fri, 12 Aug 2011 08:45:55 -0400 Received: from eggs.gnu.org ([140.186.70.92]:44443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrZ2S-0001wI-HD for grub-devel@gnu.org; Thu, 11 Aug 2011 13:27:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QrZ2O-0000Kf-RU for grub-devel@gnu.org; Thu, 11 Aug 2011 13:27:24 -0400 Received: from alius.ayous.org ([78.46.213.165]:38869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrZ2O-0008W3-9o for grub-devel@gnu.org; Thu, 11 Aug 2011 13:27:20 -0400 Received: from eos.turmzimmer.net ([2001:a60:f006:aba::1]) by alius.turmzimmer.net with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1QrZ22-0007Ma-L7 for grub-devel@gnu.org; Thu, 11 Aug 2011 17:26:58 +0000 Received: from aba by eos.turmzimmer.net with local (Exim 4.69) (envelope-from ) id 1QrZ1w-0007Rn-LP for grub-devel@gnu.org; Thu, 11 Aug 2011 19:26:52 +0200 Date: Thu, 11 Aug 2011 19:26:52 +0200 From: Andreas Barth To: The development of GNU GRUB Subject: Re: Loongson 2E boot failure Message-ID: <20110811172652.GN2657@mails.so.argh.org> References: <20110726131229.GA30427@riva.dynamic.greenend.org.uk> <20110726152502.GA3028@riva.dynamic.greenend.org.uk> <4E2EE59C.8080305@gmail.com> <20110726161932.GB3028@riva.dynamic.greenend.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Editor: Vim http://www.vim.org/ User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 78.46.213.165 X-Mailman-Approved-At: Fri, 12 Aug 2011 08:45:54 -0400 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: Thu, 11 Aug 2011 17:27:28 -0000 * Robert Millan (rmh@gnu.org) [110811 19:10]: > 2011/7/26 Colin Watson : > >> Looks like memory allocations are wrong. Try hardcoding heap at e.g. > >> 81000000-82000000 > > > > Sorry, I've not had to mess with this before.  Can you point me to what > > I'd need to change to hardcode a specific heap region? > > Try replacing grub_machine_mmap_iterate() with something like: > > grub_err_t > grub_machine_mmap_iterate (grub_memory_hook_t hook) > { > hook (0x81000000, 82000000, GRUB_MEMORY_AVAILABLE); > return GRUB_ERR_NONE; > } done so, but the failure is still the same. (I'm happy to try different variants, but please tell me how I should produce them.) Andi From MAILER-DAEMON Fri Aug 12 08:55:51 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QrrHD-0005aF-1T for mharc-grub-devel@gnu.org; Fri, 12 Aug 2011 08:55:51 -0400 Received: from eggs.gnu.org ([140.186.70.92]:55488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrrH7-0005X2-6V for grub-devel@gnu.org; Fri, 12 Aug 2011 08:55:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QrrH5-0006g5-Gq for grub-devel@gnu.org; Fri, 12 Aug 2011 08:55:45 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:58458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrrH5-0006f8-CT for grub-devel@gnu.org; Fri, 12 Aug 2011 08:55:43 -0400 Received: by wyi11 with SMTP id 11so2496219wyi.0 for ; Fri, 12 Aug 2011 05:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=ikIDW3bat1IXicPwewJVJHLgHX0vkbPitfVjBoD1FUE=; b=JCPdIsCQHOyjtTnkYVjX1wBo1BFMLczZwf1C2aDJ7A8Jot0eME9pApC7iXOSAzwXLq D9UbvNCuxJAMcADV3NC1haXGfE/+HMPrHoMhO82snrD//seH8IsHQjbeg33Dof2rK+fF LUQP1m9WNZ+xWlUC30FMHcjcRM6YFSV5m5EOc= Received: by 10.216.68.143 with SMTP id l15mr713231wed.90.1313153741947; Fri, 12 Aug 2011 05:55:41 -0700 (PDT) Received: from debian.x201.phnet (143-6.62-81.cust.bluewin.ch [81.62.6.143]) by mx.google.com with ESMTPS id x13sm1054617wec.38.2011.08.12.05.55.37 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Aug 2011 05:55:38 -0700 (PDT) Message-ID: <4E4522C1.9010508@gmail.com> Date: Fri, 12 Aug 2011 14:55:29 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Iceowl/1.0b2 Icedove/3.1.11 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: Loongson 2E boot failure References: <20110726131229.GA30427@riva.dynamic.greenend.org.uk> <20110726152502.GA3028@riva.dynamic.greenend.org.uk> <4E2EE59C.8080305@gmail.com> <20110726161932.GB3028@riva.dynamic.greenend.org.uk> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigF012C469E15D215D9D873077" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.169 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: Fri, 12 Aug 2011 12:55:49 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF012C469E15D215D9D873077 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03.08.2011 13:21, Robert Millan wrote: > 2011/7/26 Colin Watson : >>> Looks like memory allocations are wrong. Try hardcoding heap at e.g. >>> 81000000-82000000 >> Sorry, I've not had to mess with this before. Can you point me to wha= t >> I'd need to change to hardcode a specific heap region? > Try replacing grub_machine_mmap_iterate() with something like: > > grub_err_t > grub_machine_mmap_iterate (grub_memory_hook_t hook) > { > hook (0x81000000, 82000000, GRUB_MEMORY_AVAILABLE); > return GRUB_ERR_NONE; > } > This code is wrong for at least 4 reasons: 1) 0x8.... is just to access kseg0, it's not part of physical address 2) second argument is a size, not end 3) and it's lacking 0x 4) on yeeloong memory init doesn't use mmap. Correct way is to replace: grub_mm_init_region ((void *) modend, (grub_arch_memsize << 20) - (modend - GRUB_ARCH_LOWMEMVSTART)); with: grub_mm_init_region (0x81000000, 16 << 20); --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigF012C469E15D215D9D873077 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk5FIsgACgkQNak7dOguQgkzmwD/biNpWm7D3Q/T9kNPHJ9t8Dcd MRZTA9kI+Y7SpnbAjOwA/A886A8LLWh0wjUTQPajM7ozidZXa3H8H6HHQTyGC9Su =/7i2 -----END PGP SIGNATURE----- --------------enigF012C469E15D215D9D873077-- From MAILER-DAEMON Sat Aug 13 06:32:42 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QsBWE-0004oO-42 for mharc-grub-devel@gnu.org; Sat, 13 Aug 2011 06:32:42 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsBWB-0004o2-Uj for grub-devel@gnu.org; Sat, 13 Aug 2011 06:32:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QsBWA-00088M-Nf for grub-devel@gnu.org; Sat, 13 Aug 2011 06:32:39 -0400 Received: from alius.ayous.org ([78.46.213.165]:36950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QsBWA-00088I-J8 for grub-devel@gnu.org; Sat, 13 Aug 2011 06:32:38 -0400 Received: from eos.turmzimmer.net ([2001:a60:f006:aba::1]) by alius.turmzimmer.net with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1QsBW9-0001bT-Jf for grub-devel@gnu.org; Sat, 13 Aug 2011 10:32:38 +0000 Received: from aba by eos.turmzimmer.net with local (Exim 4.69) (envelope-from ) id 1QsBW4-0001hz-0m for grub-devel@gnu.org; Sat, 13 Aug 2011 12:32:32 +0200 Date: Sat, 13 Aug 2011 12:32:31 +0200 From: Andreas Barth To: The development of GNU GRUB Subject: Re: Loongson 2E boot failure Message-ID: <20110813103231.GP2657@mails.so.argh.org> References: <20110726131229.GA30427@riva.dynamic.greenend.org.uk> <20110726152502.GA3028@riva.dynamic.greenend.org.uk> <4E2EE59C.8080305@gmail.com> <20110726161932.GB3028@riva.dynamic.greenend.org.uk> <4E4522C1.9010508@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4E4522C1.9010508@gmail.com> X-Editor: Vim http://www.vim.org/ User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 78.46.213.165 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: Sat, 13 Aug 2011 10:32:40 -0000 * Vladimir 'φ-coder/phcoder' Serbinenko (phcoder@gmail.com) [110812 15:15]: > On 03.08.2011 13:21, Robert Millan wrote: > > 2011/7/26 Colin Watson : > >>> Looks like memory allocations are wrong. Try hardcoding heap at e.g. > >>> 81000000-82000000 > >> Sorry, I've not had to mess with this before. Can you point me to what > >> I'd need to change to hardcode a specific heap region? > > Try replacing grub_machine_mmap_iterate() with something like: > > > > grub_err_t > > grub_machine_mmap_iterate (grub_memory_hook_t hook) > > { > > hook (0x81000000, 82000000, GRUB_MEMORY_AVAILABLE); > > return GRUB_ERR_NONE; > > } > > > This code is wrong for at least 4 reasons: > 1) 0x8.... is just to access kseg0, it's not part of physical address > 2) second argument is a size, not end > 3) and it's lacking 0x > 4) on yeeloong memory init doesn't use mmap. > Correct way is to replace: > grub_mm_init_region ((void *) modend, (grub_arch_memsize << 20) > - (modend - GRUB_ARCH_LOWMEMVSTART)); > with: > grub_mm_init_region (0x81000000, 16 << 20); No real behaviour change - still fails within grub_font_init (using the for(;;);-method). Only change compared with http://lists.gnu.org/archive/html/grub-devel/2011-07/msg00085.html is that the last line on the vga console is now 80211ebc 7091181e .word 7091181e # ...p Andi From MAILER-DAEMON Mon Aug 15 18:30:35 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qt5g3-0004O2-Or for mharc-grub-devel@gnu.org; Mon, 15 Aug 2011 18:30:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]:43598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qt5g1-0004Jy-7U for grub-devel@gnu.org; Mon, 15 Aug 2011 18:30:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qt5g0-0004Rh-3a for grub-devel@gnu.org; Mon, 15 Aug 2011 18:30:33 -0400 Received: from chiark.greenend.org.uk ([212.13.197.229]:57865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qt5fz-0004Rd-TN for grub-devel@gnu.org; Mon, 15 Aug 2011 18:30:32 -0400 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.69 #1) with esmtp (return-path cjwatson@ubuntu.com) id 1Qt5fy-0008Hl-0X; Mon, 15 Aug 2011 23:30:30 +0100 Received: from sarantium.wl.pelham.vpn.ucam.org ([2001:470:95d9:0:21c:26ff:fe49:dd4d] helo=sarantium.pelham.vpn.ucam.org) by riva.pelham.vpn.ucam.org with esmtp (Exim 4.72) (envelope-from ) id 1Qt5fw-0003rR-I1; Mon, 15 Aug 2011 23:30:28 +0100 Received: from riva.dynamic.greenend.org.uk (localhost [127.0.0.1]) by sarantium.pelham.vpn.ucam.org (Postfix) with ESMTPS id D695C3E415B; Mon, 15 Aug 2011 23:30:26 +0100 (BST) Date: Mon, 15 Aug 2011 23:30:25 +0100 From: Colin Watson To: The development of GNU GRUB Subject: Re: [PATCH] Use realpath to clean up arguments to grub-probe Message-ID: <20110815223025.GA26144@riva.dynamic.greenend.org.uk> References: <4E389C50.3080001@dell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E389C50.3080001@dell.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 212.13.197.229 Cc: Vladimir =?utf-8?Q?'=CF=86-coder=2Fphcoder'?= Serbinenko 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: Mon, 15 Aug 2011 22:30:34 -0000 On Tue, Aug 02, 2011 at 07:54:40PM -0500, Mario Limonciello wrote: > I've found that the EFI grub-install command can fail to properly > figure out devices when using the --root-directory command. This > seems to be rooted from a call to grub-probe with a ".." in the path. > > This is fixed by using realpath to clean up the path passed in > grub-probe. Please see the attached patch. This would also fix Debian bug #637768 ("grub-probe doesn't follow symlinks"). However, there is no reason to use realpath in new code when canonicalize_file_name exists (and is implemented more safely). I've adjusted your patch to the following and committed it: === modified file 'ChangeLog' --- ChangeLog 2011-08-15 22:21:29 +0000 +++ ChangeLog 2011-08-15 22:28:45 +0000 @@ -1,3 +1,11 @@ +2011-08-15 Mario Limonciello +2011-08-15 Colin Watson + + * util/grub-probe.c (probe): Canonicalise the path argument, fixing + use of "/path/.." as in grub-install for EFI as well as handling + symlinks correctly. + Fixes Debian bug #637768. + 2011-08-15 Colin Watson * util/grub-probe.c: Remove duplicate #include. === modified file 'util/grub-probe.c' --- util/grub-probe.c 2011-08-15 22:21:29 +0000 +++ util/grub-probe.c 2011-08-15 22:25:13 +0000 @@ -180,7 +180,10 @@ probe (const char *path, char *device_na #endif } else - device_name = grub_guess_root_device (path); + { + grub_path = canonicalize_file_name (path); + device_name = grub_guess_root_device (grub_path); + } if (! device_name) grub_util_error ("cannot find a device for %s (is /dev mounted?)", path); Thanks, -- Colin Watson [cjwatson@ubuntu.com] From MAILER-DAEMON Thu Aug 18 12:50:03 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qu5n9-0000ud-Kj for mharc-grub-devel@gnu.org; Thu, 18 Aug 2011 12:50:03 -0400 Received: from eggs.gnu.org ([140.186.70.92]:37234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qu5n6-0000tu-C2 for grub-devel@gnu.org; Thu, 18 Aug 2011 12:50:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qu5n4-0007bz-Vs for grub-devel@gnu.org; Thu, 18 Aug 2011 12:50:00 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:62084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qu5n4-0007bl-HI for grub-devel@gnu.org; Thu, 18 Aug 2011 12:49:58 -0400 Received: by fxg9 with SMTP id 9so1770716fxg.0 for ; Thu, 18 Aug 2011 09:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=u6ocyZ5Xq5xk8wF7RwR9gOiw41tl0Qu6bccKXFbDaUM=; b=vqRBr/sGD7NKhcMIqivb4SlG8RbU25q+JdoPR5pVTIIgoeJA64LK08H4if4hclC6EV /9PdvooVtEQXHZBZGvKJ92abECOAC6XkaLw/LlVf+XtLeh4czaWh56pI4rpJ/Af/db/f jGxKCtN2a1gSMcEwS2FnexY2XwuNBDOlInaJs= Received: by 10.223.62.76 with SMTP id w12mr1332712fah.123.1313686196689; Thu, 18 Aug 2011 09:49:56 -0700 (PDT) Received: from debian.x201.phnet (39-92.62-81.cust.bluewin.ch [81.62.92.39]) by mx.google.com with ESMTPS id g16sm1865660faa.27.2011.08.18.09.49.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Aug 2011 09:49:53 -0700 (PDT) Message-ID: <4E4D42A8.4000503@gmail.com> Date: Thu, 18 Aug 2011 18:49:44 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Iceowl/1.0b2 Icedove/3.1.11 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: [Patch] Enable libzfs detection on Linux References: <37B025F9-45D9-4424-8458-6B40D2D5A249@gmail.com> In-Reply-To: <37B025F9-45D9-4424-8458-6B40D2D5A249@gmail.com> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig443FB358EB302CBA0D71FE1E" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.41 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: Thu, 18 Aug 2011 16:50:01 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig443FB358EB302CBA0D71FE1E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09.08.2011 19:48, Zachary Bedell wrote: > Attached is a patch which allows Grub to detect and use libzfs on Linux= as provided by the ZfsOnLinux project. =20 > > Most of this work was originally done by Darik Horn (dajhorn on GitHub)= against the Grub 1.99 releases as patched by Ubuntu. I've forward porte= d the patches to trunk and separated some of the Ubuntu-specific stuff. = These apply against trunk independent of the other ZFS work I've been doi= ng. > > Changes include: > > configure.ac: =20 > * Add check for libspl to bring in Solaris Porting Library for Linux s= upport. > * Include reference to Linux ZFS's config header to get necessary defi= nes for other ZFS headers on Linux. > * Add checks for libavl, libefi, libunicode, libzpool -- Linux decompo= ses these libraries which are lumped into libzfs on other platforms. > > getroot.c: > * Add ref to mnttab.h from libspl to allow getextmntent to work on Lin= ux. > * Change the order of the grub_find_root_device_from_mountinfo vs find= _root_device_from_libzfs calls so that libzfs runs first, falling down to= mountinfo if zfs isn't detected. > * Scan /proc/mounts and /etc/mtab in addition to /etc/mnttab to discov= er mounted filesystems in grub_find_zpool_from_dir. > /etc/mtab is just a regular file and in many cases is out-of-sync with re= al state of affairs. Should be ignored altogether. Use of /etc/mnttab is = unfortunate but I know of no other way on other platforms (since I haven'= t looked into it). > These patches have been in use by a number of folks using ZfsOnLinux fo= r some time, and they've been robust on those systems. I've tried to ens= ure the changes won't impact non-Linux platforms, though I'm not sure I t= rust my knowledge of autoconf enough to be positive there are no side eff= ects. > You forget the effect of other code changes (below) > - FILE *mnttab =3D fopen ("/etc/mnttab", "r"); > + FILE *mnttab; > + mnttab =3D fopen ("/proc/mounts", "r"); /proc on FreeBSD is very different from Linux one. Don't try /proc/mounts except if you have Linux. > + > + if (! mnttab) > + mnttab =3D fopen ("/etc/mtab", "r"); > + > + if (! mnttab) > + mnttab =3D fopen ("/etc/mnttab", "r"); > + > if (! mnttab) > return; > =20 > -if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=3Dfs 2>/dev/nul= l || true`" =3D xbtrfs ]; then > +LINUX_ROOT_FS=3D`${grub_probe} --device ${GRUB_DEVICE} --target=3Dfs 2= >/dev/null || true` > +LINUX_ROOT_STAT=3D`stat -f --printf=3D%T / || true` > + > +if [ "x${LINUX_ROOT_FS}" =3D xbtrfs ] || [ "x${LINUX_ROOT_STAT}" =3D x= btrfs ]; then This changes logic for btrfs. I don't think it's necessary or good to just change it. > +if [ "x${LINUX_ROOT_FS}" =3D xzfs ]; then > + GRUB_CMDLINE_LINUX=3D"boot=3Dzfs \$bootfs ${GRUB_CMDLINE_LINUX}" > +fi > + > fi > + if [ "x${LINUX_ROOT_FS}" =3D xzfs ]; then > + cat << EOF > + insmod zfsinfo > + zfs-bootfs (\$root) bootfs > +EOF In this place $root refers to whereever kernel is. So if /boot is separate it will be wrong. Moreover you completely forget the possible subvolumes. One could have e.g. FreeBSD in /freebsd/@/... GNU/Linux in /gnu/linux/@ /boot in /boot/@ In this case $bootfs has to take subvolume into account. Also nothing guarantees that / is accessible from GRUB proper at all. The ZFS in question may be on e.g. SAN. You need to figure parameters in 10_linux, not on boot time. --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig443FB358EB302CBA0D71FE1E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk5NQq8ACgkQNak7dOguQgl68AEAvi/xJ+Npr4Rq93NS59YHEFvG kiJRfUPF+jD421bjdDoA/AyDzutEjdSMvslmUD1BOQn4Vq3hJB45lQ4omoAClI07 =cRIt -----END PGP SIGNATURE----- --------------enig443FB358EB302CBA0D71FE1E-- From MAILER-DAEMON Thu Aug 18 13:05:23 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qu61z-00047j-14 for mharc-grub-devel@gnu.org; Thu, 18 Aug 2011 13:05:23 -0400 Received: from eggs.gnu.org ([140.186.70.92]:43922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qu61v-00043W-8u for grub-devel@gnu.org; Thu, 18 Aug 2011 13:05:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qu61u-000268-0i for grub-devel@gnu.org; Thu, 18 Aug 2011 13:05:19 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:59287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qu61t-00025y-PQ for grub-devel@gnu.org; Thu, 18 Aug 2011 13:05:17 -0400 Received: by fxg9 with SMTP id 9so1781738fxg.0 for ; Thu, 18 Aug 2011 10:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=tzJT2OKVWFiCqy3yoV7Y7GyqJomXpuzkXN22jJ/oOro=; b=qivc8sUhmHBL5W0BUTvmnig3Ub4oZX0ZIaXIudUQGQI78dr/NRDCOppTaOdgw0fERn LwKAOwewfHttexu56ybRBBOlptl5N4wKPJRfCFHKPolZ8FW+DderwYukDCRxH6AmEhZs tQji3/4tyCeTT5BeSib1KQsY/WRUFE6tF94ho= Received: by 10.223.156.80 with SMTP id v16mr1428944faw.11.1313687116880; Thu, 18 Aug 2011 10:05:16 -0700 (PDT) Received: from debian.x201.phnet (39-92.62-81.cust.bluewin.ch [81.62.92.39]) by mx.google.com with ESMTPS id p3sm1879114faa.9.2011.08.18.10.05.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Aug 2011 10:05:15 -0700 (PDT) Message-ID: <4E4D4648.1090102@gmail.com> Date: Thu, 18 Aug 2011 19:05:12 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Iceowl/1.0b2 Icedove/3.1.11 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: getroot for ZFS without libzfs? References: <624ACA48-86E4-4ECB-A975-A47B1FB7F7E6@gmail.com> <0C06B528-4EA9-48D4-820F-C6B408EC4CF0@gmail.com> In-Reply-To: <0C06B528-4EA9-48D4-820F-C6B408EC4CF0@gmail.com> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigDB1F47B3360D76A8C53D3FB5" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.41 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: Thu, 18 Aug 2011 17:05:20 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDB1F47B3360D76A8C53D3FB5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11.08.2011 03:04, Zachary Bedell wrote: > On Aug 10, 2011, at 8:22 AM, Robert Millan wrote: >> 2011/8/9 Zachary Bedell : >>> You'd need to look at all the raw devices to begin with and see which= if any has a ZFS label >> Yes, but how do you know this is the label you wanted? Consider the >> case where there's more than one pool with this name. > The pool can be identified positively via the guid which is in the labe= ls and available via `zpool list -H -o guid `. It's not possi= ble to have two pools imported at once with the same name, If you can't import 2 pools with same name in the same time then it's a bug. It's like not being able to mount 2 disks with same label. And so as such I expect it to be fixed in future and so I don't rely on this. > (And probably keep scanning for all of the devices with that guid to in= stall Grub to all of them similar to the MD support, but I'm getting ahea= d of myself=E2=80=A6) > This would be inappropriate. Install is done to the disk, not to FS. So if user tells to install to one disk, you have to obey, not guess what user might have wanted. > It would also be possible to check the imported status of the pool sinc= e a conflicted name couldn't be imported normally (though multiple pools = available via SAN fabric would probably invalidate that). The status of the pool in on-disk structures may be "IMPORTED" even if the pool currently isn't. For instance FreeBSD keeps the state to "IMPORTED" on shutdown and so it would appear as imported if booted into another OS. > It may also be possible to compare the hostid of the host that has it= imported, though I'm not sure it's possible to get the hostid reliably w= ithout going to libzfs. There's logic in the Linux ZFS driver that diver= ges from both Solaris and FreeBSD a bit as far as how the hostid is calcu= lated from the live system, so that's probably a tough option. > and unreliable as well. > Is calling out to zpool as a helper kosher? English translation of "kosher" ("=D7=9B=D7=A9=D7=A8") is "appropriate". = Why not stick to English? > The -H flag to zpool pool is basically Sun's idea of a public API in = that it's intended to output only the requested fields with no header inf= ormation for automated parsing. But probably using unusual symbols in zpool names will make the parsing go haywire anyway. @Seth: any comment on what Sun considers a public API? >> >> Then I wouldn't use /dev/zfs. The less stable and standard is the ZFS= >> API GRUB uses, the more likely is that one can argue it doesn't fall >> under the "system library" exception. We don't need system library exception to read /dev/zfs. It's not a library but a way to speak with kernel which is definitely interprocess communication. >> Directly accessing on-disk structures is entirely different, since a >> data structure itself can't be copyrighted. > Right. And a bonus that the on-disk is well documented by Sun with the= explicitly stated purpose of interoperability. > > > Assuming calling out to zpool would be acceptable, I think I'm going to= dive in this week and see if I can get it running. The libzfs related a= utoconf stuff is the biggest area that Linux is "special" in, and it woul= d be nice to yank that all out. > > -Zac > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigDB1F47B3360D76A8C53D3FB5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk5NRkgACgkQNak7dOguQgn7YQEAlaiTkF1xdRTNqJQ79OVurbOI 7o++mcRkIqX2MhAyrUQA/0ib1VFDBWvi+8x3rcB4i+ysJwAMn5eCNF20Jzq9DySE =iKzS -----END PGP SIGNATURE----- --------------enigDB1F47B3360D76A8C53D3FB5-- From MAILER-DAEMON Thu Aug 18 23:02:00 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QuFLM-0006av-Sw for mharc-grub-devel@gnu.org; Thu, 18 Aug 2011 23:02:00 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuFLJ-0006Z7-8H for grub-devel@gnu.org; Thu, 18 Aug 2011 23:01:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuFLH-00035C-Qp for grub-devel@gnu.org; Thu, 18 Aug 2011 23:01:57 -0400 Received: from m50-133.163.com ([123.125.50.133]:38544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuFLG-0002yK-96 for grub-devel@gnu.org; Thu, 18 Aug 2011 23:01:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Received:Message-ID:Date:From:User-Agent: MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=BXLv8bdW2j0JfPrZmEmhgnLQhuYB5wKr0P YcyJxjisQ=; b=corhnaJqo+37RfqCl4888ORRYkECjxYxadBmMEbwuKkw5MUK/G yzAU17O7dWKa9r7LNFbIO7bYGQLOabAPnI/9Q24VyIdwRLeLg7RHzgwACKiEtpKH lg41kTDULFPz/rAsEDojIy+YCTyDztDSlMxEZoZ0xaWNklleYbQsm2xTc= Received: from [10.2.8.35] (unknown [152.104.150.33]) by smtp3 (Coremail) with SMTP id DdGowKA7XFCo0U1OejZNAA--.48S2; Fri, 19 Aug 2011 11:00:41 +0800 (CST) Message-ID: <4E4DD138.2080102@163.com> Date: Fri, 19 Aug 2011 10:58:00 +0800 From: Cui Lei User-Agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110627 Thunderbird/5.0 MIME-Version: 1.0 To: =?UTF-8?B?QWxlxaEgTmVzcnN0YQ==?= Subject: [Resolved] Grub2 can not detect usb disk References: <1309029199.2532.35.camel@pracovna> <201106252151.12483.szymon@janc.net.pl> <1309120668.3268.153.camel@pracovna> <4E40A417.6000309@163.com> <1312926878.2943.128.camel@pracovna> In-Reply-To: <1312926878.2943.128.camel@pracovna> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: DdGowKA7XFCo0U1OejZNAA--.48S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxKFy5KF4Uur4fWF4DXw15XFb_yoW7KFy8pa yYqF4ayrWkJrs3Ar1DZw1F9r4Y9FykA3yrKFn5X34v9rn0qr9YvryxKrsYga4UWrn7Way0 vF4qvay8Ca4DCaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j-3kZUUUUU= X-CM-SenderInfo: pqhyv25iruwvdwbsiiqs6rljoofrz/xtbBDhWgNkX0aFzbRwAAsU X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 123.125.50.133 Cc: The development of GNU GRUB 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: Fri, 19 Aug 2011 03:01:58 -0000 Thank you for your help, very much! ^_^ This problem have been resolved and I can usb the usb_keyborard under grub-shell and I can boot ubuntu11.04 from usb disk. My mainboard is via 8595a, the usb controller is uhci. I resolved it by add these code in the grub-core/bus/usb/uhci.c: (1) 182 /*Set bus master*/ 183 addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND); 184 grub_uint16_t val = grub_pci_read_word(addr); 185 val = (val & ~0) | GRUB_PCI_COMMAND_BUS_MASTER; 186 grub_pci_write_word(addr, val); (2) 203 // Reset PIRQ and SMI 204 addr = grub_pci_make_address (dev, 0xC0); //USBLEGSUP 0xc0 205 grub_pci_write_word(addr, 0x8f00); //USBLEGSUP_RWC 0x8f00 /* the R/WC bits */ 206 // Reset the HC 207 grub_uhci_writereg16(u, GRUB_UHCI_REG_USBCMD, 0x0002); //USBCMD_HCRESET 0x0002 208 grub_millisleep(5); 209 // Disable interrupts and commands (just to be safe). 210 grub_outw (0, u->iobase + 4); //USBINTR 4 /*Interrupt enable register*/ 211 grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 0); I don't know whether it is useful to the other one, but may be a reference. BRs, Rock. > Hi, > > I am afraid, I maybe will not help You too much but I try it: > > I shortly looked into ML to Your posts. As I saw short part of debug > output in one of Your e-mail, GRUB freezes when it wants to get device > descriptor - more precisely, when it requests first 8 bytes of device > descriptor. It is the first thing which is done after address is > assigned to the device. > > So, it looks like device does not set address properly (even if control > message Set Address returns success) or happened something else what > prevent device to respond (but I don't know what...). > > For the first try You can increase related delays in usbhub.c: > > ... > /* Wait "recovery interval", spec. says 2ms */ > grub_millisleep (2);<<<<---- HERE (try 4ms or more) > > grub_usb_device_attach (dev); > ... > > ... > /* Enable the port. */ > err = hub->controller->dev->portstatus (hub->controller, portno, 1); > if (err) > return; > hub->controller->dev->pending_reset = grub_get_time_ms () + 5000; > > grub_millisleep (10);<<<<---- maybe here also > > /* Enable the port and create a device. */ > dev = grub_usb_hub_add_dev (hub->controller, speed, portno, 0); > hub->controller->dev->pending_reset = 0; > if (! dev) > return; > ... > > If this will not help You, I currently have no other idea what could be > the reason of timeout. > I think You don't need EHCI because it looks like Set Address control > message works (at least it does not return error), i.e. You probably > have OHCI or UHCI USB (companion) controller on computer and Your device > is working at full or low speed with Your USB controller. > > By the way, for the first look into ML I did not find which USB > controller You have - OHCI/UHCI ? (which driver/module are You using - > ohci/uhci?) - and which machine/architecture is the computer You are > trying to boot with GRUB2 - ? > I sometimes had some unidentified problems on my UHCI/EHCI controller, > mostly with port powering - UHCI does not have power management but EHCI > does and if EHCI is not properly initialized by BIOS (it could be Your > case with coreboot, maybe ?) then USB ports are not properly powered. > Another BIOS (coreboot?) issue could be improper handling of USB > controller ownership. > > Do You have USB device connected directly into root port or via some USB > hub ? Try to do it in opposite way (i.e. if You are not using the USB > hub, try use it and connect USB device via hub - maybe it helps...) > > Hmmm, I remember now one issue which could be related to Your problem. > On my very old machine with OHCI USB controller some devices are not > working "for the first time". I am still not able to debug why it > happened (it does not happened when full debug is active - so it looks > like it is related to some timing). But I am afraid it will be not Your > case because device stops working after it is recognized, configured, > usbms module loaded and GRUB USB device usb0 created. > But - try load ohci/uhci module when USB disk is connected and then > disconnect and connect it again after few seconds. In my case device > becomes working as new usb device (i.e. usb1). > > Additionally, lot of manufacturers does not follow USB or USBMS > specifications, as You can read in Linux source code of USB controllers > and USB mass storage devices and related documentation. > Did You tried more different USB mass storage devices ? > What is manufacturer& type of Your USB mass storage device ? > > Of course, You can also try EHCI driver, it maybe can solve Your problem > because of little bit different ports/devices handling. But EHCI driver > is currently highly experimental, it still exists only as uncorrected > and not accepted "patch". I have to do some improvement but I don't have > sufficient time still, unfortunately... > If You want try to use it, You can get my patch from ML (sent at > 25.6.2011) and use it with related source code trunk branch revision > (maybe also any later or current revision, because USB parts of GRUB are > not frequently changed). Please also read about know issue and another > limitations of the "zero version" of EHCI driver - e.g. it may not work > if Your PC is not x86 machine or USB registers are mapped above 4GB etc. > > Sorry if You will wait longer time for my response in future - I don't > check the post so often and additionally currently I am (and probably > will be) longer time too busy - I am not regular GRUB2 contributor, I do > something for GRUB2 USB part only time to time... > > BRs, > Ales > > > Cui Lei píše v Út 09. 08. 2011 v 11:05 +0800: >> Hi AleÅ¡, >> I am trying to boot OS from USB disk, I use coreboot-v4 with grub2 as >> payload, but my usb disk can not been >> detect. I try to use usb-keyboard, it is not working. I know you are >> working on the EHCI driver from Vladimir , >> could you give me some advices? Vladimir said it may need EHCI driver, >> but I think the usb device should run >> with low-speed or full-speed if no EHCI driver.C >> >> Looking forward to your reply. >> BRs, >> Rock Cui. >> >> > From MAILER-DAEMON Fri Aug 19 07:46:27 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QuNWt-0006UO-A9 for mharc-grub-devel@gnu.org; Fri, 19 Aug 2011 07:46:27 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuNWr-0006UI-Bp for grub-devel@gnu.org; Fri, 19 Aug 2011 07:46:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuNWq-0003Nf-8i for grub-devel@gnu.org; Fri, 19 Aug 2011 07:46:25 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]:41737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuNWq-0003NX-1K for grub-devel@gnu.org; Fri, 19 Aug 2011 07:46:24 -0400 Received: by pzk36 with SMTP id 36so5623568pzk.17 for ; Fri, 19 Aug 2011 04:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=Ody5p/pP516VN25AjLFm7s07FAD5uWqbfJEfPHfqRtE=; b=aw214BkuuZ/pmQv48G6dN01wPfXQkti2L5VsQrykZFBpLeQkB24N/AER0w5RhX96u0 wGTZTQhYIWPczQ9D7P5cUQ2fb5Lmi2VINsV6R4j043qZtdbG/Lq14fqfST9Rxaw33MYH VFcJrJSH6eH/DOWq5We9mAyVw5KFOFijVtxkc= Received: by 10.142.11.6 with SMTP id 6mr412373wfk.72.1313754382003; Fri, 19 Aug 2011 04:46:22 -0700 (PDT) Received: from shiva.selfip.org ([113.21.79.188]) by mx.google.com with ESMTPS id p7sm2280606pbn.17.2011.08.19.04.46.18 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Aug 2011 04:46:20 -0700 (PDT) Date: Fri, 19 Aug 2011 17:16:10 +0530 From: "J. Bakshi" To: The development of GRUB 2 Subject: can grub boot isolinux.bin file ? Message-ID: <20110819171610.77d53c2d@shiva.selfip.org> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.44 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: Fri, 19 Aug 2011 11:46:26 -0000 Hello list, I am trying to boot acronics true image .iso from grub. The .iso has inbuilt syslinux. After mounting the .iso with loopback I get a folder called isolinux and within that I get the following boot.cat isolinux.bin kernel.dat spl.lss bootmsg.txt isolinux.cfg ramdisk.da To call the syslinux , I have added the following in the grub.cfg menuentry "Acronics" { set isofile="/ATIBCD2010E.iso" loopback loop $isofile linux (loop)/isolinux/isolinux.bin } But during boot it shows error: file not found What may be the problem here ? TIA From MAILER-DAEMON Fri Aug 19 09:49:26 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QuPRu-00080L-9E for mharc-grub-devel@gnu.org; Fri, 19 Aug 2011 09:49:26 -0400 Received: from eggs.gnu.org ([140.186.70.92]:33787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuPRs-00080F-03 for grub-devel@gnu.org; Fri, 19 Aug 2011 09:49:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuPRq-0008Jy-VZ for grub-devel@gnu.org; Fri, 19 Aug 2011 09:49:23 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:35273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuPRq-0008Jl-TS for grub-devel@gnu.org; Fri, 19 Aug 2011 09:49:22 -0400 Received: by qwa26 with SMTP id 26so2548192qwa.0 for ; Fri, 19 Aug 2011 06:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=QcZdjT4Vjq/u75TNQ7dTRxDRYJDi9duKJMnZhT6S1g8=; b=IdjtaADCLGrMZi9EhhoYlyk8XANBD9434DGwbC7G6OnPrhVngGY/RW8D3g6LfQVPGK rbEV22suqhIcOTYsC/jzhbrnsxIhKpgVVq+sdBE04Aj4RwoD1EjVbdQf61eO3ZeGYtmD OqHDjEnfLZH/RxeY6PCg1BSjXSdKaZkOU3hzY= Received: by 10.224.214.3 with SMTP id gy3mr1972809qab.106.1313761761178; Fri, 19 Aug 2011 06:49:21 -0700 (PDT) MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.224.46.21 with HTTP; Fri, 19 Aug 2011 06:49:01 -0700 (PDT) In-Reply-To: <20110819171610.77d53c2d@shiva.selfip.org> References: <20110819171610.77d53c2d@shiva.selfip.org> From: Michal Suchanek Date: Fri, 19 Aug 2011 15:49:01 +0200 X-Google-Sender-Auth: ti80RPRM7qDUYXuBfd71W-Pwi4c Message-ID: Subject: Re: can grub boot isolinux.bin file ? To: The development of GNU GRUB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.41 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: Fri, 19 Aug 2011 13:49:24 -0000 On 19 August 2011 13:46, J. Bakshi wrote: > Hello list, > > I am trying to boot acronics true image .iso from grub. The .iso has inbu= ilt syslinux. > After mounting the .iso with loopback I get a folder called isolinux and = within > that I get the following > > boot.cat =C2=A0 =C2=A0 =C2=A0isolinux.bin =C2=A0kernel.dat =C2=A0 =C2=A0s= pl.lss > bootmsg.txt =C2=A0 isolinux.cfg =C2=A0ramdisk.da > > To call the syslinux , I have added the following in the grub.cfg > > menuentry "Acronics" { > set isofile=3D"/ATIBCD2010E.iso" > loopback loop $isofile > linux =C2=A0(loop)/isolinux/isolinux.bin > } > > But during boot it shows > > error: file not found > You probably want to look at the syslinux.cfg and use whatever is in there to construct the grub menu entry. HTH Michal From MAILER-DAEMON Sat Aug 20 17:45:52 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QutMW-0004hG-D0 for mharc-grub-devel@gnu.org; Sat, 20 Aug 2011 17:45:52 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QutMU-0004fc-2T for grub-devel@gnu.org; Sat, 20 Aug 2011 17:45:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QutMS-0005CJ-CD for grub-devel@gnu.org; Sat, 20 Aug 2011 17:45:50 -0400 Received: from smtp-out3.iol.cz ([194.228.2.91]:47363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QutMR-0005Bq-Vb for grub-devel@gnu.org; Sat, 20 Aug 2011 17:45:48 -0400 Received: from antivir5.iol.cz (unknown [192.168.30.212]) by smtp-out3.iol.cz (Postfix) with ESMTP id 2A6DFBC83F4 for ; Sat, 20 Aug 2011 21:45:44 +0000 (UTC) Received: from localhost (antivir5.iol.cz [127.0.0.1]) by antivir5.iol.cz (Postfix) with ESMTP id 186631E805B for ; Sat, 20 Aug 2011 23:45:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at iol.cz Received: from antivir5.iol.cz ([127.0.0.1]) by localhost (antivir5.iol.cz [127.0.0.1]) (amavisd-new, port 10224) with LMTP id 1VCdysSDXWDL for ; Sat, 20 Aug 2011 23:45:43 +0200 (CEST) Received: from port8.iol.cz (unknown [192.168.30.98]) by antivir5.iol.cz (Postfix) with ESMTP id D73721E805D for ; Sat, 20 Aug 2011 23:45:43 +0200 (CEST) X-SBRS: None X-SBRS-none: None X-RECVLIST: MTA-OUT-IOL X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArsNALQqUE5VRnXk/2dsb2JhbAAMNYRLeaUIAQEEJAQLAUsUFAgCJgIvHBQTh3GoD5BCgSyEDIEQBKQM Received: from 228.117.broadband3.iol.cz (HELO [192.168.8.160]) ([85.70.117.228]) by port8.iol.cz with ESMTP; 20 Aug 2011 23:45:42 +0200 Subject: [Fwd: [Resolved] Grub2 can not detect usb disk] From: =?UTF-8?Q?Ale=C5=A1?= Nesrsta To: The development of GNU GRUB Content-Type: text/plain; charset="UTF-8" Date: Sat, 20 Aug 2011 23:45:41 +0200 Message-ID: <1313876741.5634.49.camel@pracovna> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 194.228.2.91 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: Sat, 20 Aug 2011 21:45:51 -0000 Hi everybody, could anybody test changes from Cui Lei (see below) in uhci.c - if they are generally working and does not have some negative effect on machines with "normal" BIOS etc. ? Maybe such changes are related only to coreboot and some special use case/platform, but probably they are related to needed change of UHCI controller ownership and should be included into uhci.c code. Regards, Ales -------- P=C5=99eposlan=C3=A1 zpr=C3=A1va -------- Od: Cui Lei Komu: Ale=C5=A1 Nesrsta Kopie: The development of GNU GRUB P=C5=99edm=C4=9Bt: [Resolved] Grub2 can not detect usb disk Datum: Fri, 19 Aug 2011 10:58:00 +0800 Thank you for your help, very much! ^_^ This problem have been resolved and I can usb the usb_keyborard under=20 grub-shell and I can boot ubuntu11.04 from usb disk. My mainboard is via 8595a, the usb controller is uhci. I resolved it by add these code in the grub-core/bus/usb/uhci.c: (1) 182 /*Set bus master*/ 183 addr =3D grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND); 184 grub_uint16_t val =3D grub_pci_read_word(addr); 185 val =3D (val & ~0) | GRUB_PCI_COMMAND_BUS_MASTER; 186 grub_pci_write_word(addr, val); (2) 203 // Reset PIRQ and SMI 204 addr =3D grub_pci_make_address (dev, 0xC0); =20 //USBLEGSUP 0xc0 205 grub_pci_write_word(addr, 0x8f00); //USBLEGSUP_RWC =20 0x8f00 /* the R/WC bits */ 206 // Reset the HC 207 grub_uhci_writereg16(u, GRUB_UHCI_REG_USBCMD, 0x0002);=20 //USBCMD_HCRESET 0x0002 208 grub_millisleep(5); 209 // Disable interrupts and commands (just to be safe). 210 grub_outw (0, u->iobase + 4); //USBINTR 4 /*Interrupt=20 enable register*/ 211 grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 0); I don't know whether it is useful to the other one, but may be a referenc= e. BRs, Rock. > Hi, > > I am afraid, I maybe will not help You too much but I try it: > > I shortly looked into ML to Your posts. As I saw short part of debug > output in one of Your e-mail, GRUB freezes when it wants to get device > descriptor - more precisely, when it requests first 8 bytes of device > descriptor. It is the first thing which is done after address is > assigned to the device. > > So, it looks like device does not set address properly (even if control > message Set Address returns success) or happened something else what > prevent device to respond (but I don't know what...). > > For the first try You can increase related delays in usbhub.c: > > ... > /* Wait "recovery interval", spec. says 2ms */ > grub_millisleep (2);<<<<---- HERE (try 4ms or more) > > grub_usb_device_attach (dev); > ... > > ... > /* Enable the port. */ > err =3D hub->controller->dev->portstatus (hub->controller, portno, 1= ); > if (err) > return; > hub->controller->dev->pending_reset =3D grub_get_time_ms () + 5000; > > grub_millisleep (10);<<<<---- maybe here also > > /* Enable the port and create a device. */ > dev =3D grub_usb_hub_add_dev (hub->controller, speed, portno, 0); > hub->controller->dev->pending_reset =3D 0; > if (! dev) > return; > ... > > If this will not help You, I currently have no other idea what could be > the reason of timeout. > I think You don't need EHCI because it looks like Set Address control > message works (at least it does not return error), i.e. You probably > have OHCI or UHCI USB (companion) controller on computer and Your devic= e > is working at full or low speed with Your USB controller. > > By the way, for the first look into ML I did not find which USB > controller You have - OHCI/UHCI ? (which driver/module are You using - > ohci/uhci?) - and which machine/architecture is the computer You are > trying to boot with GRUB2 - ? > I sometimes had some unidentified problems on my UHCI/EHCI controller, > mostly with port powering - UHCI does not have power management but EHC= I > does and if EHCI is not properly initialized by BIOS (it could be Your > case with coreboot, maybe ?) then USB ports are not properly powered. > Another BIOS (coreboot?) issue could be improper handling of USB > controller ownership. > > Do You have USB device connected directly into root port or via some US= B > hub ? Try to do it in opposite way (i.e. if You are not using the USB > hub, try use it and connect USB device via hub - maybe it helps...) > > Hmmm, I remember now one issue which could be related to Your problem. > On my very old machine with OHCI USB controller some devices are not > working "for the first time". I am still not able to debug why it > happened (it does not happened when full debug is active - so it looks > like it is related to some timing). But I am afraid it will be not Your > case because device stops working after it is recognized, configured, > usbms module loaded and GRUB USB device usb0 created. > But - try load ohci/uhci module when USB disk is connected and then > disconnect and connect it again after few seconds. In my case device > becomes working as new usb device (i.e. usb1). > > Additionally, lot of manufacturers does not follow USB or USBMS > specifications, as You can read in Linux source code of USB controllers > and USB mass storage devices and related documentation. > Did You tried more different USB mass storage devices ? > What is manufacturer& type of Your USB mass storage device ? > > Of course, You can also try EHCI driver, it maybe can solve Your proble= m > because of little bit different ports/devices handling. But EHCI driver > is currently highly experimental, it still exists only as uncorrected > and not accepted "patch". I have to do some improvement but I don't hav= e > sufficient time still, unfortunately... > If You want try to use it, You can get my patch from ML (sent at > 25.6.2011) and use it with related source code trunk branch revision > (maybe also any later or current revision, because USB parts of GRUB ar= e > not frequently changed). Please also read about know issue and another > limitations of the "zero version" of EHCI driver - e.g. it may not work > if Your PC is not x86 machine or USB registers are mapped above 4GB etc= . > > Sorry if You will wait longer time for my response in future - I don't > check the post so often and additionally currently I am (and probably > will be) longer time too busy - I am not regular GRUB2 contributor, I d= o > something for GRUB2 USB part only time to time... > > BRs, > Ales > > > Cui Lei p=C3=AD=C5=A1e v =C3=9At 09. 08. 2011 v 11:05 +0800: >> Hi Ale=C5=A1, >> I am trying to boot OS from USB disk, I use coreboot-v4 with grub2 as >> payload, but my usb disk can not been >> detect. I try to use usb-keyboard, it is not working. I know you are >> working on the EHCI driver from Vladimir , >> could you give me some advices? Vladimir said it may need EHCI driver, >> but I think the usb device should run >> with low-speed or full-speed if no EHCI driver.C >> >> Looking forward to your reply. >> BRs, >> Rock Cui. >> >> > From MAILER-DAEMON Sat Aug 20 20:25:14 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Quvqk-0005yG-SM for mharc-grub-devel@gnu.org; Sat, 20 Aug 2011 20:25:14 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Quvqg-0005up-TG for grub-devel@gnu.org; Sat, 20 Aug 2011 20:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Quvqf-0006xj-AW for grub-devel@gnu.org; Sat, 20 Aug 2011 20:25:10 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:44089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Quvqf-0006xE-5K for grub-devel@gnu.org; Sat, 20 Aug 2011 20:25:09 -0400 Received: by fxg9 with SMTP id 9so3242807fxg.0 for ; Sat, 20 Aug 2011 17:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type; bh=z0sUms9ei2eClCxZcWmhuXscNCwBS2+s0W9I+4pxNhk=; b=HOF/8cgxypby4OMsA7Njw7VGesQic+/n5EevYiC2JDw01nZob6DTPG2f0NXE5lcMDO oaU4ov05/fteXAFCCM23egIQdEvS/V8nv7R1P+gfGs3M6Urm3z117PHuJUw5pER5gAf3 Ec0v0D9ni7ErHhx4cUhqihP/yh05Uf9OWVqm0= Received: by 10.223.56.80 with SMTP id x16mr1356266fag.36.1313886306218; Sat, 20 Aug 2011 17:25:06 -0700 (PDT) Received: from debian.x201.phnet (44-141.62-81.cust.bluewin.ch [81.62.141.44]) by mx.google.com with ESMTPS id 25sm3721389fay.7.2011.08.20.17.25.03 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 20 Aug 2011 17:25:04 -0700 (PDT) Message-ID: <4E50505D.1050306@gmail.com> Date: Sun, 21 Aug 2011 02:25:01 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Iceowl/1.0b2 Icedove/3.1.11 MIME-Version: 1.0 To: The development of GRUB 2 , =?UTF-8?B?R3LDqWdvaXJl?= =?UTF-8?B?IFN1dHJl?= Subject: [RFC, RFT] LDM ("Dynamic disk") support X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig1B2DB237648C0AAF0D6DA725" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.41 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: Sun, 21 Aug 2011 00:25:11 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1B2DB237648C0AAF0D6DA725 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, all. I've implemented LDM ("Dynamic disk") support. It allows to easily have dual-bootable RAIDed volumes. I've tested only with simple volumes but it should work with spanned, mirrored and mirrored-spanned ones but not with stripped or RAID5 (TODO, use separate /boot for now). I've pushed it to http://bzr.savannah.gnu.org/lh/grub/branches/ldm/changes. I've also successfully installed GRUB to a LDM. For this we need a small (1M) simple volume on boot disk for embedding similar to what we have on GPT. In my test I've just manually set it to use "Volume5". This obviously isn't appropriate for deployement. So we need a way to choose embedding partition. The ways I see are: 1) Let user specify. While seems to make sense in prectice it would mean that user choice is stored somewhere and on disk manipulations it may get out of sync and result in data loss on next install. 2) Use the partition type field. On LDM it's only one byte so it's more difficult to choose an unique id. But more importantly Windows Disk Manager tools allow only to choose either type NTFS or FAT and I'm not aware of any other LDM-editing tools (but would be happy to be wrong about this) which makes it difficult for end user to mark his embedding partition. 3) Use a partition with FS which supports embedding. BtrFS and FAT (specifically formatted with large number of reserved sectors) are likely candidates and additionally allow to host GRUB files or even an entire OS. However, it's difficult to check that its embedding zone isn't in use by some other booting tool since we don't know if we have ownership of any sense of the partition in question. 4) Use some kind of marker in the partition itself and supply a tool to set this marker. Seems to be the most attractive choice. But we need to ensure that this marker is destroyed if partition is formatted in any of the FS or partitioned with common formats. We could just fill sectors with string "GRUB". To cover just the FS supported in GRUB we need to fill following ones: 0 (FAT, NTFS, AFFS, XFS,romfs,SFS,SquashFS,UFS,msdos,gpt,apple,dvh,Sun), 1 (BFS, BSD,sunpc), 2 (AFS, EXT*, HFS, HFS+, minix, nilfs2), 6 (Acorn), 0-15 (amiga), 16 (UFS), 32 (ZFS), 64 (ISO9660, JFS), 128 (BtrFS, reiserfs, UFS), 256 (UDF), 512 (UDF,UFS), 1024(UDF), 2048 (UDF), 4096 (UDF), 8192 (UDF) It seems that FS devs like using powers of 2. So to avoid storing this sequence and future robustness I propose to fill sectors 0-32 (16KiB) and all powers of 2 until 8192. It results in some need for fragmented blocklists but it's not too bad. Also whichever method we choose I also intend to apply it to various bsd cases as well. --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig1B2DB237648C0AAF0D6DA725 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk5QUF0ACgkQNak7dOguQgnaoAD8Dey7brXITQI4WHR9LpannhWL UT6wq3vUUiZGN0AL+4cA/jOBYmf0hgp0ZlYLSSoshZxagNUvhRcti/OjIjv9CJCu =OwrZ -----END PGP SIGNATURE----- --------------enig1B2DB237648C0AAF0D6DA725-- From MAILER-DAEMON Sat Aug 20 20:27:50 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QuvtG-0006js-S0 for mharc-grub-devel@gnu.org; Sat, 20 Aug 2011 20:27:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuvtC-0006ca-CT for grub-devel@gnu.org; Sat, 20 Aug 2011 20:27:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuvtB-0007Jf-Dw for grub-devel@gnu.org; Sat, 20 Aug 2011 20:27:46 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:48878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuvtB-0007Jb-5B for grub-devel@gnu.org; Sat, 20 Aug 2011 20:27:45 -0400 Received: by fxg9 with SMTP id 9so3243567fxg.0 for ; Sat, 20 Aug 2011 17:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=Qt2FNiVqEA8Z6tHitrWYPVlaVzoY0PCcQAGnoz67d/s=; b=BiYVw5dpOEpFayWIP9j+Vw+MM3D3LaTqEBajXIowZSBC/eeQTDjMTxTX2BPzX/AE4W b237IgFL10Fpt8+wF6Qyv+32FTR2YI4tytMRGjCAA4D93ZleXzP9ufwDLxw/Nkyr2xcW 4opZnGCOBI4Tk9wO6NkCvfCc/xhEzfjUYjQgw= Received: by 10.223.62.7 with SMTP id v7mr572570fah.148.1313886464495; Sat, 20 Aug 2011 17:27:44 -0700 (PDT) Received: from debian.x201.phnet (44-141.62-81.cust.bluewin.ch [81.62.141.44]) by mx.google.com with ESMTPS id 22sm3811936fat.17.2011.08.20.17.27.42 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 20 Aug 2011 17:27:43 -0700 (PDT) Message-ID: <4E5050FC.8080503@gmail.com> Date: Sun, 21 Aug 2011 02:27:40 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Iceowl/1.0b2 Icedove/3.1.11 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Loongson 2E support available (was Re: Loongson 2E boot failure) References: <20110726131229.GA30427@riva.dynamic.greenend.org.uk> <20110726152502.GA3028@riva.dynamic.greenend.org.uk> <4E2EE59C.8080305@gmail.com> <20110726161932.GB3028@riva.dynamic.greenend.org.uk> <4E4522C1.9010508@gmail.com> <20110813103231.GP2657@mails.so.argh.org> In-Reply-To: <20110813103231.GP2657@mails.so.argh.org> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigDFD545CEE80A75338A5EEE77" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.41 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: Sun, 21 Aug 2011 00:27:47 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDFD545CEE80A75338A5EEE77 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable As a followup: we fixed the issues on IRC and now it's committed upstream= =2E > No real behaviour change - still fails within grub_font_init (using > the for(;;);-method). > Was bad compile option (-march=3Dloongson2f) --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigDFD545CEE80A75338A5EEE77 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk5QUPwACgkQNak7dOguQgmh8AD9GwoOZUjI8rswqMZRG4iZkg5X K2taF7Dg9z2fKvzy0vsBAKzpGoUPOrJBgKNtU9YRUTRBDrG58b0FRm80Y6D5V05m =rz4t -----END PGP SIGNATURE----- --------------enigDFD545CEE80A75338A5EEE77-- From MAILER-DAEMON Sat Aug 20 23:52:49 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Quz5d-00089C-Dp for mharc-grub-devel@gnu.org; Sat, 20 Aug 2011 23:52:49 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Quz5X-00086a-Ft for grub-devel@gnu.org; Sat, 20 Aug 2011 23:52:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Quz5S-0000Su-TV for grub-devel@gnu.org; Sat, 20 Aug 2011 23:52:43 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]:33280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Quz5S-0000So-Nz for grub-devel@gnu.org; Sat, 20 Aug 2011 23:52:38 -0400 Received: by pzk36 with SMTP id 36so8273313pzk.17 for ; Sat, 20 Aug 2011 20:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=Ody5p/pP516VN25AjLFm7s07FAD5uWqbfJEfPHfqRtE=; b=aw214BkuuZ/pmQv48G6dN01wPfXQkti2L5VsQrykZFBpLeQkB24N/AER0w5RhX96u0 wGTZTQhYIWPczQ9D7P5cUQ2fb5Lmi2VINsV6R4j043qZtdbG/Lq14fqfST9Rxaw33MYH VFcJrJSH6eH/DOWq5We9mAyVw5KFOFijVtxkc= Received: by 10.142.149.13 with SMTP id w13mr736222wfd.362.1313898430038; Sat, 20 Aug 2011 20:47:10 -0700 (PDT) Received: from shiva.selfip.org ([113.21.71.72]) by mx.google.com with ESMTPS id f8sm3436455pbk.86.2011.08.20.20.47.07 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 20 Aug 2011 20:47:09 -0700 (PDT) Date: Fri, 19 Aug 2011 17:16:10 +0530 From: "J. Bakshi" To: The development of GRUB 2 Subject: can grub boot isolinux.bin file ? Message-ID: <20110819171610.77d53c2d@shiva.selfip.org> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.44 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: Sun, 21 Aug 2011 03:52:48 -0000 Hello list, I am trying to boot acronics true image .iso from grub. The .iso has inbuilt syslinux. After mounting the .iso with loopback I get a folder called isolinux and within that I get the following boot.cat isolinux.bin kernel.dat spl.lss bootmsg.txt isolinux.cfg ramdisk.da To call the syslinux , I have added the following in the grub.cfg menuentry "Acronics" { set isofile="/ATIBCD2010E.iso" loopback loop $isofile linux (loop)/isolinux/isolinux.bin } But during boot it shows error: file not found What may be the problem here ? TIA From MAILER-DAEMON Sun Aug 21 03:17:39 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qv2Hq-0007aw-W5 for mharc-grub-devel@gnu.org; Sun, 21 Aug 2011 03:17:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qv2Hl-0007XZ-Q0 for grub-devel@gnu.org; Sun, 21 Aug 2011 03:17:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qv2Hi-0008NO-En for grub-devel@gnu.org; Sun, 21 Aug 2011 03:17:33 -0400 Received: from mail-yx0-f169.google.com ([209.85.213.169]:37098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qv2Hi-0008NK-6w for grub-devel@gnu.org; Sun, 21 Aug 2011 03:17:30 -0400 Received: by yxn35 with SMTP id 35so2329346yxn.0 for ; Sun, 21 Aug 2011 00:17:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type; bh=nTQNFADvqG7iACrZxwsDE0w+q8H6TitSLXktwdaKqzo=; b=m1xpCN86YPHzZSZnlNMP26GnTPBcrEURHpC/pZaf8cvT3NUC5afRdISiCGfObNeF5Y NTSYbbVrwCj1UYkaXfA9w0LIBDMPoA+5mRa8uToHuFTjS5btdilPit9x0JKuiBt3m/mG 0oL7ZJ+mkvPxRPqn137/qTTyEWx3FSJKl67FA= Received: by 10.150.150.17 with SMTP id x17mr1122347ybd.383.1313911049475; Sun, 21 Aug 2011 00:17:29 -0700 (PDT) Received: from [192.168.1.106] (c114-77-214-254.rivrw3.nsw.optusnet.com.au [114.77.214.254]) by mx.google.com with ESMTPS id l2sm4135373anm.24.2011.08.21.00.17.26 (version=SSLv3 cipher=OTHER); Sun, 21 Aug 2011 00:17:28 -0700 (PDT) Message-ID: <4E50B103.7070902@gmail.com> Date: Sun, 21 Aug 2011 17:17:23 +1000 From: David Joshua Geary User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110419 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Request for review of attached patches for hybrid GPT/MBR X-Enigmail-Version: 1.1.2 Content-Type: multipart/mixed; boundary="------------020006020604060506030007" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.169 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: Sun, 21 Aug 2011 07:17:36 -0000 This is a multi-part message in MIME format. --------------020006020604060506030007 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 with aim for inclusion in mainline Grub2. Grub2 1.99 is base. Patches to gpt.c and msdos.c in /grub-core/partmap/. Diffs attached with original code and patched code. Goal: To make the disk bootable on: PCs using BIOS, PCs using UEFI, Intel Macintoshes using BIOS, and Intel Macintoshes using EFI, as well as having the (HybridData) partition readable by both Windows and MacOSX. ExaExample partition layout:mple partition layout: Physical: MBR GPT (HybridData) (EFI) (BIOS) MBR: 1: 0C (FAT32) : FAT32 (HybridData) 2: EF (EFI) : FAT32 (EFI) 3: EE (GPT) : (Protective) GPT: 1: 0700 (Data) : FAT32 (HybridData) 2: ef00 (EFI) : FAT32 (EFI) 3: 0f02 (BIOS) : Unformatted (BIOS) Current behaviour: Grub2 detects an MBR and checks if the first MBR primary partition is GPT protective partition. The first MBR primary partition is not a GPT protective partition, so it treats the disk as a pure MBR disk and so refuses to install the boot loader kernel in the post-MBR gap because there is no post-MBR gap because it is taken by GPT protective partition. Proposed behaviour: Grub2 detects an MBR and checks if any of the MBR primary partitions are GPT protective partitions. It finds a GPT protective partition (MBR primary partition 3 in the example), and concludes that the disk is a GPT disk and looks for a BIOS boot partition (Hah!IdontNeedEFI) (GPT partition 3 in the example) in which to install the boot loader kernel. Questions, Comments, and Feedback welcome. See also: http://perditauranus.dyndns.org/tdiary/?date=20110803 See also: http://www.rodsbooks.com/gdisk/hybrid.html#bootloaders - -- David Joshua Geary UNE Linux User Group: linux@une.edu.au I don't care what software you use so long as we only exchange files in open data formats Open-Document Ogg PDF - -----BEGIN PGP PUBLIC KEY BLOCK----- Version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yiyg8ASdS8HPIs8Njw4CppfWX5Ds5NgwF5OALlYHkIKjn07Kc +bGO+WWJvnZfo2fdjgPPs4ECaJL7L5RuVuy26QnPMLgAUNJLgGjugGoE0pOLSwmj f3xOB4GlowARAQABiQIfBBgBAgAJBQJNCWOeAhsMAAoJEMR6DgDuR4If6LAQAIAx WHngmPZ1vzraRVadFnQrYr4bpBT+Hznwm91HtAup8HgutSiulOY1Kbpra1avjmQi MYCRQqDeOsFGirOomterbU18sXX7YBFbAT0c+rHoSdtFP2JTkSzN0Ocs1mZZuLfu Dw/DSAaxlpkKQUJ5xn+qAOPr0fX2HbNcTc9kKYPNJJ9n7WtPhG6hC7ehjHis2jSz Am3Ik+5gNZjaNkHsanaGTfx3mo/jf2AUGydB2quYPz8DFyTYN6q+VZ6+Vzy08RGz MLWwM/SSMhT+GXrhSeuAiO26a70T0XTbhliccUDlG6ORPQ+ydzkffNQB35OfIkbA +SoiDf1txduWDeJxblZ3feYqwBcjBBJU/ofEigH32z0ZOsFpWcJTsXSB2RyoJT+Y Pb426uZYYTi2ZtWGcDtwRzK2lXM3WIHnoduFY5LIXq51c+cP2u8a461pmrlTvixE y+IfX/zHfvSUnJDpnO4sA770oCHBUsbmU14oPdr+Kla67jqpjujap1ITRA96bcNm K7O3vOKqbkAoy4w9ogCbBHrH1/8M+iRWA+0Iim+zhYSeEmjLszeecII9MH3u8CS0 DjLhpLrX6WG7F9fr0xAnc3Dui+qBm/q1dKenCKauUYWRgDPUXzP32oIiw/bXBp/4 qKbhUOJTXVVns4OnvPNzFoCvcNS6G/3ZGlX/6duU =kv+y - -----END PGP PUBLIC KEY BLOCK----- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOULD7AAoJEMR6DgDuR4If/vkP/3K3gczRr5LpChbtDKuDdu3/ SGCtRahsnwsR9hmyxwCRKjuiYFDFw+K7aybX/bI9doJxQfR3rL5rclgkuvxvl4nK fhEF+FmIANVvAHVQU4rJNHu1xpxgwplJ2AhBpuNbMWyyVrA8yBwezEgd1YYDedMs tf2G1e4HW+RYvF1oqDZARhJpfgXZJW1oqeVrNA8ZBdyj05nVDm8yB7Os3JawsFE9 E9fvypowlydLDzM1U//3a4CjJ8Q09QTa0GzGiE07pCOWENEehdW2pDJXnQB/BXUY 91FxIcLsMXuY5qg2PVaEOpYt8yQsAVzqNEYX/0nPHf5/++jOtLUiYgXRtd/vq+90 l7kYxo1rm+sRusmy2y0S5BKD8LsqB/I8Y/PP0vKwkKujzFKTcbYRKxyqTvgFLyia HopvTZxEwLzvjsn9k2h2kDYVYOXnMiylpyyMlWBlT1J5xwS70RsVlGwfxYqebpLg S6FZBN9SU20SX7LaRcGwedfjhrHAJk5MLvy3m8cuECZp7HZr3fzBe/a4hJfiD2dG nqHNiDhAFSJLh6lRCELO0noMVLfuJ5nsdubIi0esWIBLrf0aGmkwUwWu+w+txfdU T3YpKfPzCrnnVDV1jc81uuXrnKrKMyQTpd33fnd3Rc5DpnvgBhlkN8WyeljA/lqo 2XLjGbJyhTZjlIh3SJG0 =/0rL -----END PGP SIGNATURE----- --------------020006020604060506030007 Content-Type: text/x-csrc; name="gpt.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gpt.c" /* gpt.c - Read GUID Partition Tables (GPT). */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2002,2005,2006,2007,2008 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GRUB is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GRUB. If not, see . */ #include #include #include #include #include #include #include GRUB_MOD_LICENSE ("GPLv3+"); static grub_uint8_t grub_gpt_magic[8] = { 0x45, 0x46, 0x49, 0x20, 0x50, 0x41, 0x52, 0x54 }; static const grub_gpt_part_type_t grub_gpt_partition_type_empty = GRUB_GPT_PARTITION_TYPE_EMPTY; #ifdef GRUB_UTIL static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT; #endif /* 512 << 7 = 65536 byte sectors. */ #define MAX_SECTOR_LOG 7 static struct grub_partition_map grub_gpt_partition_map; static grub_err_t gpt_partition_map_iterate (grub_disk_t disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) { struct grub_partition part; struct grub_gpt_header gpt; struct grub_gpt_partentry entry; struct grub_msdos_partition_mbr mbr; grub_uint64_t entries; unsigned int i; int last_offset = 0; int sector_log = 0; /* Read the protective MBR. */ if (grub_disk_read (disk, 0, 0, sizeof (mbr), &mbr)) return grub_errno; /* Check if it is valid. */ if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE)) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); /* Make sure the MBR is a protective or hybrid MBR and not a normal MBR. */ for (i = 0; i < 4; ++i) if (mbr.entries[i].type != GRUB_PC_PARTITION_TYPE_GPT_DISK) { break; } if (i == 4) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no GPT partition map found"); /* Read the GPT header. */ for (sector_log = 0; sector_log < MAX_SECTOR_LOG; sector_log++) { if (grub_disk_read (disk, 1 << sector_log, 0, sizeof (gpt), &gpt)) return grub_errno; if (grub_memcmp (gpt.magic, grub_gpt_magic, sizeof (grub_gpt_magic)) == 0) break; } if (sector_log == MAX_SECTOR_LOG) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no valid GPT header"); grub_dprintf ("gpt", "Read a valid GPT header\n"); entries = grub_le_to_cpu64 (gpt.partitions) << sector_log; for (i = 0; i < grub_le_to_cpu32 (gpt.maxpart); i++) { if (grub_disk_read (disk, entries, last_offset, sizeof (entry), &entry)) return grub_errno; if (grub_memcmp (&grub_gpt_partition_type_empty, &entry.type, sizeof (grub_gpt_partition_type_empty))) { /* Calculate the first block and the size of the partition. */ part.start = grub_le_to_cpu64 (entry.start) << sector_log; part.len = (grub_le_to_cpu64 (entry.end) - grub_le_to_cpu64 (entry.start) + 1) << sector_log; part.offset = entries; part.number = i; part.index = last_offset; part.partmap = &grub_gpt_partition_map; part.parent = disk->partition; grub_dprintf ("gpt", "GPT entry %d: start=%lld, length=%lld\n", i, (unsigned long long) part.start, (unsigned long long) part.len); if (hook (disk, &part)) return grub_errno; } last_offset += grub_le_to_cpu32 (gpt.partentry_size); if (last_offset == GRUB_DISK_SECTOR_SIZE) { last_offset = 0; entries++; } } return GRUB_ERR_NONE; } #ifdef GRUB_UTIL static grub_err_t gpt_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors, grub_embed_type_t embed_type, grub_disk_addr_t **sectors) { grub_disk_addr_t start = 0, len = 0; unsigned i; grub_err_t err; auto int NESTED_FUNC_ATTR find_usable_region (grub_disk_t disk, const grub_partition_t p); int NESTED_FUNC_ATTR find_usable_region (grub_disk_t disk __attribute__ ((unused)), const grub_partition_t p) { struct grub_gpt_partentry gptdata; disk->partition = p->parent; if (grub_disk_read (disk, p->offset, p->index, sizeof (gptdata), &gptdata)) return 0; /* If there's an embed region, it is in a dedicated partition. */ if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16)) { start = p->start; len = p->len; return 1; } return 0; } if (embed_type != GRUB_EMBED_PCBIOS) return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "GPT curently supports only PC-BIOS embedding"); err = gpt_partition_map_iterate (disk, find_usable_region); if (err) return err; if (len == 0) return grub_error (GRUB_ERR_FILE_NOT_FOUND, "This GPT partition label has no BIOS Boot Partition;" " embedding won't be possible!"); if (len < *nsectors) return grub_error (GRUB_ERR_OUT_OF_RANGE, "Your BIOS Boot Partition is too small;" " embedding won't be possible!"); *nsectors = len; *sectors = grub_malloc (*nsectors * sizeof (**sectors)); if (!*sectors) return grub_errno; for (i = 0; i < *nsectors; i++) (*sectors)[i] = start + i; return GRUB_ERR_NONE; } #endif /* Partition map type. */ static struct grub_partition_map grub_gpt_partition_map = { .name = "gpt", .iterate = gpt_partition_map_iterate, #ifdef GRUB_UTIL .embed = gpt_partition_map_embed #endif }; GRUB_MOD_INIT(part_gpt) { grub_partition_map_register (&grub_gpt_partition_map); } GRUB_MOD_FINI(part_gpt) { grub_partition_map_unregister (&grub_gpt_partition_map); } --------------020006020604060506030007 Content-Type: text/x-patch; name="gpt.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gpt.c.diff" 70,71c70,75 < /* Make sure the MBR is a protective MBR and not a normal MBR. */ < if (mbr.entries[0].type != GRUB_PC_PARTITION_TYPE_GPT_DISK) --- > /* Make sure the MBR is a protective or hybrid MBR and not a normal MBR. */ > for (i = 0; i < 4; ++i) > if (mbr.entries[i].type != GRUB_PC_PARTITION_TYPE_GPT_DISK) { > break; > } > if (i == 4) --------------020006020604060506030007 Content-Type: text/plain; name="gpt.c.original" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gpt.c.original" /* gpt.c - Read GUID Partition Tables (GPT). */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2002,2005,2006,2007,2008 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GRUB is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GRUB. If not, see . */ #include #include #include #include #include #include #include GRUB_MOD_LICENSE ("GPLv3+"); static grub_uint8_t grub_gpt_magic[8] = { 0x45, 0x46, 0x49, 0x20, 0x50, 0x41, 0x52, 0x54 }; static const grub_gpt_part_type_t grub_gpt_partition_type_empty = GRUB_GPT_PARTITION_TYPE_EMPTY; #ifdef GRUB_UTIL static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT; #endif /* 512 << 7 = 65536 byte sectors. */ #define MAX_SECTOR_LOG 7 static struct grub_partition_map grub_gpt_partition_map; static grub_err_t gpt_partition_map_iterate (grub_disk_t disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) { struct grub_partition part; struct grub_gpt_header gpt; struct grub_gpt_partentry entry; struct grub_msdos_partition_mbr mbr; grub_uint64_t entries; unsigned int i; int last_offset = 0; int sector_log = 0; /* Read the protective MBR. */ if (grub_disk_read (disk, 0, 0, sizeof (mbr), &mbr)) return grub_errno; /* Check if it is valid. */ if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE)) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); /* Make sure the MBR is a protective MBR and not a normal MBR. */ if (mbr.entries[0].type != GRUB_PC_PARTITION_TYPE_GPT_DISK) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no GPT partition map found"); /* Read the GPT header. */ for (sector_log = 0; sector_log < MAX_SECTOR_LOG; sector_log++) { if (grub_disk_read (disk, 1 << sector_log, 0, sizeof (gpt), &gpt)) return grub_errno; if (grub_memcmp (gpt.magic, grub_gpt_magic, sizeof (grub_gpt_magic)) == 0) break; } if (sector_log == MAX_SECTOR_LOG) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no valid GPT header"); grub_dprintf ("gpt", "Read a valid GPT header\n"); entries = grub_le_to_cpu64 (gpt.partitions) << sector_log; for (i = 0; i < grub_le_to_cpu32 (gpt.maxpart); i++) { if (grub_disk_read (disk, entries, last_offset, sizeof (entry), &entry)) return grub_errno; if (grub_memcmp (&grub_gpt_partition_type_empty, &entry.type, sizeof (grub_gpt_partition_type_empty))) { /* Calculate the first block and the size of the partition. */ part.start = grub_le_to_cpu64 (entry.start) << sector_log; part.len = (grub_le_to_cpu64 (entry.end) - grub_le_to_cpu64 (entry.start) + 1) << sector_log; part.offset = entries; part.number = i; part.index = last_offset; part.partmap = &grub_gpt_partition_map; part.parent = disk->partition; grub_dprintf ("gpt", "GPT entry %d: start=%lld, length=%lld\n", i, (unsigned long long) part.start, (unsigned long long) part.len); if (hook (disk, &part)) return grub_errno; } last_offset += grub_le_to_cpu32 (gpt.partentry_size); if (last_offset == GRUB_DISK_SECTOR_SIZE) { last_offset = 0; entries++; } } return GRUB_ERR_NONE; } #ifdef GRUB_UTIL static grub_err_t gpt_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors, grub_embed_type_t embed_type, grub_disk_addr_t **sectors) { grub_disk_addr_t start = 0, len = 0; unsigned i; grub_err_t err; auto int NESTED_FUNC_ATTR find_usable_region (grub_disk_t disk, const grub_partition_t p); int NESTED_FUNC_ATTR find_usable_region (grub_disk_t disk __attribute__ ((unused)), const grub_partition_t p) { struct grub_gpt_partentry gptdata; disk->partition = p->parent; if (grub_disk_read (disk, p->offset, p->index, sizeof (gptdata), &gptdata)) return 0; /* If there's an embed region, it is in a dedicated partition. */ if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16)) { start = p->start; len = p->len; return 1; } return 0; } if (embed_type != GRUB_EMBED_PCBIOS) return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "GPT curently supports only PC-BIOS embedding"); err = gpt_partition_map_iterate (disk, find_usable_region); if (err) return err; if (len == 0) return grub_error (GRUB_ERR_FILE_NOT_FOUND, "This GPT partition label has no BIOS Boot Partition;" " embedding won't be possible!"); if (len < *nsectors) return grub_error (GRUB_ERR_OUT_OF_RANGE, "Your BIOS Boot Partition is too small;" " embedding won't be possible!"); *nsectors = len; *sectors = grub_malloc (*nsectors * sizeof (**sectors)); if (!*sectors) return grub_errno; for (i = 0; i < *nsectors; i++) (*sectors)[i] = start + i; return GRUB_ERR_NONE; } #endif /* Partition map type. */ static struct grub_partition_map grub_gpt_partition_map = { .name = "gpt", .iterate = gpt_partition_map_iterate, #ifdef GRUB_UTIL .embed = gpt_partition_map_embed #endif }; GRUB_MOD_INIT(part_gpt) { grub_partition_map_register (&grub_gpt_partition_map); } GRUB_MOD_FINI(part_gpt) { grub_partition_map_unregister (&grub_gpt_partition_map); } --------------020006020604060506030007 Content-Type: text/x-csrc; name="msdos.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="msdos.c" /* pc.c - Read PC style partition tables. */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2002,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GRUB is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GRUB. If not, see . */ #include #include #include #include #include #include GRUB_MOD_LICENSE ("GPLv3+"); static struct grub_partition_map grub_msdos_partition_map; grub_err_t grub_partition_msdos_iterate (grub_disk_t disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) { struct grub_partition p; struct grub_msdos_partition_mbr mbr; int labeln = 0; grub_disk_addr_t lastaddr; grub_disk_addr_t ext_offset; grub_disk_addr_t delta = 0; if (disk->partition && disk->partition->partmap == &grub_msdos_partition_map) { if (disk->partition->msdostype == GRUB_PC_PARTITION_TYPE_LINUX_MINIX) delta = disk->partition->start; else return grub_error (GRUB_ERR_BAD_PART_TABLE, "no embedding supported"); } p.offset = 0; ext_offset = 0; p.number = -1; p.partmap = &grub_msdos_partition_map; /* Any value different than `p.offset' will satisfy the check during first loop. */ lastaddr = !p.offset; while (1) { int i; struct grub_msdos_partition_entry *e; /* Read the MBR. */ if (grub_disk_read (disk, p.offset, 0, sizeof (mbr), &mbr)) goto finish; /* This is our loop-detection algorithm. It works the following way: It saves last position which was a power of two. Then it compares the saved value with a current one. This way it's guaranteed that the loop will be broken by at most third walk. */ if (labeln && lastaddr == p.offset) return grub_error (GRUB_ERR_BAD_PART_TABLE, "loop detected"); labeln++; if ((labeln & (labeln - 1)) == 0) lastaddr = p.offset; /* Check if it is valid. */ if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE)) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); for (i = 0; i < 4; i++) if (mbr.entries[i].flag & 0x7f) return grub_error (GRUB_ERR_BAD_PART_TABLE, "bad boot flag"); /* First pass to find GPT partitions. */ for (p.index = 0; p.index < 4; p.index++) { e = mbr.entries + p.index; /* If this is a GPT partition, this MBR is just a dummy. */ if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK) return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr"); } /* Second pass to analyze DOS partitions. */ for (p.index = 0; p.index < 4; p.index++) { e = mbr.entries + p.index; p.start = p.offset + grub_le_to_cpu32 (e->start) - delta; p.len = grub_le_to_cpu32 (e->length); p.msdostype = e->type; grub_dprintf ("partition", "partition %d: flag 0x%x, type 0x%x, start 0x%llx, len 0x%llx\n", p.index, e->flag, e->type, (unsigned long long) p.start, (unsigned long long) p.len); /* If this partition is a normal one, call the hook. */ if (! grub_msdos_partition_is_empty (e->type) && ! grub_msdos_partition_is_extended (e->type)) { p.number++; if (hook (disk, &p)) return grub_errno; } else if (p.number < 4) /* If this partition is a logical one, shouldn't increase the partition number. */ p.number++; } /* Find an extended partition. */ for (i = 0; i < 4; i++) { e = mbr.entries + i; if (grub_msdos_partition_is_extended (e->type)) { p.offset = ext_offset + grub_le_to_cpu32 (e->start); if (! ext_offset) ext_offset = p.offset; break; } } /* If no extended partition, the end. */ if (i == 4) break; } finish: return grub_errno; } #ifdef GRUB_UTIL static grub_err_t pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors, grub_embed_type_t embed_type, grub_disk_addr_t **sectors) { grub_disk_addr_t end = ~0ULL; struct grub_msdos_partition_mbr mbr; int labeln = 0; /* Any value different than `p.offset' will satisfy the check during first loop. */ grub_disk_addr_t lastaddr = 1; grub_disk_addr_t ext_offset = 0; grub_disk_addr_t offset = 0; if (embed_type != GRUB_EMBED_PCBIOS) return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "PC-style partitions curently support " "only PC-BIOS embedding"); if (disk->partition) return grub_error (GRUB_ERR_OUT_OF_RANGE, "Embedding on MSDOS subpartition isn't supported"); while (1) { int i; struct grub_msdos_partition_entry *e; grub_err_t err; /* Read the MBR. */ err = grub_disk_read (disk, offset, 0, sizeof (mbr), &mbr); if (err) return err; /* This is our loop-detection algorithm. It works the following way: It saves last position which was a power of two. Then it compares the saved value with a current one. This way it's guaranteed that the loop will be broken by at most third walk. */ if (labeln && lastaddr == offset) return grub_error (GRUB_ERR_BAD_PART_TABLE, "loop detected"); labeln++; if ((labeln & (labeln - 1)) == 0) lastaddr = offset; /* Check if it is valid. */ if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE)) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); for (i = 0; i < 4; i++) if (mbr.entries[i].flag & 0x7f) return grub_error (GRUB_ERR_BAD_PART_TABLE, "bad boot flag"); /* Analyze DOS partitions. */ for (i = 0; i < 4; i++) { e = mbr.entries + i; if (!grub_msdos_partition_is_empty (e->type) && end > offset + grub_le_to_cpu32 (e->start)) end = offset + grub_le_to_cpu32 (e->start); /* If this is a GPT partition, this MBR is just a dummy. */ if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK) return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr"); } /* Find an extended partition. */ for (i = 0; i < 4; i++) { e = mbr.entries + i; if (grub_msdos_partition_is_extended (e->type)) { offset = ext_offset + grub_le_to_cpu32 (e->start); if (! ext_offset) ext_offset = offset; break; } } /* If no extended partition, the end. */ if (i == 4) break; } if (end >= *nsectors + 2) { unsigned i; *nsectors = end - 2; *sectors = grub_malloc (*nsectors * sizeof (**sectors)); if (!*sectors) return grub_errno; for (i = 0; i < *nsectors; i++) (*sectors)[i] = 1 + i; return GRUB_ERR_NONE; } if (end <= 1) return grub_error (GRUB_ERR_FILE_NOT_FOUND, "This msdos-style partition label has no " "post-MBR gap; embedding won't be possible!"); if (*nsectors > 62) return grub_error (GRUB_ERR_OUT_OF_RANGE, "Your core.img is unusually large. " "It won't fit in the embedding area."); return grub_error (GRUB_ERR_OUT_OF_RANGE, "Your embedding area is unusually small. " "core.img won't fit in it."); } #endif /* Partition map type. */ static struct grub_partition_map grub_msdos_partition_map = { .name = "msdos", .iterate = grub_partition_msdos_iterate, #ifdef GRUB_UTIL .embed = pc_partition_map_embed #endif }; GRUB_MOD_INIT(part_msdos) { grub_partition_map_register (&grub_msdos_partition_map); } GRUB_MOD_FINI(part_msdos) { grub_partition_map_unregister (&grub_msdos_partition_map); } --------------020006020604060506030007 Content-Type: text/x-patch; name="msdos.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="msdos.c.diff" 90c90,100 < /* Analyze DOS partitions. */ --- > /* First pass to find GPT partitions. */ > for (p.index = 0; p.index < 4; p.index++) > { > e = mbr.entries + p.index; > > /* If this is a GPT partition, this MBR is just a dummy. */ > if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK) > return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr"); > } > > /* Second pass to analyze DOS partitions. */ 105,108d114 < /* If this is a GPT partition, this MBR is just a dummy. */ < if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK && p.index == 0) < return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr"); < 213c219 < if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK && i == 0) --- > if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK) --------------020006020604060506030007 Content-Type: text/plain; name="msdos.c.original" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="msdos.c.original" /* pc.c - Read PC style partition tables. */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2002,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GRUB is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GRUB. If not, see . */ #include #include #include #include #include #include GRUB_MOD_LICENSE ("GPLv3+"); static struct grub_partition_map grub_msdos_partition_map; grub_err_t grub_partition_msdos_iterate (grub_disk_t disk, int (*hook) (grub_disk_t disk, const grub_partition_t partition)) { struct grub_partition p; struct grub_msdos_partition_mbr mbr; int labeln = 0; grub_disk_addr_t lastaddr; grub_disk_addr_t ext_offset; grub_disk_addr_t delta = 0; if (disk->partition && disk->partition->partmap == &grub_msdos_partition_map) { if (disk->partition->msdostype == GRUB_PC_PARTITION_TYPE_LINUX_MINIX) delta = disk->partition->start; else return grub_error (GRUB_ERR_BAD_PART_TABLE, "no embedding supported"); } p.offset = 0; ext_offset = 0; p.number = -1; p.partmap = &grub_msdos_partition_map; /* Any value different than `p.offset' will satisfy the check during first loop. */ lastaddr = !p.offset; while (1) { int i; struct grub_msdos_partition_entry *e; /* Read the MBR. */ if (grub_disk_read (disk, p.offset, 0, sizeof (mbr), &mbr)) goto finish; /* This is our loop-detection algorithm. It works the following way: It saves last position which was a power of two. Then it compares the saved value with a current one. This way it's guaranteed that the loop will be broken by at most third walk. */ if (labeln && lastaddr == p.offset) return grub_error (GRUB_ERR_BAD_PART_TABLE, "loop detected"); labeln++; if ((labeln & (labeln - 1)) == 0) lastaddr = p.offset; /* Check if it is valid. */ if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE)) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); for (i = 0; i < 4; i++) if (mbr.entries[i].flag & 0x7f) return grub_error (GRUB_ERR_BAD_PART_TABLE, "bad boot flag"); /* Analyze DOS partitions. */ for (p.index = 0; p.index < 4; p.index++) { e = mbr.entries + p.index; p.start = p.offset + grub_le_to_cpu32 (e->start) - delta; p.len = grub_le_to_cpu32 (e->length); p.msdostype = e->type; grub_dprintf ("partition", "partition %d: flag 0x%x, type 0x%x, start 0x%llx, len 0x%llx\n", p.index, e->flag, e->type, (unsigned long long) p.start, (unsigned long long) p.len); /* If this is a GPT partition, this MBR is just a dummy. */ if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK && p.index == 0) return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr"); /* If this partition is a normal one, call the hook. */ if (! grub_msdos_partition_is_empty (e->type) && ! grub_msdos_partition_is_extended (e->type)) { p.number++; if (hook (disk, &p)) return grub_errno; } else if (p.number < 4) /* If this partition is a logical one, shouldn't increase the partition number. */ p.number++; } /* Find an extended partition. */ for (i = 0; i < 4; i++) { e = mbr.entries + i; if (grub_msdos_partition_is_extended (e->type)) { p.offset = ext_offset + grub_le_to_cpu32 (e->start); if (! ext_offset) ext_offset = p.offset; break; } } /* If no extended partition, the end. */ if (i == 4) break; } finish: return grub_errno; } #ifdef GRUB_UTIL static grub_err_t pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors, grub_embed_type_t embed_type, grub_disk_addr_t **sectors) { grub_disk_addr_t end = ~0ULL; struct grub_msdos_partition_mbr mbr; int labeln = 0; /* Any value different than `p.offset' will satisfy the check during first loop. */ grub_disk_addr_t lastaddr = 1; grub_disk_addr_t ext_offset = 0; grub_disk_addr_t offset = 0; if (embed_type != GRUB_EMBED_PCBIOS) return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "PC-style partitions curently support " "only PC-BIOS embedding"); if (disk->partition) return grub_error (GRUB_ERR_OUT_OF_RANGE, "Embedding on MSDOS subpartition isn't supported"); while (1) { int i; struct grub_msdos_partition_entry *e; grub_err_t err; /* Read the MBR. */ err = grub_disk_read (disk, offset, 0, sizeof (mbr), &mbr); if (err) return err; /* This is our loop-detection algorithm. It works the following way: It saves last position which was a power of two. Then it compares the saved value with a current one. This way it's guaranteed that the loop will be broken by at most third walk. */ if (labeln && lastaddr == offset) return grub_error (GRUB_ERR_BAD_PART_TABLE, "loop detected"); labeln++; if ((labeln & (labeln - 1)) == 0) lastaddr = offset; /* Check if it is valid. */ if (mbr.signature != grub_cpu_to_le16 (GRUB_PC_PARTITION_SIGNATURE)) return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature"); for (i = 0; i < 4; i++) if (mbr.entries[i].flag & 0x7f) return grub_error (GRUB_ERR_BAD_PART_TABLE, "bad boot flag"); /* Analyze DOS partitions. */ for (i = 0; i < 4; i++) { e = mbr.entries + i; if (!grub_msdos_partition_is_empty (e->type) && end > offset + grub_le_to_cpu32 (e->start)) end = offset + grub_le_to_cpu32 (e->start); /* If this is a GPT partition, this MBR is just a dummy. */ if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK && i == 0) return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr"); } /* Find an extended partition. */ for (i = 0; i < 4; i++) { e = mbr.entries + i; if (grub_msdos_partition_is_extended (e->type)) { offset = ext_offset + grub_le_to_cpu32 (e->start); if (! ext_offset) ext_offset = offset; break; } } /* If no extended partition, the end. */ if (i == 4) break; } if (end >= *nsectors + 2) { unsigned i; *nsectors = end - 2; *sectors = grub_malloc (*nsectors * sizeof (**sectors)); if (!*sectors) return grub_errno; for (i = 0; i < *nsectors; i++) (*sectors)[i] = 1 + i; return GRUB_ERR_NONE; } if (end <= 1) return grub_error (GRUB_ERR_FILE_NOT_FOUND, "This msdos-style partition label has no " "post-MBR gap; embedding won't be possible!"); if (*nsectors > 62) return grub_error (GRUB_ERR_OUT_OF_RANGE, "Your core.img is unusually large. " "It won't fit in the embedding area."); return grub_error (GRUB_ERR_OUT_OF_RANGE, "Your embedding area is unusually small. " "core.img won't fit in it."); } #endif /* Partition map type. */ static struct grub_partition_map grub_msdos_partition_map = { .name = "msdos", .iterate = grub_partition_msdos_iterate, #ifdef GRUB_UTIL .embed = pc_partition_map_embed #endif }; GRUB_MOD_INIT(part_msdos) { grub_partition_map_register (&grub_msdos_partition_map); } GRUB_MOD_FINI(part_msdos) { grub_partition_map_unregister (&grub_msdos_partition_map); } --------------020006020604060506030007 Content-Type: application/pgp-signature; name="gpt.c.sig" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gpt.c.sig" iQIcBAABAgAGBQJOULEAAAoJEMR6DgDuR4IfdNwP/1bYkBzoSfO3GpidpMEEQN5WGeTQabIK mUppOfq7njbDQ26lPdP7hUujIX0fN9WVfyuzn+9eXu4cf2QshznMh0x1UEKsLBT6Myk7KHdA 2NYTHe1x8bS0+bra6rjfF+Fpxt5J7W3JJ44FXyuHLgobsvZdK5Jpa+Z1LX1bkVMfjosNxkJE NyUh+sOgQ3ZhlUbPI9kchHeQQ4EO2RgWRtC/dmp9m48MMcYOn4G5oRbfNDS62QypMH8LOPVg MPoEoes6M4BpikiuwkSyVbuI0EBjGWK7bnX5GlQlq/JwriOSTlOlZ8nqzTPVy53NIem6IImX eO1kwKv1YnS9fJFs7Ydx3Js3itCgWCRdp3bPV0zPamzRrB8wMnLb8+N8WWgovdfuw9KfkfmO XgHG9EfKJlX5vvp85EoplIlLX3CU/M3jqCGEPF4mc8EFiQ+e3xDAM4QzV9c0SF6w2h5SXO+7 cmF1cxFeQvgezKpdz7K2sdoM+FZvpAxey82pKrYCypA1eQuO/lUN40WOMsk945JIsR/N18uc 0hKBM+gFC7Jbm2ftY+HAXvsxfEN0hUyUS9jvVLS75EZ8t5GaqwPSqhSFs1slGoXCnQN/DHcH PhfgH8HDyBupaAY2k9Mh5Q8vfmqpA+ZRS9shOrHwkTyPS1+W4wd2q9PQIIqUnkVPtmw2qqxG MkUV --------------020006020604060506030007 Content-Type: application/pgp-signature; name="gpt.c.diff.sig" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gpt.c.diff.sig" iQIcBAABAgAGBQJOULEBAAoJEMR6DgDuR4IfC1wQANHANIMXoVll9YguREFeBWoZtn5F2U3H 6glAicBIJOZCclFxuCGkHjLE8oZRG88ic2I3jWheTwsIq08ZfKKnkNJtT+wo7ptas2k38yQX GW4u9Lwe1D82bk3IEIJoyjRbUQWjmONCw95gLfXmG6HLcedtdlcr+lT2gr7J0LOyoz3P+aDX /Kl5Q4rxmWmEDTKo3RQCvluEm0+mMEC+TGEvS48GhCXKRmulMau+rpXqJVDDBa50gP3kS9r0 op3rKPy+hM0MVnqK/NRe6CWnXoLqPmE5UWqFcxDQVsD7alglgMpC8IfyYtffv6xOYF0hz5AT tOO87A6zRDuOZDG4m/uacQvGtlaZtiIoWuJGNWTM8a9jPjGfK4GkeabOm9AP6eJYpE6ueVCQ lza5NYqN3sWzI9OuIFkeRwrpPhc/nAVqlLOKpF7BFkfr10gZ3OE3NJcXK1rKkDdyraN7hbMc tfxfynwCgh3KkPPm4tPZezYHGfiPUw581YUuHVtdbiVJXWbvODL+2oNrpw4iEZx3+l7pxalV 9bcihK+pTJ+2MWhvGRO/PXNPL9qg3jAipkjLU/Um0mD17BlIOK8I6y/lpd6keCN7YYZoLYb0 lqdg4xQIL8TKRyJM6Nh/eUiyM56ayBnULn9cwIYQTB0zOjQPPQa2IawoCV+JXOoBFe46Lxoy qWVD --------------020006020604060506030007 Content-Type: application/pgp-signature; name="gpt.c.original.sig" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gpt.c.original.sig" iQIcBAABAgAGBQJOULEBAAoJEMR6DgDuR4IfdgIP/1rRWBpewI6Zu/s6AXyIrM5cJj0NhDMj vU1jDMO5ZyT/RIqepwqhFLUYU4YvWVRCHc+GDxUdUKmKAD4h3S1TbySV9nO2Q7/SeI4Af1Lf C7PeQy4dEfgHXpeM8YZx7vgJHraK/fucgBaAu8NnB6o9/VmWRFhPhV6JSghCtYzTNzJxF4gj NLyCwLuOwabdrisB89Bjo9GWpR+EeL3kLDySTK3By60wMkRqVJ0qwbHx8TJaAbBneNlIMHOa 7qx7G7F4slxOfYmLeuMGhk82qGyFJyIC1aTCSZ4LNih7cSYy6hkkJXRPSfnsk/bCKXeG7OUu z3lC4vdazcYoNGmV8SemJlK6GoRt81v5eE3D5bIQSrnMrJ1DGyUnKib7+JNMyN6s2WWDNCrV otFBkVRd9OXHGqbw4ByaVpElL22D0IVWeiIGrIhlKv+yDMGtbnyVEFXlxEMFXLJA8Af+zaKz 9MW2KTvo4MO/u99l6eGPsgpwFQBxDrE3SggO4+E3e5PrbTWQGpM+oKrh4gCOMjH7z9RWd47K rr1Dci+qkrvUFkr3Xvz6QrWwuZRaMyUp+nc1Ds+hyVjdr9t6pC3Q9JepYZXaoUzQCdEEIwxR y44ap37t5AqOaPZldNgCqHyT1KpZRemDPIDBpePEnATrXElQ7WBAkJLAJ2W45xpaiiaMIwjw QYBh --------------020006020604060506030007 Content-Type: application/pgp-signature; name="msdos.c.sig" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="msdos.c.sig" iQIcBAABAgAGBQJOULECAAoJEMR6DgDuR4IfJqkQAKlvvABITUL0x0zWDfzRa2DC4CVHy/wA hDBAhMzlI8p7W8Wy7347hS05k5wp2HlSAzoINcsAWnFSb9LHflLL2p4Tuq0BZrbn2+79f/AC pLPKU2zGiaQgWSySqr0M8e/qszTcFH92spsNfTpwnrLu+W9/viYktySx7qixJcSqvSxYax2b SxIeXDI/N7M3tgLOzp1sc7KoZU36w+tFUSQTSlnXM+/rLRyfjZngkdMG5k4O7hOdQrN31UBt WJJLIycI2E3iA5Cd/g/BYqMmo24+LSyE4v55BFFoYY7MDTeuUaKCJHA52Zw47wClV2XkvgDC VYVPjHsY4xEHRQvm0z8ecDoiZ1CHDMqcMuyyl6UF2QHVg3JwdbYRpNrAmNHnCDvqPSICwNqU 27/x81mfK8tEQDF89Skge2pPhXdLu0FyrsTbYhLnNY9XE8mPIOyTpVOU4EF1WtICORPYYMwn bjfbHJvVIHNr6WQ5b2uarhDAJ1T3wJO8JquK9KOSuzyL3jqpkXnHLYi20gLgJz12ZD5JMPaE w6hgVUTT+yEYEoRYTvp7LRj1gA4y+vXu4L6B7eQMwvOyRfE83BQegSTXHS5X0PUkY4UAB5g8 tvC5DKoZnsZfGNv1cgwP9SA00lFmXbpCT61/dzvc1mLE7yvSuo74hcaaCEIET8+p24MdPrP9 Ggid --------------020006020604060506030007 Content-Type: application/pgp-signature; name="msdos.c.diff.sig" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="msdos.c.diff.sig" iQIcBAABAgAGBQJOULECAAoJEMR6DgDuR4IfbW4QAI+piWJ03iBdfnrVjKIuc7ylTSF3e1Ac TOUodKv+Gu1hueG0x7bnxRhdDVmp/lyBWNLeSGzsZfdB6a2sresQQkVlVa81yZ2MTYNP+zkb ES+mPjh7Wg+SAd+iFJk8/aFmL3Dgxsvm3iujxyt8l6zvO7HEQ35BH+yvKlEMtAO3j3g0iElR AditJ/FUBWOY9opmEZd9tMxhbvpn+1YxxV9dfsdlIABPqAFguL5ECk4I+VdBF7ZHNfxgxk20 Xd0zRR5JMfrP7aVW+wjNZT7WpmTLC5X2NLZT5xi7iWsWW4E4c79LDoV+4sw+3yNZ/36Q9XLN znbjtOeB4XnvlkQiEIpigRH3la1LOyBL6RnS1kDaHndlnhRp9HckJkwnm4AScwcK2TmdmMzU qW+ApQhFujPt5iZ3Uo00FYUDe+7q8g3ptO8ZkzZdkpmh+DBhEjwi8kEAaxZp2M3RHyNxzPC+ z1APGpDBofeL21KC3Qoq8vUAE6WzbAZ954x9RHqbjeP0oP7YbPXVxJ+bqJcBC6tsne0HNIDc T4PJazXAVrj7UNrTh/LjhP70eJk0zwgTY7P4k2ve3WwOV5JZ6VptpBzIayUSCr86MF+lznBW f6H+nx/8Z+ZCja06PuqJEooRUhpRyCMAT599J6Hq/d5hn13CIMLQk79RuHSM69NymgUn3qkR c20v --------------020006020604060506030007 Content-Type: application/pgp-signature; name="msdos.c.original.sig" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="msdos.c.original.sig" iQIcBAABAgAGBQJOULEDAAoJEMR6DgDuR4IfVdcP/1bYnK5DbXfeSvv5igNWobVuZCgkausT rMr3TJmyNLl4K8BorbniDFLQipJSDks8DB1NFKTx3G0zw7OkqMTXQsfJgTovyTqCWhKRib9H xd/EVZtRkZEGfjYbhHGPLD5XY7pwx9a9pguzb72TFbTY+2pIdKSFaCFN+B022l5KhiuftLod +lavBHP8c3KyxHP/EyxN7opkW9L4KkYY3iAurDCHXorrkLuRHqSaIV6imYzFsz5RM8v45Iy/ gJUqRosn5uHn0OjqiFZib+6fBMWcHWzJqDwrzu3Hk8i7ocmqtuoSP/O25BlzmgBXdVFRdyqZ qZQGixFuYDuiTa9dm8a3Uej/+WTers5N0a6Oh/kAkNJB5zJDGAD0UI/7JByYck72VW22gTQL 4C43tkUcchzZpYWl9Vw2KtzDuKhAOzguBMa4/ca+6qMu3KJJbZdshAOnh+wOsj67mRpzqOeH diIKfJGIL0IwKm327zHSOUjx49zrzCjgIuYbf58kkNYEKlzN0aezesDWWpNuy5xn0NvPpEzR +mAKr+KDSpYSu0hcq+txaLxKv+vVBxQ2cJUXHXpwm+ZT1fj0NKv4oolz1KU2tc4a2OGE3Cy+ Q67OSV0Sjla6vpEuqyA52/tTLte9Fu0UuVCaownaNbADAwZASAPFjBHAwVrL4t0J6Z3rRH9t BuG4 --------------020006020604060506030007-- From MAILER-DAEMON Sun Aug 21 12:10:43 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QvAbj-00010i-TH for mharc-grub-devel@gnu.org; Sun, 21 Aug 2011 12:10:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:44201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvAbf-0000xE-Vj for grub-devel@gnu.org; Sun, 21 Aug 2011 12:10:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvAbd-0007Qy-Tz for grub-devel@gnu.org; Sun, 21 Aug 2011 12:10:39 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:43404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvAbd-0007Pl-K1 for grub-devel@gnu.org; Sun, 21 Aug 2011 12:10:37 -0400 Received: by fxg9 with SMTP id 9so3524905fxg.0 for ; Sun, 21 Aug 2011 09:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=Q2GtgD6xnqEFAOKWh+FZUtkogND6y8F71MkEgjR0wIg=; b=WuPuisU4B5eUXZMBFNEA4/UyRvKe3btQ2syUZNrI3mdUgvRHYfgjACsGSlOvB/SMv5 6xQ6F2BlnGy44Fq162zVGUY5o4lvVoBdGgpLzchXQ2r5mCM4kZyoLL0p+WGG32GYpKLb AxeEJrb8TZlM1dAMlGB73Z0xCBhdOpGKJomXg= Received: by 10.223.61.211 with SMTP id u19mr2298687fah.102.1313943036296; Sun, 21 Aug 2011 09:10:36 -0700 (PDT) Received: from debian.x201.phnet (111-147.203-62.cust.bluewin.ch [62.203.147.111]) by mx.google.com with ESMTPS id b13sm2497783fak.16.2011.08.21.09.10.32 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Aug 2011 09:10:33 -0700 (PDT) Message-ID: <4E512DF6.1030807@gmail.com> Date: Sun, 21 Aug 2011 18:10:30 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Iceowl/1.0b2 Icedove/3.1.11 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: [Fwd: [Resolved] Grub2 can not detect usb disk] References: <1313876741.5634.49.camel@pracovna> In-Reply-To: <1313876741.5634.49.camel@pracovna> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig41EEB88BE533C087C15EEBF2" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.41 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: Sun, 21 Aug 2011 16:10:41 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig41EEB88BE533C087C15EEBF2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 20.08.2011 23:45, Ale=C5=A1 Nesrsta wrote: > Hi everybody, > > could anybody test changes from Cui Lei (see below) in uhci.c - if they= > are generally working and does not have some negative effect on machine= s > with "normal" BIOS etc. ? > > Maybe such changes are related only to coreboot and some special use > case/platform, but probably they are related to needed change of UHCI > controller ownership and should be included into uhci.c code. > I don't think it is. The difference is that coreboot doesn't use USB itself so it's initialised but disabled initially which I expect also to happen with some older BIOSes so this code is perfectly ok to be added generically. @Rock or Ale=C5=A1: Could someone of you clean this up (macroify and comm= ent style mainly) and supply as a .diff ? > Regards, > Ales > > -------- P=C5=99eposlan=C3=A1 zpr=C3=A1va -------- > Od: Cui Lei > Komu: Ale=C5=A1 Nesrsta > Kopie: The development of GNU GRUB > P=C5=99edm=C4=9Bt: [Resolved] Grub2 can not detect usb disk > Datum: Fri, 19 Aug 2011 10:58:00 +0800 > > Thank you for your help, very much! ^_^ > This problem have been resolved and I can usb the usb_keyborard under=20 > grub-shell and I can boot ubuntu11.04 from usb disk. > My mainboard is via 8595a, the usb controller is uhci. > I resolved it by add these code in the grub-core/bus/usb/uhci.c: > > (1) > 182 /*Set bus master*/ > 183 addr =3D grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND); > 184 grub_uint16_t val =3D grub_pci_read_word(addr); > 185 val =3D (val & ~0) | GRUB_PCI_COMMAND_BUS_MASTER; > 186 grub_pci_write_word(addr, val); > > (2) > 203 // Reset PIRQ and SMI > 204 addr =3D grub_pci_make_address (dev, 0xC0); =20 > //USBLEGSUP 0xc0 > 205 grub_pci_write_word(addr, 0x8f00); //USBLEGSUP_RWC =20 > 0x8f00 /* the R/WC bits */ > 206 // Reset the HC > 207 grub_uhci_writereg16(u, GRUB_UHCI_REG_USBCMD, 0x0002);=20 > //USBCMD_HCRESET 0x0002 > 208 grub_millisleep(5); > 209 // Disable interrupts and commands (just to be safe). > 210 grub_outw (0, u->iobase + 4); //USBINTR 4 /*Interrupt=20 > enable register*/ > 211 grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 0); > > I don't know whether it is useful to the other one, but may be a refere= nce. > > BRs, > > Rock. > >> Hi, >> >> I am afraid, I maybe will not help You too much but I try it: >> >> I shortly looked into ML to Your posts. As I saw short part of debug >> output in one of Your e-mail, GRUB freezes when it wants to get device= >> descriptor - more precisely, when it requests first 8 bytes of device >> descriptor. It is the first thing which is done after address is >> assigned to the device. >> >> So, it looks like device does not set address properly (even if contro= l >> message Set Address returns success) or happened something else what >> prevent device to respond (but I don't know what...). >> >> For the first try You can increase related delays in usbhub.c: >> >> ... >> /* Wait "recovery interval", spec. says 2ms */ >> grub_millisleep (2);<<<<---- HERE (try 4ms or more) >> >> grub_usb_device_attach (dev); >> ... >> >> ... >> /* Enable the port. */ >> err =3D hub->controller->dev->portstatus (hub->controller, portno, = 1); >> if (err) >> return; >> hub->controller->dev->pending_reset =3D grub_get_time_ms () + 5000;= >> >> grub_millisleep (10);<<<<---- maybe here also >> >> /* Enable the port and create a device. */ >> dev =3D grub_usb_hub_add_dev (hub->controller, speed, portno, 0); >> hub->controller->dev->pending_reset =3D 0; >> if (! dev) >> return; >> ... >> >> If this will not help You, I currently have no other idea what could b= e >> the reason of timeout. >> I think You don't need EHCI because it looks like Set Address control >> message works (at least it does not return error), i.e. You probably >> have OHCI or UHCI USB (companion) controller on computer and Your devi= ce >> is working at full or low speed with Your USB controller. >> >> By the way, for the first look into ML I did not find which USB >> controller You have - OHCI/UHCI ? (which driver/module are You using -= >> ohci/uhci?) - and which machine/architecture is the computer You are >> trying to boot with GRUB2 - ? >> I sometimes had some unidentified problems on my UHCI/EHCI controller,= >> mostly with port powering - UHCI does not have power management but EH= CI >> does and if EHCI is not properly initialized by BIOS (it could be Your= >> case with coreboot, maybe ?) then USB ports are not properly powered. >> Another BIOS (coreboot?) issue could be improper handling of USB >> controller ownership. >> >> Do You have USB device connected directly into root port or via some U= SB >> hub ? Try to do it in opposite way (i.e. if You are not using the USB >> hub, try use it and connect USB device via hub - maybe it helps...) >> >> Hmmm, I remember now one issue which could be related to Your problem.= >> On my very old machine with OHCI USB controller some devices are not >> working "for the first time". I am still not able to debug why it >> happened (it does not happened when full debug is active - so it looks= >> like it is related to some timing). But I am afraid it will be not You= r >> case because device stops working after it is recognized, configured, >> usbms module loaded and GRUB USB device usb0 created. >> But - try load ohci/uhci module when USB disk is connected and then >> disconnect and connect it again after few seconds. In my case device >> becomes working as new usb device (i.e. usb1). >> >> Additionally, lot of manufacturers does not follow USB or USBMS >> specifications, as You can read in Linux source code of USB controller= s >> and USB mass storage devices and related documentation. >> Did You tried more different USB mass storage devices ? >> What is manufacturer& type of Your USB mass storage device ? >> >> Of course, You can also try EHCI driver, it maybe can solve Your probl= em >> because of little bit different ports/devices handling. But EHCI drive= r >> is currently highly experimental, it still exists only as uncorrected >> and not accepted "patch". I have to do some improvement but I don't ha= ve >> sufficient time still, unfortunately... >> If You want try to use it, You can get my patch from ML (sent at >> 25.6.2011) and use it with related source code trunk branch revision >> (maybe also any later or current revision, because USB parts of GRUB a= re >> not frequently changed). Please also read about know issue and another= >> limitations of the "zero version" of EHCI driver - e.g. it may not wor= k >> if Your PC is not x86 machine or USB registers are mapped above 4GB et= c. >> >> Sorry if You will wait longer time for my response in future - I don't= >> check the post so often and additionally currently I am (and probably >> will be) longer time too busy - I am not regular GRUB2 contributor, I = do >> something for GRUB2 USB part only time to time... >> >> BRs, >> Ales >> >> >> Cui Lei p=C3=AD=C5=A1e v =C3=9At 09. 08. 2011 v 11:05 +0800: >>> Hi Ale=C5=A1, >>> I am trying to boot OS from USB disk, I use coreboot-v4 with grub2 a= s >>> payload, but my usb disk can not been >>> detect. I try to use usb-keyboard, it is not working. I know you are= >>> working on the EHCI driver from Vladimir , >>> could you give me some advices? Vladimir said it may need EHCI driver= , >>> but I think the usb device should run >>> with low-speed or full-speed if no EHCI driver.C >>> >>> Looking forward to your reply. >>> BRs, >>> Rock Cui. >>> >>> > > > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig41EEB88BE533C087C15EEBF2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk5RLfcACgkQNak7dOguQgmS1QD/c2G3ljycLg8VpPIvNd8mW17E uChlpN3M32V22rFK7sYBAIre+ELFxxLE9AIskweo0xypGJXdmxxGx+PmohqnInBG =PtOG -----END PGP SIGNATURE----- --------------enig41EEB88BE533C087C15EEBF2-- From MAILER-DAEMON Sun Aug 21 17:30:32 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QvFbE-0005kY-96 for mharc-grub-devel@gnu.org; Sun, 21 Aug 2011 17:30:32 -0400 Received: from eggs.gnu.org ([140.186.70.92]:41228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvFbC-0005jo-LS for grub-devel@gnu.org; Sun, 21 Aug 2011 17:30:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvFbB-0003eL-1V for grub-devel@gnu.org; Sun, 21 Aug 2011 17:30:30 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:33438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvFbA-0003eF-QT for grub-devel@gnu.org; Sun, 21 Aug 2011 17:30:28 -0400 X-Originating-IP: 217.70.178.134 Received: from mfilter4-d.gandi.net (mfilter4-d.gandi.net [217.70.178.134]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 81373A804B; Sun, 21 Aug 2011 23:30:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter4-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter4-d.gandi.net (mfilter4-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id osEN+Wgi5gz2; Sun, 21 Aug 2011 23:30:25 +0200 (CEST) X-Originating-IP: 50.43.15.19 Received: from leaf (static-50-43-15-19.bvtn.or.frontiernet.net [50.43.15.19]) (Authenticated sender: josh@joshtriplett.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id DE195A806E; Sun, 21 Aug 2011 23:30:23 +0200 (CEST) Date: Sun, 21 Aug 2011 14:30:21 -0700 From: Josh Triplett To: grub-devel@gnu.org Subject: Request for review of attached patches for hybrid GPT/MBR Message-ID: <20110821213019.GA17168@leaf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 217.70.183.195 Cc: bianca.uranus@gmail.com 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: Sun, 21 Aug 2011 21:30:31 -0000 Very impressive work! Do you know if the approach you use for hybrid images could also work (with adaptation) for the existing hybrid images bootable via USB or CD .iso? I'd love to create combination images which can work via all the methods you mention and also work as a CD .iso. You might also find http://mjg59.dreamwidth.org/4957.html useful. Thanks, Josh Triplett From MAILER-DAEMON Sun Aug 21 17:48:16 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QvFsO-0000NT-07 for mharc-grub-devel@gnu.org; Sun, 21 Aug 2011 17:48:16 -0400 Received: from eggs.gnu.org ([140.186.70.92]:33549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvFsL-0000NF-2j for grub-devel@gnu.org; Sun, 21 Aug 2011 17:48:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvFsJ-0006wQ-OF for grub-devel@gnu.org; Sun, 21 Aug 2011 17:48:13 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:42177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvFsJ-0006wK-GS for grub-devel@gnu.org; Sun, 21 Aug 2011 17:48:11 -0400 Received: by fxg9 with SMTP id 9so3638757fxg.0 for ; Sun, 21 Aug 2011 14:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=SG50dhtJiImJEGEzU9Vw1ZIGoTi/MrHZMAsztS/O1m4=; b=TZ+H3rJsoPoB+pEwyYVwiZ6prGoQBHgo+9w6ZwjesgNvMHTJ0fpmB8Mzfost2kOU5W WHSa4szZY9fpibRE8k01u6uZHFnkWVxZvXzL1p+EA0ae501BBU23LDmb+wD3Y0NXtv6s qdyfYUWJ7bkcrsMQj6LgKU+HtEG0ULuMo4v1M= Received: by 10.223.102.10 with SMTP id e10mr2555926fao.55.1313963290660; Sun, 21 Aug 2011 14:48:10 -0700 (PDT) Received: from debian.x201.phnet (122-99.203-62.cust.bluewin.ch [62.203.99.122]) by mx.google.com with ESMTPS id p4sm3314452fah.25.2011.08.21.14.48.08 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Aug 2011 14:48:09 -0700 (PDT) Message-ID: <4E517D10.4010702@gmail.com> Date: Sun, 21 Aug 2011 23:48:00 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110820 Iceowl/1.0b2 Icedove/3.1.12 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: Request for review of attached patches for hybrid GPT/MBR References: <20110821213019.GA17168@leaf> In-Reply-To: <20110821213019.GA17168@leaf> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig468B8BED62EA47383454EFB7" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.41 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: Sun, 21 Aug 2011 21:48:14 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig468B8BED62EA47383454EFB7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 21.08.2011 23:30, Josh Triplett wrote: > Very impressive work! > > Do you know if the approach you use for hybrid images could also work > (with adaptation) for the existing hybrid images bootable via USB or CD= > .iso? I'd love to create combination images which can work via all the= > methods you mention and also work as a CD .iso. > His work has nothing to do with creating hybrid images. And it's only about GRUB accepting broken partition tables. > You might also find http://mjg59.dreamwidth.org/4957.html useful. > > Thanks, > Josh Triplett > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig468B8BED62EA47383454EFB7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk5RfRcACgkQNak7dOguQgld9QEAqJiOogWrYNXI1WFe1zg69SCk oaDZRx0VqSngxyRapfYA+weMDpZlHb03f1oKSiGx7IK4VkCxazKAmGRubqFsELSx =AK31 -----END PGP SIGNATURE----- --------------enig468B8BED62EA47383454EFB7-- From MAILER-DAEMON Sun Aug 21 17:55:42 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QvFza-0002Cf-BU for mharc-grub-devel@gnu.org; Sun, 21 Aug 2011 17:55:42 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvFzX-00029i-QA for grub-devel@gnu.org; Sun, 21 Aug 2011 17:55:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvFzW-00081Z-N1 for grub-devel@gnu.org; Sun, 21 Aug 2011 17:55:39 -0400 Received: from chiark.greenend.org.uk ([212.13.197.229]:34004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvFzW-00081S-Is for grub-devel@gnu.org; Sun, 21 Aug 2011 17:55:38 -0400 Received: from [172.20.153.9] (helo=riva.pelham.vpn.ucam.org) by chiark.greenend.org.uk (Debian Exim 4.69 #1) with esmtp (return-path cjwatson@ubuntu.com) id 1QvFzV-0007us-0U; Sun, 21 Aug 2011 22:55:37 +0100 Received: from sarantium.wl.pelham.vpn.ucam.org ([2001:470:95d9:0:21c:26ff:fe49:dd4d] helo=sarantium.pelham.vpn.ucam.org) by riva.pelham.vpn.ucam.org with esmtp (Exim 4.72) (envelope-from ) id 1QvFzU-0001DN-8G; Sun, 21 Aug 2011 22:55:36 +0100 Received: from riva.dynamic.greenend.org.uk (sarantium.wl.pelham.vpn.ucam.org [172.20.153.152]) by sarantium.pelham.vpn.ucam.org (Postfix) with ESMTPS id B1D7D3E4240; Sun, 21 Aug 2011 22:55:31 +0100 (BST) Date: Sun, 21 Aug 2011 22:55:30 +0100 From: Colin Watson To: The development of GNU GRUB Subject: Re: Request for review of attached patches for hybrid GPT/MBR Message-ID: <20110821215530.GA15807@riva.dynamic.greenend.org.uk> References: <20110821213019.GA17168@leaf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110821213019.GA17168@leaf> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 212.13.197.229 Cc: bianca.uranus@gmail.com 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: Sun, 21 Aug 2011 21:55:40 -0000 On Sun, Aug 21, 2011 at 02:30:21PM -0700, Josh Triplett wrote: > Do you know if the approach you use for hybrid images could also work > (with adaptation) for the existing hybrid images bootable via USB or CD > .iso? I'd love to create combination images which can work via all the > methods you mention and also work as a CD .iso. While that would indeed be really useful, I think the work for that needs to be done in xorriso (in addition to the work Matthew Garrett has been doing in isohybrid). -- Colin Watson [cjwatson@ubuntu.com] From MAILER-DAEMON Mon Aug 22 04:28:43 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QvPsB-0005p1-3R for mharc-grub-devel@gnu.org; Mon, 22 Aug 2011 04:28:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:54151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvPs8-0005ob-Aq for grub-devel@gnu.org; Mon, 22 Aug 2011 04:28:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvPs7-0002RM-Ba for grub-devel@gnu.org; Mon, 22 Aug 2011 04:28:40 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:35765) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QvPs6-0002RD-UZ for grub-devel@gnu.org; Mon, 22 Aug 2011 04:28:39 -0400 Received: (qmail invoked by alias); 22 Aug 2011 08:28:35 -0000 Received: from 165.126.46.212.adsl.ncore.de (HELO 192.168.2.69) [212.46.126.165] by mail.gmx.net (mp067) with SMTP; 22 Aug 2011 10:28:35 +0200 X-Authenticated: #2145628 X-Provags-ID: V01U2FsdGVkX18MYd1z7i4MLeNR29YpaxehkA1CeLjg9OKPW3n8io FfE/Gqe+KNfsuv Date: Mon, 22 Aug 2011 10:28:41 +0200 From: "Thomas Schmitt" To: grub-devel@gnu.org Subject: Re: Request for review of attached patches for hybrid GPT/MBR Message-Id: <98928026131716@192.168.2.69> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.23 Cc: cjwatson@ubuntu.com 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: Mon, 22 Aug 2011 08:28:41 -0000 Hi, Josh Triplett wrote: > > Do you know if the approach you use for hybrid images could also work > > (with adaptation) for the existing hybrid images bootable via USB or CD > > .iso? I'd love to create combination images which can work via all the > > methods you mention and also work as a CD .iso. Colin Watson wrote: > While that would indeed be really useful, I think the work for that > needs to be done in xorriso (in addition to the work Matthew Garrett has > been doing in isohybrid). Vladimir Serbinenko wrote: > His work has nothing to do with creating hybrid images. And it's only > about GRUB accepting broken partition tables. So xorriso is not really involved in this thread ? If there is interest in GPT production by xorriso, then i would be willing to implement it. Just describe the desired feature and give me pointers to background informations. I am not aware of pending wishes for isohybrid production. So Colin, please give me some more hints in private, if there is anything that xorriso should learn. Have a nice day :) Thomas From MAILER-DAEMON Mon Aug 22 14:02:41 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QvYpd-0001Yp-Up for mharc-grub-devel@gnu.org; Mon, 22 Aug 2011 14:02:41 -0400 Received: from eggs.gnu.org ([140.186.70.92]:48257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvYpb-0001XW-Qz for grub-devel@gnu.org; Mon, 22 Aug 2011 14:02:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvYpa-000685-Q0 for grub-devel@gnu.org; Mon, 22 Aug 2011 14:02:39 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:63897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvYpa-000620-Ft for grub-devel@gnu.org; Mon, 22 Aug 2011 14:02:38 -0400 Received: by bkbzt4 with SMTP id zt4so4547205bkb.0 for ; Mon, 22 Aug 2011 11:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=oVtlhJt/opRjVXirLX4i2Qp8ok78aCwbL+voO5AvMxI=; b=VD+R5j8ZBcKIRGLxNrhBsm4SuYz03nn0DvTRKW8GPs1Obm5Te+u+Zd2/okpKf28JJQ 0A0fnQU+zZIjcON3CYBV+1xbdf2jLL5U7p17ZMhbgHLxoAWhFgEd+gMoVfQnU71/QAsS DVlrQiBCuesdTwnRWFSc8haoR3TasvQAgZDIQ= Received: by 10.204.13.67 with SMTP id b3mr1066784bka.359.1314036151141; Mon, 22 Aug 2011 11:02:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.205.83.203 with HTTP; Mon, 22 Aug 2011 11:02:11 -0700 (PDT) From: "KESHAV P.R." Date: Mon, 22 Aug 2011 23:32:11 +0530 Message-ID: Subject: Add prefix option to grub-mkconfig To: grub-devel Content-Type: multipart/mixed; boundary=00151750e3a402c45d04ab1be2f2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 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: Mon, 22 Aug 2011 18:02:40 -0000 --00151750e3a402c45d04ab1be2f2 Content-Type: text/plain; charset=UTF-8 Hi, I made a small change to grub-mkconfig.in script to add GRUB_PREFIX option as an argument so that a single grub-mkconfig can be used to generate grub.cfg for both /boot/grub (with bios video modules being loaded) and /boot/efi/efi/grub (uefi video modules loaded in the config). Please review and apply it. Thanks in advance. Regards. Keshav PS: Patch attached. --00151750e3a402c45d04ab1be2f2 Content-Type: text/x-patch; charset=US-ASCII; name="grub-mkconfig-add-prefix-option.patch" Content-Disposition: attachment; filename="grub-mkconfig-add-prefix-option.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_grnr5x5t0 ZGlmZiAtLWdpdCBhL3V0aWwvZ3J1Yi1ta2NvbmZpZy5pbiBiL3V0aWwvZ3J1Yi1ta2NvbmZpZy5p bgppbmRleCBlMzE3Mjc5Li5hNDU3YjI2IDEwMDY0NAotLS0gYS91dGlsL2dydWItbWtjb25maWcu aW4KKysrIGIvdXRpbC9ncnViLW1rY29uZmlnLmluCkBAIC00OSw2ICs0OSw3IEBAIHVzYWdlICgp IHsKIFVzYWdlOiAkc2VsZiBbT1BUSU9OXQogR2VuZXJhdGUgYSBncnViIGNvbmZpZyBmaWxlCiAK KyAgLXAsIC0tcHJlZml4PVBBVEggICAgICAgZ3J1YiBwcmVmaXggZGlyIFtkZWZhdWx0PS9ib290 L2dydWJdCiAgIC1vLCAtLW91dHB1dD1GSUxFICAgICAgIG91dHB1dCBnZW5lcmF0ZWQgY29uZmln IHRvIEZJTEUgW2RlZmF1bHQ9c3Rkb3V0XQogICAtaCwgLS1oZWxwICAgICAgICAgICAgICBwcmlu dCB0aGlzIG1lc3NhZ2UgYW5kIGV4aXQKICAgLXYsIC0tdmVyc2lvbiAgICAgICAgICAgcHJpbnQg dGhlIHZlcnNpb24gaW5mb3JtYXRpb24gYW5kIGV4aXQKQEAgLTgxLDYgKzgyLDExIEBAIGRvCiAg ICAgLXYgfCAtLXZlcnNpb24pCiAJZWNobyAiJHNlbGYgKCR7UEFDS0FHRV9OQU1FfSkgJHtQQUNL QUdFX1ZFUlNJT059IgogCWV4aXQgMCA7OworICAgIC1wIHwgLS1wcmVmaXgpCisJR1JVQl9QUkVG SVg9YGFyZ3VtZW50ICRvcHRpb24gIiRAImA7IHNoaWZ0OzsKKyAgICAtLXByZWZpeD0qKQorCUdS VUJfUFJFRklYPWBlY2hvICIkb3B0aW9uIiB8IHNlZCAicywvLyosLyxnImAKKwk7OwogICAgIC1v IHwgLS1vdXRwdXQpCiAJZ3J1Yl9jZmc9YGFyZ3VtZW50ICRvcHRpb24gIiRAImA7IHNoaWZ0OzsK ICAgICAtLW91dHB1dD0qKQo= --00151750e3a402c45d04ab1be2f2-- From MAILER-DAEMON Wed Aug 24 05:17:05 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qw9a5-0000HG-Ow for mharc-grub-devel@gnu.org; Wed, 24 Aug 2011 05:17:05 -0400 Received: from eggs.gnu.org ([140.186.70.92]:35730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qw9a3-0000H4-8E for grub-devel@gnu.org; Wed, 24 Aug 2011 05:17:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qw9a0-0000mc-N2 for grub-devel@gnu.org; Wed, 24 Aug 2011 05:17:03 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]:58083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qw9a0-0000mD-IT for grub-devel@gnu.org; Wed, 24 Aug 2011 05:17:00 -0400 Received: by pzk36 with SMTP id 36so630735pzk.17 for ; Wed, 24 Aug 2011 02:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=UYPPfM6SXaxYdtZOIRimw4BsgQUdx/M1WfIeeLsPVd4=; b=cHAg1wMbwX2xIWswpau24pFCJZRR30ZYRlSuASRbSZp+Md3UW1sfO5LgetNzGV1Od/ MSOJuW9FBcSA7MR7AExzg1IJc2rmFqx8r0xLic/IIbZ/WUQAesrrWF+P42qpDiEsv/Xz 0cLR4xBwI9LIvw6vp27Nc17PNI26ax6aVcfRM= Received: by 10.142.174.3 with SMTP id w3mr2796349wfe.244.1314177418053; Wed, 24 Aug 2011 02:16:58 -0700 (PDT) MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.142.226.16 with HTTP; Wed, 24 Aug 2011 02:16:38 -0700 (PDT) From: Michal Suchanek Date: Wed, 24 Aug 2011 11:16:38 +0200 X-Google-Sender-Auth: _cb8rDi6ULrbJFJi9-Fp9eHB7ew Message-ID: Subject: Timeout broken with serial port To: The development of GRUB 2 Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.44 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, 24 Aug 2011 09:17:04 -0000 Hello, I was experiencing a mysterious error with grub. It would not boot with timeout set. It turns out that setting serial IO disables timeout. grub-pc 1.99-11ubuntu1 I think it used to work with earlier grub, I have this file for ages: # cat /etc/grub.d/03_serial #!/bin/sh echo serial --unit=0 --speed=115200 echo terminal_input --append serial\; terminal_output --append serial From MAILER-DAEMON Wed Aug 24 05:40:35 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qw9wp-0008J7-OT for mharc-grub-devel@gnu.org; Wed, 24 Aug 2011 05:40:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qw9wn-0008Hy-7I for grub-devel@gnu.org; Wed, 24 Aug 2011 05:40:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qw9wm-0006yr-0O for grub-devel@gnu.org; Wed, 24 Aug 2011 05:40:33 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:62958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qw9wl-0006ye-R3 for grub-devel@gnu.org; Wed, 24 Aug 2011 05:40:31 -0400 Received: by wyi11 with SMTP id 11so831942wyi.0 for ; Wed, 24 Aug 2011 02:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=DZPiNAPFItkFO7l45ND4S78geQi7cumqCHkrOcOBbhw=; b=DLeOeHfey/NWvqCV1uy0/ig2bQf9DseNolPmBRmpYgyvQInZdzO4Hhe9xlFozAcOiI kLBhjhabtaOPwrIMmkDTiDr4I4F6AImfOKbkmiIVDL2U5A90JeonBe7e39hEV2Kqnfqg 7zg1Z5RZkBVrkrKSVD6BCJBQU7jxg06nlCaRg= Received: by 10.227.201.8 with SMTP id ey8mr1169735wbb.108.1314178830718; Wed, 24 Aug 2011 02:40:30 -0700 (PDT) Received: from debian.x201.phnet (gprs35.swisscom-mobile.ch [193.247.250.35]) by mx.google.com with ESMTPS id fd4sm681293wbb.47.2011.08.24.02.40.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Aug 2011 02:40:29 -0700 (PDT) Message-ID: <4E54C70A.8050503@gmail.com> Date: Wed, 24 Aug 2011 11:40:26 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110820 Iceowl/1.0b2 Icedove/3.1.12 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: Timeout broken with serial port References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigC166B3A7D10697CA24D6755B" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.169 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, 24 Aug 2011 09:40:34 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC166B3A7D10697CA24D6755B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 24.08.2011 11:16, Michal Suchanek wrote: > Hello, > > I was experiencing a mysterious error with grub. It would not boot > with timeout set. > > It turns out that setting serial IO disables timeout. Check your contacts. Bad contacts are known to send noise on I/O which GRUB interprets as keypresses. > grub-pc 1.99-11ubuntu1 > > I think it used to work with earlier grub, I have this file for ages: > > # cat /etc/grub.d/03_serial > #!/bin/sh > > echo serial --unit=3D0 --speed=3D115200 > echo terminal_input --append serial\; terminal_output --append serial > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigC166B3A7D10697CA24D6755B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk5UxwoACgkQNak7dOguQgn6pgD+OLiPyMDHB/coHJbEQTh4qKAI XWruup+Pi8U5g5WIzN4A/RsZP/2wLIjYz1OejlEZhT1iS96GJAhkBtU7wAl1MfhE =yByU -----END PGP SIGNATURE----- --------------enigC166B3A7D10697CA24D6755B-- From MAILER-DAEMON Thu Aug 25 01:35:24 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QwSb6-0001LY-Ne for mharc-grub-devel@gnu.org; Thu, 25 Aug 2011 01:35:24 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwSb3-0001KJ-Nz for grub-devel@gnu.org; Thu, 25 Aug 2011 01:35:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwSb2-0007vH-Tj for grub-devel@gnu.org; Thu, 25 Aug 2011 01:35:21 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:58428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwSb2-0007v5-Oi for grub-devel@gnu.org; Thu, 25 Aug 2011 01:35:20 -0400 Received: from rtcsinet22.oracle.com (rtcsinet22.oracle.com [66.248.204.30]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p7P5ZFUj015581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Aug 2011 05:35:17 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rtcsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p7P5ZE6d017420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 25 Aug 2011 05:35:15 GMT Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p7P5Z9Ke001638 for ; Thu, 25 Aug 2011 00:35:09 -0500 Received: from [192.168.2.6] (/98.210.248.164) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 24 Aug 2011 22:35:09 -0700 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: getroot for ZFS without libzfs? From: Seth Goldberg In-Reply-To: <4E4D4648.1090102@gmail.com> Date: Wed, 24 Aug 2011 22:35:08 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <8B5E58A1-B9DD-465D-BEFD-CD19E9C67DDE@oracle.com> References: <624ACA48-86E4-4ECB-A975-A47B1FB7F7E6@gmail.com> <0C06B528-4EA9-48D4-820F-C6B408EC4CF0@gmail.com> <4E4D4648.1090102@gmail.com> To: The development of GNU GRUB X-Mailer: Apple Mail (2.1084) X-Source-IP: rtcsinet22.oracle.com [66.248.204.30] X-CT-RefId: str=0001.0A090208.4E55DF15.00F7,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 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: Thu, 25 Aug 2011 05:35:22 -0000 Hi, > @Seth: any comment on what Sun considers a public API? >>>=20 As far as I know, libzfs is not a publicly documented API. I don't = think I can give any assurances about its stability. >>> Then I wouldn't use /dev/zfs. The less stable and standard is the = ZFS >>> API GRUB uses, the more likely is that one can argue it doesn't fall >>> under the "system library" exception. > We don't need system library exception to read /dev/zfs. It's not a > library but a way to speak with kernel which is definitely = interprocess > communication. My gut reaction to that would be that it would probably be easier for = the ioctl interface to change than the libzfs interface, but that's my = personal opinion :). If you do decide to make changes for other systems, it would be nice = to leave in the libzfs code that exists for platforms that have it, if = that's allowable/possible. --S From MAILER-DAEMON Fri Aug 26 05:57:19 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QwtA7-0008JN-Qk for mharc-grub-devel@gnu.org; Fri, 26 Aug 2011 05:57:19 -0400 Received: from eggs.gnu.org ([140.186.70.92]:40265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwtA4-0008JE-K8 for grub-devel@gnu.org; Fri, 26 Aug 2011 05:57:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwtA2-0008Ee-8k for grub-devel@gnu.org; Fri, 26 Aug 2011 05:57:16 -0400 Received: from smtp-out3.iol.cz ([194.228.2.91]:55793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwtA1-0008E1-CX for grub-devel@gnu.org; Fri, 26 Aug 2011 05:57:14 -0400 Received: from antivir5.iol.cz (unknown [192.168.30.212]) by smtp-out3.iol.cz (Postfix) with ESMTP id ABFF6BC8299 for ; Fri, 26 Aug 2011 09:57:09 +0000 (UTC) Received: from localhost (antivir5.iol.cz [127.0.0.1]) by antivir5.iol.cz (Postfix) with ESMTP id 94A4B1E80A0 for ; Fri, 26 Aug 2011 11:57:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at iol.cz Received: from antivir5.iol.cz ([127.0.0.1]) by localhost (antivir5.iol.cz [127.0.0.1]) (amavisd-new, port 10224) with LMTP id SnzShV745Qe6 for ; Fri, 26 Aug 2011 11:57:09 +0200 (CEST) Received: from port4.iol.cz (unknown [192.168.30.94]) by antivir5.iol.cz (Postfix) with ESMTP id 327D61E8093 for ; Fri, 26 Aug 2011 11:57:08 +0200 (CEST) X-SBRS: None X-SBRS-none: None X-RECVLIST: MTA-OUT-IOL X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjYLAJRtV05VRnXk/2dsb2JhbAAMNoRMeaUKAQEBAQMBAQEgBEcbCRQGKgICJwEFHA4GCgmHdqkfkV2FO4ERBI4SgniTEg Received: from 228.117.broadband3.iol.cz (HELO [192.168.8.160]) ([85.70.117.228]) by port4.iol.cz with ESMTP; 26 Aug 2011 11:57:07 +0200 Subject: [PATCH] Re: [Fwd: [Resolved] Grub2 can not detect usb disk] From: =?UTF-8?Q?Ale=C5=A1?= Nesrsta To: The development of GNU GRUB In-Reply-To: <4E512DF6.1030807@gmail.com> References: <1313876741.5634.49.camel@pracovna> <4E512DF6.1030807@gmail.com> Content-Type: multipart/mixed; boundary="=-iMEnpBmvQpTRI0BBEad5" Date: Fri, 26 Aug 2011 11:57:06 +0200 Message-ID: <1314352626.2642.10.camel@pracovna> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 194.228.2.91 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: Fri, 26 Aug 2011 09:57:18 -0000 --=-iMEnpBmvQpTRI0BBEad5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Vladimir, there is the patch with @Rock changes. I hope I didn't make some mistake during cleanup/macroify... You may note some additional cosmetic changes: 1. ... + /* Finish HC reset, HC remains disabled */ + grub_uhci_writereg16(u, GRUB_UHCI_REG_USBCMD, 0); + /* Read back to be sure PCI write is done */ + grub_uhci_readreg16(u, GRUB_UHCI_REG_USBCMD); ... I think it is more safe to ensure the command is written into PCI register before executing next code. 2. - /* Make sure UHCI is disabled! */ - grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 0); - It is not necessary yet because UHCI is disabled sooner in code which is listed above in point 1. 3. - grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 1 | (1 << 7)); + grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, + GRUB_UHCI_CMD_RUN_STOP | GRUB_UHCI_CMD_MAXP); Some very small cleanup of previous code... I very shortly tested this patch, it seems to be working OK. Best regards, Ales Vladimir '=CF=86-coder/phcoder' Serbinenko p=C3=AD=C5=A1e v Ne 21. 08. 20= 11 v 18:10 +0200: > On 20.08.2011 23:45, Ale=C5=A1 Nesrsta wrote: > > Hi everybody, > > > > could anybody test changes from Cui Lei (see below) in uhci.c - if th= ey > > are generally working and does not have some negative effect on machi= nes > > with "normal" BIOS etc. ? > > > > Maybe such changes are related only to coreboot and some special use > > case/platform, but probably they are related to needed change of UHCI > > controller ownership and should be included into uhci.c code. > > > I don't think it is. The difference is that coreboot doesn't use USB > itself so it's initialised but disabled initially which I expect also t= o > happen with some older BIOSes so this code is perfectly ok to be added > generically. > @Rock or Ale=C5=A1: Could someone of you clean this up (macroify and co= mment > style mainly) and supply as a .diff ? > > Regards, > > Ales > > > > -------- P=C5=99eposlan=C3=A1 zpr=C3=A1va -------- > > Od: Cui Lei > > Komu: Ale=C5=A1 Nesrsta > > Kopie: The development of GNU GRUB > > P=C5=99edm=C4=9Bt: [Resolved] Grub2 can not detect usb disk > > Datum: Fri, 19 Aug 2011 10:58:00 +0800 > > > > Thank you for your help, very much! ^_^ > > This problem have been resolved and I can usb the usb_keyborard under= =20 > > grub-shell and I can boot ubuntu11.04 from usb disk. > > My mainboard is via 8595a, the usb controller is uhci. > > I resolved it by add these code in the grub-core/bus/usb/uhci.c: > > > > (1) > > 182 /*Set bus master*/ > > 183 addr =3D grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND); > > 184 grub_uint16_t val =3D grub_pci_read_word(addr); > > 185 val =3D (val & ~0) | GRUB_PCI_COMMAND_BUS_MASTER; > > 186 grub_pci_write_word(addr, val); > > > > (2) > > 203 // Reset PIRQ and SMI > > 204 addr =3D grub_pci_make_address (dev, 0xC0); =20 > > //USBLEGSUP 0xc0 > > 205 grub_pci_write_word(addr, 0x8f00); //USBLEGSUP_RWC =20 > > 0x8f00 /* the R/WC bits */ > > 206 // Reset the HC > > 207 grub_uhci_writereg16(u, GRUB_UHCI_REG_USBCMD, 0x0002);=20 > > //USBCMD_HCRESET 0x0002 > > 208 grub_millisleep(5); > > 209 // Disable interrupts and commands (just to be safe). > > 210 grub_outw (0, u->iobase + 4); //USBINTR 4 /*Interrupt=20 > > enable register*/ > > 211 grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 0); > > > > I don't know whether it is useful to the other one, but may be a refe= rence. > > > > BRs, > > > > Rock. > > > >> Hi, > >> > >> I am afraid, I maybe will not help You too much but I try it: > >> > >> I shortly looked into ML to Your posts. As I saw short part of debug > >> output in one of Your e-mail, GRUB freezes when it wants to get devi= ce > >> descriptor - more precisely, when it requests first 8 bytes of devic= e > >> descriptor. It is the first thing which is done after address is > >> assigned to the device. > >> > >> So, it looks like device does not set address properly (even if cont= rol > >> message Set Address returns success) or happened something else what > >> prevent device to respond (but I don't know what...). > >> > >> For the first try You can increase related delays in usbhub.c: > >> > >> ... > >> /* Wait "recovery interval", spec. says 2ms */ > >> grub_millisleep (2);<<<<---- HERE (try 4ms or more) > >> > >> grub_usb_device_attach (dev); > >> ... > >> > >> ... > >> /* Enable the port. */ > >> err =3D hub->controller->dev->portstatus (hub->controller, portno= , 1); > >> if (err) > >> return; > >> hub->controller->dev->pending_reset =3D grub_get_time_ms () + 500= 0; > >> > >> grub_millisleep (10);<<<<---- maybe here also > >> > >> /* Enable the port and create a device. */ > >> dev =3D grub_usb_hub_add_dev (hub->controller, speed, portno, 0); > >> hub->controller->dev->pending_reset =3D 0; > >> if (! dev) > >> return; > >> ... > >> > >> If this will not help You, I currently have no other idea what could= be > >> the reason of timeout. > >> I think You don't need EHCI because it looks like Set Address contro= l > >> message works (at least it does not return error), i.e. You probably > >> have OHCI or UHCI USB (companion) controller on computer and Your de= vice > >> is working at full or low speed with Your USB controller. > >> > >> By the way, for the first look into ML I did not find which USB > >> controller You have - OHCI/UHCI ? (which driver/module are You using= - > >> ohci/uhci?) - and which machine/architecture is the computer You are > >> trying to boot with GRUB2 - ? > >> I sometimes had some unidentified problems on my UHCI/EHCI controlle= r, > >> mostly with port powering - UHCI does not have power management but = EHCI > >> does and if EHCI is not properly initialized by BIOS (it could be Yo= ur > >> case with coreboot, maybe ?) then USB ports are not properly powered= . > >> Another BIOS (coreboot?) issue could be improper handling of USB > >> controller ownership. > >> > >> Do You have USB device connected directly into root port or via some= USB > >> hub ? Try to do it in opposite way (i.e. if You are not using the US= B > >> hub, try use it and connect USB device via hub - maybe it helps...) > >> > >> Hmmm, I remember now one issue which could be related to Your proble= m. > >> On my very old machine with OHCI USB controller some devices are not > >> working "for the first time". I am still not able to debug why it > >> happened (it does not happened when full debug is active - so it loo= ks > >> like it is related to some timing). But I am afraid it will be not Y= our > >> case because device stops working after it is recognized, configured= , > >> usbms module loaded and GRUB USB device usb0 created. > >> But - try load ohci/uhci module when USB disk is connected and then > >> disconnect and connect it again after few seconds. In my case device > >> becomes working as new usb device (i.e. usb1). > >> > >> Additionally, lot of manufacturers does not follow USB or USBMS > >> specifications, as You can read in Linux source code of USB controll= ers > >> and USB mass storage devices and related documentation. > >> Did You tried more different USB mass storage devices ? > >> What is manufacturer& type of Your USB mass storage device ? > >> > >> Of course, You can also try EHCI driver, it maybe can solve Your pro= blem > >> because of little bit different ports/devices handling. But EHCI dri= ver > >> is currently highly experimental, it still exists only as uncorrecte= d > >> and not accepted "patch". I have to do some improvement but I don't = have > >> sufficient time still, unfortunately... > >> If You want try to use it, You can get my patch from ML (sent at > >> 25.6.2011) and use it with related source code trunk branch revision > >> (maybe also any later or current revision, because USB parts of GRUB= are > >> not frequently changed). Please also read about know issue and anoth= er > >> limitations of the "zero version" of EHCI driver - e.g. it may not w= ork > >> if Your PC is not x86 machine or USB registers are mapped above 4GB = etc. > >> > >> Sorry if You will wait longer time for my response in future - I don= 't > >> check the post so often and additionally currently I am (and probabl= y > >> will be) longer time too busy - I am not regular GRUB2 contributor, = I do > >> something for GRUB2 USB part only time to time... > >> > >> BRs, > >> Ales > >> > >> > >> Cui Lei p=C3=AD=C5=A1e v =C3=9At 09. 08. 2011 v 11:05 +0800: > >>> Hi Ale=C5=A1, > >>> I am trying to boot OS from USB disk, I use coreboot-v4 with grub2= as > >>> payload, but my usb disk can not been > >>> detect. I try to use usb-keyboard, it is not working. I know you a= re > >>> working on the EHCI driver from Vladimir , > >>> could you give me some advices? Vladimir said it may need EHCI driv= er, > >>> but I think the usb device should run > >>> with low-speed or full-speed if no EHCI driver.C > >>> > >>> Looking forward to your reply. > >>> BRs, > >>> Rock Cui. > >>> > >>> > > > > > > > > > > > > _______________________________________________ > > Grub-devel mailing list > > Grub-devel@gnu.org > > https://lists.gnu.org/mailman/listinfo/grub-devel >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel --=-iMEnpBmvQpTRI0BBEad5 Content-Disposition: attachment; filename="usb_patch_uhci_110826_0" Content-Type: text/x-patch; name="usb_patch_uhci_110826_0"; charset="UTF-8" Content-Transfer-Encoding: 7bit diff -purB ./grub/grub-core/bus/usb/uhci.c ./grub_patched/grub-core/bus/usb/uhci.c --- ./grub/grub-core/bus/usb/uhci.c 2011-08-26 10:21:39.000000000 +0200 +++ ./grub_patched/grub-core/bus/usb/uhci.c 2011-08-26 11:29:52.000000000 +0200 @@ -36,11 +36,33 @@ GRUB_MOD_LICENSE ("GPLv3+"); typedef enum { GRUB_UHCI_REG_USBCMD = 0x00, + GRUB_UHCI_REG_USBINTR = 0x04, GRUB_UHCI_REG_FLBASEADD = 0x08, GRUB_UHCI_REG_PORTSC1 = 0x10, - GRUB_UHCI_REG_PORTSC2 = 0x12 + GRUB_UHCI_REG_PORTSC2 = 0x12, + GRUB_UHCI_REG_USBLEGSUP = 0xc0 } grub_uhci_reg_t; +/* R/WC legacy support bits */ +#define GRUB_UHCI_LEGSUP_END_A20GATE (1 << 15) +#define GRUB_UHCI_TRAP_BY_64H_WSTAT (1 << 11) +#define GRUB_UHCI_TRAP_BY_64H_RSTAT (1 << 10) +#define GRUB_UHCI_TRAP_BY_60H_WSTAT (1 << 9) +#define GRUB_UHCI_TRAP_BY_60H_RSTAT (1 << 8) + +/* Reset all legacy support - clear all R/WC bits and all R/W bits */ +#define GRUB_UHCI_RESET_LEGSUP_SMI ( GRUB_UHCI_LEGSUP_END_A20GATE \ + | GRUB_UHCI_TRAP_BY_64H_WSTAT \ + | GRUB_UHCI_TRAP_BY_64H_RSTAT \ + | GRUB_UHCI_TRAP_BY_60H_WSTAT \ + | GRUB_UHCI_TRAP_BY_60H_RSTAT ) + +/* Some UHCI commands */ +#define GRUB_UHCI_CMD_RUN_STOP (1 << 0) +#define GRUB_UHCI_CMD_HCRESET (1 << 1) +#define GRUB_UHCI_CMD_MAXP (1 << 7) + +/* Important bits in structures */ #define GRUB_UHCI_LINK_TERMINATE 1 #define GRUB_UHCI_LINK_QUEUE_HEAD 2 @@ -181,6 +203,11 @@ grub_uhci_pci_iter (grub_pci_device_t de if (class != 0x0c || subclass != 0x03 || interf != 0x00) return 0; + /* Set bus master - needed for coreboot or broken BIOSes */ + addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND); + grub_pci_write_word(addr, + GRUB_PCI_COMMAND_BUS_MASTER | grub_pci_read_word(addr)); + /* Determine IO base address. */ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG4); base = grub_pci_read (addr); @@ -195,6 +222,19 @@ grub_uhci_pci_iter (grub_pci_device_t de u->iobase = base & GRUB_UHCI_IOMASK; + /* Reset PIRQ and SMI */ + addr = grub_pci_make_address (dev, GRUB_UHCI_REG_USBLEGSUP); + grub_pci_write_word(addr, GRUB_UHCI_RESET_LEGSUP_SMI); + /* Reset the HC */ + grub_uhci_writereg16(u, GRUB_UHCI_REG_USBCMD, GRUB_UHCI_CMD_HCRESET); + grub_millisleep(5); + /* Disable interrupts and commands (just to be safe) */ + grub_uhci_writereg16(u, GRUB_UHCI_REG_USBINTR, 0); + /* Finish HC reset, HC remains disabled */ + grub_uhci_writereg16(u, GRUB_UHCI_REG_USBCMD, 0); + /* Read back to be sure PCI write is done */ + grub_uhci_readreg16(u, GRUB_UHCI_REG_USBCMD); + /* Reserve a page for the frame list. */ u->framelist = grub_memalign (4096, 4096); if (! u->framelist) @@ -252,9 +292,6 @@ grub_uhci_pci_iter (grub_pci_device_t de u->td[N_TD - 2].linkptr = 0; u->tdfree = u->td; - /* Make sure UHCI is disabled! */ - grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 0); - /* Setup the frame list pointers. Since no isochronous transfers are and will be supported, they all point to the (same!) queue head. */ @@ -285,7 +322,8 @@ grub_uhci_pci_iter (grub_pci_device_t de u->qh[N_QH - 1].linkptr = 1; /* Enable UHCI again. */ - grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, 1 | (1 << 7)); + grub_uhci_writereg16 (u, GRUB_UHCI_REG_USBCMD, + GRUB_UHCI_CMD_RUN_STOP | GRUB_UHCI_CMD_MAXP); /* UHCI is initialized and ready for transfers. */ grub_dprintf ("uhci", "UHCI initialized\n"); --=-iMEnpBmvQpTRI0BBEad5-- From MAILER-DAEMON Fri Aug 26 15:16:25 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qx1tB-0004Av-Sa for mharc-grub-devel@gnu.org; Fri, 26 Aug 2011 15:16:25 -0400 Received: from eggs.gnu.org ([140.186.70.92]:52493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qx1t9-00048d-2w for grub-devel@gnu.org; Fri, 26 Aug 2011 15:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qx1t8-0006fv-0o for grub-devel@gnu.org; Fri, 26 Aug 2011 15:16:23 -0400 Received: from asmtpout029.mac.com ([17.148.16.104]:41345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qx1t7-0006fp-Ri for grub-devel@gnu.org; Fri, 26 Aug 2011 15:16:21 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from localhost (aegis.CS.Princeton.EDU [128.112.139.195]) by asmtp029.mac.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPSA id <0LQJ008Q2UUU7690@asmtp029.mac.com> for grub-devel@gnu.org; Fri, 26 Aug 2011 12:16:08 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.211,0.0.0000 definitions=2011-08-26_05:2011-08-26, 2011-08-26, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1108260185 From: Trevor Jim To: grub-devel@gnu.org Subject: efi boot, nvidia, macbookair3,1 User-Agent: Notmuch/0.6 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-unknown-linux-gnu) Date: Fri, 26 Aug 2011 15:17:36 -0400 Message-id: <87fwko3ru7.fsf@research.att.com> X-detected-operating-system: by eggs.gnu.org: Solaris 10 (1203?) X-Received-From: 17.148.16.104 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: Fri, 26 Aug 2011 19:16:24 -0000 Hi, I'm trying to debug nvidia graphics with EFI boot on a MacbookAir3,1. Any pointers would be appreciated. EFI boots fine to console. Black screen on xinit with nvidia driver. I hear nouveau is the same, however, the following bug report indicates the problem is that nouveau (and presumably nvidia) expects the bios information in a different location than provided by grub: https://bugs.freedesktop.org/show_bug.cgi?id=35267#c10 Where would be the place to fix this? fakebios/loadbios? Not grub? :-) -T From MAILER-DAEMON Fri Aug 26 21:16:03 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qx7VD-0004be-3O for mharc-grub-devel@gnu.org; Fri, 26 Aug 2011 21:16:03 -0400 Received: from eggs.gnu.org ([140.186.70.92]:46274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qx7VA-0004bY-G8 for grub-devel@gnu.org; Fri, 26 Aug 2011 21:16:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qx7V9-0001cg-3j for grub-devel@gnu.org; Fri, 26 Aug 2011 21:16:00 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:40883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qx7V8-0001cb-Oi for grub-devel@gnu.org; Fri, 26 Aug 2011 21:15:59 -0400 Received: by bkbzt4 with SMTP id zt4so3358019bkb.0 for ; Fri, 26 Aug 2011 18:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=iERYvPI7HceKTBgTYNn7LzX7NyWhbKPdOMm9uk8dhpU=; b=GRBh6BXKfOyVEG1gFT7VvCfO5ANunfSDJulFRDYdH+1i0zPAiTqxK6e6SOWqWj8La6 mDm7g4Jy5IQl7SWAkTZMcY42MPwR1jHyevlxI98FOnBES9JHcariWPglWz1gE9nIy40n ICTgaUmvI7O1UL6uilGPYjT9dvp9YzYmqrsMI= Received: by 10.204.9.194 with SMTP id m2mr892687bkm.153.1314407757260; Fri, 26 Aug 2011 18:15:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.39.3 with HTTP; Fri, 26 Aug 2011 18:15:37 -0700 (PDT) From: BVK Chaitanya Date: Fri, 26 Aug 2011 18:15:37 -0700 Message-ID: Subject: [PATCH] Use Autogen macros to reduce Makefile.tpl size To: The development of GRUB 2 Content-Type: multipart/mixed; boundary=0015175d02a276278804ab72673e X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 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: Sat, 27 Aug 2011 01:16:01 -0000 --0015175d02a276278804ab72673e Content-Type: text/plain; charset=ISO-8859-1 Hi, Attached patch removes lots of repeated Autogen code snippets from Makefile.tpl with the help of Autogen macros. This reduces the Makefile.tpl size from 9MB to less than 2MB. thanks, bvk.chaitanya --0015175d02a276278804ab72673e Content-Type: text/x-patch; charset=US-ASCII; name="gentpl-improvements.patch" Content-Disposition: attachment; filename="gentpl-improvements.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_grtwd88v0 IyBCYXphYXIgbWVyZ2UgZGlyZWN0aXZlIGZvcm1hdCAyIChCYXphYXIgMC45MCkKIyByZXZpc2lv bl9pZDogYnZrLmdyb3Vwc0BnbWFpbC5jb20tMjAxMTA4MjYwNjEzNTktc2dxejA0dmdieXRrdzVk cAojIHRhcmdldF9icmFuY2g6IGh0dHA6Ly9ienIuc2F2YW5uYWguZ251Lm9yZy9yL2dydWIvdHJ1 bmsvZ3J1Yi8KIyB0ZXN0YW1lbnRfc2hhMTogOGFhYTc4N2MxOGQzODJhNDVhOWE4OTI2OGM0OWVj MTU5OTExOGJkYwojIHRpbWVzdGFtcDogMjAxMS0wOC0yNSAyMzoxNDowNCAtMDcwMAojIGJhc2Vf cmV2aXNpb25faWQ6IHBoY29kZXJAZ21haWwuY29tLTIwMTEwODIzMDkyMDU2LTJvOHZyeWl3OXdh NmkyeWMKIyAKIyBCZWdpbiBwYXRjaAo9PT0gbW9kaWZpZWQgZmlsZSAnQ2hhbmdlTG9nJwotLS0g Q2hhbmdlTG9nCTIwMTEtMDgtMjMgMDk6MjA6NTYgKzAwMDAKKysrIENoYW5nZUxvZwkyMDExLTA4 LTI2IDA2OjEzOjU5ICswMDAwCkBAIC0xLDMgKzEsOCBAQAorMjAxMS0wOC0yNSAgQlZLIENoYWl0 YW55YSAgPGJ2ay5ncm91cHNAZ21haWwuY29tPgorCisJKiBnZW50cGwucHk6IFVzZSBBdXRvZ2Vu IG1hY3JvcyBzbyB0aGF0IHRoZSBvdXRwdXQgZmlsZQorCShNYWtlZmls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U4yNkUzcnZHcjg5eGFpWnVOcUJv RUlBTXJqV1VYRUZ1U0FWOVIxMGJBNWRNCmlaeE5wenJKQWQwU1N4RGtBTW5DcmhCQVMycVZiMXZ6 aDBLcXFxM3d3a3hZNWtOQlJGSW9vb29vcEVHNENDVUVTYTFjcTRyemIwcFcKRncwRXdseDNVcXVv NXpwT3dDRERBYkRuc2ZXUWxGWExFU1Mwc1dGTFJkT3FqZHMxQzYxekNMZW85Q0NVcnJvR2tTdzdp NmRDM1M2UQowbWN1eFJWT09pNkMrVXR0SlNoUWxBWkVZc0ZWUVZWWkJsZGtoWUdQaHUrcG13azQ0 Rkp0bTVoRE1WTWdhYTYyWmJTRkVoczNrYWRoCmdaSU5HRks3MmJxRENPQkJrcE1JaXlRcEkvd1RT K0x5RktZS1FGTWNCbHprMVJtZ2s2ZU9KZ2ozZ1dZaW1oTVhrUWxDaXpiZElYU3UKTlI0TkRpRjQ2 YjY3Mk1Fa280dFI3akxFUVFyUTBsSVVzcGpwZmFCcVRtSlQyaDZBTEE5Z1JoaVhKcWx0Sk5kRE1j Z01pUENVQytBeApQS2dzanovRjNKRk9GQ1FWWk0rb2dBPT0K --0015175d02a276278804ab72673e-- From MAILER-DAEMON Sat Aug 27 12:42:43 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QxLxz-00015p-EW for mharc-grub-devel@gnu.org; Sat, 27 Aug 2011 12:42:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxLxq-00010u-Ny for grub-devel@gnu.org; Sat, 27 Aug 2011 12:42:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QxLxl-0000Ry-F9 for grub-devel@gnu.org; Sat, 27 Aug 2011 12:42:34 -0400 Received: from smtp-out4.iol.cz ([194.228.2.92]:48037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxLxk-0000Rs-9C for grub-devel@gnu.org; Sat, 27 Aug 2011 12:42:29 -0400 Received: from antivir6.iol.cz (unknown [192.168.30.215]) by smtp-out4.iol.cz (Postfix) with ESMTP id F29EC581376 for ; Sat, 27 Aug 2011 16:42:23 +0000 (UTC) Received: from localhost (antivir6.iol.cz [127.0.0.1]) by antivir6.iol.cz (Postfix) with ESMTP id E2DE372008A for ; Sat, 27 Aug 2011 18:42:23 +0200 (CEST) X-Virus-Scanned: amavisd-new at iol.cz Received: from antivir6.iol.cz ([127.0.0.1]) by localhost (antivir6.iol.cz [127.0.0.1]) (amavisd-new, port 10224) with LMTP id NSrHNpxCjryg for ; Sat, 27 Aug 2011 18:42:23 +0200 (CEST) Received: from port4.iol.cz (unknown [192.168.30.94]) by antivir6.iol.cz (Postfix) with ESMTP id 9EB2D720087 for ; Sat, 27 Aug 2011 18:42:23 +0200 (CEST) X-SBRS: None X-SBRS-none: None X-RECVLIST: MTA-OUT-IOL X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiYMAD8dWU5VRnXk/2dsb2JhbAAMNoRMeaUeAQEFGgEIBGILQgICLSoGChISr2+Qc4U7gREEjhWPBIcM Received: from 228.117.broadband3.iol.cz (HELO [192.168.8.160]) ([85.70.117.228]) by port4.iol.cz with ESMTP; 27 Aug 2011 18:42:19 +0200 Subject: Re: [PATCH] EHCI driver - USB 2.0 support From: =?UTF-8?Q?Ale=C5=A1?= Nesrsta To: The development of GNU GRUB In-Reply-To: <4E28A149.4010008@gmail.com> References: <1309029199.2532.35.camel@pracovna> <201106252151.12483.szymon@janc.net.pl> <1309120668.3268.153.camel@pracovna> <4E28A149.4010008@gmail.com> Content-Type: multipart/mixed; boundary="=-C7f7TiLy1N2mADiw6c7F" Date: Sat, 27 Aug 2011 18:42:18 +0200 Message-ID: <1314463338.2555.56.camel@pracovna> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 194.228.2.92 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: Sat, 27 Aug 2011 16:42:39 -0000 --=-C7f7TiLy1N2mADiw6c7F Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi Vladimir, there is little bit improved EHCI driver - ehci.c. Changes in other files are still the same (more precisely, I hope - I didn't check if there are some other unrelated changes from anybody else in newest trunk revision...) - usb_ehci_110625_0. Changes were done according to Your notes: - ... run indent ... - done - ... macro into inline function ... - done - ... volatile attribute ... - done - ... pointer arithmetic via char* ... - done - ... access to PCI register in correct way in ownership change ... - done - ... "hard way" of ownership change ... - done - ... use of grub_memalign_dma32 ... - done - (corrected year in header of file...) Result: - driver should run on 64-bits machines with exception if EHCI I/O registers are mapped above 4G - driver should run on machines with different virtual/physical addressing - driver should run on "big endian" machines (but also original "zero version" EHCI patch supports big endian) Remaining issue: - Any HID low speed device attached via USB 2.0 hub does not work. (It is most probably because bulk split transfers are differently handled in comparison with interrupt split transfers. Probably only one solution is to add interrupt transfers into EHCI driver.) I made short test, driver looks to be working. But there can be still mistakes in CPU/LE and VIRT/PHYS conversions - I cannot test them on x86 machine (or at least I don't know how to do it...). Could You (or, of course, anybody else...) test EHCI patch on: - some "big endian" machine ? - some machine with different virtual/physical addressing, i.e. like Yeloong ? What I didn't: - ... packed isn't necessary here ... - GCC documentation says: "packed This attribute, attached to struct or union type definition, specifies that each member of the structure or union is placed to minimize the memory required." I.e., it is exactly what we need - members are stored in structure without any additional space between them. Without this attribute compiler can align structure members in any way (depend on its defaults and global settings etc.) - so members can be aligned e.g. to 64 bits inside structure and in this case we have structure which does not correspond to EHCI HW data structure. So, I left "packed" attribute in code. Best regards Ales --=-C7f7TiLy1N2mADiw6c7F Content-Disposition: attachment; filename="usb_ehci_110625_0" Content-Type: text/x-patch; name="usb_ehci_110625_0"; charset="UTF-8" Content-Transfer-Encoding: 7bit diff -purB ./grub/grub-core/bus/usb/usbhub.c ./grub_patched/grub-core/bus/usb/usbhub.c --- ./grub/grub-core/bus/usb/usbhub.c 2011-06-25 19:48:11.000000000 +0200 +++ ./grub_patched/grub-core/bus/usb/usbhub.c 2011-06-25 20:30:56.000000000 +0200 @@ -44,7 +44,9 @@ static struct grub_usb_hub *hubs; /* Add a device that currently has device number 0 and resides on CONTROLLER, the Hub reported that the device speed is SPEED. */ static grub_usb_device_t -grub_usb_hub_add_dev (grub_usb_controller_t controller, grub_usb_speed_t speed) +grub_usb_hub_add_dev (grub_usb_controller_t controller, + grub_usb_speed_t speed, + int port, int hubaddr) { grub_usb_device_t dev; int i; @@ -56,6 +58,8 @@ grub_usb_hub_add_dev (grub_usb_controlle dev->controller = *controller; dev->speed = speed; + dev->port = port; + dev->hubaddr = hubaddr; err = grub_usb_device_initialize (dev); if (err) @@ -97,6 +101,11 @@ grub_usb_hub_add_dev (grub_usb_controlle dev->initialized = 1; grub_usb_devs[i] = dev; + grub_dprintf ("usb", "Added new usb device: %08x, addr=%d\n", + (grub_uint32_t)dev, i); + grub_dprintf ("usb", "speed=%d, port=%d, hubaddr=%d\n", + speed, port, hubaddr); + /* Wait "recovery interval", spec. says 2ms */ grub_millisleep (2); @@ -218,7 +227,7 @@ attach_root_port (struct grub_usb_hub *h grub_millisleep (10); /* Enable the port and create a device. */ - dev = grub_usb_hub_add_dev (hub->controller, speed); + dev = grub_usb_hub_add_dev (hub->controller, speed, portno, 0); hub->controller->dev->pending_reset = 0; if (! dev) return; @@ -353,7 +362,7 @@ poll_nonroot_hub (grub_usb_device_t dev) 0, i, sizeof (status), (char *) &status); grub_dprintf ("usb", "dev = %p, i = %d, status = %08x\n", - dev, i, status); + dev, i, status); if (err) continue; @@ -472,7 +481,7 @@ poll_nonroot_hub (grub_usb_device_t dev) grub_millisleep (10); /* Add the device and assign a device address to it. */ - next_dev = grub_usb_hub_add_dev (&dev->controller, speed); + next_dev = grub_usb_hub_add_dev (&dev->controller, speed, i, dev->addr); dev->controller.dev->pending_reset = 0; if (! next_dev) continue; diff -purB ./grub/grub-core/Makefile.core.def ./grub_patched/grub-core/Makefile.core.def --- ./grub/grub-core/Makefile.core.def 2011-06-25 19:48:11.000000000 +0200 +++ ./grub_patched/grub-core/Makefile.core.def 2011-06-25 20:21:14.000000000 +0200 @@ -435,6 +435,12 @@ module = { }; module = { + name = ehci; + common = bus/usb/ehci.c; + enable = pci; +}; + +module = { name = pci; noemu = bus/pci.c; emu = bus/emu/pci.c; diff -purB ./grub/include/grub/usb.h ./grub_patched/include/grub/usb.h --- ./grub/include/grub/usb.h 2011-05-17 09:11:27.000000000 +0200 +++ ./grub_patched/include/grub/usb.h 2011-06-25 20:32:53.000000000 +0200 @@ -198,6 +198,11 @@ struct grub_usb_device grub_uint32_t statuschange; struct grub_usb_desc_endp *hub_endpoint; + + /* EHCI Split Transfer information */ + int port; + + int hubaddr; }; --=-C7f7TiLy1N2mADiw6c7F Content-Disposition: attachment; filename="ehci.c" Content-Type: text/x-csrc; name="ehci.c"; charset="UTF-8" Content-Transfer-Encoding: 7bit /* ehci.c - EHCI Support. */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2011 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GRUB is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GRUB. If not, see . */ #include #include #include #include #include #include #include #include #include #include GRUB_MOD_LICENSE ("GPLv3+"); /* This simple GRUB implementation of EHCI driver: * - assumes no IRQ * - is not supporting isochronous transfers (iTD, siTD) * - is not supporting interrupt transfers */ #define GRUB_EHCI_PCI_SBRN_REG 0x60 /* Capability registers offsets */ #define GRUB_EHCI_EHCC_CAPLEN 0x00 /* byte */ #define GRUB_EHCI_EHCC_VERSION 0x02 /* word */ #define GRUB_EHCI_EHCC_SPARAMS 0x04 /* dword */ #define GRUB_EHCI_EHCC_CPARAMS 0x08 /* dword */ #define GRUB_EHCI_EHCC_PROUTE 0x0c /* 60 bits */ #define GRUB_EHCI_EECP_MASK (0xff << 8) #define GRUB_EHCI_EECP_SHIFT 8 #define GRUB_EHCI_ADDR_MEM_MASK (~0xff) #define GRUB_EHCI_POINTER_MASK (~0x1f) /* Capability register SPARAMS bits */ #define GRUB_EHCI_SPARAMS_N_PORTS (0xf <<0) #define GRUB_EHCI_SPARAMS_PPC (1<<4) /* Power port control */ #define GRUB_EHCI_SPARAMS_PRR (1<<7) /* Port routing rules */ #define GRUB_EHCI_SPARAMS_N_PCC (0xf<<8) /* No of ports per comp. */ #define GRUB_EHCI_SPARAMS_NCC (0xf<<12) /* No of com. controllers */ #define GRUB_EHCI_SPARAMS_P_IND (1<<16) /* Port indicators present */ #define GRUB_EHCI_SPARAMS_DEBUG_P (0xf<<20) /* Debug port */ #define GRUB_EHCI_MAX_N_PORTS 15 /* Max. number of ports */ /* Capability register CPARAMS bits */ #define GRUB_EHCI_CPARAMS_64BIT (1<<0) #define GRUB_EHCI_CPARAMS_PROG_FRAMELIST (1<<1) #define GRUB_EHCI_CPARAMS_PARK_CAP (1<<2) #define GRUB_EHCI_N_FRAMELIST 1024 #define GRUB_EHCI_N_QH 256 #define GRUB_EHCI_N_TD 640 #define GRUB_EHCI_QH_EMPTY 1 /* USBLEGSUP bits and related OS OWNED byte offset */ #define GRUB_EHCI_BIOS_OWNED (1<<16) #define GRUB_EHCI_OS_OWNED (1<<24) /* Operational registers offsets */ #define GRUB_EHCI_COMMAND 0x00 #define GRUB_EHCI_STATUS 0x04 #define GRUB_EHCI_INTERRUPT 0x08 #define GRUB_EHCI_FRAME_INDEX 0x0c #define GRUB_EHCI_64BIT_SEL 0x10 #define GRUB_EHCI_FL_BASE 0x14 #define GRUB_EHCI_CUR_AL_ADDR 0x18 #define GRUB_EHCI_CONFIG_FLAG 0x40 #define GRUB_EHCI_PORT_STAT_CMD 0x44 /* Operational register COMMAND bits */ #define GRUB_EHCI_CMD_RUNSTOP (1<<0) #define GRUB_EHCI_CMD_HC_RESET (1<<1) #define GRUB_EHCI_CMD_FL_SIZE (3<<2) #define GRUB_EHCI_CMD_PS_ENABL (1<<4) #define GRUB_EHCI_CMD_AS_ENABL (1<<5) #define GRUB_EHCI_CMD_AS_ADV_D (1<<6) #define GRUB_EHCI_CMD_L_HC_RES (1<<7) #define GRUB_EHCI_CMD_AS_PARKM (3<<8) #define GRUB_EHCI_CMD_AS_PARKE (1<<11) #define GRUB_EHCI_CMD_INT_THRS (0xff<<16) /* Operational register STATUS bits */ #define GRUB_EHCI_ST_INTERRUPT (1<<0) #define GRUB_EHCI_ST_ERROR_INT (1<<1) #define GRUB_EHCI_ST_PORT_CHG (1<<2) #define GRUB_EHCI_ST_FL_ROLLOVR (1<<3) #define GRUB_EHCI_ST_HS_ERROR (1<<4) #define GRUB_EHCI_ST_AS_ADVANCE (1<<5) #define GRUB_EHCI_ST_HC_HALTED (1<<12) #define GRUB_EHCI_ST_RECLAM (1<<13) #define GRUB_EHCI_ST_PS_STATUS (1<<14) #define GRUB_EHCI_ST_AS_STATUS (1<<15) /* Operational register PORT_STAT_CMD bits */ #define GRUB_EHCI_PORT_CONNECT (1<<0) #define GRUB_EHCI_PORT_CONNECT_CH (1<<1) #define GRUB_EHCI_PORT_ENABLED (1<<2) #define GRUB_EHCI_PORT_ENABLED_CH (1<<3) #define GRUB_EHCI_PORT_OVERCUR (1<<4) #define GRUB_EHCI_PORT_OVERCUR_CH (1<<5) #define GRUB_EHCI_PORT_RESUME (1<<6) #define GRUB_EHCI_PORT_SUSPEND (1<<7) #define GRUB_EHCI_PORT_RESET (1<<8) #define GRUB_EHCI_PORT_LINE_STAT (3<<10) #define GRUB_EHCI_PORT_POWER (1<<12) #define GRUB_EHCI_PORT_OWNER (1<<13) #define GRUB_EHCI_PORT_INDICATOR (3<<14) #define GRUB_EHCI_PORT_TEST (0xf<<16) #define GRUB_EHCI_PORT_WON_CONN_E (1<<20) #define GRUB_EHCI_PORT_WON_DISC_E (1<<21) #define GRUB_EHCI_PORT_WON_OVER_E (1<<22) #define GRUB_EHCI_PORT_LINE_SE0 (0<<10) #define GRUB_EHCI_PORT_LINE_K (1<<10) #define GRUB_EHCI_PORT_LINE_J (2<<10) #define GRUB_EHCI_PORT_LINE_UNDEF (3<<10) #define GRUB_EHCI_PORT_LINE_LOWSP GRUB_EHCI_PORT_LINE_K /* K state means low speed */ #define GRUB_EHCI_PORT_WMASK ~(GRUB_EHCI_PORT_CONNECT_CH | \ GRUB_EHCI_PORT_ENABLED_CH | \ GRUB_EHCI_PORT_OVERCUR_CH) /* Operational register CONFIGFLAGS bits */ #define GRUB_EHCI_CF_EHCI_OWNER (1<<0) /* Queue Head & Transfer Descriptor constants */ #define GRUB_EHCI_HPTR_OFF 5 /* Horiz. pointer bit offset */ #define GRUB_EHCI_HPTR_TYPE_MASK (3<<1) #define GRUB_EHCI_HPTR_TYPE_ITD (0<<1) #define GRUB_EHCI_HPTR_TYPE_QH (1<<1) #define GRUB_EHCI_HPTR_TYPE_SITD (2<<1) #define GRUB_EHCI_HPTR_TYPE_FSTN (3<<1) #define GRUB_EHCI_C (1<<27) #define GRUB_EHCI_MAXPLEN_MASK (0x7ff<<16) #define GRUB_EHCI_MAXPLEN_OFF 16 #define GRUB_EHCI_H (1<<15) #define GRUB_EHCI_DTC (1<<14) #define GRUB_EHCI_SPEED_MASK (3<<12) #define GRUB_EHCI_SPEED_OFF 12 #define GRUB_EHCI_SPEED_FULL (0<<12) #define GRUB_EHCI_SPEED_LOW (1<<12) #define GRUB_EHCI_SPEED_HIGH (2<<12) #define GRUB_EHCI_SPEED_RESERVED (3<<12) #define GRUB_EHCI_EP_NUM_MASK (0xf<<8) #define GRUB_EHCI_EP_NUM_OFF 8 #define GRUB_EHCI_DEVADDR_MASK 0x7f #define GRUB_EHCI_TARGET_MASK (GRUB_EHCI_EP_NUM_MASK \ | GRUB_EHCI_DEVADDR_MASK) #define GRUB_EHCI_MULT_MASK (3<30) #define GRUB_EHCI_MULT_OFF 30 #define GRUB_EHCI_MULT_RESERVED (0<<30) #define GRUB_EHCI_MULT_ONE (0<<30) #define GRUB_EHCI_MULT_TWO (0<<30) #define GRUB_EHCI_MULT_THREE (0<<30) #define GRUB_EHCI_DEVPORT_MASK (0x7f<<23) #define GRUB_EHCI_DEVPORT_OFF 23 #define GRUB_EHCI_HUBADDR_MASK (0x7f<<16) #define GRUB_EHCI_HUBADDR_OFF 16 #define GRUB_EHCI_TERMINATE (1<<0) #define GRUB_EHCI_TOGGLE (1<<31) #define GRUB_EHCI_TOTAL_MASK (0x7fff << 16) #define GRUB_EHCI_TOTAL_OFF 16 #define GRUB_EHCI_CERR_MASK (3<<10) #define GRUB_EHCI_CERR_OFF 10 #define GRUB_EHCI_CERR_0 (0<<10) #define GRUB_EHCI_CERR_1 (1<<10) #define GRUB_EHCI_CERR_2 (2<<10) #define GRUB_EHCI_CERR_3 (3<<10) #define GRUB_EHCI_PIDCODE_OUT (0<<8) #define GRUB_EHCI_PIDCODE_IN (1<<8) #define GRUB_EHCI_PIDCODE_SETUP (2<<8) #define GRUB_EHCI_STATUS_MASK 0xff #define GRUB_EHCI_STATUS_ACTIVE (1<<7) #define GRUB_EHCI_STATUS_HALTED (1<<6) #define GRUB_EHCI_STATUS_BUFERR (1<<5) #define GRUB_EHCI_STATUS_BABBLE (1<<4) #define GRUB_EHCI_STATUS_TRANERR (1<<3) #define GRUB_EHCI_STATUS_MISSDMF (1<<2) #define GRUB_EHCI_STATUS_SPLITST (1<<1) #define GRUB_EHCI_STATUS_PINGERR (1<<0) #define GRUB_EHCI_BUFPTR_MASK (0xfffff<<12) #define GRUB_EHCI_QHTDPTR_MASK 0xffffffe0 #define GRUB_EHCI_TD_BUF_PAGES 5 #define GRUB_EHCI_BUFPAGELEN 0x1000 #define GRUB_EHCI_MAXBUFLEN 0x5000 #define GRUB_EHCI_QHPTR_TO_INDEX (qh) \ ((grub_uint32_t)qh - (grub_uint32_t)e->qh) / \ sizeof(grub_ehci_qh_t) struct grub_ehci_td; struct grub_ehci_qh; typedef volatile struct grub_ehci_td *grub_ehci_td_t; typedef volatile struct grub_ehci_qh *grub_ehci_qh_t; /* EHCI Isochronous Transfer Descriptor */ /* Currently not supported */ /* EHCI Split Transaction Isochronous Transfer Descriptor */ /* Currently not supported */ /* EHCI Queue Element Transfer Descriptor (qTD) */ /* Align to 32-byte boundaries */ struct grub_ehci_td { /* EHCI HW part */ grub_uint32_t next_td; /* Pointer to next qTD */ grub_uint32_t alt_next_td; /* Pointer to alternate next qTD */ grub_uint32_t token; /* Toggle, Len, Interrupt, Page, Error, PID, Status */ grub_uint32_t buffer_page[GRUB_EHCI_TD_BUF_PAGES]; /* Buffer pointer (+ cur. offset in page 0 */ /* 64-bits part */ grub_uint32_t buffer_page_high[GRUB_EHCI_TD_BUF_PAGES]; /* EHCI driver part */ grub_ehci_td_t link_td; /* pointer to next free/chained TD */ grub_uint32_t size; grub_uint32_t pad[1]; /* padding to some multiple of 32 bytes */ } __attribute__ ((packed)); /* EHCI Queue Head */ /* Align to 32-byte boundaries */ /* QH allocation is made in the similar/same way as in OHCI driver, * because unlninking QH from the Asynchronous list is not so * trivial as on UHCI (at least it is time consuming) */ struct grub_ehci_qh { /* EHCI HW part */ grub_uint32_t qh_hptr; /* Horiz. pointer & Terminate */ grub_uint32_t ep_char; /* EP characteristics */ grub_uint32_t ep_cap; /* EP capabilities */ grub_uint32_t td_current; /* current TD link pointer */ struct grub_ehci_td td_overlay; /* TD overlay area = 64 bytes */ /* EHCI driver part */ grub_uint32_t pad[4]; /* padding to some multiple of 32 bytes */ } __attribute__ ((packed)); /* EHCI Periodic Frame Span Traversal Node */ /* Currently not supported */ struct grub_ehci { volatile grub_uint32_t *iobase_ehcc; /* Capability registers */ volatile grub_uint32_t *iobase; /* Operational registers */ grub_pci_address_t pcibase_eecp; /* PCI extended capability registers base */ struct grub_pci_dma_chunk *framelist_chunk; /* Currently not used */ volatile grub_uint32_t *framelist_virt; grub_uint32_t framelist_phys; struct grub_pci_dma_chunk *qh_chunk; /* GRUB_EHCI_N_QH Queue Heads */ grub_ehci_qh_t qh_virt; grub_uint32_t qh_phys; struct grub_pci_dma_chunk *td_chunk; /* GRUB_EHCI_N_TD Transfer Descriptors */ grub_ehci_td_t td_virt; grub_uint32_t td_phys; grub_ehci_td_t tdfree_virt; /* Free Transfer Descriptors */ int flag64; grub_uint32_t reset; /* bits 1-15 are flags if port was reset from connected time or not */ struct grub_ehci *next; }; static struct grub_ehci *ehci; /* EHCC registers access functions */ static inline grub_uint32_t grub_ehci_ehcc_read32 (struct grub_ehci *e, grub_uint32_t addr) { return grub_le_to_cpu32 (* ((volatile grub_uint32_t *) ((char *) e->iobase_ehcc + addr))); } static inline grub_uint16_t grub_ehci_ehcc_read16 (struct grub_ehci *e, grub_uint32_t addr) { return grub_le_to_cpu16 (* ((volatile grub_uint16_t *) ((char *) e->iobase_ehcc + addr))); } static inline grub_uint8_t grub_ehci_ehcc_read8 (struct grub_ehci *e, grub_uint32_t addr) { return *((volatile grub_uint8_t *) ((char *) e->iobase_ehcc + addr)); } /* Operational registers access functions */ static inline grub_uint32_t grub_ehci_oper_read32 (struct grub_ehci *e, grub_uint32_t addr) { return grub_le_to_cpu32 (* ((volatile grub_uint32_t *) ((char *) e->iobase + addr))); } static inline void grub_ehci_oper_write32 (struct grub_ehci *e, grub_uint32_t addr, grub_uint32_t value) { *((volatile grub_uint32_t *) ((char *) e->iobase + addr)) = grub_cpu_to_le32 (value); } static inline grub_uint32_t grub_ehci_port_read (struct grub_ehci *e, grub_uint32_t port) { return grub_ehci_oper_read32 (e, GRUB_EHCI_PORT_STAT_CMD + port * 4); } static inline void grub_ehci_port_resbits (struct grub_ehci *e, grub_uint32_t port, grub_uint32_t bits) { grub_ehci_oper_write32 (e, GRUB_EHCI_PORT_STAT_CMD + port * 4, grub_ehci_port_read (e, port) & GRUB_EHCI_PORT_WMASK & ~(bits)); grub_ehci_port_read (e, port); } static inline void grub_ehci_port_setbits (struct grub_ehci *e, grub_uint32_t port, grub_uint32_t bits) { grub_ehci_oper_write32 (e, GRUB_EHCI_PORT_STAT_CMD + port * 4, (grub_ehci_port_read (e, port) & GRUB_EHCI_PORT_WMASK) | bits); grub_ehci_port_read (e, port); } static inline void * grub_ehci_phys2virt (grub_uint32_t phys, struct grub_pci_dma_chunk *chunk) { if (!phys) return NULL; return (void *) (phys - grub_dma_get_phys (chunk) + (grub_uint32_t) grub_dma_get_virt (chunk)); } static inline grub_uint32_t grub_ehci_virt2phys (void *virt, struct grub_pci_dma_chunk *chunk) { if (!virt) return 0; return ((grub_uint32_t) virt - (grub_uint32_t) grub_dma_get_virt (chunk) + grub_dma_get_phys (chunk)); } /* Halt if EHCI HC not halted */ static grub_err_t grub_ehci_halt (struct grub_ehci *e) { grub_uint64_t maxtime; if ((grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS) & GRUB_EHCI_ST_HC_HALTED) == 0) /* EHCI is not halted */ { /* Halt EHCI */ grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND, ~GRUB_EHCI_CMD_RUNSTOP & grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); /* Ensure command is written */ grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND); maxtime = grub_get_time_ms () + 1000; /* Fix: Should be 2ms ! */ while (((grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS) & GRUB_EHCI_ST_HC_HALTED) == 0) && (grub_get_time_ms () < maxtime)); if ((grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS) & GRUB_EHCI_ST_HC_HALTED) == 0) return GRUB_ERR_TIMEOUT; } return GRUB_ERR_NONE; } /* EHCI HC reset */ static grub_err_t grub_ehci_reset (struct grub_ehci *e) { grub_uint64_t maxtime; grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND, GRUB_EHCI_CMD_HC_RESET | grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); /* Ensure command is written */ grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND); /* XXX: How long time could take reset of HC ? */ maxtime = grub_get_time_ms () + 1000; while (((grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND) & GRUB_EHCI_CMD_HC_RESET) != 0) && (grub_get_time_ms () < maxtime)); if ((grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND) & GRUB_EHCI_CMD_HC_RESET) != 0) return GRUB_ERR_TIMEOUT; return GRUB_ERR_NONE; } /* PCI iteration function... */ static int NESTED_FUNC_ATTR grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid __attribute__ ((unused))) { grub_pci_address_t addr; grub_uint8_t release; grub_uint32_t class_code; grub_uint32_t interf; grub_uint32_t subclass; grub_uint32_t class; grub_uint32_t base, base_h; struct grub_ehci *e; grub_uint32_t eecp_offset; grub_uint32_t fp; int i; grub_uint32_t usblegsup = 0; grub_uint64_t maxtime; grub_uint32_t n_ports; grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: begin\n"); addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS); class_code = grub_pci_read (addr) >> 8; interf = class_code & 0xFF; subclass = (class_code >> 8) & 0xFF; class = class_code >> 16; /* If this is not an EHCI controller, just return. */ if (class != 0x0c || subclass != 0x03 || interf != 0x20) return 0; grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: class OK\n"); /* Check Serial Bus Release Number */ addr = grub_pci_make_address (dev, GRUB_EHCI_PCI_SBRN_REG); release = grub_pci_read_byte (addr); if (release != 0x20) { grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: Wrong SBRN: %0x\n", release); return 0; } grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: bus rev. num. OK\n"); /* Determine EHCI EHCC registers base address. */ addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0); base = grub_pci_read (addr); addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG1); base_h = grub_pci_read (addr); /* Stop if registers are mapped above 4G - GRUB does not currently * work with registers mapped above 4G */ if (((base & GRUB_PCI_ADDR_MEM_TYPE_MASK) != GRUB_PCI_ADDR_MEM_TYPE_32) && (base_h != 0)) { grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: registers above 4G are not supported\n"); return 1; } grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: 32-bit EHCI OK\n"); /* Allocate memory for the controller and fill basic values. */ e = grub_zalloc (sizeof (*e)); if (!e) return 1; e->framelist_chunk = NULL; e->td_chunk = NULL; e->qh_chunk = NULL; e->iobase_ehcc = (grub_uint32_t *) (base & GRUB_EHCI_ADDR_MEM_MASK); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: iobase of EHCC: %08x\n", (grub_uint32_t) e->iobase_ehcc); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CAPLEN: %02x\n", grub_ehci_ehcc_read8 (e, GRUB_EHCI_EHCC_CAPLEN)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: VERSION: %04x\n", grub_ehci_ehcc_read16 (e, GRUB_EHCI_EHCC_VERSION)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: SPARAMS: %08x\n", grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_SPARAMS)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CPARAMS: %08x\n", grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_CPARAMS)); /* Determine base address of EHCI operational registers */ e->iobase = (grub_uint32_t *) ((grub_uint32_t) e->iobase_ehcc + (grub_uint32_t) grub_ehci_ehcc_read8 (e, GRUB_EHCI_EHCC_CAPLEN)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: iobase of oper. regs: %08x\n", (grub_uint32_t) e->iobase); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: COMMAND: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: INTERRUPT: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_INTERRUPT)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: FRAME_INDEX: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_FRAME_INDEX)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: FL_BASE: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_FL_BASE)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CUR_AL_ADDR: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_CUR_AL_ADDR)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CONFIG_FLAG: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_CONFIG_FLAG)); /* Is there EECP ? */ eecp_offset = (grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_CPARAMS) & GRUB_EHCI_EECP_MASK) >> GRUB_EHCI_EECP_SHIFT; if (eecp_offset >= 0x40) /* EECP offset valid in HCCPARAMS */ e->pcibase_eecp = grub_pci_make_address (dev, eecp_offset); else e->pcibase_eecp = 0; /* Check format of data structures requested by EHCI */ /* XXX: In fact it is not used at any place, it is prepared for future * This implementation uses 32-bits pointers only */ e->flag64 = ((grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_CPARAMS) & GRUB_EHCI_CPARAMS_64BIT) != 0); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: flag64=%d\n", e->flag64); /* Reserve a page for the frame list - it is accurate for max. * possible size of framelist. But currently it is not used. */ e->framelist_chunk = grub_memalign_dma32 (4096, 4096); if (!e->framelist_chunk) goto fail; e->framelist_virt = grub_dma_get_virt (e->framelist_chunk); e->framelist_phys = grub_dma_get_phys (e->framelist_chunk); grub_memset ((void *) e->framelist_virt, 0, 4096); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: framelist mem=0x%08x. OK\n", (grub_uint32_t) e->framelist_virt); /* Allocate memory for the QHs and register it in "e". */ e->qh_chunk = grub_memalign_dma32 (4096, sizeof (struct grub_ehci_qh) * GRUB_EHCI_N_QH); if (!e->qh_chunk) goto fail; e->qh_virt = (grub_ehci_qh_t) grub_dma_get_virt (e->qh_chunk); e->qh_phys = grub_dma_get_phys (e->qh_chunk); grub_memset ((void *) e->qh_virt, 0, sizeof (struct grub_ehci_qh) * GRUB_EHCI_N_QH); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: QH mem=0x%08x. OK\n", (grub_uint32_t) e->qh_virt); /* Allocate memory for the TDs and register it in "e". */ e->td_chunk = grub_memalign_dma32 (4096, sizeof (struct grub_ehci_td) * GRUB_EHCI_N_TD); if (!e->td_chunk) goto fail; e->td_virt = (grub_ehci_td_t) grub_dma_get_virt (e->td_chunk); e->td_phys = grub_dma_get_phys (e->td_chunk); grub_memset ((void *) e->td_virt, 0, sizeof (struct grub_ehci_td) * GRUB_EHCI_N_TD); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: TD mem=0x%08x. OK\n", (grub_uint32_t) e->td_virt); /* Setup all frame list pointers. Since no isochronous transfers are supported, they all point to the (same!) queue head with index 0. */ fp = grub_cpu_to_le32 ((e->qh_phys & GRUB_EHCI_POINTER_MASK) | GRUB_EHCI_HPTR_TYPE_QH); for (i = 0; i < GRUB_EHCI_N_FRAMELIST; i++) e->framelist_virt[i] = fp; /* Prepare chain of all TDs and set Terminate in all TDs */ for (i = 0; i < (GRUB_EHCI_N_TD - 1); i++) { e->td_virt[i].link_td = &e->td_virt[i + 1]; e->td_virt[i].next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); e->td_virt[i].alt_next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); } e->td_virt[GRUB_EHCI_N_TD - 1].next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); e->td_virt[GRUB_EHCI_N_TD - 1].alt_next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); e->tdfree_virt = e->td_virt; /* Set Terminate in first QH, which is used in framelist */ e->qh_virt[0].qh_hptr = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); e->qh_virt[0].td_overlay.next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); e->qh_virt[0].td_overlay.alt_next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); /* Also set Halted bit in token */ e->qh_virt[0].td_overlay.token = grub_cpu_to_le32 (GRUB_EHCI_STATUS_HALTED); /* Set the H bit in first QH used for AL */ e->qh_virt[1].ep_char = grub_cpu_to_le32 (GRUB_EHCI_H); /* Set Terminate into TD in rest of QHs and set horizontal link * pointer to itself - these QHs will be used for asynchronous * schedule and they should have valid value in horiz. link */ for (i = 1; i < GRUB_EHCI_N_QH; i++) { e->qh_virt[i].qh_hptr = grub_cpu_to_le32 ((grub_ehci_virt2phys ((void *) &e->qh_virt[i], e-> qh_chunk) & GRUB_EHCI_POINTER_MASK) | GRUB_EHCI_HPTR_TYPE_QH); e->qh_virt[i].td_overlay.next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); e->qh_virt[i].td_overlay.alt_next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); /* Also set Halted bit in token */ e->qh_virt[i].td_overlay.token = grub_cpu_to_le32 (GRUB_EHCI_STATUS_HALTED); } /* Note: QH 0 and QH 1 are reserved and must not be used anywhere. * QH 0 is used as empty QH for framelist * QH 1 is used as starting empty QH for asynchronous schedule * QH 1 must exist at any time because at least one QH linked to * itself must exist in asynchronous schedule * QH 1 has the H flag set to one */ grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: QH/TD init. OK\n"); /* Determine and change ownership. */ if (e->pcibase_eecp) /* Ownership can be changed via EECP only */ { usblegsup = grub_pci_read (e->pcibase_eecp); if (usblegsup & GRUB_EHCI_BIOS_OWNED) { grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: EHCI owned by: BIOS\n"); /* Ownership change - set OS_OWNED bit */ grub_pci_write (e->pcibase_eecp, usblegsup | GRUB_EHCI_OS_OWNED); /* Ensure PCI register is written */ grub_pci_read (e->pcibase_eecp); /* Wait for finish of ownership change, EHCI specification * doesn't say how long it can take... */ maxtime = grub_get_time_ms () + 1000; while ((grub_pci_read (e->pcibase_eecp) & GRUB_EHCI_BIOS_OWNED) && (grub_get_time_ms () < maxtime)); if (grub_pci_read (e->pcibase_eecp) & GRUB_EHCI_BIOS_OWNED) { grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: EHCI change ownership timeout"); /* Change ownership in "hard way" - reset BIOS ownership */ grub_pci_write (e->pcibase_eecp, GRUB_EHCI_OS_OWNED); /* Ensure PCI register is written */ grub_pci_read (e->pcibase_eecp); } } else if (usblegsup & GRUB_EHCI_OS_OWNED) /* XXX: What to do in this case - nothing ? Can it happen ? */ grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: EHCI owned by: OS\n"); else { grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: EHCI owned by: NONE\n"); /* XXX: What to do in this case ? Can it happen ? * Is code below correct ? */ /* Ownership change - set OS_OWNED bit */ grub_pci_write (e->pcibase_eecp, GRUB_EHCI_OS_OWNED); /* Ensure PCI register is written */ grub_pci_read (e->pcibase_eecp); } } grub_dprintf ("ehci", "inithw: EHCI grub_ehci_pci_iter: ownership OK\n"); /* Now we can setup EHCI (maybe...) */ /* Check if EHCI is halted and halt it if not */ if (grub_ehci_halt (e) != GRUB_USB_ERR_NONE) { grub_error (GRUB_ERR_TIMEOUT, "EHCI grub_ehci_pci_iter: EHCI halt timeout"); goto fail; } grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: halted OK\n"); /* Reset EHCI */ if (grub_ehci_reset (e) != GRUB_USB_ERR_NONE) { grub_error (GRUB_ERR_TIMEOUT, "EHCI grub_ehci_pci_iter: EHCI reset timeout"); goto fail; } grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: reset OK\n"); /* Setup list address registers */ grub_ehci_oper_write32 (e, GRUB_EHCI_FL_BASE, e->framelist_phys); grub_ehci_oper_write32 (e, GRUB_EHCI_CUR_AL_ADDR, grub_ehci_virt2phys ((void *) &e->qh_virt[1], e->qh_chunk)); /* Set ownership of root hub ports to EHCI */ grub_ehci_oper_write32 (e, GRUB_EHCI_CONFIG_FLAG, GRUB_EHCI_CF_EHCI_OWNER); /* Enable asynchronous list */ grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND, GRUB_EHCI_CMD_AS_ENABL | grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); /* Now should be possible to power-up and enumerate ports etc. */ if ((grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_SPARAMS) & GRUB_EHCI_SPARAMS_PPC) != 0) { /* EHCI has port powering control */ /* Power on all ports */ n_ports = grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_SPARAMS) & GRUB_EHCI_SPARAMS_N_PORTS; for (i = 0; i < (int) n_ports; i++) grub_ehci_oper_write32 (e, GRUB_EHCI_PORT_STAT_CMD + i * 4, GRUB_EHCI_PORT_POWER | grub_ehci_oper_read32 (e, GRUB_EHCI_PORT_STAT_CMD + i * 4)); } /* Ensure all commands are written */ grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND); /* Enable EHCI */ grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND, GRUB_EHCI_CMD_RUNSTOP | grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); /* Ensure command is written */ grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND); /* Link to ehci now that initialisation is successful. */ e->next = ehci; ehci = e; grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: OK at all\n"); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: iobase of oper. regs: %08x\n", (grub_uint32_t) e->iobase); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: COMMAND: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: INTERRUPT: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_INTERRUPT)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: FRAME_INDEX: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_FRAME_INDEX)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: FL_BASE: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_FL_BASE)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CUR_AL_ADDR: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_CUR_AL_ADDR)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CONFIG_FLAG: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_CONFIG_FLAG)); return 1; fail: if (e) { if (e->td_chunk) grub_dma_free ((void *) e->td_chunk); if (e->qh_chunk) grub_dma_free ((void *) e->qh_chunk); if (e->framelist_chunk) grub_dma_free (e->framelist_chunk); } grub_free (e); return 1; } static int grub_ehci_iterate (int (*hook) (grub_usb_controller_t dev)) { struct grub_ehci *e; struct grub_usb_controller dev; for (e = ehci; e; e = e->next) { dev.data = e; if (hook (&dev)) return 1; } return 0; } static void grub_ehci_setup_qh (grub_ehci_qh_t qh, grub_usb_transfer_t transfer) { grub_uint32_t ep_char = 0; grub_uint32_t ep_cap = 0; /* Note: Another part of code is responsible to this QH is * Halted ! But it can be linked in AL, so we cannot erase or * change qh_hptr ! */ /* We will not change any TD field because they should/must be * in safe state from previous use. */ /* EP characteristic setup */ /* Currently not used NAK counter (RL=0), * C bit set if EP is not HIGH speed and is control, * Max Packet Length is taken from transfer structure, * H bit = 0 (because QH[1] has this bit set), * DTC bit set to 1 because we are using our own toggle bit control, * SPEED is selected according to value from transfer structure, * EP number is taken from transfer structure * "I" bit must not be set, * Device Address is taken from transfer structure * */ if ((transfer->dev->speed != GRUB_USB_SPEED_HIGH) && (transfer->type == GRUB_USB_TRANSACTION_TYPE_CONTROL)) ep_char |= GRUB_EHCI_C; ep_char |= (transfer->max << GRUB_EHCI_MAXPLEN_OFF) & GRUB_EHCI_MAXPLEN_MASK; ep_char |= GRUB_EHCI_DTC; switch (transfer->dev->speed) { case GRUB_USB_SPEED_LOW: ep_char |= GRUB_EHCI_SPEED_LOW; break; case GRUB_USB_SPEED_FULL: ep_char |= GRUB_EHCI_SPEED_FULL; break; case GRUB_USB_SPEED_HIGH: default: ep_char |= GRUB_EHCI_SPEED_HIGH; /* XXX: How we will handle unknown value of speed? */ } ep_char |= (transfer->endpoint << GRUB_EHCI_EP_NUM_OFF) & GRUB_EHCI_EP_NUM_MASK; ep_char |= transfer->devaddr & GRUB_EHCI_DEVADDR_MASK; qh->ep_char = grub_cpu_to_le32 (ep_char); /* EP capabilities setup */ /* MULT field - we try to use max. number * PortNumber - included now in device structure referenced * inside transfer structure * HubAddress - included now in device structure referenced * inside transfer structure * SplitCompletionMask - AFAIK it is ignored in asynchronous list, * InterruptScheduleMask - AFAIK it should be zero in async. list */ ep_cap |= GRUB_EHCI_MULT_THREE; ep_cap |= (transfer->dev->port << GRUB_EHCI_DEVPORT_OFF) & GRUB_EHCI_DEVPORT_MASK; ep_cap |= (transfer->dev->hubaddr << GRUB_EHCI_HUBADDR_OFF) & GRUB_EHCI_HUBADDR_MASK; qh->ep_cap = grub_cpu_to_le32 (ep_cap); grub_dprintf ("ehci", "setup_qh: qh=%08x, not changed: qh_hptr=%08x\n", (grub_uint32_t) qh, grub_le_to_cpu32 (qh->qh_hptr)); grub_dprintf ("ehci", "setup_qh: ep_char=%08x, ep_cap=%08x\n", ep_char, ep_cap); grub_dprintf ("ehci", "setup_qh: end\n"); grub_dprintf ("ehci", "setup_qh: not changed: td_current=%08x\n", grub_le_to_cpu32 (qh->td_current)); grub_dprintf ("ehci", "setup_qh: not changed: next_td=%08x\n", grub_le_to_cpu32 (qh->td_overlay.next_td)); grub_dprintf ("ehci", "setup_qh: not changed: alt_next_td=%08x\n", grub_le_to_cpu32 (qh->td_overlay.alt_next_td)); grub_dprintf ("ehci", "setup_qh: not changed: token=%08x\n", grub_le_to_cpu32 (qh->td_overlay.token)); } static grub_ehci_qh_t grub_ehci_find_qh (struct grub_ehci *e, grub_usb_transfer_t transfer) { grub_uint32_t target, mask; int i; grub_ehci_qh_t qh = e->qh_virt; /* Prepare part of EP Characteristic to find existing QH */ target = ((transfer->endpoint << GRUB_EHCI_EP_NUM_OFF) | transfer->devaddr) & GRUB_EHCI_TARGET_MASK; target = grub_cpu_to_le32 (target); mask = grub_cpu_to_le32 (GRUB_EHCI_TARGET_MASK); /* First try to find existing QH with proper target */ for (i = 2; i < GRUB_EHCI_N_QH; i++) /* We ignore zero and first QH */ { if (!qh[i].ep_char) break; /* Found first not-allocated QH, finish */ if (target == (qh[i].ep_char & mask)) { /* Found proper existing (and linked) QH, do setup of QH */ grub_dprintf ("ehci", "find_qh: found, i=%d, QH=%08x\n", i, (grub_uint32_t) & qh[i]); grub_ehci_setup_qh (&qh[i], transfer); return &qh[i]; } } /* QH with target_addr does not exist, we have to add it */ /* Have we any free QH in array ? */ if (i >= GRUB_EHCI_N_QH) /* No. */ { grub_dprintf ("ehci", "find_qh: end - no free QH\n"); return NULL; } grub_dprintf ("ehci", "find_qh: new, i=%d, QH=%08x\n", i, (grub_uint32_t) & qh[i]); /* Currently we simply take next (current) QH in array, no allocation * function is used. It should be no problem until we will need to * de-allocate QHs of unplugged devices. */ /* We should preset new QH and link it into AL */ grub_ehci_setup_qh (&qh[i], transfer); /* Linking - this new (last) QH will point to first QH */ qh[i].qh_hptr = grub_cpu_to_le32 (GRUB_EHCI_HPTR_TYPE_QH | grub_ehci_virt2phys ((void *) &qh[1], e->qh_chunk)); /* Linking - previous last QH will point to this new QH */ qh[i - 1].qh_hptr = grub_cpu_to_le32 (GRUB_EHCI_HPTR_TYPE_QH | grub_ehci_virt2phys ((void *) &qh[i], e->qh_chunk)); return &qh[i]; } static grub_ehci_td_t grub_ehci_alloc_td (struct grub_ehci *e) { grub_ehci_td_t ret; /* Check if there is a Transfer Descriptor available. */ if (!e->tdfree_virt) { grub_dprintf ("ehci", "alloc_td: end - no free TD\n"); return NULL; } ret = e->tdfree_virt; /* Take current free TD */ e->tdfree_virt = (grub_ehci_td_t) ret->link_td; /* Advance to next free TD in chain */ ret->link_td = 0; /* Reset link_td in allocated TD */ return ret; } static void grub_ehci_free_td (struct grub_ehci *e, grub_ehci_td_t td) { td->link_td = e->tdfree_virt; /* Chain new free TD & rest */ e->tdfree_virt = td; /* Change address of first free TD */ } static void grub_ehci_free_tds (struct grub_ehci *e, grub_ehci_td_t td, grub_usb_transfer_t transfer, grub_size_t * actual) { int i; /* Index of TD in transfer */ grub_uint32_t token, to_transfer; /* Note: Another part of code is responsible to this QH is * INACTIVE ! */ *actual = 0; /* Free the TDs in this queue and set last_trans. */ for (i = 0; td; i++) { grub_ehci_td_t tdprev; token = grub_le_to_cpu32 (td->token); to_transfer = (token & GRUB_EHCI_TOTAL_MASK) >> GRUB_EHCI_TOTAL_OFF; /* Check state of TD - if it did not transfered * whole data then set last_trans - it should be last executed TD * in case when something went wrong. */ if (transfer && (td->size != to_transfer)) transfer->last_trans = i; *actual += td->size - to_transfer; /* Unlink the TD */ tdprev = td; td = (grub_ehci_td_t) td->link_td; /* Free the TD. */ grub_ehci_free_td (e, tdprev); } /* Check if last_trans was set. If not and something was * transferred (it should be all data in this case), set it * to index of last TD, i.e. i-1 */ if (transfer && (transfer->last_trans < 0) && (*actual != 0)) transfer->last_trans = i - 1; /* XXX: Fix it: last_trans may be set to bad index. * Probably we should test more error flags to distinguish * if TD was at least partialy executed or not at all. * Generaly, we still could have problem with toggling because * EHCI can probably split transactions into smaller parts then * we defined in transaction even if we did not exceed MaxFrame * length - it probably could happen at the end of microframe (?) * and if the buffer is crossing page boundary (?). */ } static grub_ehci_td_t grub_ehci_transaction (struct grub_ehci *e, grub_transfer_type_t type, unsigned int toggle, grub_size_t size, grub_uint32_t data, grub_ehci_td_t td_alt) { grub_ehci_td_t td; grub_uint32_t token; grub_uint32_t bufadr; int i; /* Test of transfer size, it can be: * <= GRUB_EHCI_MAXBUFLEN if data aligned to page boundary * <= GRUB_EHCI_MAXBUFLEN - GRUB_EHCI_BUFPAGELEN if not aligned * (worst case) */ if ((((data % GRUB_EHCI_BUFPAGELEN) == 0) && (size > GRUB_EHCI_MAXBUFLEN)) || (((data % GRUB_EHCI_BUFPAGELEN) != 0) && (size > (GRUB_EHCI_MAXBUFLEN - GRUB_EHCI_BUFPAGELEN)))) { grub_error (GRUB_ERR_OUT_OF_MEMORY, "too long data buffer for EHCI transaction"); return 0; } /* Grab a free Transfer Descriptor and initialize it. */ td = grub_ehci_alloc_td (e); if (!td) { grub_error (GRUB_ERR_OUT_OF_MEMORY, "no transfer descriptors available for EHCI transfer"); return 0; } grub_dprintf ("ehci", "transaction: type=%d, toggle=%d, size=%lu data=0x%x td=%p\n", type, toggle, (unsigned long) size, data, td); /* Fill whole TD by zeros */ grub_memset ((void *) td, 0, sizeof (struct grub_ehci_td)); /* Don't point to any TD yet, just terminate. */ td->next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); /* Set alternate pointer. When short packet occurs, alternate TD * will not be really fetched because it is not active. But don't * forget, EHCI will try to fetch alternate TD every scan of AL * until QH is halted. */ td->alt_next_td = grub_cpu_to_le32 (grub_ehci_virt2phys ((void *) td_alt, e->td_chunk)); /* token: * TOGGLE - according to toggle * TOTAL SIZE = size * Interrupt On Complete = FALSE, we don't need IRQ * Current Page = 0 * Error Counter = max. value = 3 * PID Code - according to type * STATUS: * ACTIVE bit should be set to one * SPLIT TRANS. STATE bit should be zero. It is ignored * in HIGH speed transaction, and should be zero for LOW/FULL * speed to indicate state Do Split Transaction */ token = toggle ? GRUB_EHCI_TOGGLE : 0; token |= (size << GRUB_EHCI_TOTAL_OFF) & GRUB_EHCI_TOTAL_MASK; token |= GRUB_EHCI_CERR_3; switch (type) { case GRUB_USB_TRANSFER_TYPE_IN: token |= GRUB_EHCI_PIDCODE_IN; break; case GRUB_USB_TRANSFER_TYPE_OUT: token |= GRUB_EHCI_PIDCODE_OUT; break; case GRUB_USB_TRANSFER_TYPE_SETUP: token |= GRUB_EHCI_PIDCODE_SETUP; break; default: /* XXX: Should not happen, but what to do if it does ? */ break; } token |= GRUB_EHCI_STATUS_ACTIVE; td->token = grub_cpu_to_le32 (token); /* Fill buffer pointers according to size */ bufadr = data; td->buffer_page[0] = grub_cpu_to_le32 (bufadr); bufadr = ((bufadr / GRUB_EHCI_BUFPAGELEN) + 1) * GRUB_EHCI_BUFPAGELEN; for (i = 1; ((bufadr - data) < size) && (i < GRUB_EHCI_TD_BUF_PAGES); i++) { td->buffer_page[i] = grub_cpu_to_le32 (bufadr & GRUB_EHCI_BUFPTR_MASK); bufadr = ((bufadr / GRUB_EHCI_BUFPAGELEN) + 1) * GRUB_EHCI_BUFPAGELEN; } /* Remember data size for future use... */ td->size = (grub_uint32_t) size; grub_dprintf ("ehci", "td=%08x\n", (grub_uint32_t) td); grub_dprintf ("ehci", "HW: next_td=%08x, alt_next_td=%08x\n", grub_le_to_cpu32 (td->next_td), grub_le_to_cpu32 (td->alt_next_td)); grub_dprintf ("ehci", "HW: token=%08x, buffer[0]=%08x\n", grub_le_to_cpu32 (td->token), grub_le_to_cpu32 (td->buffer_page[0])); grub_dprintf ("ehci", "HW: buffer[1]=%08x, buffer[2]=%08x\n", grub_le_to_cpu32 (td->buffer_page[1]), grub_le_to_cpu32 (td->buffer_page[2])); grub_dprintf ("ehci", "HW: buffer[3]=%08x, buffer[4]=%08x\n", grub_le_to_cpu32 (td->buffer_page[3]), grub_le_to_cpu32 (td->buffer_page[4])); grub_dprintf ("ehci", "link_td=%08x, size=%08x\n", (grub_uint32_t) td->link_td, td->size); return td; } struct grub_ehci_transfer_controller_data { grub_ehci_qh_t qh_virt; grub_ehci_td_t td_first_virt; grub_ehci_td_t td_alt_virt; grub_ehci_td_t td_last_virt; }; static grub_usb_err_t grub_ehci_setup_transfer (grub_usb_controller_t dev, grub_usb_transfer_t transfer) { struct grub_ehci *e = (struct grub_ehci *) dev->data; grub_ehci_td_t td = NULL; grub_ehci_td_t td_prev = NULL; int i; struct grub_ehci_transfer_controller_data *cdata; /* Check if EHCI is running and AL is enabled */ if ((grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS) & GRUB_EHCI_ST_HC_HALTED) != 0) /* XXX: Fix it: Currently we don't do anything to restart EHCI */ return GRUB_USB_ERR_INTERNAL; if ((grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS) & GRUB_EHCI_ST_AS_STATUS) == 0) /* XXX: Fix it: Currently we don't do anything to restart EHCI */ return GRUB_USB_ERR_INTERNAL; /* Check if transfer is not high speed and connected to root hub. * It should not happened but... */ if ((transfer->dev->speed != GRUB_USB_SPEED_HIGH) && !transfer->dev->hubaddr) { grub_error (GRUB_USB_ERR_BADDEVICE, "FULL/LOW speed device on EHCI port!?!"); return GRUB_USB_ERR_BADDEVICE; } /* Allocate memory for controller transfer data. */ cdata = grub_malloc (sizeof (*cdata)); if (!cdata) return GRUB_USB_ERR_INTERNAL; cdata->td_first_virt = NULL; /* Allocate a queue head for the transfer queue. */ cdata->qh_virt = grub_ehci_find_qh (e, transfer); if (!cdata->qh_virt) { grub_free (cdata); return GRUB_USB_ERR_INTERNAL; } /* To detect short packet we need some additional "alternate" TD, * allocate it first. */ cdata->td_alt_virt = grub_ehci_alloc_td (e); if (!cdata->td_alt_virt) { grub_free (cdata); return GRUB_USB_ERR_INTERNAL; } /* Fill whole alternate TD by zeros (= inactive) and set * Terminate bits and Halt bit */ grub_memset ((void *) cdata->td_alt_virt, 0, sizeof (struct grub_ehci_td)); cdata->td_alt_virt->next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); cdata->td_alt_virt->alt_next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); cdata->td_alt_virt->token = grub_cpu_to_le32 (GRUB_EHCI_STATUS_HALTED); /* Allocate appropriate number of TDs and set */ for (i = 0; i < transfer->transcnt; i++) { grub_usb_transaction_t tr = &transfer->transactions[i]; td = grub_ehci_transaction (e, tr->pid, tr->toggle, tr->size, tr->data, cdata->td_alt_virt); if (!td) /* de-allocate and free all */ { grub_size_t actual = 0; if (cdata->td_first_virt) grub_ehci_free_tds (e, cdata->td_first_virt, NULL, &actual); grub_free (cdata); return GRUB_USB_ERR_INTERNAL; } /* Register new TD in cdata or previous TD */ if (!cdata->td_first_virt) cdata->td_first_virt = td; else { td_prev->link_td = td; td_prev->next_td = grub_cpu_to_le32 (grub_ehci_virt2phys ((void *) td, e->td_chunk)); } td_prev = td; } /* Remember last TD */ cdata->td_last_virt = td; /* Last TD should not have set alternate TD */ cdata->td_last_virt->alt_next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); grub_dprintf ("ehci", "setup_transfer: cdata=%08x, qh=%08x\n", (grub_uint32_t) cdata, (grub_uint32_t) cdata->qh_virt); grub_dprintf ("ehci", "setup_transfer: td_first=%08x, td_alt=%08x\n", (grub_uint32_t) cdata->td_first_virt, (grub_uint32_t) cdata->td_alt_virt); grub_dprintf ("ehci", "setup_transfer: td_last=%08x\n", (grub_uint32_t) cdata->td_last_virt); /* Start transfer: */ /* Unlink possible alternate pointer in QH */ cdata->qh_virt->td_overlay.alt_next_td = grub_cpu_to_le32 (GRUB_EHCI_TERMINATE); /* Link new TDs with QH via next_td */ cdata->qh_virt->td_overlay.next_td = grub_cpu_to_le32 (grub_ehci_virt2phys ((void *) cdata->td_first_virt, e->td_chunk)); /* Reset Active and Halted bits in QH to activate Advance Queue, * i.e. reset token */ cdata->qh_virt->td_overlay.token = grub_cpu_to_le32 (0); /* Finito */ transfer->controller_data = cdata; return GRUB_USB_ERR_NONE; } /* This function expects QH is not active. * Function set Halt bit in QH TD overlay and possibly prints * necessary debug information. */ static void grub_ehci_pre_finish_transfer (grub_usb_transfer_t transfer) { struct grub_ehci_transfer_controller_data *cdata = transfer->controller_data; /* Collect debug data here if necessary */ /* Set Halt bit in not active QH. AL will not attempt to do * Advance Queue on QH with Halt bit set, i.e., we can then * safely manipulate with QH TD part. */ cdata->qh_virt->td_overlay.token = (cdata->qh_virt->td_overlay.token | grub_cpu_to_le32 (GRUB_EHCI_STATUS_HALTED)) & grub_cpu_to_le32 (~GRUB_EHCI_STATUS_ACTIVE); /* Print debug data here if necessary */ } static grub_usb_err_t grub_ehci_parse_notrun (grub_usb_controller_t dev, grub_usb_transfer_t transfer, grub_size_t * actual) { struct grub_ehci *e = dev->data; struct grub_ehci_transfer_controller_data *cdata = transfer->controller_data; grub_dprintf ("ehci", "parse_notrun: info\n"); /* QH can be in any state in this case. */ /* But EHCI or AL is not running, so QH is surely not active * even if it has Active bit set... */ grub_ehci_pre_finish_transfer (transfer); grub_ehci_free_tds (e, cdata->td_first_virt, transfer, actual); grub_ehci_free_td (e, cdata->td_alt_virt); grub_free (cdata); /* Additionally, do something with EHCI to make it running (what?) */ /* Try enable EHCI and AL */ grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND, GRUB_EHCI_CMD_RUNSTOP | GRUB_EHCI_CMD_AS_ENABL | grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); /* Ensure command is written */ grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND); return GRUB_USB_ERR_UNRECOVERABLE; } static grub_usb_err_t grub_ehci_parse_halt (grub_usb_controller_t dev, grub_usb_transfer_t transfer, grub_size_t * actual) { struct grub_ehci *e = dev->data; struct grub_ehci_transfer_controller_data *cdata = transfer->controller_data; grub_uint32_t token; grub_usb_err_t err = GRUB_USB_ERR_NAK; /* QH should be halted and not active in this case. */ grub_dprintf ("ehci", "parse_halt: info\n"); /* Remember token before call pre-finish function */ token = grub_le_to_cpu32 (cdata->qh_virt->td_overlay.token); /* Do things like in normal finish */ grub_ehci_pre_finish_transfer (transfer); grub_ehci_free_tds (e, cdata->td_first_virt, transfer, actual); grub_ehci_free_td (e, cdata->td_alt_virt); grub_free (cdata); /* Evaluation of error code - currently we don't have GRUB USB error * codes for some EHCI states, GRUB_USB_ERR_DATA is used for them. * Order of evaluation is critical, specially bubble/stall. */ if ((token & GRUB_EHCI_STATUS_BABBLE) != 0) err = GRUB_USB_ERR_BABBLE; else if ((token & GRUB_EHCI_CERR_MASK) != 0) err = GRUB_USB_ERR_STALL; else if ((token & GRUB_EHCI_STATUS_TRANERR) != 0) err = GRUB_USB_ERR_DATA; else if ((token & GRUB_EHCI_STATUS_BUFERR) != 0) err = GRUB_USB_ERR_DATA; else if ((token & GRUB_EHCI_STATUS_MISSDMF) != 0) err = GRUB_USB_ERR_DATA; return err; } static grub_usb_err_t grub_ehci_parse_success (grub_usb_controller_t dev, grub_usb_transfer_t transfer, grub_size_t * actual) { struct grub_ehci *e = dev->data; struct grub_ehci_transfer_controller_data *cdata = transfer->controller_data; grub_dprintf ("ehci", "parse_success: info\n"); /* QH should be not active in this case, but it is not halted. */ grub_ehci_pre_finish_transfer (transfer); grub_ehci_free_tds (e, cdata->td_first_virt, transfer, actual); grub_ehci_free_td (e, cdata->td_alt_virt); grub_free (cdata); return GRUB_USB_ERR_NONE; } static grub_usb_err_t grub_ehci_check_transfer (grub_usb_controller_t dev, grub_usb_transfer_t transfer, grub_size_t * actual) { struct grub_ehci *e = dev->data; struct grub_ehci_transfer_controller_data *cdata = transfer->controller_data; grub_uint32_t token; grub_dprintf ("ehci", "check_transfer: EHCI STATUS=%08x, cdata=%08x, qh=%08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS), (grub_uint32_t) cdata, (grub_uint32_t) cdata->qh_virt); grub_dprintf ("ehci", "check_transfer: qh_hptr=%08x, ep_char=%08x\n", grub_le_to_cpu32 (cdata->qh_virt->qh_hptr), grub_le_to_cpu32 (cdata->qh_virt->ep_char)); grub_dprintf ("ehci", "check_transfer: ep_cap=%08x, td_current=%08x\n", grub_le_to_cpu32 (cdata->qh_virt->ep_cap), grub_le_to_cpu32 (cdata->qh_virt->td_current)); grub_dprintf ("ehci", "check_transfer: next_td=%08x, alt_next_td=%08x\n", grub_le_to_cpu32 (cdata->qh_virt->td_overlay.next_td), grub_le_to_cpu32 (cdata->qh_virt->td_overlay.alt_next_td)); grub_dprintf ("ehci", "check_transfer: token=%08x, buffer[0]=%08x\n", grub_le_to_cpu32 (cdata->qh_virt->td_overlay.token), grub_le_to_cpu32 (cdata->qh_virt->td_overlay.buffer_page[0])); /* Check if EHCI is running and AL is enabled */ if ((grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS) & GRUB_EHCI_ST_HC_HALTED) != 0) return grub_ehci_parse_notrun (dev, transfer, actual); if ((grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS) & GRUB_EHCI_ST_AS_STATUS) == 0) return grub_ehci_parse_notrun (dev, transfer, actual); token = grub_le_to_cpu32 (cdata->qh_virt->td_overlay.token); /* Detect QH halted */ if ((token & GRUB_EHCI_STATUS_HALTED) != 0) return grub_ehci_parse_halt (dev, transfer, actual); /* Detect QH not active - QH is not active and no next TD */ if ((token & GRUB_EHCI_STATUS_ACTIVE) == 0) { /* It could be finish at all or short packet condition */ if ((grub_le_to_cpu32 (cdata->qh_virt->td_overlay.next_td) & GRUB_EHCI_TERMINATE) && ((grub_le_to_cpu32 (cdata->qh_virt->td_current) & GRUB_EHCI_QHTDPTR_MASK) == (grub_uint32_t) cdata->td_last_virt)) /* Normal finish */ return grub_ehci_parse_success (dev, transfer, actual); else if ((token & GRUB_EHCI_TOTAL_MASK) != 0) /* Short packet condition */ /* But currently we don't handle it - higher level will do it */ return grub_ehci_parse_success (dev, transfer, actual); } return GRUB_USB_ERR_WAIT; } static grub_usb_err_t grub_ehci_cancel_transfer (grub_usb_controller_t dev, grub_usb_transfer_t transfer) { struct grub_ehci *e = dev->data; struct grub_ehci_transfer_controller_data *cdata = transfer->controller_data; grub_size_t actual; int i; grub_uint64_t maxtime; /* QH can be active and should be de-activated and halted */ grub_dprintf ("ehci", "cancel_transfer: begin\n"); /* First check if EHCI is running and AL is enabled and if not, * there is no problem... */ if (((grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS) & GRUB_EHCI_ST_HC_HALTED) != 0) || ((grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS) & GRUB_EHCI_ST_AS_STATUS) == 0)) { grub_ehci_pre_finish_transfer (transfer); grub_ehci_free_tds (e, cdata->td_first_virt, transfer, &actual); grub_ehci_free_td (e, cdata->td_alt_virt); grub_free (cdata); grub_dprintf ("ehci", "cancel_transfer: end - EHCI not running\n"); return GRUB_USB_ERR_NONE; } /* EHCI and AL are running. What to do? * Try to Halt QH via de-scheduling QH. */ /* Find index of current QH - we need previous QH, i.e. i-1 */ i = ((int) (e->qh_virt - cdata->qh_virt)) / sizeof (struct grub_ehci_qh); /* Unlink QH from AL */ e->qh_virt[i - 1].qh_hptr = cdata->qh_virt->qh_hptr; /* Ring the doorbell */ grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND, GRUB_EHCI_CMD_AS_ADV_D | grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); /* Ensure command is written */ grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND); /* Wait answer with timeout */ maxtime = grub_get_time_ms () + 2; while (((grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS) & GRUB_EHCI_ST_AS_ADVANCE) == 0) && (grub_get_time_ms () < maxtime)); /* We do not detect the timeout because if timeout occurs, it most * probably means something wrong with EHCI - maybe stopped etc. */ /* Shut up the doorbell */ grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND, ~GRUB_EHCI_CMD_AS_ADV_D & grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); grub_ehci_oper_write32 (e, GRUB_EHCI_STATUS, GRUB_EHCI_ST_AS_ADVANCE | grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS)); /* Ensure command is written */ grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS); /* Now is QH out of AL and we can do anything with it... */ grub_ehci_pre_finish_transfer (transfer); grub_ehci_free_tds (e, cdata->td_first_virt, transfer, &actual); grub_ehci_free_td (e, cdata->td_alt_virt); /* Finaly we should return QH back to the AL... */ e->qh_virt[i - 1].qh_hptr = grub_cpu_to_le32 (grub_ehci_virt2phys ((void *) cdata->qh_virt, e->qh_chunk)); grub_free (cdata); grub_dprintf ("ehci", "cancel_transfer: end\n"); return GRUB_USB_ERR_NONE; } static int grub_ehci_hubports (grub_usb_controller_t dev) { struct grub_ehci *e = (struct grub_ehci *) dev->data; grub_uint32_t portinfo; portinfo = grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_SPARAMS) & GRUB_EHCI_SPARAMS_N_PORTS; grub_dprintf ("ehci", "root hub ports=%d\n", portinfo); return portinfo; } static grub_err_t grub_ehci_portstatus (grub_usb_controller_t dev, unsigned int port, unsigned int enable) { struct grub_ehci *e = (struct grub_ehci *) dev->data; grub_uint64_t endtime; grub_dprintf ("ehci", "portstatus: EHCI STATUS: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS)); grub_dprintf ("ehci", "portstatus: begin, iobase=0x%02x, port=%d, status=0x%02x\n", (grub_uint32_t) e->iobase, port, grub_ehci_port_read (e, port)); /* In any case we need to disable port: * - if enable==false - we should disable port * - if enable==true we will do the reset and the specification says * PortEnable should be FALSE in such case */ /* Disable the port and wait for it. */ grub_ehci_port_resbits (e, port, GRUB_EHCI_PORT_ENABLED); endtime = grub_get_time_ms () + 1000; while (grub_ehci_port_read (e, port) & GRUB_EHCI_PORT_ENABLED) if (grub_get_time_ms () > endtime) return grub_error (GRUB_ERR_IO, "portstatus: EHCI Timed out - disable"); if (!enable) /* We don't need reset port */ { grub_dprintf ("ehci", "portstatus: Disabled.\n"); grub_dprintf ("ehci", "portstatus: end, status=0x%02x\n", grub_ehci_port_read (e, port)); return GRUB_ERR_NONE; } grub_dprintf ("ehci", "portstatus: enable\n"); /* Now we will do reset - if HIGH speed device connected, it will * result in Enabled state, otherwise port remains disabled. */ /* Set RESET bit for 50ms */ grub_ehci_port_setbits (e, port, GRUB_EHCI_PORT_RESET); grub_millisleep (50); /* Reset RESET bit and wait for the end of reset */ grub_ehci_port_resbits (e, port, GRUB_EHCI_PORT_RESET); endtime = grub_get_time_ms () + 1000; while (grub_ehci_port_read (e, port) & GRUB_EHCI_PORT_RESET) if (grub_get_time_ms () > endtime) return grub_error (GRUB_ERR_IO, "portstatus: EHCI Timed out - reset port"); /* Remember "we did the reset" - needed by detect_dev */ e->reset |= (1 << port); /* Test if port enabled, i.e. HIGH speed device connected */ if ((grub_ehci_port_read (e, port) & GRUB_EHCI_PORT_ENABLED) != 0) /* yes! */ { grub_dprintf ("ehci", "portstatus: Enabled!\n"); /* "Reset recovery time" (USB spec.) */ grub_millisleep (10); } else /* no... */ { /* FULL speed device connected - change port ownership. * It results in disconnected state of this EHCI port. */ grub_ehci_port_setbits (e, port, GRUB_EHCI_PORT_OWNER); return GRUB_USB_ERR_BADDEVICE; } /* XXX: Fix it! There is possible problem - we can say to calling * function that we lost device if it is FULL speed onlu via * return value <> GRUB_ERR_NONE. It (maybe) displays also error * message on screen - but this situation is not error, it is normal * state! */ grub_dprintf ("ehci", "portstatus: end, status=0x%02x\n", grub_ehci_port_read (e, port)); return GRUB_ERR_NONE; } static grub_usb_speed_t grub_ehci_detect_dev (grub_usb_controller_t dev, int port, int *changed) { struct grub_ehci *e = (struct grub_ehci *) dev->data; grub_uint32_t status, line_state; status = grub_ehci_port_read (e, port); grub_dprintf ("ehci", "detect_dev: EHCI STATUS: %08x\n", grub_ehci_oper_read32 (e, GRUB_EHCI_STATUS)); grub_dprintf ("ehci", "detect_dev: iobase=0x%02x, port=%d, status=0x%02x\n", (grub_uint32_t) e->iobase, port, status); /* Connect Status Change bit - it detects change of connection */ if (status & GRUB_EHCI_PORT_CONNECT_CH) { *changed = 1; /* Reset bit Connect Status Change */ grub_ehci_port_setbits (e, port, GRUB_EHCI_PORT_CONNECT_CH); } else *changed = 0; if (!(status & GRUB_EHCI_PORT_CONNECT)) { /* We should reset related "reset" flag in not connected state */ e->reset &= ~(1 << port); return GRUB_USB_SPEED_NONE; } /* Detected connected state, so we should return speed. * But we can detect only LOW speed device and only at connection * time when PortEnabled=FALSE. FULL / HIGH speed detection is made * later by EHCI-specific reset procedure. * Another thing - if detected speed is LOW at connection time, * we should change port ownership to companion controller. * So: * 1. If we detect connected and enabled and EHCI-owned port, * we can say it is HIGH speed. * 2. If we detect connected and not EHCI-owned port, we can say * NONE speed, because such devices are not handled by EHCI. * 3. If we detect connected, not enabled but reset port, we can say * NONE speed, because it means FULL device connected to port and * such devices are not handled by EHCI. * 4. If we detect connected, not enabled and not reset port, which * has line state != "K", we will say HIGH - it could be FULL or HIGH * device, we will see it later after end of EHCI-specific reset * procedure. * 5. If we detect connected, not enabled and not reset port, which * has line state == "K", we can say NONE speed, because LOW speed * device is connected and we should change port ownership. */ if ((status & GRUB_EHCI_PORT_ENABLED) != 0) /* Port already enabled, return high speed. */ return GRUB_USB_SPEED_HIGH; if ((status & GRUB_EHCI_PORT_OWNER) != 0) /* EHCI is not port owner */ return GRUB_USB_SPEED_NONE; /* EHCI driver is ignoring this port. */ if ((e->reset & (1 << port)) != 0) /* Port reset was done = FULL speed */ return GRUB_USB_SPEED_NONE; /* EHCI driver is ignoring this port. */ else /* Port connected but not enabled - test port speed. */ { line_state = status & GRUB_EHCI_PORT_LINE_STAT; if (line_state != GRUB_EHCI_PORT_LINE_LOWSP) return GRUB_USB_SPEED_HIGH; /* Detected LOW speed device, we should change * port ownership. * XXX: Fix it!: There should be test if related companion * controler is available ! And what to do if it does not exist ? */ grub_ehci_port_setbits (e, port, GRUB_EHCI_PORT_OWNER); return GRUB_USB_SPEED_NONE; /* Ignore this port */ /* Note: Reset of PORT_OWNER bit is done by EHCI HW when * device is really disconnected from port. * Don't do PORT_OWNER bit reset by SW when not connected signal * is detected in port register ! */ } } static void grub_ehci_inithw (void) { grub_pci_iterate (grub_ehci_pci_iter); } static grub_err_t grub_ehci_restore_hw (void) { struct grub_ehci *e; grub_uint32_t n_ports; int i; /* We should re-enable all EHCI HW similarly as on inithw */ for (e = ehci; e; e = e->next) { /* Check if EHCI is halted and halt it if not */ if (grub_ehci_halt (e) != GRUB_USB_ERR_NONE) grub_error (GRUB_ERR_TIMEOUT, "restore_hw: EHCI halt timeout"); /* Reset EHCI */ if (grub_ehci_reset (e) != GRUB_USB_ERR_NONE) grub_error (GRUB_ERR_TIMEOUT, "restore_hw: EHCI reset timeout"); /* Setup some EHCI registers and enable EHCI */ grub_ehci_oper_write32 (e, GRUB_EHCI_FL_BASE, e->framelist_phys); grub_ehci_oper_write32 (e, GRUB_EHCI_CUR_AL_ADDR, grub_ehci_virt2phys ((void *) &e->qh_virt[1], e->qh_chunk)); grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND, GRUB_EHCI_CMD_RUNSTOP | grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); /* Set ownership of root hub ports to EHCI */ grub_ehci_oper_write32 (e, GRUB_EHCI_CONFIG_FLAG, GRUB_EHCI_CF_EHCI_OWNER); /* Enable asynchronous list */ grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND, GRUB_EHCI_CMD_AS_ENABL | grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); /* Now should be possible to power-up and enumerate ports etc. */ if ((grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_SPARAMS) & GRUB_EHCI_SPARAMS_PPC) != 0) { /* EHCI has port powering control */ /* Power on all ports */ n_ports = grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_SPARAMS) & GRUB_EHCI_SPARAMS_N_PORTS; for (i = 0; i < (int) n_ports; i++) grub_ehci_oper_write32 (e, GRUB_EHCI_PORT_STAT_CMD + i * 4, GRUB_EHCI_PORT_POWER | grub_ehci_oper_read32 (e, GRUB_EHCI_PORT_STAT_CMD + i * 4)); } } return GRUB_USB_ERR_NONE; } static grub_err_t grub_ehci_fini_hw (int noreturn __attribute__ ((unused))) { struct grub_ehci *e; /* We should disable all EHCI HW to prevent any DMA access etc. */ for (e = ehci; e; e = e->next) { /* Check if EHCI is halted and halt it if not */ if (grub_ehci_halt (e) != GRUB_USB_ERR_NONE) grub_error (GRUB_ERR_TIMEOUT, "restore_hw: EHCI halt timeout"); /* Reset EHCI */ if (grub_ehci_reset (e) != GRUB_USB_ERR_NONE) grub_error (GRUB_ERR_TIMEOUT, "restore_hw: EHCI reset timeout"); } return GRUB_USB_ERR_NONE; } static struct grub_usb_controller_dev usb_controller = { .name = "ehci", .iterate = grub_ehci_iterate, .setup_transfer = grub_ehci_setup_transfer, .check_transfer = grub_ehci_check_transfer, .cancel_transfer = grub_ehci_cancel_transfer, .hubports = grub_ehci_hubports, .portstatus = grub_ehci_portstatus, .detect_dev = grub_ehci_detect_dev }; GRUB_MOD_INIT (ehci) { COMPILE_TIME_ASSERT (sizeof (struct grub_ehci_td) == 64); COMPILE_TIME_ASSERT (sizeof (struct grub_ehci_qh) == 96); grub_ehci_inithw (); grub_usb_controller_dev_register (&usb_controller); grub_loader_register_preboot_hook (grub_ehci_fini_hw, grub_ehci_restore_hw, GRUB_LOADER_PREBOOT_HOOK_PRIO_DISK); } GRUB_MOD_FINI (ehci) { grub_ehci_fini_hw (0); grub_usb_controller_dev_unregister (&usb_controller); } --=-C7f7TiLy1N2mADiw6c7F-- From MAILER-DAEMON Mon Aug 29 07:08:10 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QxzhK-000138-6T for mharc-grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:10 -0400 Received: from eggs.gnu.org ([140.186.70.92]:41092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxzhC-0000q5-AF for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qxzh9-0005R1-W7 for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:02 -0400 Received: from smtp.stumbleupon.com ([74.201.117.226]:60835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxzh9-0005QT-M1 for grub-devel@gnu.org; Mon, 29 Aug 2011 07:07:59 -0400 Received: from www.stumbleupon.com (sv4r17s63 [10.4.17.63]) by smtp.stumbleupon.com (Postfix) with ESMTP id 5F5507A54 for ; Mon, 29 Aug 2011 04:07:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=mail; d=stumbleupon.com; c=simple; q=dns; b=fAcEXf3m045Jat7GxLR5jaibkRtJowYXw4FWF85vQLKNnzUUyBaQtpPYmi6UarxTa U0alBj5ACQd57zxJiwpKXM0yFMkpdJVUYmqVPDIAUODdgydvGtSp2CrA3w/afyEPf76 bakZj3NeeZzmrp25srcJWvZsTjXNQO1PyqfF9vg= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=stumbleupon.com; s=mail; t=1314616078; bh=Gp9Bsw66jKc8KzN2AJpVi6I6sChnSWQBF2Ss/rxSGuo=; h=Date:To:From:Reply-to:Subject:Message-ID:Sender:List-Unsubscribe: MIME-Version:Content-Type; b=bRUVNq9ap1ILGg9J6/WKqgQS4x7G1Ds6jidFIGmN3k9RrOXpTcQ5bf7irO2PTuRtY ss0kxufV0PbTZUmh3JQLpVVcYWozQP2nbqVarH7olf/XHopk5MTjjoLcH5xXQowFMk vjp2Vmz9g/wenj89ZQUq939aqVfnCFzmOptxQELk= Date: Mon, 29 Aug 2011 04:07:58 -0700 To: "Grub-devel@gnu.org" From: skrapsrwt Subject: Join me on StumbleUpon! Message-ID: <5f2060a1e00f9de85a9adb7d4838e871@www.stumbleupon.com> Sender: service@stumbleupon.com X-SU-Reference: 1; 832867569:TPFUSAEASWYYXR2M MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_5f2060a1e00f9de85a9adb7d4838e871" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 74.201.117.226 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: Mon, 29 Aug 2011 11:08:04 -0000 --b1_5f2060a1e00f9de85a9adb7d4838e871 Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: quoted-printable [StumbleUpon] (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/pf/_= _eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 skrapsrwt 1 Favorites 0 Followers skrapsrwt (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/pf2/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 wants to be friends with you on StumbleUpon. StumbleUpon is a discovery engine that finds you the best web pages, reco= mmended based on your interests. Join today and browse web pages you never would have found before! To learn more, watch this video (http://www.stumbleupon.com/to/e/83286756= 9:TPFUSAEASWYYXR2M/invite-4/vt/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9Uv= KMpPKU0uSUnNzdcHXDAsug8b) and take a tour! Join for free > (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR= 2M/invite-4/home/__eNrLKCkpKLbS1y8vL9crLinNTcpJLS3Iz9NLzs_Vty8oSrXNzCvLLE= lVK7U1dLIwSQNcMK1_ESg,)=20 Find us on:& (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/suf/= __eNrLKCkpsNLXLy8v10tLTE5Nys_P1kvOz9UPLinNTcpJDS3IzwNcMOnQDUA,) & (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/sut/= __eNrLKCkpsNLXLynPLClJLdJLzs_VV1bULy4pzU3KSS0tyM8DXDDMbAw5) & (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/sub/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UvLk3KyU_XB1ww5CMNAQ,,) & StumbleUpon is a discovery engine that finds the best of the web, recomme= nded just for you.=20 Learn more (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/in= vite-4/hf/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UHXDCQcgpG)=20 If you do not wish to receive emails sent by StumbleUpon, please click here (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/in= vite-4/oo/__eNoFwcsSgiAUXDDQH6oZqQ0tS5tR4foYoWHHgqzx0UNA7PL1naN1X1nO0unrK= q440kDQrcyQCqfJczM2SRLqeFINoi4FeBBDLCNQS4ZQMH5pojxCvL5rkbxI1s5bupHDPZeQff= Ywnp9IZ2mX7lf4hwJGnevam4F0WXNndn_0kSvK)=20 (c) StumbleUpon 2001 - 2011 --b1_5f2060a1e00f9de85a9adb7d4838e871 Content-Type: text/html; charset = "utf-8" Content-Transfer-Encoding: quoted-printable
3D"StumbleUpon"
skrapsrwt
1 Favorites
0 Followers
skrapsrwt wants to be friends with you on StumbleUpon.
StumbleUpon is a discovery engine that finds you the best web pa= ges, recommended based on your interests. Join today and browse web pages you never would have found befor= e!
=09
To learn more, watch this video and take a tour!
Join for free >

Find us on:       
StumbleUpon is a discovery engine that finds the best of the web, reco= mmended just for you.=20 Learn more
If you do not wish to receive emails sent by StumbleUpon, please click here

© StumbleUpon 2001 - 2011

--b1_5f2060a1e00f9de85a9adb7d4838e871-- From MAILER-DAEMON Mon Aug 29 07:08:11 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QxzhL-00016l-7C for mharc-grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:11 -0400 Received: from eggs.gnu.org ([140.186.70.92]:41126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxzhE-0000qS-Qj for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QxzhA-0005RH-0K for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:04 -0400 Received: from smtp.stumbleupon.com ([74.201.117.226]:58235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxzh9-0005Qf-M3 for grub-devel@gnu.org; Mon, 29 Aug 2011 07:07:59 -0400 Received: from www.stumbleupon.com (sv4r23s65 [10.4.23.65]) by smtp.stumbleupon.com (Postfix) with ESMTP id CCE107A59 for ; Mon, 29 Aug 2011 04:07:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=mail; d=stumbleupon.com; c=simple; q=dns; b=ZKo+nMAwdvw+4fD/TYoHOvBfPK8ChyJiPWZ5a4x8FsB60fnKWBh34XnTcK31y7q9D 5DHg4k1qvVUkvr34NyGWO++epYFaVleg9T84AxclLPR/D5vONLo+7KB0AwHzrHAnXLi bYqJ/WfsVQsyzzQ6Ybgpeji1Me4kQAIKivo3Bo8= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=stumbleupon.com; s=mail; t=1314616078; bh=sp/feRIia37wmZdTaqWjlZutbcQNanY+mzm5Mfdp+sQ=; h=Date:To:From:Reply-to:Subject:Message-ID:Sender:List-Unsubscribe: MIME-Version:Content-Type; b=L1+F+pdjFoCM+hAECidHYS6YnAW5jfL4hxwbsnPIAsTFKKLX9MwLEZFmGnmhBwAsQ ktYZ9GD0SCOdP2UlugXl7vXUXP9NV7N+kW8h7qASp6yNv4e0QP8cBbN4fONsufJmP5 62lMfDD8IvX2qQTT5k0Woy1qZff3Zse1ka/gnT04= Date: Mon, 29 Aug 2011 04:07:58 -0700 To: "Grub-devel@gnu.org" From: skrapsrwt Subject: Join me on StumbleUpon! Message-ID: Sender: service@stumbleupon.com X-SU-Reference: 1; 832867569:TPFUSAEASWYYXR2M MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_aa176b6bb8821d6570c21fc50eb996a0" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 74.201.117.226 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: Mon, 29 Aug 2011 11:08:06 -0000 --b1_aa176b6bb8821d6570c21fc50eb996a0 Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: quoted-printable [StumbleUpon] (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/pf/_= _eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 skrapsrwt 1 Favorites 0 Followers skrapsrwt (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/pf2/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 wants to be friends with you on StumbleUpon. StumbleUpon is a discovery engine that finds you the best web pages, reco= mmended based on your interests. Join today and browse web pages you never would have found before! To learn more, watch this video (http://www.stumbleupon.com/to/e/83286756= 9:TPFUSAEASWYYXR2M/invite-4/vt/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9Uv= KMpPKU0uSUnNzdcHXDAsug8b) and take a tour! Join for free > (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR= 2M/invite-4/home/__eNrLKCkpKLbS1y8vL9crLinNTcpJLS3Iz9NLzs_Vty8oSrXNzCvLLE= lVK7U1dLIwSQNcMK1_ESg,)=20 Find us on:& (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/suf/= __eNrLKCkpsNLXLy8v10tLTE5Nys_P1kvOz9UPLinNTcpJDS3IzwNcMOnQDUA,) & (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/sut/= __eNrLKCkpsNLXLynPLClJLdJLzs_VV1bULy4pzU3KSS0tyM8DXDDMbAw5) & (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/sub/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UvLk3KyU_XB1ww5CMNAQ,,) & StumbleUpon is a discovery engine that finds the best of the web, recomme= nded just for you.=20 Learn more (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/in= vite-4/hf/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UHXDCQcgpG)=20 If you do not wish to receive emails sent by StumbleUpon, please click here (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/in= vite-4/oo/__eNoFwcsSgiAUXDDQH6oZqQ0tS5tR4foYoWHHgqzx0UNA7PL1naN1X1nO0unrK= q440kDQrcyQCqfJczM2SRLqeFINoi4FeBBDLCNQS4ZQMH5pojxCvL5rkbxI1s5bupHDPZeQff= Ywnp9IZ2mX7lf4hwJGnevam4F0WXNndn_0kSvK)=20 (c) StumbleUpon 2001 - 2011 --b1_aa176b6bb8821d6570c21fc50eb996a0 Content-Type: text/html; charset = "utf-8" Content-Transfer-Encoding: quoted-printable
3D"StumbleUpon"
skrapsrwt
1 Favorites
0 Followers
skrapsrwt wants to be friends with you on StumbleUpon.
StumbleUpon is a discovery engine that finds you the best web pa= ges, recommended based on your interests. Join today and browse web pages you never would have found befor= e!
=09
To learn more, watch this video and take a tour!
Join for free >

Find us on:       
StumbleUpon is a discovery engine that finds the best of the web, reco= mmended just for you.=20 Learn more
If you do not wish to receive emails sent by StumbleUpon, please click here

© StumbleUpon 2001 - 2011

--b1_aa176b6bb8821d6570c21fc50eb996a0-- From MAILER-DAEMON Mon Aug 29 07:08:11 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QxzhK-00015q-Sx for mharc-grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:10 -0400 Received: from eggs.gnu.org ([140.186.70.92]:41118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxzhD-0000qC-Up for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QxzhA-0005RN-54 for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:03 -0400 Received: from smtp.stumbleupon.com ([74.201.117.226]:64069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxzh9-0005Ql-TV for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:00 -0400 Received: from www.stumbleupon.com (sv4r18s62 [10.4.18.62]) by smtp.stumbleupon.com (Postfix) with ESMTP id 6CAE375C8 for ; Mon, 29 Aug 2011 04:07:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=mail; d=stumbleupon.com; c=simple; q=dns; b=QiWrphMiwZjq5KyANyXWH7lj+2zLXMrKSVOrDr6Ma3MksVsVmzMU73s2ZqwGmkjx4 qq3q7HgCQUleaXqNDnHBU6NGox9kPIP41dBZyxmVOIpztfWHhAp2vZTewYG2NPb9ZT7 FhOsNDSwUrhtXtX1BDdMqHGHu2zxUB7y0pODyMQ= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=stumbleupon.com; s=mail; t=1314616079; bh=KkMfe183DBd8N4xcYTeMgJJr7I+N33ZwZIM0gJ+wQjo=; h=Date:To:From:Reply-to:Subject:Message-ID:Sender:List-Unsubscribe: MIME-Version:Content-Type; b=EtnCqsyhXcs0IbTM02VDG5SIiyIzpiIQnUidMpHqm2AHJU7R4IKUnJA5FWnY2G61l hppQPeeaGrrWM3s8v0baF4JjJB77XkZe3mydzxKj2+QOc8gRiLsGCCPaIY9xdu/XOy 3nKAvWlizvTO+FDWqSay0ZNC5IOd/SkUtM55MCVM= Date: Mon, 29 Aug 2011 04:07:59 -0700 To: "Grub-devel@gnu.org" From: skrapsrwt Subject: Join me on StumbleUpon! Message-ID: <9cf02b20688cd712e9482ff702a49162@www.stumbleupon.com> Sender: service@stumbleupon.com X-SU-Reference: 1; 832867568:TPFUSAEASWYYXR2M MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_9cf02b20688cd712e9482ff702a49162" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 74.201.117.226 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: Mon, 29 Aug 2011 11:08:05 -0000 --b1_9cf02b20688cd712e9482ff702a49162 Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: quoted-printable [StumbleUpon] (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/invite-4/pf/_= _eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 skrapsrwt 1 Favorites 0 Followers skrapsrwt (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/invite-4/pf2/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 wants to be friends with you on StumbleUpon. StumbleUpon is a discovery engine that finds you the best web pages, reco= mmended based on your interests. Join today and browse web pages you never would have found before! To learn more, watch this video (http://www.stumbleupon.com/to/e/83286756= 8:TPFUSAEASWYYXR2M/invite-4/vt/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9Uv= KMpPKU0uSUnNzdcHXDAsug8b) and take a tour! Join for free > (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR= 2M/invite-4/home/__eNrLKCkpKLbS1y8vL9crLinNTcpJLS3Iz9NLzs_Vty8oSrXNzCvLLE= lVK7U1dLIwSQNcMK1_ESg,)=20 Find us on:& (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/invite-4/suf/= __eNrLKCkpsNLXLy8v10tLTE5Nys_P1kvOz9UPLinNTcpJDS3IzwNcMOnQDUA,) & (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/invite-4/sut/= __eNrLKCkpsNLXLynPLClJLdJLzs_VV1bULy4pzU3KSS0tyM8DXDDMbAw5) & (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/invite-4/sub/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UvLk3KyU_XB1ww5CMNAQ,,) & StumbleUpon is a discovery engine that finds the best of the web, recomme= nded just for you.=20 Learn more (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/in= vite-4/hf/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UHXDCQcgpG)=20 If you do not wish to receive emails sent by StumbleUpon, please click here (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/in= vite-4/oo/__eNoFwcsSgiAUXDDQH6oZqQ0tS5tR4foYoWHHgqzx0UNA7PL1naN1X1nO0unrK= q440kDQrcyQCqfJczM2SRLqeFINoi4FeBBDLCNQS4ZQMH5pojxCvL5rkbxI1s5bupHDPZeQff= Ywnp9IZ2mX7lf4hwJGnevam4F0WXNndn_0kSvK)=20 (c) StumbleUpon 2001 - 2011 --b1_9cf02b20688cd712e9482ff702a49162 Content-Type: text/html; charset = "utf-8" Content-Transfer-Encoding: quoted-printable
3D"StumbleUpon"
skrapsrwt
1 Favorites
0 Followers
skrapsrwt wants to be friends with you on StumbleUpon.
StumbleUpon is a discovery engine that finds you the best web pa= ges, recommended based on your interests. Join today and browse web pages you never would have found befor= e!
=09
To learn more, watch this video and take a tour!
Join for free >

Find us on:       
StumbleUpon is a discovery engine that finds the best of the web, reco= mmended just for you.=20 Learn more
If you do not wish to receive emails sent by StumbleUpon, please click here

© StumbleUpon 2001 - 2011

--b1_9cf02b20688cd712e9482ff702a49162-- From MAILER-DAEMON Mon Aug 29 07:08:11 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QxzhL-00017t-Ig for mharc-grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:11 -0400 Received: from eggs.gnu.org ([140.186.70.92]:41134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxzhG-0000qg-CR for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qxzh9-0005R8-WF for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:06 -0400 Received: from smtp.stumbleupon.com ([74.201.117.226]:53134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxzh9-0005Qj-Mr for grub-devel@gnu.org; Mon, 29 Aug 2011 07:07:59 -0400 Received: from www.stumbleupon.com (sv4r17s63 [10.4.17.63]) by smtp.stumbleupon.com (Postfix) with ESMTP id 35C2475A5 for ; Mon, 29 Aug 2011 04:07:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=mail; d=stumbleupon.com; c=simple; q=dns; b=W9PSd4OxnJAiqNTAyrsbWHSZZTcVEpk0CJHFpH5Xs6E5au2+AgLMz0giVkP665X4e /1h411Kbc04E8qnQGMyshLvljAVswfBBEhDwBoFJS3a7EnjfaB1Zz6E1UE6zZrucFm9 TgXWhj3KrfP+aBaIJN248cPn44kLF3WHwOFjS7U= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=stumbleupon.com; s=mail; t=1314616079; bh=RBIfPxNEz5uXxDzeaP/QXH8RfndUsglVvMEBBvPOH4w=; h=Date:To:From:Reply-to:Subject:Message-ID:Sender:List-Unsubscribe: MIME-Version:Content-Type; b=YmJEUUB4XYno0VtkWAL4xvhRqekhWJ5bOvLP0vSR3CwLmJrsoN8aLmHnB4wlbyc0t BaGZm6LUM2gIQo3B9PAZaLHdYcmTNDLREOzo/V/j20asaoBCltULXlG43lZ8+BWE+l audc2p5vIP46pHKKoP4fPsyNuyRgm74HfsB3pJa8= Date: Mon, 29 Aug 2011 04:07:59 -0700 To: "Grub-devel@gnu.org" From: skrapsrwt Subject: Join me on StumbleUpon! Message-ID: Sender: service@stumbleupon.com X-SU-Reference: 1; 832867568:TPFUSAEASWYYXR2M MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_a07b788e5c52e7f228c8be8b338af4bf" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 74.201.117.226 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: Mon, 29 Aug 2011 11:08:07 -0000 --b1_a07b788e5c52e7f228c8be8b338af4bf Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: quoted-printable [StumbleUpon] (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/invite-4/pf/_= _eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 skrapsrwt 1 Favorites 0 Followers skrapsrwt (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/invite-4/pf2/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 wants to be friends with you on StumbleUpon. StumbleUpon is a discovery engine that finds you the best web pages, reco= mmended based on your interests. Join today and browse web pages you never would have found before! To learn more, watch this video (http://www.stumbleupon.com/to/e/83286756= 8:TPFUSAEASWYYXR2M/invite-4/vt/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9Uv= KMpPKU0uSUnNzdcHXDAsug8b) and take a tour! Join for free > (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR= 2M/invite-4/home/__eNrLKCkpKLbS1y8vL9crLinNTcpJLS3Iz9NLzs_Vty8oSrXNzCvLLE= lVK7U1dLIwSQNcMK1_ESg,)=20 Find us on:& (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/invite-4/suf/= __eNrLKCkpsNLXLy8v10tLTE5Nys_P1kvOz9UPLinNTcpJDS3IzwNcMOnQDUA,) & (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/invite-4/sut/= __eNrLKCkpsNLXLynPLClJLdJLzs_VV1bULy4pzU3KSS0tyM8DXDDMbAw5) & (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/invite-4/sub/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UvLk3KyU_XB1ww5CMNAQ,,) & StumbleUpon is a discovery engine that finds the best of the web, recomme= nded just for you.=20 Learn more (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/in= vite-4/hf/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UHXDCQcgpG)=20 If you do not wish to receive emails sent by StumbleUpon, please click here (http://www.stumbleupon.com/to/e/832867568:TPFUSAEASWYYXR2M/in= vite-4/oo/__eNoFwcsSgiAUXDDQH6oZqQ0tS5tR4foYoWHHgqzx0UNA7PL1naN1X1nO0unrK= q440kDQrcyQCqfJczM2SRLqeFINoi4FeBBDLCNQS4ZQMH5pojxCvL5rkbxI1s5bupHDPZeQff= Ywnp9IZ2mX7lf4hwJGnevam4F0WXNndn_0kSvK)=20 (c) StumbleUpon 2001 - 2011 --b1_a07b788e5c52e7f228c8be8b338af4bf Content-Type: text/html; charset = "utf-8" Content-Transfer-Encoding: quoted-printable
3D"StumbleUpon"
skrapsrwt
1 Favorites
0 Followers
skrapsrwt wants to be friends with you on StumbleUpon.
StumbleUpon is a discovery engine that finds you the best web pa= ges, recommended based on your interests. Join today and browse web pages you never would have found befor= e!
=09
To learn more, watch this video and take a tour!
Join for free >

Find us on:       
StumbleUpon is a discovery engine that finds the best of the web, reco= mmended just for you.=20 Learn more
If you do not wish to receive emails sent by StumbleUpon, please click here

© StumbleUpon 2001 - 2011

--b1_a07b788e5c52e7f228c8be8b338af4bf-- From MAILER-DAEMON Mon Aug 29 07:08:10 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QxzhK-000140-DA for mharc-grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:10 -0400 Received: from eggs.gnu.org ([140.186.70.92]:41105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxzhC-0000qB-Ta for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qxzh9-0005R7-WA for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:02 -0400 Received: from smtp.stumbleupon.com ([74.201.117.226]:61453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxzh9-0005QV-Lz for grub-devel@gnu.org; Mon, 29 Aug 2011 07:07:59 -0400 Received: from www.stumbleupon.com (sv4r22s60 [10.4.22.60]) by smtp.stumbleupon.com (Postfix) with ESMTP id A649B7A6F for ; Mon, 29 Aug 2011 04:07:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=mail; d=stumbleupon.com; c=simple; q=dns; b=ierQP1h9Yr5T3Ee8LhjG+RefCUB/7e6iFeWXA9ObwpXa85p/UjuSAvekfmkLflRlj bTSgCLeHd+CVJcLR1OAAlPe+XECz8QhQKTuaaw0sF/i6XtdNoeY28PBubEFRjyprQ8K 5G8Sxxe5PYQPfpCkSwKwA6SBfVIN9e3Wj/VM9Pk= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=stumbleupon.com; s=mail; t=1314616078; bh=DcJL9lZbIyUSpaItcdJCq44MM8UQsAF8oi2OoEgSwig=; h=Date:To:From:Reply-to:Subject:Message-ID:Sender:List-Unsubscribe: MIME-Version:Content-Type; b=hTtUcu0plNM7+YP0desBSZEdRJr947A6kEYe+fMqLk5g8EHYl1uva0opyQL6tGoNZ Mi7aEuPQV524E+Bm+YYYuesgoPgpHVWkPBT45al++CZSCKYot42u2J82hM6kG1tfUF 6x47eQnJxFSrMFBD8OEaKAMNVtLHdc0SqeNdoyIo= Date: Mon, 29 Aug 2011 04:07:58 -0700 To: "Grub-devel@gnu.org" From: skrapsrwt Subject: Join me on StumbleUpon! Message-ID: Sender: service@stumbleupon.com X-SU-Reference: 1; 832867569:TPFUSAEASWYYXR2M MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_fdb262949f972a88793313c6a6699e8d" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 74.201.117.226 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: Mon, 29 Aug 2011 11:08:04 -0000 --b1_fdb262949f972a88793313c6a6699e8d Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: quoted-printable [StumbleUpon] (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/pf/_= _eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 skrapsrwt 1 Favorites 0 Followers skrapsrwt (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/pf2/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 wants to be friends with you on StumbleUpon. StumbleUpon is a discovery engine that finds you the best web pages, reco= mmended based on your interests. Join today and browse web pages you never would have found before! To learn more, watch this video (http://www.stumbleupon.com/to/e/83286756= 9:TPFUSAEASWYYXR2M/invite-4/vt/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9Uv= KMpPKU0uSUnNzdcHXDAsug8b) and take a tour! Join for free > (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR= 2M/invite-4/home/__eNrLKCkpKLbS1y8vL9crLinNTcpJLS3Iz9NLzs_Vty8oSrXNzCvLLE= lVK7U1dLIwSQNcMK1_ESg,)=20 Find us on:& (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/suf/= __eNrLKCkpsNLXLy8v10tLTE5Nys_P1kvOz9UPLinNTcpJDS3IzwNcMOnQDUA,) & (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/sut/= __eNrLKCkpsNLXLynPLClJLdJLzs_VV1bULy4pzU3KSS0tyM8DXDDMbAw5) & (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/sub/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UvLk3KyU_XB1ww5CMNAQ,,) & StumbleUpon is a discovery engine that finds the best of the web, recomme= nded just for you.=20 Learn more (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/in= vite-4/hf/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UHXDCQcgpG)=20 If you do not wish to receive emails sent by StumbleUpon, please click here (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/in= vite-4/oo/__eNoFwcsSgiAUXDDQH6oZqQ0tS5tR4foYoWHHgqzx0UNA7PL1naN1X1nO0unrK= q440kDQrcyQCqfJczM2SRLqeFINoi4FeBBDLCNQS4ZQMH5pojxCvL5rkbxI1s5bupHDPZeQff= Ywnp9IZ2mX7lf4hwJGnevam4F0WXNndn_0kSvK)=20 (c) StumbleUpon 2001 - 2011 --b1_fdb262949f972a88793313c6a6699e8d Content-Type: text/html; charset = "utf-8" Content-Transfer-Encoding: quoted-printable
3D"StumbleUpon"
skrapsrwt
1 Favorites
0 Followers
skrapsrwt wants to be friends with you on StumbleUpon.
StumbleUpon is a discovery engine that finds you the best web pa= ges, recommended based on your interests. Join today and browse web pages you never would have found befor= e!
=09
To learn more, watch this video and take a tour!
Join for free >

Find us on:       
StumbleUpon is a discovery engine that finds the best of the web, reco= mmended just for you.=20 Learn more
If you do not wish to receive emails sent by StumbleUpon, please click here

© StumbleUpon 2001 - 2011

--b1_fdb262949f972a88793313c6a6699e8d-- From MAILER-DAEMON Mon Aug 29 07:08:10 2011 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QxzhK-00014e-JU for mharc-grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:10 -0400 Received: from eggs.gnu.org ([140.186.70.92]:41069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QxzhB-0000q4-Da for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QxzhA-0005Qw-04 for grub-devel@gnu.org; Mon, 29 Aug 2011 07:08:01 -0400 Received: from smtp.stumbleupon.com ([74.201.117.226]:64368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxzh9-0005QU-M5 for grub-devel@gnu.org; Mon, 29 Aug 2011 07:07:59 -0400 Received: from www.stumbleupon.com (sv4r18s65 [10.4.18.65]) by smtp.stumbleupon.com (Postfix) with ESMTP id 7BC417A6C for ; Mon, 29 Aug 2011 04:07:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=mail; d=stumbleupon.com; c=simple; q=dns; b=JzeY97APjtMDevdCICxgcVGM3rjiQ9mq9klXM5ywlvP8bRQRewAkNlwhQX5SZL7XJ JALpYOJJwFNWdHqp4l5DL+IOjLLr4Qb4vM1rEdGXC9YGxXErOke0oSr/c2S1dAKyg5A ksizBLD6ZUVly7XK2wlzejBbFuzwdVnsDvJHffo= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=stumbleupon.com; s=mail; t=1314616078; bh=dBb9BR8liVlJU3/SatUzVIsbPWRlYTgATxvmX/8yOro=; h=Date:To:From:Reply-to:Subject:Message-ID:Sender:List-Unsubscribe: MIME-Version:Content-Type; b=f5zKe1YLtJIxLxgZGFehFD4dpvvvu1bRvG2QUGLjElOtL5Xgb0h5G7E5fBfRgyVUj G5v/jW25tB/L3TWpHHlRJ57rBXFBmd3OVtgPPH06fLDoCvU+006AE0oN+pfnFYi9mE M3o8aZvZU1Vh6+NfJ4v3/ebTf7ZgO4xYhEEVIBK8= Date: Mon, 29 Aug 2011 04:07:58 -0700 To: "Grub-devel@gnu.org" From: skrapsrwt Subject: Join me on StumbleUpon! Message-ID: <36191c7e842d59afb1726939252efbf2@www.stumbleupon.com> Sender: service@stumbleupon.com X-SU-Reference: 1; 832867569:TPFUSAEASWYYXR2M MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_36191c7e842d59afb1726939252efbf2" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 74.201.117.226 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: Mon, 29 Aug 2011 11:08:05 -0000 --b1_36191c7e842d59afb1726939252efbf2 Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: quoted-printable [StumbleUpon] (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/pf/_= _eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 skrapsrwt 1 Favorites 0 Followers skrapsrwt (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/pf2/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9WH8ov0i7OLEguKi8pLXDCQtRHU)=20 wants to be friends with you on StumbleUpon. StumbleUpon is a discovery engine that finds you the best web pages, reco= mmended based on your interests. Join today and browse web pages you never would have found before! To learn more, watch this video (http://www.stumbleupon.com/to/e/83286756= 9:TPFUSAEASWYYXR2M/invite-4/vt/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9Uv= KMpPKU0uSUnNzdcHXDAsug8b) and take a tour! Join for free > (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR= 2M/invite-4/home/__eNrLKCkpKLbS1y8vL9crLinNTcpJLS3Iz9NLzs_Vty8oSrXNzCvLLE= lVK7U1dLIwSQNcMK1_ESg,)=20 Find us on:& (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/suf/= __eNrLKCkpsNLXLy8v10tLTE5Nys_P1kvOz9UPLinNTcpJDS3IzwNcMOnQDUA,) & (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/sut/= __eNrLKCkpsNLXLynPLClJLdJLzs_VV1bULy4pzU3KSS0tyM8DXDDMbAw5) & (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/invite-4/sub/= __eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UvLk3KyU_XB1ww5CMNAQ,,) & StumbleUpon is a discovery engine that finds the best of the web, recomme= nded just for you.=20 Learn more (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/in= vite-4/hf/__eNrLKCkpsNLXLy8v1ysuKc1NykktLcjP00vOz9UHXDCQcgpG)=20 If you do not wish to receive emails sent by StumbleUpon, please click here (http://www.stumbleupon.com/to/e/832867569:TPFUSAEASWYYXR2M/in= vite-4/oo/__eNoFwcsSgiAUXDDQH6oZqQ0tS5tR4foYoWHHgqzx0UNA7PL1naN1X1nO0unrK= q440kDQrcyQCqfJczM2SRLqeFINoi4FeBBDLCNQS4ZQMH5pojxCvL5rkbxI1s5bupHDPZeQff= Ywnp9IZ2mX7lf4hwJGnevam4F0WXNndn_0kSvK)=20 (c) StumbleUpon 2001 - 2011 --b1_36191c7e842d59afb1726939252efbf2 Content-Type: text/html; charset = "utf-8" Content-Transfer-Encoding: quoted-printable
3D"StumbleUpon"
skrapsrwt
1 Favorites
0 Followers
skrapsrwt wants to be friends with you on StumbleUpon.
StumbleUpon is a discovery engine that finds you the best web pa= ges, recommended based on your interests. Join today and browse web pages you never would have found befor= e!
=09
To learn more, watch this video and take a tour!
Join for free >

Find us on:       
StumbleUpon is a discovery engine that finds the best of the web, reco= mmended just for you.=20 Learn more
If you do not wish to receive emails sent by StumbleUpon, please click here

© StumbleUpon 2001 - 2011

--b1_36191c7e842d59afb1726939252efbf2--