Make PcdPeim/PcdDxe driver also produce EFI_PCD_PPI/EFI_PCD_PROTOCOL defined in PI 1.2 vol3. The EFI_PCD_PPI/EFI_PCD_PROTOCOL only support dynamic-ex type PCD, but original PCD_PPI/PCD_PROTOCOL in MdePkg support dynamic and dynamic-ex type PCDs.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9401 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
PCD DXE driver manage all PCD entry initialized in PEI phase and DXE phase, and
|
PCD DXE driver manage all PCD entry initialized in PEI phase and DXE phase, and
|
||||||
produce the implementation of PCD protocol.
|
produce the implementation of PCD protocol.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2007, Intel Corporation
|
Copyright (c) 2006 - 2009, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -66,6 +66,26 @@ PCD_PROTOCOL mPcdInstance = {
|
|||||||
DxePcdGetNextTokenSpace
|
DxePcdGetNextTokenSpace
|
||||||
};
|
};
|
||||||
|
|
||||||
|
EFI_PCD_PROTOCOL mEfiPcdInstance = {
|
||||||
|
DxePcdSetSku,
|
||||||
|
DxePcdGet8Ex,
|
||||||
|
DxePcdGet16Ex,
|
||||||
|
DxePcdGet32Ex,
|
||||||
|
DxePcdGet64Ex,
|
||||||
|
DxePcdGetPtrEx,
|
||||||
|
DxePcdGetBoolEx,
|
||||||
|
DxePcdGetSizeEx,
|
||||||
|
DxePcdSet8Ex,
|
||||||
|
DxePcdSet16Ex,
|
||||||
|
DxePcdSet32Ex,
|
||||||
|
DxePcdSet64Ex,
|
||||||
|
DxePcdSetPtrEx,
|
||||||
|
DxePcdSetBoolEx,
|
||||||
|
(EFI_PCD_PROTOCOL_CALLBACK_ON_SET) DxeRegisterCallBackOnSet,
|
||||||
|
(EFI_PCD_PROTOCOL_CANCEL_CALLBACK) DxeUnRegisterCallBackOnSet,
|
||||||
|
DxePcdGetNextToken,
|
||||||
|
DxePcdGetNextTokenSpace
|
||||||
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Static global to reduce the code size
|
// Static global to reduce the code size
|
||||||
@@ -107,6 +127,19 @@ PcdDxeInit (
|
|||||||
&mPcdInstance
|
&mPcdInstance
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Also install gEfiPcdProtocolGuid which is only support dynamic-ex type
|
||||||
|
// PCD.
|
||||||
|
//
|
||||||
|
mNewHandle = NULL;
|
||||||
|
Status = gBS->InstallProtocolInterface (
|
||||||
|
&mNewHandle,
|
||||||
|
&gEfiPcdProtocolGuid,
|
||||||
|
EFI_NATIVE_INTERFACE,
|
||||||
|
&mEfiPcdInstance
|
||||||
|
);
|
||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
@@ -318,6 +318,7 @@
|
|||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gPcdProtocolGuid ## PRODUCES
|
gPcdProtocolGuid ## PRODUCES
|
||||||
|
gEfiPcdProtocolGuid ## PRODUCES
|
||||||
|
|
||||||
[FixedPcd.common]
|
[FixedPcd.common]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress
|
||||||
|
@@ -18,6 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <PiDxe.h>
|
#include <PiDxe.h>
|
||||||
#include <Guid/PcdDataBaseHobGuid.h>
|
#include <Guid/PcdDataBaseHobGuid.h>
|
||||||
#include <Protocol/Pcd.h>
|
#include <Protocol/Pcd.h>
|
||||||
|
#include <Protocol/PiPcd.h>
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/UefiLib.h>
|
#include <Library/UefiLib.h>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
All Pcd Ppi services are implemented here.
|
All Pcd Ppi services are implemented here.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2009, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -53,12 +53,40 @@ PCD_PPI mPcdPpiInstance = {
|
|||||||
PeiPcdGetNextTokenSpace
|
PeiPcdGetNextTokenSpace
|
||||||
};
|
};
|
||||||
|
|
||||||
|
EFI_PEI_PCD_PPI mEfiPcdPpiInstance = {
|
||||||
|
PeiPcdSetSku,
|
||||||
|
|
||||||
|
PeiPcdGet8Ex,
|
||||||
|
PeiPcdGet16Ex,
|
||||||
|
PeiPcdGet32Ex,
|
||||||
|
PeiPcdGet64Ex,
|
||||||
|
PeiPcdGetPtrEx,
|
||||||
|
PeiPcdGetBoolEx,
|
||||||
|
PeiPcdGetSizeEx,
|
||||||
|
PeiPcdSet8Ex,
|
||||||
|
PeiPcdSet16Ex,
|
||||||
|
PeiPcdSet32Ex,
|
||||||
|
PeiPcdSet64Ex,
|
||||||
|
PeiPcdSetPtrEx,
|
||||||
|
PeiPcdSetBoolEx,
|
||||||
|
(EFI_PEI_PCD_PPI_CALLBACK_ON_SET) PeiRegisterCallBackOnSet,
|
||||||
|
(EFI_PEI_PCD_PPI_CANCEL_CALLBACK) PcdUnRegisterCallBackOnSet,
|
||||||
|
PeiPcdGetNextToken,
|
||||||
|
PeiPcdGetNextTokenSpace
|
||||||
|
};
|
||||||
|
|
||||||
EFI_PEI_PPI_DESCRIPTOR mPpiPCD = {
|
EFI_PEI_PPI_DESCRIPTOR mPpiPCD = {
|
||||||
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||||
&gPcdPpiGuid,
|
&gPcdPpiGuid,
|
||||||
&mPcdPpiInstance
|
&mPcdPpiInstance
|
||||||
};
|
};
|
||||||
|
|
||||||
|
EFI_PEI_PPI_DESCRIPTOR mEfiPpiPCD = {
|
||||||
|
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||||
|
&gEfiPeiPcdPpiGuid,
|
||||||
|
&mEfiPcdPpiInstance
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Main entry for PCD PEIM driver.
|
Main entry for PCD PEIM driver.
|
||||||
|
|
||||||
|
@@ -263,7 +263,7 @@
|
|||||||
# - Variable GUID for HII type PCD
|
# - Variable GUID for HII type PCD
|
||||||
# - Token space GUID for dynamicex type PCD
|
# - Token space GUID for dynamicex type PCD
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006 - 2008, Intel Corporation
|
# Copyright (c) 2006 - 2009, Intel Corporation
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -315,6 +315,7 @@
|
|||||||
[Ppis]
|
[Ppis]
|
||||||
gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES
|
gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES
|
||||||
gPcdPpiGuid ## PRODUCES
|
gPcdPpiGuid ## PRODUCES
|
||||||
|
gEfiPeiPcdPpiGuid ## PRODUCES
|
||||||
|
|
||||||
[FeaturePcd]
|
[FeaturePcd]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiFullPcdDatabaseEnable
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiFullPcdDatabaseEnable
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
The internal header file declares the private functions used by PeiPcd driver.
|
The internal header file declares the private functions used by PeiPcd driver.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2009, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -18,6 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <PiPei.h>
|
#include <PiPei.h>
|
||||||
#include <Ppi/ReadOnlyVariable2.h>
|
#include <Ppi/ReadOnlyVariable2.h>
|
||||||
#include <Ppi/Pcd.h>
|
#include <Ppi/Pcd.h>
|
||||||
|
#include <Ppi/PiPcd.h>
|
||||||
#include <Guid/PcdDataBaseHobGuid.h>
|
#include <Guid/PcdDataBaseHobGuid.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/PeimEntryPoint.h>
|
#include <Library/PeimEntryPoint.h>
|
||||||
|
Reference in New Issue
Block a user