From patchwork Wed Jan 23 15:34:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 156387 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp853581jaa; Wed, 23 Jan 2019 07:38:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN4SIM81RBp6V20DZbNy59FaUdkCU1XWMWNhujzKV97O7LxXvg6Vxuu/j4wZmWEGdGZJu9Nl X-Received: by 2002:adf:a28d:: with SMTP id s13mr1706282wra.100.1548257908149; Wed, 23 Jan 2019 07:38:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548257908; cv=none; d=google.com; s=arc-20160816; b=g2DN8cNgIWIMPQ0zuH9eFJx5lNlTS6Tr6BLecBwXkHoMawoRobL5rdaSG4ySjrhd0m 8vF7o/b0aQSMCGPSXtM3WqjpmQqYvKjus7z4g+zENpqMrNIxgT9BOUHrUoUAueMhqn0V ws4uUr5MfUG+7Ez3PkoL9tqYGrPAO6p2xV65nNTeNkxAq7snoSmz/0sdI/GV42mh00FL mLnBHmnxuG0FMxJRsVEei7HRzRzpMKjWFQ0S5kSs0BTFFsEBD0LklvaldxjKvtuln0NY Mi8xOYqgOgRy062QSjlFePjWJ3elLq3LlW+2R4HYYo4VpSMCqzmocEOqKXFqIoZWIQEf rBGw== 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=iriFgr1FSblLgHWTO7qMNv1M+EcLGGeNOvaXQsZ3RlU=; b=MgCquw62+TtDLRrWlkHPdr7z62Fb26sbgE0lnj5SDXPkIDH5DxWQW8v7G0Cyfa8W0a Q9/CEIWO1EgYaTOQNxVpl1ZEJAmviFDl3ilUso3xvPerwb7jshtNSt33+Oji30blAtLK cR+bOfPLSKAEJcT9xDExwemuKB2dYquGcIImBswz6xcNng/BzcVxnULLdCPm+DTXsy5m 1WUXkbH/dJ596D2u0OjI7bpW5P4Rn8rUq3ISHhpYN62DZ5EJ34CGyHgjAhOPBLbLQgGC zdqOoPBxQjkv8lCaG+nlQJ9ZBkYONOfPTD19ZbOSTc7Dv2MLQYZoQvO59J+3ftltFlLF fvZA== 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 p7si41238819wmd.171.2019.01.23.07.38.27 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 23 Jan 2019 07:38:28 -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]:36982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmKbj-0003jp-53 for patch@linaro.org; Wed, 23 Jan 2019 10:38:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmKYZ-0001b0-30 for grub-devel@gnu.org; Wed, 23 Jan 2019 10:35:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmKYT-000892-Ka for grub-devel@gnu.org; Wed, 23 Jan 2019 10:35:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:39700 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 1gmKYT-000842-AO for grub-devel@gnu.org; Wed, 23 Jan 2019 10:35:05 -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 1EB21B025; Wed, 23 Jan 2019 15:34:59 +0000 (UTC) From: Alexander Graf To: grub-devel@gnu.org Subject: [PATCH v4 0/2] arm64: Support HP Envy X2 Date: Wed, 23 Jan 2019 16:34:56 +0100 Message-Id: <20190123153458.35215-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 , Daniel Kiper , Leif Lindholm , Ard Biesheuvel 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). Alexander Graf (2): mkimage: Use EFI32_HEADER_SIZE define in arm-efi case mkimage: Align efi sections on 4k boundary include/grub/efi/pe32.h | 9 +++++++-- util/mkimage.c | 7 +------ 2 files changed, 8 insertions(+), 8 deletions(-) -- 2.12.3 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel