Received: from list by lists.gnu.org with archive (Exim 4.71) id 1U9lHT-0008LR-2R for mharc-grub-devel@gnu.org; Sun, 24 Feb 2013 18:46:55 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9lHQ-0008Ja-Dj for grub-devel@gnu.org; Sun, 24 Feb 2013 18:46:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9lHP-0006Yo-56 for grub-devel@gnu.org; Sun, 24 Feb 2013 18:46:52 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:45561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9lHO-0006Yi-V9 for grub-devel@gnu.org; Sun, 24 Feb 2013 18:46:51 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r1ONkmR9031122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 24 Feb 2013 23:46:49 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r1ONkmfD013899 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 24 Feb 2013 23:46:48 GMT Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r1ONkljx026433 for ; Sun, 24 Feb 2013 17:46:47 -0600 Received: from [10.132.115.229] (/166.137.184.52) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 24 Feb 2013 15:46:47 -0800 Subject: Re: grub_efi_finish_boot_services not spec-compliant References: <20130224091320.470adfd1@opensuse.site> From: Seth Goldberg Content-Type: text/plain; charset=utf-8 X-Mailer: iPhone Mail (10B143) In-Reply-To: <20130224091320.470adfd1@opensuse.site> Message-Id: <86086DEB-17EB-4B4F-B04B-13AFA7EB85FE@oracle.com> Date: Sun, 24 Feb 2013 15:46:47 -0800 To: The development of GNU GRUB Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 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, 24 Feb 2013 23:46:53 -0000 On Feb 23, 2013, at 9:13 PM, Andrey Borzenkov wrote: > =D0=92 Sat, 23 Feb 2013 20:35:17 -0800 > Seth Goldberg =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >=20 >> Hi there, >>=20 >> On some systems, ExitBootServices() will fail due to a change in the mem= ory map during execution of the boot services call. The UEFI spec says tha= t in that event, GetMemoryMap() should be repeated, then the new key passed t= o another call to ExitBootServices(). Note that the spec doesn't give an up= per bound on the number of times to do this dance. The logic in grub_efi_fi= nish_boot_services() just tries once, leading to a failure to properly shut d= own boot services and various issue booting UEFI-compliant operating systems= . >=20 > I have seen reports about ELILO failing due to changed memory map too, > but ELILO does retry GetMemoryMap() and still fails > (https://bugzilla.novell.com/show_bug.cgi?id=3D800035). Did you test if > increasing number of attempts to get memory map fixes it in your case? > What hardware is it? Actually, ELILO violates the UEFI spec by calling other UEFI APIs (like me= mory allocation APIs) after the failed call to ExitBootServices, which is pr= obably why it fails on those systems that require the retry. The spec expli= citly states that ONLY GetMemoryMap is safe to call after a failed call to E= xitBootServices. In my case, it is necessary to repeat the GetMemoryMap / ExitBootServices pa= ir an additional time for it to succeed. --S >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel