]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/PCD/Pei/Pcd.c
Use gEfiCallerIdGuid as the private guid for PcdPeim module.
[mirror_edk2.git] / MdeModulePkg / Universal / PCD / Pei / Pcd.c
index 0516bc8ab6f4b92c53d7ab2ac564a63e4dca178d..41b34269a09d346efae447175535d59cc13aa282 100644 (file)
@@ -205,7 +205,7 @@ PeiPcdGet64 (
 \r
   @param[in]  TokenNumber The PCD token number. \r
 \r
-  @return The pointer to the buffer to be retrived.\r
+  @return The pointer to the buffer to be retrieved.\r
   \r
 **/\r
 VOID *\r
@@ -402,7 +402,7 @@ PeiPcdGet64Ex (
   @param[in]  Guid          The token space for the token number.\r
   @param[in]  ExTokenNumber The PCD token number. \r
 \r
-  @return The pointer to the buffer to be retrived.\r
+  @return The pointer to the buffer to be retrieved.\r
   \r
 **/\r
 VOID *\r
@@ -835,8 +835,10 @@ PeiRegisterCallBackOnSet (
     return EFI_UNSUPPORTED;\r
   }\r
 \r
-  ASSERT (CallBackFunction != NULL);\r
-  \r
+  if (CallBackFunction == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   return PeiRegisterCallBackWorker (ExTokenNumber, Guid, CallBackFunction, TRUE);\r
 }\r
 \r
@@ -864,8 +866,10 @@ PcdUnRegisterCallBackOnSet (
     return EFI_UNSUPPORTED;\r
   }\r
 \r
-  ASSERT (CallBackFunction != NULL);\r
-  \r
+  if (CallBackFunction == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   return PeiRegisterCallBackWorker (ExTokenNumber, Guid, CallBackFunction, FALSE);\r
 }\r
 \r
@@ -1091,7 +1095,7 @@ PeiPcdGetNextTokenSpace (
   The max size of this PCD's value is described in PCD's definition in DEC file.\r
 \r
   @param LocalTokenNumberTableIdx Index of PCD token number in PCD token table\r
-  @param MaxSize                  Maxmium size of PCD's value\r
+  @param MaxSize                  Maximum size of PCD's value\r
   @param Database                 Pcd database in PEI phase.\r
 \r
   @return PCD value's size for POINTER type PCD.\r
@@ -1162,11 +1166,11 @@ GetPtrTypeSize (
   The max size of this PCD's value is described in PCD's definition in DEC file.\r
 \r
   @param LocalTokenNumberTableIdx Index of PCD token number in PCD token table\r
-  @param CurrentSize              Maxmium size of PCD's value\r
+  @param CurrentSize              Maximum size of PCD's value\r
   @param Database                 Pcd database in PEI phase.\r
 \r
-  @retval TRUE  Success to set PCD's value size, which is not exceed maxmium size\r
-  @retval FALSE Fail to set PCD's value size, which maybe exceed maxmium size\r
+  @retval TRUE  Success to set PCD's value size, which is not exceed maximum size\r
+  @retval FALSE Fail to set PCD's value size, which maybe exceed maximum size\r
 \r
 **/\r
 BOOLEAN\r