From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::242; helo=mail-it0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (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 41AB122436953 for ; Tue, 27 Feb 2018 02:39:28 -0800 (PST) Received: by mail-it0-x242.google.com with SMTP id k79so11858910ita.2 for ; Tue, 27 Feb 2018 02:45:34 -0800 (PST) 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=J809kISDchntxcHoB2momn+yZW0DGoSvV058wwxywOM=; b=Vi4T4o9tmeIt+iwNe1mXcCKqoMTP+UyxE2STQuzFovcG+6B4e0DYX+VZnSpuRYJrh4 GOvtdj4zQC3YUb71ZJ4WgRoKSqxzc3IVr7TcLF8KCZ30BQUJfYmo/Y5ShPAxvJ/rPWY2 PNG5X8DND/6chUT5riWr9wbSE8DhiVkr/F4bU= 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=J809kISDchntxcHoB2momn+yZW0DGoSvV058wwxywOM=; b=VVMFxxkJhsBbEWmbFQPwDlDIrsxo3jzFvFvXQsMzLQN7w8SHC62RdH3skFwNvMDii1 /TiigLlO7PK2xiFRP6nI1SY84Hqv1pMeDYI5S+pEFT3gq7r3w5lMb0ZfO5pFv+gJbVIj Y6ilEd83rOeD9/KVjNeMlngLJfdez5uHOHXXzePoOzbxyognZp27MpIOU53g9ZHuZdTX tj8H7TaVIYN9rbfbiN/FCctEH+JUOW+FWK3vCFP0Bd/E5hzpalDTvvZTv+3qjNFLNbyI f6jHcvrL4zZxgxGa715pkecHPWf1bXLMsuFpd80R9pLAiXgwgB9Ig+wXFRAVKc5bRSW+ SwSA== X-Gm-Message-State: APf1xPAJwFnIiJlzhnpBQhyl6Loy1XjVG+1rgvuNi2kQfx6Wm/6f8MCN 6k2V5V9J/Sq/mAcxp/C5ZwC19XuuknFR1cwDqxum4w== X-Google-Smtp-Source: AG47ELsDqI8mk9/xPKi3FnnSznUVdbvNVa+h2BcMeVmRstTBlPX4fSU0Illtg4NDSkZNEpIt2AebrJPqtSzf7MsD+kc= X-Received: by 10.36.60.216 with SMTP id m207mr8270803ita.68.1519728333509; Tue, 27 Feb 2018 02:45:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.138.209 with HTTP; Tue, 27 Feb 2018 02:45:32 -0800 (PST) In-Reply-To: <20180227103903.lqq6exh6jamzqkd3@bivouac.eciton.net> References: <20180224142515.461-1-ard.biesheuvel@linaro.org> <20180227103903.lqq6exh6jamzqkd3@bivouac.eciton.net> From: Ard Biesheuvel Date: Tue, 27 Feb 2018 10:45:32 +0000 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" , Laszlo Ersek Subject: Re: [PATCH edk2-platforms 1/2] Platform, Silicon: use DxeRuntimeDebugLibSerialPort for runtime DXE drivers X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2018 10:39:28 -0000 Content-Type: text/plain; charset="UTF-8" On 27 February 2018 at 10:39, Leif Lindholm wrote: > On Sat, Feb 24, 2018 at 02:25:14PM +0000, Ard Biesheuvel wrote: >> Commit 4bf95a9f361e ("MdeModulePkg/ResetSystemRuntimeDxe: Add more >> debug message") broke the DEBUG build for all platforms that rely on >> MMIO mapped UART devices, since it introduces a DEBUG() print that >> may trigger at runtime, at which such UART devices are usually not >> mapped, resulting in an OS crash. >> >> Given that this mostly only affects ARM and AARCH64, it is not unlikely >> that similar inadvertent breakage will occur again in the future, so >> let's fix this once and for all by switching affected platforms to the >> new DxeRuntimeDebugLibSerialPort DebugLib implementation that takes care >> not to touch the UART hardware after ExitBootServices(). >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel > > For the series (pending DxeRuntimeDebugLibSerialPort hitting edk2): > Reviewed-by: Leif Lindholm > That's already in so I pushed this as d8e4d4565841..dbf93a0a853a Thanks >> --- >> Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 3 +++ >> Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 3 +++ >> Platform/LeMaker/CelloBoard/CelloBoard.dsc | 3 +++ >> Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 3 +++ >> Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 3 +++ >> Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 3 +++ >> Silicon/Hisilicon/Hisilicon.dsc.inc | 3 +++ >> Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 3 +++ >> 8 files changed, 24 insertions(+) >> >> diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc >> index 7d85b78642da..348828e18d44 100644 >> --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc >> +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc >> @@ -227,6 +227,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf >> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf >> CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf >> +!if $(TARGET) != RELEASE >> + DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf >> +!endif >> >> [LibraryClasses.common.UEFI_APPLICATION] >> UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf >> diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc >> index b026ce3a420a..7cb47937329e 100644 >> --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc >> +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc >> @@ -227,6 +227,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> !if $(SECURE_BOOT_ENABLE) == TRUE >> BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf >> !endif >> +!if $(TARGET) != RELEASE >> + DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf >> +!endif >> >> [LibraryClasses.ARM, LibraryClasses.AARCH64] >> # >> diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc b/Platform/LeMaker/CelloBoard/CelloBoard.dsc >> index 2468583c0daa..569e444f6b26 100644 >> --- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc >> +++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc >> @@ -211,6 +211,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf >> ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf >> CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf >> +!if $(TARGET) != RELEASE >> + DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf >> +!endif >> >> [LibraryClasses.common.UEFI_APPLICATION] >> UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf >> diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc >> index 8450d7800e43..925ce36d278b 100644 >> --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc >> +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc >> @@ -208,6 +208,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf >> ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf >> BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf >> +!if $(TARGET) != RELEASE >> + DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf >> +!endif >> >> ################################################################################ >> # >> diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc >> index 45ab2afc4069..2d5a94ed1dab 100644 >> --- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc >> +++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc >> @@ -203,6 +203,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf >> CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf >> ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf >> +!if $(TARGET) != RELEASE >> + DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf >> +!endif >> >> ################################################################################ >> # >> diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc >> index f0a7e9794153..3f4c7c8a3eef 100644 >> --- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc >> +++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc >> @@ -217,6 +217,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf >> ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf >> CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf >> +!if $(TARGET) != RELEASE >> + DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf >> +!endif >> >> [LibraryClasses.common.UEFI_APPLICATION] >> UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf >> diff --git a/Silicon/Hisilicon/Hisilicon.dsc.inc b/Silicon/Hisilicon/Hisilicon.dsc.inc >> index 9050f29be381..b196322a20e2 100644 >> --- a/Silicon/Hisilicon/Hisilicon.dsc.inc >> +++ b/Silicon/Hisilicon/Hisilicon.dsc.inc >> @@ -213,6 +213,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> !ifndef CONFIG_NO_DEBUGLIB >> DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf >> !endif >> +!if $(TARGET) != RELEASE >> + DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf >> +!endif >> >> [LibraryClasses.AARCH64] >> ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf >> diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc >> index ef70b5216727..535cc3ff4c19 100644 >> --- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc >> +++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc >> @@ -184,6 +184,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf >> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf >> CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf >> +!if $(TARGET) != RELEASE >> + DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf >> +!endif >> >> [LibraryClasses.ARM, LibraryClasses.AARCH64] >> # >> -- >> 2.11.0 >>