From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VGczc-0008Lr-FV for mharc-grub-devel@gnu.org; Mon, 02 Sep 2013 18:53:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGczV-0008DR-Bj for grub-devel@gnu.org; Mon, 02 Sep 2013 18:53:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGczP-0000y4-Vd for grub-devel@gnu.org; Mon, 02 Sep 2013 18:53:01 -0400 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]:38414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGczP-0000ub-Jl for grub-devel@gnu.org; Mon, 02 Sep 2013 18:52:55 -0400 Received: by mail-ee0-f45.google.com with SMTP id c50so2622003eek.18 for ; Mon, 02 Sep 2013 15:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=roXyi/o7xy0Ro8Tpm83BJWk/aNifuP49J1r2MHhc1b4=; b=X6NRNsimyeDg3aE6Nd9PI2NEzCyeJO8kNQ/OcFGWNuEMgQ8OAZDBo1tqf2VaB4jp4B bXVmpmaFdhpMAcOhFlxiJsFg/Rka33EFqPxMjEGGwhXAsUY/rQr+7kZamGXogz4d7tSJ PzZMzYiTO0/HqOOBY8swIORVa5aaPwKTGKvxZNLLCpo+Ozj2QQBo/kXbr96wB/O1OYdk pas7XLjN/x2P1JV6XaGJoq/YscMNCh8l+R/xiCnK3MFoXLtYyk7ZjRO2vU/CRVAgiX7X HwLyhrnrOb4Tnr0NWXkxsQKKrSmu7Fz+nFJT7oAjfTncsxTGrylduFWhkmZyfft/zy0X 0P0g== X-Received: by 10.14.88.65 with SMTP id z41mr40516218eee.38.1378162373827; Mon, 02 Sep 2013 15:52:53 -0700 (PDT) Received: from [192.168.1.113] (31-249.1-85.cust.bluewin.ch. [85.1.249.31]) by mx.google.com with ESMTPSA id b45sm26282751eef.4.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Sep 2013 15:52:53 -0700 (PDT) Message-ID: <522516B6.20900@gmail.com> Date: Tue, 03 Sep 2013 00:52:38 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130821 Icedove/17.0.8 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: USB controller hand-back (original thread: Missing USB devices.) References: <20130807201137.08332daf@opensuse.site> <520534A0.4030009@volny.cz> <52056C1F.5070003@volny.cz> <521D0A45.5000407@volny.cz> <521D1C4E.3060503@gmail.com> <522117AC.4050401@volny.cz> <5225042F.50906@volny.cz> In-Reply-To: <5225042F.50906@volny.cz> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2EPTHTHDSDXTVPPXEIHQN" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22d 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, 02 Sep 2013 22:53:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2EPTHTHDSDXTVPPXEIHQN Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02.09.2013 23:33, Ale=C5=A1 Nesrsta wrote: > 2.9.2013 09:01, Melki Christian (consultant) wrote: >> Exactly. >> The EHCI handback is provided by the EHCI spec handover state machine.= >> Problem is, most BIOS:es don't implement it, or just screw it up tryin= g. >> The scenario is like this: >> Load grub2 with EHCI usb. >> Grub2 loads windows 7 or something. >> Windows 7 goes b0rk and requests input (diskcheck etc). >> User only has USB-keyboard. >> Eeep, can't enter anything because windows 7 has not loaded usb-stuff >> yet. >=20 > It is surprising for me that Windows does not load USB drivers in such > case and the above described situation can happen. > I never saw such situation in Linux, but in fact it can probably also > happen in some (badly) customized kernels/images etc. >=20 >> I've played with setting the correct smi-bits and then just flip the >> OS_OWNED flag. This should make the BIOS take over control again. I >> did it in the fini-hook and that function gets run when the loader >> starts running. Patch attach. It is just for toying, not final work or= >> anything. :) >> The patch works for some BIOS:es. Most of the time it does nothing to >> help. Some BIOS:es screw it up when trying to reclaim ownership >> however. :( >=20 > Interesting. According to results of your experiments it looks like > really black magic... But maybe it is correct even if we will possibly > don't like it - see next... > - As I don't know details about BIOSes and SMM etc., I am little bit > afraid of one thing: couldn't happen something wrong with loaded OS > kernel when BIOS takes ownership of USB controller? I mean e.g. if in > the case of hand-back cannot happen some memory collision between BIOS > and loaded/booted kernel/image etc. >=20 Linux or any other natively supported payload should handle the problem correctly As for chainloading targets, the only way to make sure that they work is to stick to BIOS drivers and not load native drivers at all. Do you have a scenario when loading native drivers is necessary when loading chainloaded target? > Additionally, EHCI specification doesn't say that BIOS (SMM) really mus= t > implement hand-back and immediately start again legacy support - EHCI > specifies only handover mechanism. So, in fact, BIOS which does nothing= > in the hand-back case is probably correct - at least according to EHCI > specification... >=20 You're correct. Hand-back should never be attempted both for specification and practical reasons. > If hand-back could be dangerous in some way or could have some > unexpected/unwanted behavior in some cases, I expect it will be better > to don't implement it (or implement it only as some very special option= > for experts - but I have no idea in which way...). >=20 > What is Vladimir's opinion? >=20 > BR, > Ales >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >=20 ------enig2EPTHTHDSDXTVPPXEIHQN 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.14 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlIlFsMACgkQNak7dOguQgnU8QD/ab5PI7gFR2NaL2OW03f8y9Ou KH2+lGBjkQyauaw5OgEA/RFCWliE4UUnzb6BNykwSDjcGPo0nrRoVG271tOjaC6t =TYqu -----END PGP SIGNATURE----- ------enig2EPTHTHDSDXTVPPXEIHQN--