From patchwork Sun Feb 8 16:51:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44508 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 570952153F for ; Sun, 8 Feb 2015 16:52:24 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id l18sf3680118wgh.1 for ; Sun, 08 Feb 2015 08:52:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=9a6PZAQ85Huq1+nIzGBzoQFBoyQ/AgNHfnF9KcvhXvg=; b=fiSf3kXSVt/jb412gJqtmJbW5xTX44CUYgZHGPJXVY4mQIpRD/Z2mfs/Tutc/FRrbn oFpzqBkyMYm265H4TVVfNQ7mAWyRq3mNKMIlFmlpPRd8LKBWlcJ6+2iD5+67xTsNyK4O S7RPDweD2Bo/eZwp+yXfHPWW4Z3NAHaGjW+IXwC0qLXuJyg93MpBXH7jigXXT5lZqBoj rs7MMn+c3xQ6pGUjoYfsTBxISqslt0o4KvE0wUgn4u8iULsHKqz4qM0vwUMQ6SYAeBZo o8C26NvWDPzXreRT0p3+IX5nx6vKxKZ59ccp7wWgld2T/NV7DM4UUO8SptU45j6qnqSC YPsQ== X-Gm-Message-State: ALoCoQkv/JWCM+gThCIGRGch+PqEOubIBHgCmi6EBRr5FssH6QNMmaXuwmxggmRQWnTroPT4Wmwg X-Received: by 10.112.65.11 with SMTP id t11mr725724lbs.4.1423414343264; Sun, 08 Feb 2015 08:52:23 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.229 with SMTP id v5ls421052lav.55.gmail; Sun, 08 Feb 2015 08:52:23 -0800 (PST) X-Received: by 10.152.242.132 with SMTP id wq4mr12699231lac.79.1423414343053; Sun, 08 Feb 2015 08:52:23 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id lu3si6857859lac.167.2015.02.08.08.52.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Feb 2015 08:52:23 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by mail-lb0-f182.google.com with SMTP id l4so25792342lbv.13 for ; Sun, 08 Feb 2015 08:52:23 -0800 (PST) X-Received: by 10.152.88.44 with SMTP id bd12mr12659893lab.86.1423414342940; Sun, 08 Feb 2015 08:52:22 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2925348lbj; Sun, 8 Feb 2015 08:52:21 -0800 (PST) X-Received: by 10.107.158.146 with SMTP id h140mr21295934ioe.27.1423414338533; Sun, 08 Feb 2015 08:52:18 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id v20si4843712igr.38.2015.02.08.08.52.17 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 08 Feb 2015 08:52:18 -0800 (PST) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YKV5a-000692-Kw; Sun, 08 Feb 2015 16:52:06 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YKV5Z-00068s-EO for edk2-devel@lists.sourceforge.net; Sun, 08 Feb 2015 16:52:05 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.192.173 as permitted sender) client-ip=209.85.192.173; envelope-from=ard.biesheuvel@linaro.org; helo=mail-pd0-f173.google.com; Received: from mail-pd0-f173.google.com ([209.85.192.173]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YKV5Y-0006sI-I6 for edk2-devel@lists.sourceforge.net; Sun, 08 Feb 2015 16:52:05 +0000 Received: by pdbnh10 with SMTP id nh10so23200433pdb.0 for ; Sun, 08 Feb 2015 08:51:58 -0800 (PST) X-Received: by 10.70.46.227 with SMTP id y3mr21778193pdm.155.1423414318857; Sun, 08 Feb 2015 08:51:58 -0800 (PST) Received: from ards-macbook-pro.local ([113.28.134.59]) by mx.google.com with ESMTPSA id di5sm759152pbc.36.2015.02.08.08.51.56 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Feb 2015 08:51:58 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, olivier.martin@arm.com, roy.franz@linaro.org, leif.lindholm@linaro.org, jordan.l.justen@intel.com, feng.tian@intel.com Date: Mon, 9 Feb 2015 00:51:18 +0800 Message-Id: <1423414278-8455-7-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1423414278-8455-1-git-send-email-ard.biesheuvel@linaro.org> References: <1423414278-8455-1-git-send-email-ard.biesheuvel@linaro.org> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1YKV5Y-0006sI-I6 Subject: [edk2] [PATCH 6/6] MdeModulePkg: use 64 KB granularity for runtime allocations on AArch64 X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 On AArch64, the OS can choose to run with a page size of 64 KB, making it cumbersome to deal with UEFI reserved memory regions whose boundaries are not 64 KB aligned. So increase the allocation granularity for runtime regions to 64 KB. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Core/Dxe/Mem/Imem.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/Mem/Imem.h b/MdeModulePkg/Core/Dxe/Mem/Imem.h index d09ff3c5220f..16077d825deb 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Imem.h +++ b/MdeModulePkg/Core/Dxe/Mem/Imem.h @@ -22,6 +22,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT (EFI_PAGE_SIZE * 2) #define DEFAULT_PAGE_ALLOCATION (EFI_PAGE_SIZE * 2) +#elif defined (MDE_CPU_AARCH64) +/// +/// 64-bit ARM systems allow the OS to execute with 64 KB page size, +/// so for improved interoperability with the firmware, align the +/// runtime regions to 64 KB as well +/// +#define EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT (SIZE_64KB) +#define DEFAULT_PAGE_ALLOCATION (EFI_PAGE_SIZE) + #else /// /// For genric EFI machines make the default allocations 4K aligned