diff options
author | hchen30 <hchen30@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-17 09:13:35 +0000 |
---|---|---|
committer | hchen30 <hchen30@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-17 09:13:35 +0000 |
commit | 309e31222f0359c9a3022bb83709db56ca2f9c72 (patch) | |
tree | c14e6f9f1f50771615d2860deee4f12ad94b9996 | |
parent | 058bf46eefc3716988077b54975d0d0d5cc3e859 (diff) | |
download | edk2-platforms-309e31222f0359c9a3022bb83709db56ca2f9c72.tar.xz |
update code to pass K8.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7536 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/PCD/Dxe/Service.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c index c08ac54b61..64bbe4c799 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -106,8 +106,13 @@ GetWorker ( }
PcdDb = IsPeiDb ? ((UINT8 *) &mPcdDatabase->PeiDb) : ((UINT8 *) &mPcdDatabase->DxeDb);
- StringTable = (UINT16 *) (IsPeiDb ? mPcdDatabase->PeiDb.Init.StringTable :
- mPcdDatabase->DxeDb.Init.StringTable);
+
+ if (IsPeiDb) {
+ StringTable = (UINT16 *) (&mPcdDatabase->PeiDb.Init.StringTable[0]);
+ } else {
+ StringTable = (UINT16 *) (&mPcdDatabase->DxeDb.Init.StringTable[0]);
+ }
+
Offset = LocalTokenNumber & PCD_DATABASE_OFFSET_MASK;
@@ -118,8 +123,11 @@ GetWorker ( break;
case PCD_TYPE_HII:
- GuidTable = (EFI_GUID *) (IsPeiDb ? mPcdDatabase->PeiDb.Init.GuidTable :
- mPcdDatabase->DxeDb.Init.GuidTable);
+ if (IsPeiDb) {
+ GuidTable = (EFI_GUID *) (&mPcdDatabase->PeiDb.Init.GuidTable[0]);
+ } else {
+ GuidTable = (EFI_GUID *) (&mPcdDatabase->DxeDb.Init.GuidTable[0]);
+ }
VariableHead = (VARIABLE_HEAD *) (PcdDb + Offset);
@@ -761,8 +769,12 @@ SetWorker ( PcdDb = IsPeiDb ? ((UINT8 *) &mPcdDatabase->PeiDb) : ((UINT8 *) &mPcdDatabase->DxeDb);
- StringTable = (UINT16*) (IsPeiDb ? mPcdDatabase->PeiDb.Init.StringTable :
- mPcdDatabase->DxeDb.Init.StringTable);
+ if (IsPeiDb) {
+ StringTable = (UINT16 *) (&mPcdDatabase->PeiDb.Init.StringTable[0]);
+ } else {
+ StringTable = (UINT16 *) (&mPcdDatabase->DxeDb.Init.StringTable[0]);
+ }
+
InternalData = PcdDb + Offset;
@@ -789,8 +801,11 @@ SetWorker ( }
}
- GuidTable = (EFI_GUID *)(IsPeiDb ? mPcdDatabase->PeiDb.Init.GuidTable :
- mPcdDatabase->DxeDb.Init.GuidTable);
+ if (IsPeiDb) {
+ GuidTable = (EFI_GUID *) (&mPcdDatabase->PeiDb.Init.GuidTable[0]);
+ } else {
+ GuidTable = (EFI_GUID *) (&mPcdDatabase->DxeDb.Init.GuidTable[0]);
+ }
VariableHead = (VARIABLE_HEAD *) (PcdDb + Offset);
|