From patchwork Wed Jul 5 13:04:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 107076 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp751292qge; Wed, 5 Jul 2017 06:04:45 -0700 (PDT) X-Received: by 10.84.216.71 with SMTP id f7mr22060216plj.266.1499259885836; Wed, 05 Jul 2017 06:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499259885; cv=none; d=google.com; s=arc-20160816; b=myxTcmklrWDDW0LJUDQJCFsTtcjEXHXeK9lTsZMM5DQYy7dqMnwiNFTfqeTFBUSsv2 mJNxqEW61BGLlCgpTer5UDLnNJRZ4EDx8F9t/xnCFxASBKVbFrgPEf9eH5GoFGjkoPO4 aD6lqPRlWJ2wY8UU7XHtWW9Pyjj6l5MgYaSt+PUP11QHGrTpV9+e/dOQFjQ93geReqaQ gk7CVOPkyj4T3C8YpNqCuXyAPS1QFCR4IDkzuikAXn4RQeoCVr692FLxo57eqHoecTmg 6BBm/k5dvGocHOByVJzjjoGHfy6dn5K3zA4ZGJpXBJkRGAi08e6cUeLfatz5I/ldh7/S 0mrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=TnrO/XF9cHpg2b6jmJNgeu6RQhBHs5ljFj7lkhXgdJ8=; b=B310XfiH50yJoCPmlTaYVsAl8lly+8RfSbCIeleF1Qu9HRo2XncHrsM/RzCzpUFT+O aTaC/0AhKCngm4GNDEGToPOEUb6bCZXlsBLvmKzQGObgJXfFGJ/pfwtM7cLoHNO5/TPw d1q03YrR2X+W+PAxa/jSDsRSOoJcrsF8iSTbk9SCEdhDycQhHYKK8zXUq/Oa3BkZSsfq toS/eDxLaOK8qlg1SwmPW76BdwQanE09zRiw76BwMJiOfYUOc2Pg+UUJy1oxbba2uGK1 eRaFyQnpULHx9dDjq+KMdIpJYrr8p3Pq/fdU+2pyq0rWZV8S+ja4nLYU2zM5Ob6Z6c4U pwSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=C26dnvrI; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id 184si16859004pgj.9.2017.07.05.06.04.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 06:04:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=C26dnvrI; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AAD5F21C943F0; Wed, 5 Jul 2017 06:03:05 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org 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 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: [edk2] [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: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek 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