1) Sync PcdPpi guid with PCD arch spec.
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 10 Jun 2006 12:03:36 +0000 (12:03 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 10 Jun 2006 12:03:36 +0000 (12:03 +0000)
2) Correct macro PatchPcdSetPtr

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@469 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Universal/PCD/Dxe/Pcd.c
EdkModulePkg/Universal/PCD/Dxe/Pcd.msa
EdkModulePkg/Universal/PCD/Dxe/Service.c
EdkModulePkg/Universal/PCD/Pei/Pcd.msa
EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.msa
MdePkg/Include/Library/PcdLib.h
MdePkg/Include/Ppi/Pcd.h
MdePkg/Library/DxePcdLib/DxePcdLib.msa
MdePkg/MdePkg.spd

index d0f85d2..45a6c59 100644 (file)
@@ -76,7 +76,7 @@ PcdDxeInit (
   //\r
 \r
   ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gPcdProtocolGuid);\r
-  \r
+\r
   BuildPcdDxeDataBase ();\r
 \r
   //\r
index b29d839..ee84d83 100644 (file)
@@ -47,13 +47,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   <SourceFiles>\r
     <Filename>Service.c</Filename>\r
     <Filename>Pcd.c</Filename>\r
+    <Filename>Pcd.dxs</Filename>\r
   </SourceFiles>\r
   <Includes>\r
     <PackageName>MdePkg</PackageName>\r
     <PackageName>EdkModulePkg</PackageName>\r
   </Includes>\r
   <Protocols>\r
-    <Protocol Usage="ALWAYS_PRODUCED">Pcd</Protocol>\r
+    <Protocol Usage="ALWAYS_PRODUCED">PcdProtocol</Protocol>\r
     <Protocol Usage="ALWAYS_CONSUMED">Variable</Protocol>\r
   </Protocols>\r
   <Hobs>\r
