From patchwork Fri Jan 25 11:45:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 156574 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp262958jaa; Fri, 25 Jan 2019 03:52:46 -0800 (PST) X-Google-Smtp-Source: ALg8bN4cG8yzvlxchC9mYgNi6jxhonp41Qmqpys3uAiKhP1xor0Sw5/aUbSXhDwzGxU3yE3DvM5u X-Received: by 2002:a1c:2457:: with SMTP id k84mr6563574wmk.139.1548417166604; Fri, 25 Jan 2019 03:52:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548417166; cv=none; d=google.com; s=arc-20160816; b=qzdE3tWYIFSIYeSj+QTluqKsQ7mR3TjntbMUcoBdib/0LoWDTan9/UUzpakOdChf0H mjkT7YQD2bzCiM2I7WAAKNDqf1Eb3ZdsxRwCx9AXJUWbU6Pt2mcG3HuFwK1I1Y0AWtc/ N+hYwVoCj0lgfDhW3Xjwmvzf+ZYTJprxAX9XH/iH5fbxO1k/h+EYno8K/5LWS5X2Q16A Sq49hNbU6DTG2HsQLtCzT2r7aCLifDcVEdjo/Cex9SS2CsjYavKX/HRDOACbjVeZkm0E UK4lZEKfUPuMikWzv9N6nZw20eoJSl/0CTsMhePnTvGgvvIWN6SQOdq+xSLRIEDYDN8Q xmIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from; bh=WS2khTQ903jFoNFRG7A3iWmasLQ9BhFUI8IIMyUSILE=; b=qJwDSKZ+LLIPxmv8WsAIHLwvly0qMPK+WRnr6V7Ws81IGtjNp5KPtJuwz3FbP1RfZP bF4SuVkFXx/DqfKLObCrYJ/lZdX0EwFIr2sI2A5A9QiLcob0j+bCk7DmVRw6VVYmipC8 0oLiQemqj7NGNQEzyc/UqI9L8GpYfZQ5dPMdM4qv+0CMPEGKTtIBJb8XOhRp8TiTGLWU hH4sJKWZGQ9DE/C1D3Iia7tCXdK6gEyb3fye69NT2tvilC9GRwN5pBvwDkFM3H3q+ryZ tyNnTpIngRJScU/e3CwqV7WiXnoSdhGiDicsKyQzBVQ57/x/Bw2wW9XUjSMw4GZzpAeP xOIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x20si40372333wmh.163.2019.01.25.03.52.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 25 Jan 2019 03:52:46 -0800 (PST) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org" Received: from localhost ([127.0.0.1]:43109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn02P-00028u-Ez for patch@linaro.org; Fri, 25 Jan 2019 06:52:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmzzS-0008VC-6h for grub-devel@gnu.org; Fri, 25 Jan 2019 06:49:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmzzP-0004Hf-Tf for grub-devel@gnu.org; Fri, 25 Jan 2019 06:49:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:52260 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmzzP-0004Bt-Jm for grub-devel@gnu.org; Fri, 25 Jan 2019 06:49:39 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D1CFBADF1; Fri, 25 Jan 2019 11:49:28 +0000 (UTC) From: Alexander Graf To: grub-devel@gnu.org Subject: [PATCH v5 0/3] arm64: Support HP Envy X2 Date: Fri, 25 Jan 2019 12:45:13 +0100 Message-Id: <20190125114516.12127-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The development of GNU GRUB Cc: Jon Masters , Leif Lindholm , Daniel Kiper MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: "Grub-devel" I got a new toy recently: An HP Envy X2 system. This is one of those shiny new Qualcomm Snapdragon based Windows tablet/notebook hybrid things. While running Windows on those is actually not a terribly bad experience now that WSL is out, I would like to see Linux run on those as well in the future. Unfortunately as far as I'm aware so far nobody was able to run self built binaries on the built-in UEFI version. Turns out, it's a problem with aligning the start of the header to 4k. Once we do that, binaries can be loaded just fine and run. The reason behind that is simple: Its firmware tries to ensure NX protection flags and can do so only when the code is 4K aligned. So to maintain compatibility with that device, this patch set just bumps all PE alignments to 4K always on all efi targets. This way we improve overall compatibility - there surely will be more devices coming with similar constraints. This gets us into alignment with how the MS tools build UEFI applications, so we should not run into compatibility problems about alignment going forward. v1 -> v2: - Remove explicit device wording from patch - Use GRUB_EFI_PAGE_SIZE v2 -> v3: - Apply alignment to all architectures - new patch: mkimage: Align efi sections on 4k boundary v3 -> v4: - Reduce everything down to 1 patch which just adapts *all* alignment to GRUB_EFI_PAGE_SIZE (4k). v4 -> v5: - Use GRUB_EFI_PAGE_SIZE - Add include to have above const defined - new patch: mkimage: Clarify file alignment in efi case Alexander Graf (3): mkimage: Use EFI32_HEADER_SIZE define in arm-efi case mkimage: Align efi sections on 4k boundary mkimage: Clarify file alignment in efi case include/grub/efi/pe32.h | 10 ++++++++-- util/mkimage.c | 15 +++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) -- 2.12.3 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel