From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web12.3804.1589283238467579095 for ; Tue, 12 May 2020 04:33:58 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: wei6.xu@intel.com) IronPort-SDR: 1Y7guvxibP7Id9ab0SNCTQve42cRlR6ao6wkA+DDuGT/eOCnZfnlkBVKrTGIIGbVGkNqcNnQI0 dhv943V5RtVg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2020 04:33:57 -0700 IronPort-SDR: h4jb3jGkqPO8qSqYAMkgLXgsbfv7H2bsJlqaAnSzw9bQHU81sCkHl7xQFQhsQ0kduQ7dlyBhHw uwu9lgQCf17A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,383,1583222400"; d="scan'208";a="265474118" Received: from shwdeopenpsi174.ccr.corp.intel.com ([10.239.157.39]) by orsmga006.jf.intel.com with ESMTP; 12 May 2020 04:33:55 -0700 From: "Xu, Wei6" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Sean Brogan Subject: [edk2-devel] [PATCH V2 0/5] FmpDevicePkg: Move capsule dependency implement to library Date: Tue, 12 May 2020 19:33:46 +0800 Message-Id: <20200512113351.8224-1-wei6.xu@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 v2: - Remove API GetDependencySize in FmpDependencyLib. - Correct comments in FmpDependencyLib unit test; Correct the error status when CreateUnitTestSuite fails. - Update comments for null instance of FmpDependencyCheckLib; Remove SaveFmpDependency and GetFmpDependency from FmpDependencyCheckLib - Add new FmpDependencyDevice library class to provide firmware device specific SaveFmpDependency and GetFmpDependency services. - Update FmpDxe to use new FmpDependencyDeviceLib v1: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2696 This patch series move the implementation of Fmp Capsule Dependency from FmpDxe driver into two library classes. FmpDependencyLib is a base lib to provide generic dependency evaluation services. FmpDependencyCheckLib is a platform lib to provide dependency check services during firmware update. Platform can perform the dependency check in platform specific manner by implementing its own FmpDependencyCheckLib. This patch series also add unit test for EvaluateDependency API in FmpDependencyLib. Cc: Michael D Kinney Cc: Liming Gao Cc: Sean Brogan Signed-off-by: Wei6 Xu Wei6 Xu (5): FmpDevicePkg: Add FmpDependency library class and BASE instance FmpDevicePkg/Test: Add FmpDependencyLib unit test FmpDevicePkg: Add FmpDependencyCheck library class and instances FmpDevicePkg: Add FmpDependencyDevice library class and NULL instance FmpDevicePkg/FmpDxe: Use new Fmp dependency libraries FmpDevicePkg/FmpDevicePkg.ci.yaml | 10 + FmpDevicePkg/FmpDevicePkg.dec | 15 +- FmpDevicePkg/FmpDevicePkg.dsc | 16 +- FmpDevicePkg/FmpDxe/Dependency.h | 63 ---- FmpDevicePkg/FmpDxe/FmpDxe.c | 255 ++++------------ FmpDevicePkg/FmpDxe/FmpDxe.h | 4 + FmpDevicePkg/FmpDxe/FmpDxe.inf | 5 +- FmpDevicePkg/FmpDxe/FmpDxeLib.inf | 5 +- .../Include/Library/FmpDependencyCheckLib.h | 38 +++ .../Include/Library/FmpDependencyDeviceLib.h | 50 +++ FmpDevicePkg/Include/Library/FmpDependencyLib.h | 89 ++++++ .../FmpDependencyCheckLib/FmpDependencyCheckLib.c | 327 ++++++++++++++++++++ .../FmpDependencyCheckLib.inf | 43 +++ .../FmpDependencyCheckLib.uni | 13 + .../FmpDependencyCheckLibNull.c | 34 +++ .../FmpDependencyCheckLibNull.inf | 30 ++ .../FmpDependencyCheckLibNull.uni | 13 + .../FmpDependencyDeviceLib.c | 49 +++ .../FmpDependencyDeviceLibNull.inf | 29 ++ .../FmpDependencyDeviceLibNull.uni | 12 + .../FmpDependencyLib/FmpDependencyLib.c} | 337 +++++++-------------- .../Library/FmpDependencyLib/FmpDependencyLib.inf | 34 +++ .../Library/FmpDependencyLib/FmpDependencyLib.uni | 12 + FmpDevicePkg/Test/FmpDeviceHostPkgTest.dsc | 28 ++ .../FmpDependencyLib/EvaluateDependencyUnitTest.c | 270 +++++++++++++++++ .../FmpDependencyLibUnitTestsHost.inf | 34 +++ .../FmpDependencyLibUnitTestsUefi.inf | 35 +++ 27 files changed, 1344 insertions(+), 506 deletions(-) delete mode 100644 FmpDevicePkg/FmpDxe/Dependency.h create mode 100644 FmpDevicePkg/Include/Library/FmpDependencyCheckLib.h create mode 100644 FmpDevicePkg/Include/Library/FmpDependencyDeviceLib.h create mode 100644 FmpDevicePkg/Include/Library/FmpDependencyLib.h create mode 100644 FmpDevicePkg/Library/FmpDependencyCheckLib/FmpDependencyCheckLib.c create mode 100644 FmpDevicePkg/Library/FmpDependencyCheckLib/FmpDependencyCheckLib.inf create mode 100644 FmpDevicePkg/Library/FmpDependencyCheckLib/FmpDependencyCheckLib.uni create mode 100644 FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.c create mode 100644 FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.inf create mode 100644 FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.uni create mode 100644 FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLib.c create mode 100644 FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLibNull.inf create mode 100644 FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLibNull.uni rename FmpDevicePkg/{FmpDxe/Dependency.c => Library/FmpDependencyLib/FmpDependencyLib.c} (53%) create mode 100644 FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.inf create mode 100644 FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.uni create mode 100644 FmpDevicePkg/Test/FmpDeviceHostPkgTest.dsc create mode 100644 FmpDevicePkg/Test/UnitTest/Library/FmpDependencyLib/EvaluateDependencyUnitTest.c create mode 100644 FmpDevicePkg/Test/UnitTest/Library/FmpDependencyLib/FmpDependencyLibUnitTestsHost.inf create mode 100644 FmpDevicePkg/Test/UnitTest/Library/FmpDependencyLib/FmpDependencyLibUnitTestsUefi.inf -- 2.16.2.windows.1