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 A2B5D21164EEB for ; Thu, 18 Oct 2018 20:48:02 -0700 (PDT) Received: by mail-it1-x141.google.com with SMTP id m15so3029244itl.4 for ; Thu, 18 Oct 2018 20:48:02 -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=ZpYBa7TxE3zEi8Cp1DOOjWNUKntNobI/7OWZg8mXzY0=; b=Anhlqpl65rD2dx+PNDgrCTD6vOBGkKuta5pbecwtbQivPL1pn6LMqzjptIpIkHrQEN hct2JsQVtV+k55+iVhPz31yOBpZfqk4eLQjUrUMvo0hLRyn+k/7VtpBrFmzn1FXHVpXt zc+YAPK8XkTX+qKT7p0yxwZMQ/QSuSkw8RFQY= 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=ZpYBa7TxE3zEi8Cp1DOOjWNUKntNobI/7OWZg8mXzY0=; b=JI3ogKaaXD4KlOS9jZVpXwfuzeGaAUxYHQ1V0WKQLniB6rvqnVS1+zoaR5/dut6YNo uhyQSMaTo2LgC1jdWcoQiq4kTzMy7kRMesJaKVTCyVvC5Ct406dQ5Jnq/0iV5CdJ8HA+ 4xLJNr5N1zRawmQYAF5YjihYK+3HVB/n6zmDq1yvxZgpym3ipmnRMWAKmnBMFwc3Zx4w CONf4fLlbkbedmOFNPShrpfb4LfWuYGeLmEVj5WZn+U9MMsNzsnhc+8x68e0mTMhb+zs j6dYrqM819cKXvnFCJxqv7nZh2x2bO5iEEaQYy00gWHUw84pMbNrSwtHparuiWPdh7/9 /1sw== X-Gm-Message-State: ABuFfojhFK5CNCL7rRoyKQmEVfTMBc/fHna0UAUEAImrKnM7C+GNn3M3 EkgwdOZeic6LRAEyyaOuMDsvdAAURiN3fQFjx3VRRw== X-Google-Smtp-Source: ACcGV63K45SitXHbxUKsIhuNQd7a9Cx6CPBpl+BRA7B8IPAaY0CI89wfroN0rlTtNp1CwbPF8KlUl6iAjxKR2fRKWI0= X-Received: by 2002:a24:4ac5:: with SMTP id k188-v6mr2356142itb.158.1539920881818; Thu, 18 Oct 2018 20:48:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:5910:0:0:0:0:0 with HTTP; Thu, 18 Oct 2018 20:48:01 -0700 (PDT) In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103BC2352B@shsmsx102.ccr.corp.intel.com> References: <20181019025418.3037-1-ard.biesheuvel@linaro.org> <0C09AFA07DD0434D9E2A0C6AEB0483103BC2352B@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Fri, 19 Oct 2018 11:48:01 +0800 Message-ID: To: "Zeng, Star" , Peter Jones Cc: "edk2-devel@lists.01.org" , "Dong, Eric" , Leif Lindholm , "Kinney, Michael D" , "Yao, Jiewen" 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:48:02 -0000 Content-Type: text/plain; charset="UTF-8" (+ Peter) On 19 October 2018 at 11:46, Zeng, Star wrote: > Hi Ard, > > Thanks for the patch. > > Cc more people who knows ESRT. > > UEFI 2.7 chapter 23.3: > The ESRT shall be stored in memory of type EfiBootServicesData. > > Seeming, we need update UEFI spec if firmware really needs access ESRT configuration table at runtime. > > > Thanks, > Star > -----Original Message----- > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > Sent: Friday, October 19, 2018 11:25 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Dong, Eric ; Leif Lindholm ; Ard Biesheuvel > Subject: Re: [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from RtServicesData memory > > 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 >>