From patchwork Tue Jun 30 13:17:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 50480 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 91E83229DF for ; Tue, 30 Jun 2015 13:18:16 +0000 (UTC) Received: by wian6 with SMTP id n6sf5547703wia.2 for ; Tue, 30 Jun 2015 06:18:15 -0700 (PDT) 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:cc: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=abuc0Q2WgHTXT7vPA/dq5CwwNczHPOfC+fF8AV3Xy+A=; b=dVsxVcCNMGnmDEKb+RKATYOJGiuwhLtw/3a3/ayo9Wx9Df1kVRAP8TXvCkoYEht/zt Kx/PQ0PleAFJBYDMZyE8x4IGNYVEicWsOffk0/N7WrAuAtLVCvJmgpmZRlKh2N2phRrh QdtBfpuY20MgRCYna6Kk2jRmrIKYYJq5lfXe9EHhoKIO6RRv4kKAiga6nXU6DscG146W L6ljX3CI32w+FcqfWT13zTwZvB/4RqxGwBUa8UDIpiB1SLhMx7QUjFNHZkw/iBcHdV1x vXtc5WS10yILqx6qifpTPJ6x6RVoYZunJYwEz7oD/rCx2PJygY6ENjGWOgTMjmiPQy6f ZOsw== X-Gm-Message-State: ALoCoQm8kJRU59Up8YnFveIGURvwu7bK1fsGRwSGO5yPfubCNMKWGR9PZYnsanXnoI2IbqvizJd8 X-Received: by 10.112.181.37 with SMTP id dt5mr608350lbc.10.1435670295876; Tue, 30 Jun 2015 06:18:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.1 with SMTP id o1ls41738lao.12.gmail; Tue, 30 Jun 2015 06:18:15 -0700 (PDT) X-Received: by 10.152.6.1 with SMTP id w1mr19332259law.91.1435670295734; Tue, 30 Jun 2015 06:18:15 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id lb1si38100028lab.116.2015.06.30.06.18.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jun 2015 06:18:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by laar3 with SMTP id r3so13136271laa.0 for ; Tue, 30 Jun 2015 06:18:15 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr20088142lbc.32.1435670295614; Tue, 30 Jun 2015 06:18:15 -0700 (PDT) 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.108.230 with SMTP id hn6csp2444501lbb; Tue, 30 Jun 2015 06:18:14 -0700 (PDT) X-Received: by 10.107.11.17 with SMTP id v17mr27590537ioi.83.1435670294116; Tue, 30 Jun 2015 06:18:14 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id 63si7978629iog.101.2015.06.30.06.18.13 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 30 Jun 2015 06:18:14 -0700 (PDT) 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 1Z9vQI-0004XU-0g; Tue, 30 Jun 2015 13:18:02 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z9vQG-0004XP-WC for edk2-devel@lists.sourceforge.net; Tue, 30 Jun 2015 13:18:01 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.179 as permitted sender) client-ip=209.85.212.179; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f179.google.com; Received: from mail-wi0-f179.google.com ([209.85.212.179]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Z9vQG-00024K-4e for edk2-devel@lists.sourceforge.net; Tue, 30 Jun 2015 13:18:00 +0000 Received: by wicgi11 with SMTP id gi11so16441491wic.0 for ; Tue, 30 Jun 2015 06:17:54 -0700 (PDT) X-Received: by 10.180.84.202 with SMTP id b10mr33706456wiz.23.1435670274147; Tue, 30 Jun 2015 06:17:54 -0700 (PDT) Received: from localhost.localdomain ([185.13.106.91]) by mx.google.com with ESMTPSA id lk5sm16980848wic.24.2015.06.30.06.17.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jun 2015 06:17:53 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, jiewen.yao@intel.com Date: Tue, 30 Jun 2015 15:17:34 +0200 Message-Id: <1435670255-4106-5-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435670255-4106-1-git-send-email-ard.biesheuvel@linaro.org> References: <1435670255-4106-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 X-Headers-End: 1Z9vQG-00024K-4e Cc: matt.fleming@intel.com Subject: [edk2] [PATCH 4/5] MdeModulePkg: move arch-specific allocation granularity defines to DxeMain.h 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.215.43 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 Move the definitions of EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT and DEFAULT_PAGE_ALLOCATION to DxeMain.h to make them available explicitly to all parts of DxeCore. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Core/Dxe/DxeMain.h | 25 ++++++++++++++++++++ MdeModulePkg/Core/Dxe/Mem/Imem.h | 25 -------------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h index 31277ca3629f..06b865c8fb1d 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.h +++ b/MdeModulePkg/Core/Dxe/DxeMain.h @@ -124,6 +124,31 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /// #define DEPEX_STACK_SIZE_INCREMENT 0x1000 +#if defined (MDE_CPU_IPF) +/// +/// For Itanium machines make the default allocations 8K aligned +/// +#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 +/// +#define EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT (EFI_PAGE_SIZE) +#define DEFAULT_PAGE_ALLOCATION (EFI_PAGE_SIZE) + +#endif + typedef struct { EFI_GUID *ProtocolGuid; VOID **Protocol; diff --git a/MdeModulePkg/Core/Dxe/Mem/Imem.h b/MdeModulePkg/Core/Dxe/Mem/Imem.h index 7f906832182d..a76ae2fe67ac 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Imem.h +++ b/MdeModulePkg/Core/Dxe/Mem/Imem.h @@ -15,31 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef _IMEM_H_ #define _IMEM_H_ -#if defined (MDE_CPU_IPF) -/// -/// For Itanium machines make the default allocations 8K aligned -/// -#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 -/// -#define EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT (EFI_PAGE_SIZE) -#define DEFAULT_PAGE_ALLOCATION (EFI_PAGE_SIZE) - -#endif - // // +---------------------------------------------------+ // | 0..(EfiMaxMemoryType - 1) - Normal memory type |