On 02/22/18 17:28, Ard Biesheuvel wrote:
> Introduce a variant of BaseDebugLibSerialPort that behaves correctly with
> regards to the use of the serial port after ExitBootServices(). Also, it
> caches PCD values in the constructor so that no calls into PcdLib are
> made at runtime.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
> ---
>  MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c                       
> | 373 ++++++++++++++++++++
>  MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf 
> |  56 +++
>  MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.uni 
> |  21 ++
>  3 files changed, 450 insertions(+)

> +/**
> +  If a runtime driver exits with an error, it must call this routine
> +  to free the allocated resource before the exiting.
> +
> +  @param[in]  ImageHandle   The firmware allocated handle for the EFI image.
> +  @param[in]  SystemTable   A pointer to the EFI System Table.
> +
> +  @retval     EFI_SUCCESS       The Runtime Driver Lib shutdown successfully.
> +  @retval     EFI_UNSUPPORTED   Runtime Driver lib was not initialized.
> +**/
> +EFI_STATUS
> +EFIAPI
> +DxeRuntimeDebugLibSerialPortDestructor (
> +  IN EFI_HANDLE        ImageHandle,
> +  IN EFI_SYSTEM_TABLE  *SystemTable
> +  )
> +{
> +  return SystemTable->BootServices->CloseEvent (mEfiExitBootServicesEvent);
> +}

The leading comments still refer to "Runtime Driver Lib", but that's
harmless.

The UNI file (STR_ contents and @file comment) have not been updated
with the special purpose of this library, but I can live with that.

Reviewed-by: Laszlo Ersek <ler...@redhat.com>

Thanks!
LAszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to