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::141; helo=mail-it1-x141.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x141.google.com (mail-it1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) (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 BB6612115C33C for ; Thu, 18 Oct 2018 20:24:50 -0700 (PDT) Received: by mail-it1-x141.google.com with SMTP id c85-v6so3018978itd.1 for ; Thu, 18 Oct 2018 20:24:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=u2W/0H+KTO+EOOVW35ovq3Y6toKuj/d+X9qS/bXbUZE=; b=b2aT3iju1ISYchFuohBhXo++CnuyLRcCzkGMjhdUEyN9bOousYgWP2GBISc9F1kNGX D3gtBhPDUIgl6uIzaWSYbTAs1MCwYQs4qiIoE6N4WDUjEh29DoLNpplQTDSY5VGDw2nK u3xwgAcP3Zief3clAezVtsJ3Y8aB6q7YuqrMA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=u2W/0H+KTO+EOOVW35ovq3Y6toKuj/d+X9qS/bXbUZE=; b=TvtHaS5X7VJ3IejxUL/7Auf+LcYDRUwBcRVlWW9A1mOI1AyTkQYf/XCfOIcPJ2RLrP FK2fSo5n3BK8cSGtuXkADs3Orf2kUAlzC/Q6yjOiJ7+5jEqieWMBX7++Dxc7U0WC4d/G 7W+9T4pa7wjTu7BaE7q+gJzA1zxy/pwjJ8/0kAdW5iiZ6KOpq1KyP1x1Svtn3F+CsI0g yy8zfI2KpOB+WY01gQneW0MwDjJSffnXAkUK9L6z4umW+ROXTRa1Uabe5OpX98QMKy0j /u0Tb4jwUIEtzQcON3l9hQ0CXb0xZHfxEi1lzlH0LwV8wBA5lUvLcrSLjouzf7GJcuDE AL6Q== X-Gm-Message-State: ABuFfojAeJWw8hpIJywhvDw4Q0dV/dTE1NTknI0n/jt919uZHvuHCc5c H9IjB50tnPUtcjcNgessm6Y6dzNSEnMFf8J2y7lxpwmN X-Google-Smtp-Source: ACcGV63bqLVurlga2IZDDPa8QSKeMCUMhZ7n0Vzls2zPy0uYSC3jDJdsPPtOw5BrFCkExzKOa0IpLNgVOaHafMN7JGI= X-Received: by 2002:a24:e08f:: with SMTP id c137-v6mr2186131ith.71.1539919489636; Thu, 18 Oct 2018 20:24:49 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:5910:0:0:0:0:0 with HTTP; Thu, 18 Oct 2018 20:24:49 -0700 (PDT) In-Reply-To: <20181019025418.3037-1-ard.biesheuvel@linaro.org> References: <20181019025418.3037-1-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Fri, 19 Oct 2018 11:24:49 +0800 Message-ID: To: "edk2-devel@lists.01.org" Cc: "Zeng, Star" , Eric Dong , Leif Lindholm , Ard Biesheuvel Subject: Re: [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 03:24:51 -0000 Content-Type: text/plain; charset="UTF-8" On 19 October 2018 at 10:54, Ard Biesheuvel wrote: > Given that the firmware itself may access the ESRT table when the OS > invokes the UpdateCapsule () boot service, *runtime* 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 >