From e9d97d08d98de5a076e72866d131355b9ce8e49b Mon Sep 17 00:00:00 2001 From: lgao4 Date: Wed, 15 Feb 2012 03:33:03 +0000 Subject: [PATCH] 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 --- MdeModulePkg/Universal/PCD/Dxe/Service.h | 15 ++++++++++++++- MdeModulePkg/Universal/PCD/Pei/Service.h | 13 ++++++------- 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.
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
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 @@ -30,6 +30,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include +// +// 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.
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
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.