From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aeR8i-00063i-Fw for mharc-grub-devel@gnu.org; Fri, 11 Mar 2016 12:46:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeR8g-0005yy-DB for grub-devel@gnu.org; Fri, 11 Mar 2016 12:46:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeR8b-00014j-Cf for grub-devel@gnu.org; Fri, 11 Mar 2016 12:46:14 -0500 Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]:34598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeR8b-00014Z-4c for grub-devel@gnu.org; Fri, 11 Mar 2016 12:46:09 -0500 Received: by mail-lb0-x232.google.com with SMTP id xr8so160197342lbb.1 for ; Fri, 11 Mar 2016 09:46:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=g7ydZGF+IDB8YYjeChvQpPFbfKQHbSYEM36QIv9jSIE=; b=abm1wlAAiv3XdVeZHygpQN2rMO8x0BA0OY6g3pm6yuanrbapqxyzbGfoBJ5n/jZbkV LEOp9RLpBEyiE1X8zWmu4l4Qeda6UZMKENWav/BiD0sMWK4RfLFk0yNDivYLaF5sCVO4 4CoFpsjhk8W+dHWtYHcXQFi0AGgPvY3UCqygiyhpPqTrKMPgbZT+ZBaN2sVXmKly+Ud/ OT+lg1RE2PnvKOOw3acv8WOshK2Y+xroZC9yOO6hvMCT3nJUxDWYpKrU3Uaa/8A5CyFj UiSXo0q07pPCh4Gtx+7Qj4I3rjZX25r3ywdGLloAHeuDBCs1BLHAhpRfLlxhuSZ0uZHw 792w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=g7ydZGF+IDB8YYjeChvQpPFbfKQHbSYEM36QIv9jSIE=; b=chQ3bPcxtmak9U/TwlOPNhlKemcQznT/PDdyjU+4oueCRKFMOKQriTJfEFxH8D4lmc rW0fRb1L+59JxizH8zaRaTze9GfplOJ4g1/1dCjWqihKqXBJbDanYNvr3RcnQwbUikbk +hKfmBX2onqaM+tgiVCd8mUpt4zPr+roEO8hfZKIKhgwBsbJshK7OTwIn6D7LeJnAGb2 c3jDA32CZrRJ09C5X32EuPvXioQ+Aq9DXdQoqGdP9RItq473DmnvNiLGpG/K7OI9mjhS Eb3g7rBauVDwZAh51xSPL7ZIMrjsd+6IAPyKMTj0/GSLbYnRQhC3VBGJCyoq05QplnlJ p0gQ== X-Gm-Message-State: AD7BkJKkVQoFX1iKZR34AVxsSubJHV7TFLgPBy37ZeNZ80Ew8wEaErn8v6byskhzuvqyIg== X-Received: by 10.112.157.234 with SMTP id wp10mr3872684lbb.56.1457718367913; Fri, 11 Mar 2016 09:46:07 -0800 (PST) Received: from [192.168.1.42] (ppp109-252-76-159.pppoe.spdop.ru. [109.252.76.159]) by smtp.gmail.com with ESMTPSA id f196sm1503776lfb.49.2016.03.11.09.46.06 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 11 Mar 2016 09:46:06 -0800 (PST) Subject: Re: Linux loader EFI handover To: Matt Fleming References: <56DDE5B0.6080002@gmail.com> <56DDEB3D.4010505@gmail.com> <20160307211958.GF13163@redhat.com> <56DDF2AA.3010504@gmail.com> <20160307220132.GI13163@redhat.com> <20160308034010.GA19551@linux-dsax.tai.apac.novell.com> <56DE5BBF.5050108@gmail.com> <20160309151824.GA15775@codeblueprint.co.uk> <56E08454.4020107@gmail.com> <20160310142130.GE15775@codeblueprint.co.uk> From: Andrei Borzenkov Message-ID: <56E3045D.2050200@gmail.com> Date: Fri, 11 Mar 2016 20:46:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160310142130.GE15775@codeblueprint.co.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::232 Cc: The development of GNU GRUB , Colin Watson , Vladimir 'phcoder' 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, 11 Mar 2016 17:46:15 -0000 10.03.2016 17:21, Matt Fleming пишет: > On Wed, 09 Mar, at 11:15:16PM, Andrei Borzenkov wrote: >> 09.03.2016 18:18, Matt Fleming пишет: >>> On Tue, 08 Mar, at 07:57:35AM, Andrei Borzenkov wrote: >>>>>> - 64-bit kernel on 32-bit platform like Baytrail can't work >>>> >>>> Do you mean "32 bit EFI"? If yes, why is it a problem? >>> >>> The biggest issue is that there's no way right now for a boot loader >>> to tell the kernel that it needs to use a translation layer when >>> calling EFI services (we refer to this as the "thunk" layer in the >>> kernel) without going via the EFI handover protocol. >>> >>> Obviously this could be achieved by writing the required code for GRUB >>> but it would be largely duplicated from the existing code EFI boot >>> stub code in the kernel. I don't think it's worth the effort. >>> >> >> That sounds like this should be supported irrespectively of secure boot >> then. > > I'm not sure what you mean here. Are you suggesting to add support for > the EFI handover protocol to the regular linux loader? > Yes. >>> The kernel figures out when to use the thunk layer by taking note of >>> which EFI handover offset entry point the boot loader entered from, we >>> include both a 32-bit and 64-bit entry point when CONFIG_EFI_MIXED is >>> enabled. >>> >> >> OK, looking at linuxefi patch, the only real difference from normal >> linux loader is that it restricts memory allocations to below 1G. Is it >> kernel requirement? > > No, I'm not aware of such a requirement for modern kernels, though > it's possible there was a historical restriction. > >> What to do if kernel is compiled without CONFIG_EFI_MIXED support? >> Should we fall back to traditional handover without calling into EFI >> stub or fail load completely? > > Falling back to the traditional handover and disabling EFI runtime > services would be the best way to go. You can see whether mixed mode > is enabled by inspecting the ->xloadflags in the bzImage header. > OK, even more reason to support EFI handover as part of normal linux loader.