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.biesheu...@linaro.org] 
Sent: Friday, October 19, 2018 11:25 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.z...@intel.com>; Dong, Eric <eric.d...@intel.com>; Leif 
Lindholm <leif.lindh...@linaro.org>; Ard Biesheuvel <ard.biesheu...@linaro.org>
Subject: Re: [PATCH] MdeModulePkg/EsrtDxe: allocate ESRT table from 
RtServicesData memory

On 19 October 2018 at 10:54, Ard Biesheuvel <ard.biesheu...@linaro.org> 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 <ard.biesheu...@linaro.org>
> ---
>  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
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to