[edk2-devel] [patch 07/11] QuarkPlatformPkg: Remove PcdFrameworkCompatibilitySupport usage

Dandan Bi posted 11 patches 6 years, 9 months ago
[edk2-devel] [patch 07/11] QuarkPlatformPkg: Remove PcdFrameworkCompatibilitySupport usage
Posted by Dandan Bi 6 years, 9 months ago
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464

Currently Framework compatibility support is not needed and
PcdFrameworkCompatibilitySupport will be removed from edk2.
So remove the usage of this PCD firstly.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 .../Pei/PlatformInit/Generic/Recovery.c       | 50 ++++++-------------
 .../Pei/PlatformInit/PlatformEarlyInit.inf    |  3 +-
 2 files changed, 15 insertions(+), 38 deletions(-)

diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/Generic/Recovery.c b/QuarkPlatformPkg/Platform/Pei/PlatformInit/Generic/Recovery.c
index f6a076f757..67299a68b7 100644
--- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/Generic/Recovery.c
+++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/Generic/Recovery.c
@@ -1,10 +1,10 @@
 /** @file
 Install Platform EFI_PEI_RECOVERY_MODULE_PPI and Implementation of
 EFI_PEI_LOAD_RECOVERY_CAPSULE service.
 
-Copyright (c) 2013-2016 Intel Corporation.
+Copyright (c) 2013-2019 Intel Corporation.
 
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
@@ -195,29 +195,17 @@ Returns:
   //
   // If there is an image provider, get the capsule ID
   //
   if (ProviderAvailable) {
     RecoveryCapsuleSize = 0;
-    if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {
-      Status = DeviceRecoveryModule->GetRecoveryCapsuleInfo (
-                                      PeiServices,
-                                      DeviceRecoveryModule,
-                                      0,
-                                      &RecoveryCapsuleSize,
-                                      &DeviceId
-                                      );
-    } else {
-      Status = DeviceRecoveryModule->GetRecoveryCapsuleInfo (
-                  PeiServices,
-                  DeviceRecoveryModule,
-                  1,
-                  &RecoveryCapsuleSize,
-                  &DeviceId
-                  );
-
-
-  }
+    Status = DeviceRecoveryModule->GetRecoveryCapsuleInfo (
+                PeiServices,
+                DeviceRecoveryModule,
+                1,
+                &RecoveryCapsuleSize,
+                &DeviceId
+                );
 
     if (EFI_ERROR (Status)) {
       return Status;
     }
 
@@ -237,26 +225,16 @@ Returns:
     Buffer  = NULL;
     Address = (UINTN) AllocatePages ((RecoveryCapsuleSize - 1) / 0x1000 + 1);
     ASSERT (Address);
 
     Buffer = (UINT8 *) (UINTN) Address;
-    if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {
-      Status = DeviceRecoveryModule->LoadRecoveryCapsule (
-                                      PeiServices,
-                                      DeviceRecoveryModule,
-                                      0,
-                                      Buffer
-                                      );
-     } else {
-       Status = DeviceRecoveryModule->LoadRecoveryCapsule (
-                                        PeiServices,
-                                        DeviceRecoveryModule,
-                                        1,
-                                        Buffer
-                                        );
-
-     }
+    Status = DeviceRecoveryModule->LoadRecoveryCapsule (
+                                     PeiServices,
+                                     DeviceRecoveryModule,
+                                     1,
+                                     Buffer
+                                     );
 
     DEBUG ((EFI_D_INFO | EFI_D_LOAD, "LoadRecoveryCapsule Returns: %r\n", Status));
 
     if (Status == EFI_DEVICE_ERROR) {
       AssertMediaDeviceError (PeiServices);
diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.inf b/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.inf
index 617d681d77..df8b0dd3bd 100644
--- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.inf
+++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.inf
@@ -34,11 +34,11 @@
 #  Recovery.c - provides the platform recoveyr functionality.
 #  MrcWrapper.c - Contains the logic to call MRC PPI and do Framework
 #     memory specific stuff like build memory map, build
 #     resource description hob for DXE phase,etc.
 #  Bootmode.c - Detect boot mode.
-# Copyright (c) 2013 - 2016 Intel Corporation.
+# Copyright (c) 2013 - 2019 Intel Corporation.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
@@ -138,11 +138,10 @@
 [FeaturePcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnFatUsbDisk
   gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnDataCD
   gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnFatFloppyDisk
   gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnIdeDisk
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport
   gQuarkPlatformTokenSpaceGuid.WaitIfResetDueToError
 
 [Pcd]
   gQuarkPlatformTokenSpaceGuid.PcdEsramStage1Base
   gQuarkPlatformTokenSpaceGuid.PcdFlashAreaSize
-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#39725): https://edk2.groups.io/g/devel/message/39725
Mute This Topic: https://groups.io/mt/31379000/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [patch 07/11] QuarkPlatformPkg: Remove PcdFrameworkCompatibilitySupport usage
Posted by Liming Gao 6 years, 9 months ago
Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Dandan Bi
>Sent: Monday, April 29, 2019 10:16 AM
>To: devel@edk2.groups.io
>Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Steele, Kelly
><kelly.steele@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: [edk2-devel] [patch 07/11] QuarkPlatformPkg: Remove
>PcdFrameworkCompatibilitySupport usage
>
>REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464
>
>Currently Framework compatibility support is not needed and
>PcdFrameworkCompatibilitySupport will be removed from edk2.
>So remove the usage of this PCD firstly.
>
>Cc: Michael D Kinney <michael.d.kinney@intel.com>
>Cc: Kelly Steele <kelly.steele@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>Signed-off-by: Dandan Bi <dandan.bi@intel.com>
>---
> .../Pei/PlatformInit/Generic/Recovery.c       | 50 ++++++-------------
> .../Pei/PlatformInit/PlatformEarlyInit.inf    |  3 +-
> 2 files changed, 15 insertions(+), 38 deletions(-)
>
>diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/Generic/Recovery.c
>b/QuarkPlatformPkg/Platform/Pei/PlatformInit/Generic/Recovery.c
>index f6a076f757..67299a68b7 100644
>--- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/Generic/Recovery.c
>+++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/Generic/Recovery.c
>@@ -1,10 +1,10 @@
> /** @file
> Install Platform EFI_PEI_RECOVERY_MODULE_PPI and Implementation of
> EFI_PEI_LOAD_RECOVERY_CAPSULE service.
>
>-Copyright (c) 2013-2016 Intel Corporation.
>+Copyright (c) 2013-2019 Intel Corporation.
>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> **/
>
>@@ -195,29 +195,17 @@ Returns:
>   //
>   // If there is an image provider, get the capsule ID
>   //
>   if (ProviderAvailable) {
>     RecoveryCapsuleSize = 0;
>-    if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {
>-      Status = DeviceRecoveryModule->GetRecoveryCapsuleInfo (
>-                                      PeiServices,
>-                                      DeviceRecoveryModule,
>-                                      0,
>-                                      &RecoveryCapsuleSize,
>-                                      &DeviceId
>-                                      );
>-    } else {
>-      Status = DeviceRecoveryModule->GetRecoveryCapsuleInfo (
>-                  PeiServices,
>-                  DeviceRecoveryModule,
>-                  1,
>-                  &RecoveryCapsuleSize,
>-                  &DeviceId
>-                  );
>-
>-
>-  }
>+    Status = DeviceRecoveryModule->GetRecoveryCapsuleInfo (
>+                PeiServices,
>+                DeviceRecoveryModule,
>+                1,
>+                &RecoveryCapsuleSize,
>+                &DeviceId
>+                );
>
>     if (EFI_ERROR (Status)) {
>       return Status;
>     }
>
>@@ -237,26 +225,16 @@ Returns:
>     Buffer  = NULL;
>     Address = (UINTN) AllocatePages ((RecoveryCapsuleSize - 1) / 0x1000 + 1);
>     ASSERT (Address);
>
>     Buffer = (UINT8 *) (UINTN) Address;
>-    if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {
>-      Status = DeviceRecoveryModule->LoadRecoveryCapsule (
>-                                      PeiServices,
>-                                      DeviceRecoveryModule,
>-                                      0,
>-                                      Buffer
>-                                      );
>-     } else {
>-       Status = DeviceRecoveryModule->LoadRecoveryCapsule (
>-                                        PeiServices,
>-                                        DeviceRecoveryModule,
>-                                        1,
>-                                        Buffer
>-                                        );
>-
>-     }
>+    Status = DeviceRecoveryModule->LoadRecoveryCapsule (
>+                                     PeiServices,
>+                                     DeviceRecoveryModule,
>+                                     1,
>+                                     Buffer
>+                                     );
>
>     DEBUG ((EFI_D_INFO | EFI_D_LOAD, "LoadRecoveryCapsule
>Returns: %r\n", Status));
>
>     if (Status == EFI_DEVICE_ERROR) {
>       AssertMediaDeviceError (PeiServices);
>diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.inf
>b/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.inf
>index 617d681d77..df8b0dd3bd 100644
>--- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.inf
>+++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.inf
>@@ -34,11 +34,11 @@
> #  Recovery.c - provides the platform recoveyr functionality.
> #  MrcWrapper.c - Contains the logic to call MRC PPI and do Framework
> #     memory specific stuff like build memory map, build
> #     resource description hob for DXE phase,etc.
> #  Bootmode.c - Detect boot mode.
>-# Copyright (c) 2013 - 2016 Intel Corporation.
>+# Copyright (c) 2013 - 2019 Intel Corporation.
> #
> # SPDX-License-Identifier: BSD-2-Clause-Patent
> #
> ##
>
>@@ -138,11 +138,10 @@
> [FeaturePcd]
>   gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnFatUsbDisk
>   gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnDataCD
>   gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnFatFloppyDisk
>   gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryOnIdeDisk
>-  gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport
>   gQuarkPlatformTokenSpaceGuid.WaitIfResetDueToError
>
> [Pcd]
>   gQuarkPlatformTokenSpaceGuid.PcdEsramStage1Base
>   gQuarkPlatformTokenSpaceGuid.PcdFlashAreaSize
>--
>2.18.0.windows.1
>
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40074): https://edk2.groups.io/g/devel/message/40074
Mute This Topic: https://groups.io/mt/31379000/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-