diff mbox series

[edk2,2/3] ArmVirtPkg: switch to DXE runtime version of DebugLib where appropriate

Message ID 20180220110524.9050-3-ard.biesheuvel@linaro.org
State Superseded
Headers show
Series Create UART DebugLib implementation for runtime drivers | expand

Commit Message

Ard Biesheuvel Feb. 20, 2018, 11:05 a.m. UTC
Switch all users of ArmVirt.dsc.inc to the new DebugLib implementation
that was created especially for DXE_RUNTIME_DRIVER modules, ensuring
that DEBUG() calls do not touch the UART at runtime.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 ArmVirtPkg/ArmVirt.dsc.inc | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.11.0

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

Comments

Laszlo Ersek Feb. 20, 2018, 4:44 p.m. UTC | #1
On 02/20/18 12:05, Ard Biesheuvel wrote:
> Switch all users of ArmVirt.dsc.inc to the new DebugLib implementation

> that was created especially for DXE_RUNTIME_DRIVER modules, ensuring

> that DEBUG() calls do not touch the UART at runtime.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  ArmVirtPkg/ArmVirt.dsc.inc | 3 +++

>  1 file changed, 3 insertions(+)

> 

> diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc

> index 0cb48f08e9bf..cde514958da2 100644

> --- a/ArmVirtPkg/ArmVirt.dsc.inc

> +++ b/ArmVirtPkg/ArmVirt.dsc.inc

> @@ -231,6 +231,9 @@ [LibraryClasses.common.UEFI_DRIVER]

>  [LibraryClasses.common.DXE_RUNTIME_DRIVER]

>    MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf

>    CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf

> +!if $(TARGET) != RELEASE

> +  DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf

> +!endif

>  

>  !if $(SECURE_BOOT_ENABLE) == TRUE

>    BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf

> 


I think all occurrences of the DebugLib -->
"MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf"
resolution should be audited and possibly patched / extended in the edk2
tree. Otherwise those platforms will be broken by patch #3. But, that
can wait for the next iteration.

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


Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index 0cb48f08e9bf..cde514958da2 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -231,6 +231,9 @@  [LibraryClasses.common.UEFI_DRIVER]
 [LibraryClasses.common.DXE_RUNTIME_DRIVER]
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
+!if $(TARGET) != RELEASE
+  DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
+!endif
 
 !if $(SECURE_BOOT_ENABLE) == TRUE
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf