From patchwork Thu Aug 3 10:04:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 109304 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp571026qge; Thu, 3 Aug 2017 03:08:05 -0700 (PDT) X-Received: by 10.55.157.135 with SMTP id g129mr1682282qke.241.1501754885094; Thu, 03 Aug 2017 03:08:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501754885; cv=none; d=google.com; s=arc-20160816; b=RCbE9u03a1B3fLUT6xXK/VM2oAO8ZjxJGMhRWiVcMfB0F+uIQJGB6N9W13Ig9inCwP 0BbbxzDCxdslOlyQ9jL3vd6tgtuy2no7n9cdB+taN8MTWS+bLvkHddUtDDH87OuPF7Rs +D4a2bz9SNLKdnnAeu+aCHzVm9AOyPjpmq7VjsXrCHBdBS8vlmgxInDL0ioMsgsi0CVw 4gVFSRLXZPuWngrXoT7BtiU/vz+T6i84LDd9rA66y2d5a0erwPsStxUxvlud2sPCG2Uo oGshawMP27PWUVdaKYtdova2s2GGTGMROwpO6LT4SrwclrzHAkX+aGFvwiMQsFLFbBQ6 47kQ== 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:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:arc-authentication-results; bh=wzWvQnk0/rV8TICHUbXRHFlu3F9yffbc9zOSa5Oa0kQ=; b=e86lUBfxwbwdMbeD0Td3YGYiBgpEyQtoTc+tR2FzfFidd82FXWb6LEV8ZZm9KIYin5 M2QbvF9F4SazOMWTBA9++NH8E0EABYHGTZdVuPjH6I25wwqQHWOdXbZ+wdcYETl+ngdn Udym4HhFl08F+MRIMTXs85pLf1EmobQqyLYPl/FlmyUS2UaC+F3MpgPWCJ/lgG2OCouQ qjuTeoNkjdhmu5BNAHhgeuRe1dpD3C6w3T+VJ/5zVhXgn2swFAwhIJD3rbC7fPQ3SgMU tJglR1q3mBQ/mVBWPRswazqqg9dz1IZr9U6lrDlYwFxC67gw+MrmTqSaVf4IPQaIgFQ1 JG6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=RqhxHf8E; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=grub-devel-bounces+patch=linaro.org@gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id n8si31115463qtb.203.2017.08.03.03.08.04 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 03 Aug 2017 03:08:05 -0700 (PDT) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=RqhxHf8E; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=grub-devel-bounces+patch=linaro.org@gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddD2w-0000Fu-Lr for patch@linaro.org; Thu, 03 Aug 2017 06:08:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddD1c-0000F3-Ba for grub-devel@gnu.org; Thu, 03 Aug 2017 06:06:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddD1a-00046a-OL for grub-devel@gnu.org; Thu, 03 Aug 2017 06:06:40 -0400 Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:33917) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ddD1a-00044l-I6 for grub-devel@gnu.org; Thu, 03 Aug 2017 06:06:38 -0400 Received: by mail-wr0-x229.google.com with SMTP id 12so3742233wrb.1 for ; Thu, 03 Aug 2017 03:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ayh31/HdZRUibUy00pqK+nc+jUnmarVfhC0eUeoW7n0=; b=RqhxHf8EhR4iahN46FrUv5oyInabxyJCzk3EmwDTxMswo4X9ZsZA+UNNSoyU6zylrE FXDkQnnX6NzQpzVDZoepTx5gEhWUDyGKB8HxRJMGDQL1xdAxlIK5OLoF//u2PpumclGN DfJnAj6rA9P3tBfQ7s14Wnsj1WyzU+pgk3fA8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ayh31/HdZRUibUy00pqK+nc+jUnmarVfhC0eUeoW7n0=; b=jLwjGsLtO4yKi/f+7APN9BZhUWbb1xXmoIg0jf3+YzSvu6KDnP1g7C91q4j1JqTbWa mysx4XlrDaC84y1rdhuatqn8xZKKdoWRt/NOxoXwT7Q+fsQotLwK+khfIf8Hn/+bivY3 BUEzFxS8ohRn9SPqCcl4/lsw7cRCJmq5v/wPtKPvoIGMY0PRkBAnkzO+ZkFeqrtGrfXo luegbSmT3BuUlbnD8IkF7JQxtrLNbNMtIWpLFrWDlkA2+v+GD2+eI+kD2+0ycZ2Qb00m qZ0Qzol+MS2GJ1U4AwdcvxCJjKflttGj2tt25AU/9L6vQF/r+pZj1mmMwuBOEG1rLE0p 8EbQ== X-Gm-Message-State: AHYfb5izFQ7t+3p27WxcQc5e8v+y9iJpk6B3W80HegBNPF5OZt0kL4xx mufQZZ7A6Es4dE3hAbZVpg== X-Received: by 10.223.148.162 with SMTP id 31mr913689wrr.28.1501754795775; Thu, 03 Aug 2017 03:06:35 -0700 (PDT) Received: from vanye.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id e5sm2274543wre.24.2017.08.03.03.06.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 03:06:34 -0700 (PDT) From: Leif Lindholm To: grub-devel@gnu.org Subject: [PATCH v2 01/14] arm64/efi: move EFI_PAGE definitions to efi/memory.h Date: Thu, 3 Aug 2017 11:04:19 +0100 Message-Id: <20170803100432.29913-2-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170803100432.29913-1-leif.lindholm@linaro.org> References: <20170803100432.29913-1-leif.lindholm@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::229 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: Daniel Kiper MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: "Grub-devel" The EFI page definitions and macros are generic and should not be confined to atm64 headers - so move to efi/memory.h. Also add EFI_PAGE_SIZE macro. Update loader sources to reflect new header location. Signed-off-by: Leif Lindholm --- grub-core/loader/arm64/fdt.c | 1 + grub-core/loader/arm64/linux.c | 1 + grub-core/loader/arm64/xen_boot.c | 1 + include/grub/arm64/fdtload.h | 3 --- include/grub/efi/memory.h | 4 ++++ 5 files changed, 7 insertions(+), 3 deletions(-) -- 2.11.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel diff --git a/grub-core/loader/arm64/fdt.c b/grub-core/loader/arm64/fdt.c index db49cf649..bdc3a0c1f 100644 --- a/grub-core/loader/arm64/fdt.c +++ b/grub-core/loader/arm64/fdt.c @@ -24,6 +24,7 @@ #include #include #include +#include static void *loaded_fdt; static void *fdt; diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c index 9519d2e4d..1960d18b5 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index 27ede46ca..b7a5b17c9 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -30,6 +30,7 @@ #include #include #include +#include #include /* required by struct xen_hypervisor_header */ #include #include diff --git a/include/grub/arm64/fdtload.h b/include/grub/arm64/fdtload.h index 7b9ddba91..713c9424d 100644 --- a/include/grub/arm64/fdtload.h +++ b/include/grub/arm64/fdtload.h @@ -29,7 +29,4 @@ grub_fdt_unload (void); grub_err_t grub_fdt_install (void); -#define GRUB_EFI_PAGE_SHIFT 12 -#define GRUB_EFI_BYTES_TO_PAGES(bytes) (((bytes) + 0xfff) >> GRUB_EFI_PAGE_SHIFT) - #endif diff --git a/include/grub/efi/memory.h b/include/grub/efi/memory.h index 20526b146..a113348ca 100644 --- a/include/grub/efi/memory.h +++ b/include/grub/efi/memory.h @@ -22,6 +22,10 @@ #include #include +#define GRUB_EFI_PAGE_SHIFT 12 +#define GRUB_EFI_PAGE_SIZE (1 << GRUB_EFI_PAGE_SHIFT) +#define GRUB_EFI_BYTES_TO_PAGES(bytes) (((bytes) + 0xfff) >> GRUB_EFI_PAGE_SHIFT) + #define GRUB_MMAP_REGISTER_BY_FIRMWARE 1 grub_err_t grub_machine_mmap_register (grub_uint64_t start, grub_uint64_t size,