From patchwork Fri Oct 19 02:54:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 149205 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2762542lji; Thu, 18 Oct 2018 19:54:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV610RZe8i8qZ6dbAa7hFKdFhE6Khcs5XKrSsNMnK4nM5tQQmzYRFcgRpmUO7adTncBT157H2 X-Received: by 2002:a63:493:: with SMTP id 141-v6mr4407265pge.183.1539917668375; Thu, 18 Oct 2018 19:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539917668; cv=none; d=google.com; s=arc-20160816; b=ygZy+CzzgDdnzPAAnW0Nky5e1u4A/bj2t0WR7FHyF9YPEa9U46lGEfi6bin+di3mNm clwP9iP+nBtzmvx1hgte5zWWY2tUQf5t6O/lgywd2iePinxHr2uxM5lgPgKyaCFFMcOV Wt3HoSZJCFvxvRd+KuRVWkRQA6FRKJt4NtRzxw+kgbjAeNudN1EHGJV9GSVN1TGbawtK +Mo24D3cKfzt6F5BdfqWLRyzRIW1UQXbjkOyoWlM5RExsNnk7WMc5dNDTr2ncDv+Pb5G SVB73tnpifHRgTMT3eLxHRqPDnh5NEZ3qypHH6cbvA9sFXfAJW5DSol17ZZgX3L2z30r 41aQ== 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 :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=FiD+fpaUw4CKm1jE730vHTFWWyrW3aHpkFuz2L/fgsM=; b=w47c84vabf2FvTFlu7GJne0vPJ8IiCMghbaslKRujEmrPPa2ArD9R/teKGBLzbNvax j2JO15LkG+p46mTYAiH5jGhxMG0bJmk6Owv6cvwZVk7fJtM/NaH+XBLHi8Dxu10tbdiO lk2ffAs/Vycy2BW1q/QmG57+7i36onreJdR39kLXq4o0jhJwiTVCRLyNlG5SDmvI7bLF xIHM7mgBwFZwNdSxiPIuUr4Llh47QmcuXPC+oyfj9UNOOT9o9eSCIoBlXfmgAUiCzJ9U C0CZARhtbb3Tt2iIDjYJWfKi5ojD6mxXQrX0u+JBqCZPobO3BNwiPTGVDyKvDRqIH4ZJ guXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Y9h8w4+/"; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id w6-v6si23974217pgw.316.2018.10.18.19.54.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 19:54:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="Y9h8w4+/"; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6880E2117AE6B; Thu, 18 Oct 2018 19:54:27 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::443; helo=mail-pf1-x443.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DB3022116747A for ; Thu, 18 Oct 2018 19:54:25 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id m77-v6so15804421pfi.8 for ; Thu, 18 Oct 2018 19:54:25 -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; bh=t+h+qG/Yyh6CFPxHSZNW774Qe+i4Q4Or9SzC9SkRLEA=; b=Y9h8w4+/PP7rFCv4ZDmofUPxBNhFbzH2OYFUY9y5VBNPiVlv0o5BpRK3bhsjdxSBtu OwMv/EkqmDmc7ZaoxB/77MCK3MxpeEstYtPb19oCJE3pIpLZeHgsKIpOPq1qoPrNHBEc CJ1M2Qzn2UGCd4XjiuZeFu/eQi35uopddwadQ= 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; bh=t+h+qG/Yyh6CFPxHSZNW774Qe+i4Q4Or9SzC9SkRLEA=; b=iBmJioJvC5PkVdCdDCS9n5kSTNXnm2rwylYzgGyWSdxG4+N32f+04d5ik9r+9D5HeL 1I6FRiRUCoku3we4KhehB/Tz4C7BMs/jELnNidCntjwy+Gcieh8tXCNgB7QO+n4cCRm+ n8vi1Jfg/3xcM/RVf00iwqLdpit/h2D5SPQHhfjQKHOxDw21bpo18ayEYQBLzt/HlNlB EHxCdCgrCnLypoW5eyVCGADEn1x4SNqK6qB4ZtX4fT3F1lgVJkvITNVgPnhkobPhcFFr si3FqszwtmJ8qzOlCVOnaFOX2ccF/zBYQ+fvt0Q5aMUoQHu4Gz7aD+9maIm+B3UnlQCm mdlw== X-Gm-Message-State: ABuFfohRUDAFDRi/8YQCM3OZ8U9mqZju/5cWZ6gv7kEafA0GSSM4TLHL EEaQqN/iNwQZZuXmaKYAQGnHeceonoI= X-Received: by 2002:a63:4c4e:: with SMTP id m14-v6mr31085204pgl.173.1539917664910; Thu, 18 Oct 2018 19:54:24 -0700 (PDT) Received: from mba13.smb.com (59-115-111-251.dynamic-ip.hinet.net. [59.115.111.251]) by smtp.gmail.com with ESMTPSA id r81-v6sm37994264pfa.110.2018.10.18.19.54.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 19:54:23 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 19 Oct 2018 10:54:18 +0800 Message-Id: <20181019025418.3037-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 Subject: [edk2] [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eric.dong@intel.com, star.zeng@intel.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Given that the firmware itself may access the ESRT table when the OS invokes the UpdateCapsule () boot service, it requires a virtual mapping and so it needs to be allocated from RtServicesData memory. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c b/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c index cab8d69e35ad..66266a44cec9 100644 --- a/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c +++ b/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c @@ -577,7 +577,8 @@ EsrtReadyToBootEventNotify ( goto EXIT; } - EsrtTable = AllocatePool(sizeof(EFI_SYSTEM_RESOURCE_TABLE) + NonFmpRepositorySize + FmpRepositorySize); + EsrtTable = AllocateRuntimePool (sizeof(EFI_SYSTEM_RESOURCE_TABLE) + + NonFmpRepositorySize + FmpRepositorySize); if (EsrtTable == NULL) { DEBUG ((EFI_D_ERROR, "Esrt table memory allocation failure\n")); goto EXIT;