diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-23 07:52:09 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-23 07:52:09 +0000 |
commit | 8a541f0a71b6686c947d259d3c518663ee877840 (patch) | |
tree | 2c65f812908b6ac68497359adcaca55a752c12ac /MdeModulePkg/Universal/PCD/Dxe | |
parent | 7bbae0753119abc70e7c4b129eae693d50125a34 (diff) | |
download | edk2-platforms-8a541f0a71b6686c947d259d3c518663ee877840.tar.xz |
1, Correct the PCD PEIM to produce gEfiPcdPpi and gPcdPpi at same time;
2, Combine two action of InstallProtocolInstance for gEfiPcdProtocol and gPcdProtocol into InstallMultipleProtocolInstances.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9468 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/PCD/Dxe')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Dxe/Pcd.c | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c index 0bb44ff81c..c8dab145af 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c @@ -1,6 +1,7 @@ /** @file
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 native PCD protocol and EFI_PCD_PROTOCOL defined in
+ PI 1.2 Vol3.
Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
@@ -27,6 +28,10 @@ EFI_GUID *TmpTokenSpaceBuffer[PEI_EXMAPPING_TABLE_SIZE + DXE_EXMAPPING_TABLE_SIZ ///
EFI_LOCK mPcdDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE(TPL_NOTIFY);
+//
+// PCD_PROTOCOL the native implementation provided by MdePkg which support dynamic
+// type and dynamicEx type PCD.
+//
PCD_PROTOCOL mPcdInstance = {
DxePcdSetSku,
@@ -66,6 +71,10 @@ PCD_PROTOCOL mPcdInstance = { DxePcdGetNextTokenSpace
};
+//
+// EFI_PCD_PROTOCOL is defined in PI 1.2 Vol 3 which only support dynamicEx type
+// PCD.
+//
EFI_PCD_PROTOCOL mEfiPcdInstance = {
DxePcdSetSku,
DxePcdGet8Ex,
@@ -87,10 +96,8 @@ EFI_PCD_PROTOCOL mEfiPcdInstance = { DxePcdGetNextTokenSpace
};
-//
-// Static global to reduce the code size
-//
-EFI_HANDLE mNewHandle = NULL;
+
+
/**
Main entry for PCD DXE driver.
@@ -110,8 +117,9 @@ PcdDxeInit ( IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
-
+ EFI_STATUS Status;
+ EFI_HANDLE mNewHandle;
+
//
// Make sure the Pcd Protocol is not already installed in the system
//
@@ -120,26 +128,20 @@ PcdDxeInit ( BuildPcdDxeDataBase ();
- Status = gBS->InstallProtocolInterface (
- &mNewHandle,
- &gPcdProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &mPcdInstance
- );
-
+ mNewHandle = NULL;
//
- // Also install gEfiPcdProtocolGuid which is only support dynamic-ex type
- // PCD.
+ // Install PCD_PROTOCOL to handle dynamic type PCD
+ // Install EFI_PCD_PROTOCOL to handle dynamicEx type PCD
//
- mNewHandle = NULL;
- Status = gBS->InstallProtocolInterface (
+ Status = gBS->InstallMultipleProtocolInterfaces (
&mNewHandle,
+ &gPcdProtocolGuid,
+ &mPcdInstance,
&gEfiPcdProtocolGuid,
- EFI_NATIVE_INTERFACE,
&mEfiPcdInstance
);
-
+
ASSERT_EFI_ERROR (Status);
return EFI_SUCCESS;
|