]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Make PcdPeim/PcdDxe driver also produce EFI_PCD_PPI/EFI_PCD_PROTOCOL defined in PI...
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 10 Nov 2009 08:45:07 +0000 (08:45 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 10 Nov 2009 08:45:07 +0000 (08:45 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9401 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/PCD/Dxe/Pcd.c
MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
MdeModulePkg/Universal/PCD/Dxe/Service.h
MdeModulePkg/Universal/PCD/Pei/Pcd.c
MdeModulePkg/Universal/PCD/Pei/Pcd.inf
MdeModulePkg/Universal/PCD/Pei/Service.h

index 288e7f785bb11206f3c92a930099c61e92db992d..0bb44ff81c1f82d2e156c7cfbdcf1562ec37f46a 100644 (file)
@@ -2,7 +2,7 @@
   PCD DXE driver manage all PCD entry initialized in PEI phase and DXE phase, and\r
   produce the implementation of PCD protocol.\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2009, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -66,6 +66,26 @@ PCD_PROTOCOL mPcdInstance = {
   DxePcdGetNextTokenSpace\r
 };\r
 \r
+EFI_PCD_PROTOCOL mEfiPcdInstance = {\r
+  DxePcdSetSku,\r
+  DxePcdGet8Ex,\r
+  DxePcdGet16Ex,\r
+  DxePcdGet32Ex,\r
+  DxePcdGet64Ex,\r
+  DxePcdGetPtrEx,\r
+  DxePcdGetBoolEx,\r
+  DxePcdGetSizeEx,\r
+  DxePcdSet8Ex,\r
+  DxePcdSet16Ex,\r
+  DxePcdSet32Ex,\r
+  DxePcdSet64Ex,\r
+  DxePcdSetPtrEx,\r
+  DxePcdSetBoolEx,\r
+  (EFI_PCD_PROTOCOL_CALLBACK_ON_SET) DxeRegisterCallBackOnSet,\r
+  (EFI_PCD_PROTOCOL_CANCEL_CALLBACK) DxeUnRegisterCallBackOnSet,\r
+  DxePcdGetNextToken,\r
+  DxePcdGetNextTokenSpace\r
+};\r
 \r
 //\r
 // Static global to reduce the code size\r
@@ -107,6 +127,19 @@ PcdDxeInit (
                   &mPcdInstance\r
                   );\r
 \r
+  \r
+  //\r
+  // Also install gEfiPcdProtocolGuid which is only support dynamic-ex type \r
+  // PCD.\r
+  //\r
+  mNewHandle = NULL;\r
+  Status = gBS->InstallProtocolInterface (\r
+                  &mNewHandle,\r
+                  &gEfiPcdProtocolGuid,\r
+                  EFI_NATIVE_INTERFACE,\r
+                  &mEfiPcdInstance\r
+                  );\r
+                  \r
   ASSERT_EFI_ERROR (Status);\r
 \r
   return EFI_SUCCESS;\r
index 13b1859174ce603f7e6bde9c8f41c40c37af7139..0b0486737eb3a55966c1cb56527008bfea0719bb 100644 (file)
 \r
 [Protocols]\r
   gPcdProtocolGuid                              ## PRODUCES\r
-\r
+  gEfiPcdProtocolGuid                           ## PRODUCES\r
+  \r
 [FixedPcd.common]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress\r
 \r
index 8978aa8203528b4455ef214e961e911de734d17c..583b0d657d5600363af49b73a917d482489b8725 100644 (file)
@@ -18,6 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <PiDxe.h>\r
 #include <Guid/PcdDataBaseHobGuid.h>\r
 #include <Protocol/Pcd.h>\r
+#include <Protocol/PiPcd.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiLib.h>\r
index a998109fb9d1a77a3a68fdfb14e39a32129b3eb2..08a18c111eb1435d3e0df0ecabeb134c4b4e3032 100644 (file)
@@ -1,7 +1,7 @@
 /** @file \r
   All Pcd Ppi services are implemented here.\r
   \r
-Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -53,12 +53,40 @@ PCD_PPI mPcdPpiInstance = {
   PeiPcdGetNextTokenSpace\r
 };\r
 \r
+EFI_PEI_PCD_PPI  mEfiPcdPpiInstance = {\r
+  PeiPcdSetSku,\r
+  \r
+  PeiPcdGet8Ex,\r
+  PeiPcdGet16Ex,\r
+  PeiPcdGet32Ex,\r
+  PeiPcdGet64Ex,\r
+  PeiPcdGetPtrEx,\r
+  PeiPcdGetBoolEx,\r
+  PeiPcdGetSizeEx,\r
+  PeiPcdSet8Ex,\r
+  PeiPcdSet16Ex,\r
+  PeiPcdSet32Ex,\r
+  PeiPcdSet64Ex,\r
+  PeiPcdSetPtrEx,\r
+  PeiPcdSetBoolEx,\r
+  (EFI_PEI_PCD_PPI_CALLBACK_ON_SET) PeiRegisterCallBackOnSet,\r
+  (EFI_PEI_PCD_PPI_CANCEL_CALLBACK) PcdUnRegisterCallBackOnSet,\r
+  PeiPcdGetNextToken,\r
+  PeiPcdGetNextTokenSpace\r
+};\r
+\r
 EFI_PEI_PPI_DESCRIPTOR  mPpiPCD = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gPcdPpiGuid,\r
   &mPcdPpiInstance\r
 };\r
 \r
+EFI_PEI_PPI_DESCRIPTOR  mEfiPpiPCD = {\r
+  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
+  &gEfiPeiPcdPpiGuid,\r
+  &mEfiPcdPpiInstance\r
+};\r
+\r
 /**\r
   Main entry for PCD PEIM driver.\r
   \r
index baaa30164d69e577ca1e02800cd8390147b638d3..075e16aeb4deb12b5ff555593b17569aab354352 100644 (file)
 #            - Variable GUID for HII type PCD\r
 #            - Token space GUID for dynamicex type PCD \r
 #    \r
-# Copyright (c) 2006 - 2008, Intel Corporation\r
+# Copyright (c) 2006 - 2009, Intel Corporation\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 [Ppis]\r
   gEfiPeiReadOnlyVariable2PpiGuid               ## CONSUMES\r
   gPcdPpiGuid                                   ## PRODUCES\r
-\r
+  gEfiPeiPcdPpiGuid                             ## PRODUCES\r
+  \r
 [FeaturePcd]\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdPeiFullPcdDatabaseEnable\r
 \r
index 20362fa2066df4bf0f5981e267607162c359b3ce..b5c2a872a80cfe5c12bab59c886a785b752d325c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The internal header file declares the private functions used by PeiPcd driver.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2009, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -18,6 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <PiPei.h>\r
 #include <Ppi/ReadOnlyVariable2.h>\r
 #include <Ppi/Pcd.h>\r
+#include <Ppi/PiPcd.h>\r
 #include <Guid/PcdDataBaseHobGuid.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PeimEntryPoint.h>\r