From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 34B0621C9E7D8 for ; Wed, 5 Jul 2017 06:03:04 -0700 (PDT) Received: by mail-wm0-x22b.google.com with SMTP id 62so222146779wmw.1 for ; Wed, 05 Jul 2017 06:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=H0YKeVoyudz06efueEmip+9N5Hy54W1E9BNRYQz0VUE=; b=C26dnvrIuEnzlAfyCJxpfODvMAAYDWO1GXB+pH4agc4ieM2YkSh8vt7b/OexVdL2c0 WKR4MnZD25hSSx87d6nuBD1WRjhTk8FA54OOD1ANpXPbMFP9gkE9x4LONNdmjrVdlvQa bknuGEAngR2LTFwlCOp4sZrmK/5yuICepSUiU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=H0YKeVoyudz06efueEmip+9N5Hy54W1E9BNRYQz0VUE=; b=AGv2aoaXmIBtV1BQJtslLXpgirmRWtF2M2MBgdGsRLmezL2lkfr8laB9GFrFQTWwpe mW7qdGWRBPD24PwQQviwW0p+KkevbnAZVugjFPlGivW+zM6V8chg8U6JxEMg8fkZVGsb 6XX2PDFl6dpeBJ+L9icGgJRJSsUstF5XUSqTYUg22tZelsTkrJDk4218PJjp3adYqOAj dUdhXoqNQfzFgAiCCVuWHk++H8sJ1h6LUBiMjNM2Tlhj4yZB9LbFO175MhKXu6WKBDHj LrTvLYW8+NiYWJFvjxQiALaGU+n/3JpmFuyz9g74xRkRxI457LAOwBPi5UHhNuEDEtBp JR7g== X-Gm-Message-State: AKS2vOwZWjIQcmf3Ig2YOTiI0qcDHxCEshHWWyIf9naHuTql3STDmQZt /UxpVCFL3UA/xGBO2KkAxw== X-Received: by 10.28.107.135 with SMTP id a7mr29489600wmi.117.1499259881468; Wed, 05 Jul 2017 06:04:41 -0700 (PDT) Received: from localhost.localdomain ([154.145.144.206]) by smtp.gmail.com with ESMTPSA id o6sm19582294wrc.48.2017.07.05.06.04.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 06:04:40 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Cc: leif.lindholm@linaro.org, mw@semihalf.com, Ard Biesheuvel Date: Wed, 5 Jul 2017 14:04:34 +0100 Message-Id: <20170705130434.4525-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 Subject: [PATCH] ArmVirtPkg: remove status code support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 13:03:04 -0000 Commit 7b1dc6c569a 'ArmVirtPkg: switch to generic ResetSystemRuntimeDxe' replaced all references in ArmVirtPkg to the deprecated ResetRuntimeDxe from EmbeddedPkg with the well maintained generic alternative that lives in MdeModulePkg. However, as it turns out, the generic driver has a dependency on the library class ReportStatusCodeLib, whose default resolution is an implementation that is not safe for use at runtime, resulting in crashes when trying to invoke it from the OS. Since we have no use for status codes in any of the ArmVirtPkg platforms, let's replace all resolutions with a common one to the NULL implementation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirt.dsc.inc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 0b9b457b5619..bfc40286d7ab 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -154,6 +154,8 @@ [LibraryClasses.common] VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf + ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf + [LibraryClasses.common.SEC] PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf @@ -174,7 +176,6 @@ [LibraryClasses.common.PEI_CORE] MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf - ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf @@ -191,7 +192,6 @@ [LibraryClasses.common.PEIM] MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf - ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf @@ -205,13 +205,11 @@ [LibraryClasses.common.DXE_CORE] HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf - ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf [LibraryClasses.common.DXE_DRIVER] - ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf @@ -223,10 +221,8 @@ [LibraryClasses.common.UEFI_APPLICATION] HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf - ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf [LibraryClasses.common.UEFI_DRIVER] - ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf @@ -234,7 +230,6 @@ [LibraryClasses.common.UEFI_DRIVER] [LibraryClasses.common.DXE_RUNTIME_DRIVER] MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf - ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf !if $(SECURE_BOOT_ENABLE) == TRUE @@ -334,8 +329,6 @@ [PcdsFixedAtBuild.common] # DEBUG_ERROR 0x80000000 // Error gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL) - gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07 - # # Optional feature to help prevent EFI memory map fragments # Turned on and off via: PcdPrePiProduceMemoryTypeInformationHob -- 2.9.3