summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/PCD
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-15 03:33:03 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-15 03:33:03 +0000
commite9d97d08d98de5a076e72866d131355b9ce8e49b (patch)
tree687e6a127e9925e878fe2afac70458ac8b6588cc /MdeModulePkg/Universal/PCD
parent328ce03e55c2d802e1c83739d51c54bbcc92d87b (diff)
downloadedk2-e9d97d08d98de5a076e72866d131355b9ce8e49b.tar.gz
edk2-e9d97d08d98de5a076e72866d131355b9ce8e49b.tar.bz2
edk2-e9d97d08d98de5a076e72866d131355b9ce8e49b.zip
Enable PCD version check on PCD driver and PCD database.
Signed-off-by: lgao4 Reviewed-by: jliu66 djboyer git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13015 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/PCD')
-rw-r--r--MdeModulePkg/Universal/PCD/Dxe/Service.h15
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/Service.h13
2 files changed, 20 insertions, 8 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.h b/MdeModulePkg/Universal/PCD/Dxe/Service.h
index 54e38e5599..c15edd3e82 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Service.h
+++ b/MdeModulePkg/Universal/PCD/Dxe/Service.h
@@ -1,7 +1,7 @@
/** @file
Private functions used by PCD DXE driver.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -31,6 +31,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/UefiRuntimeServicesTableLib.h>
//
+// Please make sure the PCD Serivce DXE Version is consistent with
+// the version of the generated DXE PCD Database by build tool.
+//
+#define PCD_SERVICE_DXE_VERSION 2
+
+//
+// PCD_DXE_SERVICE_DRIVER_VERSION is defined in Autogen.h.
+//
+#if (PCD_SERVICE_DXE_VERSION != PCD_DXE_SERVICE_DRIVER_VERSION)
+ #error "Please make sure the version of PCD DXE Service and the generated PCD DXE Database match."
+#endif
+
+//
// Protocol Interface function declaration.
//
/**
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.h b/MdeModulePkg/Universal/PCD/Pei/Service.h
index e9ea6724bf..2847686259 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Service.h
+++ b/MdeModulePkg/Universal/PCD/Pei/Service.h
@@ -1,7 +1,7 @@
/** @file
The internal header file declares the private functions used by PeiPcd driver.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -31,17 +31,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// Please make sure the PCD Serivce PEIM Version is consistent with
-// the version of PCD Database generation tool
+// the version of the generated PEIM PCD Database by build tool.
//
#define PCD_SERVICE_PEIM_VERSION 2
//
-// PCD_PEI_DATABASE_GENTOOL_VERSION is defined in Autogen.h
-// and generated by PCD Database generation tool.
+// PCD_PEI_SERVICE_DRIVER_VERSION is defined in Autogen.h.
//
-//#if (PCD_SERVICE_PEIM_VERSION != PCD_PEI_SERVICE_DRIVER_AUTOGEN_VERSION )
-// #error "Please make sure the version of PCD Service PEIM and PCD PEI Database Generation Tool matches"
-//#endif
+#if (PCD_SERVICE_PEIM_VERSION != PCD_PEI_SERVICE_DRIVER_VERSION)
+ #error "Please make sure the version of PCD PEIM Service and the generated PCD PEI Database match."
+#endif
//
// PPI Interface Implementation Declaration.