From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: ACcGV63PyBADtptzjzxSfuPKffNAKsjuFGUi+EIGDkwBO2FNngvuRKkUyeZXSFdYa2l7x+xCaByZGw== 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 Cc: star.zeng@intel.com, eric.dong@intel.com, leif.lindholm@linaro.org, Ard Biesheuvel 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: [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: , X-List-Received-Date: Fri, 19 Oct 2018 02:54:26 -0000 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(-) 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; -- 2.17.1