index 4b86cd7..84bfae7 100644 (file)
@@ -57,7 +57,7 @@ GetWorker (
   ASSERT (GetSize == Size || GetSize == 0);\r
 \r
   \r
-  IsPeiDb = (TokenNumber <= PEI_LOCAL_TOKEN_NUMBER) ? TRUE : FALSE;\r
+  IsPeiDb = (TokenNumber < PEI_LOCAL_TOKEN_NUMBER) ? TRUE : FALSE;\r
 \r
   LocalTokenNumberTable  = IsPeiDb ? mPcdDatabase->PeiDb.Init.LocalTokenNumberTable : \r
                                      mPcdDatabase->DxeDb.Init.LocalTokenNumberTable;\r
@@ -484,7 +484,7 @@ SetWorker (
     ASSERT (Size == DxePcdGetSize (TokenNumber));\r
   }\r
   \r
-  IsPeiDb = (TokenNumber <= PEI_LOCAL_TOKEN_NUMBER) ? TRUE : FALSE;\r
+  IsPeiDb = (TokenNumber < PEI_LOCAL_TOKEN_NUMBER) ? TRUE : FALSE;\r
 \r
   LocalTokenNumberTable  = IsPeiDb ? mPcdDatabase->PeiDb.Init.LocalTokenNumberTable : \r
                                      mPcdDatabase->DxeDb.Init.LocalTokenNumberTable;\r
index f08a2fa..d9d1bae 100644 (file)
@@ -64,7 +64,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     </Hob>\r
   </Hobs>\r
   <PPIs>\r
-    <Ppi Usage="ALWAYS_PRODUCED">Pcd</Ppi>\r
+    <Ppi Usage="ALWAYS_PRODUCED">PcdPpi</Ppi>\r
     <Ppi Usage="ALWAYS_CONSUMED">ReadOnlyVariable</Ppi>\r
   </PPIs>\r
   <Guids>\r
index 9bc94bf..093a18c 100644 (file)
@@ -57,7 +57,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <Protocol Usage="BY_START">WinNtIo</Protocol>\r
     <Protocol Usage="TO_START">WinNtThunk</Protocol>\r
     <Protocol Usage="TO_START">DevicePath</Protocol>\r
-    <Protocol Usage="ALWAYS_CONSUMED">Pcd</Protocol>\r
+    <Protocol Usage="ALWAYS_CONSUMED">PcdProtocol</Protocol>\r
   </Protocols>\r
   <Guids>\r
     <GuidEntry Usage="ALWAYS_CONSUMED">\r
index 03493e2..c4e5502 100644 (file)
@@ -60,7 +60,7 @@ Module Name: PcdLib.h
 #define PatchPcdSet32(TokenName, Value)    (_gPcd_BinaryPatch_##TokenName = Value)\r
 #define PatchPcdSet64(TokenName, Value)    (_gPcd_BinaryPatch_##TokenName = Value)\r
 #define PatchPcdSetBool(TokenName, Value)  (_gPcd_BinaryPatch_##TokenName = Value)\r
-#define PatchPcdSetPtr(TokenName, Value, Size)   CopyMem (_gPcd_BinaryPatch_##TokenName, Value, Size)\r
+#define PatchPcdSetPtr(TokenName, Size, Buffer)   CopyMem (_gPcd_BinaryPatch_##TokenName, Buffer, Size)\r
 \r
 //\r
 // Dynamic is via the protocol with only the TokenNumber as argument\r
index 2841f54..13b5640 100644 (file)
@@ -20,7 +20,7 @@
 extern EFI_GUID gPcdPpiGuid;\r
 \r
 #define PCD_PPI_GUID \\r
-  { 0x632df884, 0x8023, 0x4872, { 0xb6, 0x70, 0xb7, 0x4a, 0x30, 0x19, 0x16, 0xe9 } }\r
+  { 0x6e81c58, 0x4ad7, 0x44bc, { 0x83, 0x90, 0xf1, 0x2, 0x65, 0xf7, 0x24, 0x80 } }\r
 \r
 #define PCD_INVALID_TOKEN_NUMBER ((UINTN) -1)\r
 \r
index 163b751..8622305 100644 (file)
@@ -43,7 +43,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <PackageName>MdePkg</PackageName>\r
   </Includes>\r
   <Protocols>\r
-    <Protocol Usage="ALWAYS_CONSUMED">Pcd</Protocol>\r
+    <Protocol Usage="ALWAYS_CONSUMED">PcdProtocol</Protocol>\r
   </Protocols>\r
   <Externs>\r
     <Extern>\r
index 28e90ee..9b060d8 100644 (file)
       <C_Name>gEfiHiiProtocolGuid</C_Name>\r
       <Guid>0xea816d2c, 0xcee5, 0x4f02, 0x99, 0xb5, 0xd3, 0x90, 0x5c, 0xbb, 0xd0, 0x77</Guid>\r
     </Entry>\r
-    <Entry Name="Pcd">\r
+    <Entry Name="PcdProtocol">\r
       <C_Name>gPcdProtocolGuid</C_Name>\r
       <Guid>0x11b34006, 0xd85b, 0x4d0a, 0xa2, 0x90, 0xd5, 0xa5, 0x71, 0x31, 0x0e, 0xf7</Guid>\r
     </Entry>\r
       <C_Name>gEfiPeiStatusCodePpiGuid</C_Name>\r
       <Guid>0x229832d3, 0x7a30, 0x4b36, 0xb8, 0x27, 0xf4, 0x0c, 0xb7, 0xd4, 0x54, 0x36</Guid>\r
     </Entry>\r
-    <Entry Name="Pcd">\r
+    <Entry Name="PcdPpi">\r
       <C_Name>gPcdPpiGuid</C_Name>\r
-      <Guid>0x5d5c0e21, 0x749c, 0x4063, 0x81, 0xaf, 0xbc, 0x74, 0xfc, 0x79, 0xab, 0x5c</Guid>\r
+      <Guid>0x6e81c58, 0x4ad7, 0x44bc, 0x83, 0x90, 0xf1, 0x2, 0x65, 0xf7, 0x24, 0x80</Guid>\r
     </Entry>\r
     <Entry Name="BootScriptExecuter">\r
       <C_Name>gEfiPeiBootScriptExecuterPpiGuid</C_Name>\r