From patchwork Tue May 10 08:44:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 67405 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2008380qge; Tue, 10 May 2016 01:45:09 -0700 (PDT) X-Received: by 10.55.197.203 with SMTP id k72mr41208223qkl.15.1462869909011; Tue, 10 May 2016 01:45:09 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l185si685034qke.121.2016.05.10.01.45.08; Tue, 10 May 2016 01:45:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6FBD96163F; Tue, 10 May 2016 08:45:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 57AA16157C; Tue, 10 May 2016 08:45:03 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 7296E61585; Tue, 10 May 2016 08:45:00 +0000 (UTC) Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by lists.linaro.org (Postfix) with ESMTPS id 450DE61103 for ; Tue, 10 May 2016 08:44:59 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id e201so167799412wme.0 for ; Tue, 10 May 2016 01:44:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4QunOX589lX+uM/MJ7Mcln4UkBBr4pGhAPvNtBOGKE0=; b=DscamWrF5Rw7+iKxTMpFAUZOzHL0jR6U4pmKwU1bb72N1NVTaBR1VZvSlyjJ4PukYk OHtpFfFQVZ6AbD+tdH9hGRi5htub2m3WuwOACAW0PTmRsSAuzYs6eYFJlsj2CRzRm5OY NNF2+kpqirad+oHvpwWt9l11LL8/pvWSDkT0XN6xgOnRjgFHkWcuNKWNQ5YLc8eoIvyA dZInEtFi2qr1A26rcMwunIfq1dTLOOHbP0snjj/mnCX+O7SH7OktabjoaVsOvT9g/924 b8hlozstqRiVO0fT4OhA7KkRcy9fSjPvEs5WbD6OS08a9GbLTbwuamZ46HCTpBcnNfFB 8uyw== X-Gm-Message-State: AOPr4FVAedYW9v5lsj2eGpgNmul1W9VA7bbx3uovrEDqjp2aT1NEXr7MbHidqI5c5O8NvDkCOG4= X-Received: by 10.194.6.164 with SMTP id c4mr3467950wja.133.1462869898502; Tue, 10 May 2016 01:44:58 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id lr9sm1232929wjb.39.2016.05.10.01.44.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 May 2016 01:44:57 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org Date: Tue, 10 May 2016 10:44:53 +0200 Message-Id: <1462869893-11825-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Cc: leo.duran@amd.com Subject: [Linaro-uefi] [PATCH] Platforms/AMD/Styx: reduce fragmentation of runtime UEFI regions X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" This increases the preallocation sizes for UEFI runtime services code and data regions. This does not actually affect the footprint, but it reserves memory zones early on so that all allocations of each type can be served from adjacent regions. With this patch applied, we end up with fewer entries in the memory map, resulting in more efficient page tables due to the lower fragmentation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Just look at the memory map the kernel prints out when efi=debug is passed on the kernel command line. Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc | 4 ++-- Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc index e75c37338563..620518108e98 100644 --- a/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc +++ b/Platforms/AMD/Styx/CelloBoard/CelloBoard.dsc @@ -374,8 +374,8 @@ DEFINE TRANS_CODE = $(EL3_TO_EL2) gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|50 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|20 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|1000 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|1000 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|400 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData|12000 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode|20 diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc index 8865706df8a4..aa64be59a204 100644 --- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc +++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc @@ -378,8 +378,8 @@ DEFINE TRANS_CODE = $(EL3_TO_EL2) gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|50 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|20 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|1000 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|1000 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode|400 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData|12000 gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode|20