X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FDxePcdLib%2FDxePcdLib.c;fp=MdePkg%2FLibrary%2FDxePcdLib%2FDxePcdLib.c;h=7fcbb028726fbb540520b54d4bc70f01d9e70fc2;hb=9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107;hp=371166818a34a5fea352bf58232bbf12e8a4af41;hpb=d1102dba7210b95e41d06c2338a22ba6af248645;p=mirror_edk2.git diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcdLib/DxePcdLib.c index 371166818a..7fcbb02872 100644 --- a/MdePkg/Library/DxePcdLib/DxePcdLib.c +++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c @@ -1,14 +1,14 @@ /** @file Implementation of PcdLib class library for DXE phase. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-This program and the accompanying materials -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 -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +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 +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -46,7 +46,7 @@ GetPiPcdProtocol ( if (mPiPcd == NULL) { // - // PI Pcd protocol defined in PI 1.2 vol3 should be installed before the module + // PI Pcd protocol defined in PI 1.2 vol3 should be installed before the module // access DynamicEx type PCD. // Status = gBS->LocateProtocol (&gEfiPcdProtocolGuid, NULL, (VOID **) &mPiPcd); @@ -73,7 +73,7 @@ GetPcdProtocol ( // // PCD protocol need to be installed before the module access Dynamic type PCD. // But dynamic type PCD is not required in PI 1.2 specification. - // + // Status = gBS->LocateProtocol (&gPcdProtocolGuid, NULL, (VOID **)&mPcd); ASSERT_EFI_ERROR (Status); ASSERT (mPcd != NULL); @@ -109,7 +109,7 @@ GetPiPcdInfoProtocolPointer ( GET_PCD_INFO_PROTOCOL * GetPcdInfoProtocolPointer ( VOID - ) + ) { EFI_STATUS Status; @@ -147,12 +147,12 @@ LibPcdSetSku ( /** This function provides a means by which to retrieve a value for a given PCD token. - - Returns the 8-bit value for the token specified by TokenNumber. + + Returns the 8-bit value for the token specified by TokenNumber. @param[in] TokenNumber The PCD token number to retrieve a current value for. - @return Returns the 8-bit value for the token specified by TokenNumber. + @return Returns the 8-bit value for the token specified by TokenNumber. **/ UINT8 @@ -168,12 +168,12 @@ LibPcdGet8 ( /** This function provides a means by which to retrieve a value for a given PCD token. - - Returns the 16-bit value for the token specified by TokenNumber. + + Returns the 16-bit value for the token specified by TokenNumber. @param[in] TokenNumber The PCD token number to retrieve a current value for. - @return Returns the 16-bit value for the token specified by TokenNumber. + @return Returns the 16-bit value for the token specified by TokenNumber. **/ UINT16 @@ -189,8 +189,8 @@ LibPcdGet16 ( /** This function provides a means by which to retrieve a value for a given PCD token. - - Returns the 32-bit value for the token specified by TokenNumber. + + Returns the 32-bit value for the token specified by TokenNumber. @param[in] TokenNumber The PCD token number to retrieve a current value for. @@ -210,7 +210,7 @@ LibPcdGet32 ( /** This function provides a means by which to retrieve a value for a given PCD token. - + Returns the 64-bit value for the token specified by TokenNumber. @param[in] TokenNumber The PCD token number to retrieve a current value for. @@ -231,7 +231,7 @@ LibPcdGet64 ( /** This function provides a means by which to retrieve a value for a given PCD token. - + Returns the pointer to the buffer of the token specified by TokenNumber. @param[in] TokenNumber The PCD token number to retrieve a current value for. @@ -252,15 +252,15 @@ LibPcdGetPtr ( /** This function provides a means by which to retrieve a value for a given PCD token. - - Returns the Boolean value of the token specified by TokenNumber. + + Returns the Boolean value of the token specified by TokenNumber. @param[in] TokenNumber The PCD token number to retrieve a current value for. - @return Returns the Boolean value of the token specified by TokenNumber. + @return Returns the Boolean value of the token specified by TokenNumber. **/ -BOOLEAN +BOOLEAN EFIAPI LibPcdGetBool ( IN UINTN TokenNumber @@ -276,7 +276,7 @@ LibPcdGetBool ( @param[in] TokenNumber The PCD token number to retrieve a current value for. - @return Returns the size of the token specified by TokenNumber. + @return Returns the size of the token specified by TokenNumber. **/ UINTN @@ -292,12 +292,12 @@ LibPcdGetSize ( /** This function provides a means by which to retrieve a value for a given PCD token. - + Returns the 8-bit value for the token specified by TokenNumber and Guid. - - If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that designates + If Guid is NULL, then ASSERT(). + + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to retrieve a value from. @param[in] TokenNumber The PCD token number to retrieve a current value for. @@ -312,7 +312,7 @@ LibPcdGetEx8 ( ) { ASSERT (Guid != NULL); - + return GetPiPcdProtocol()->Get8 (Guid, TokenNumber); } @@ -321,10 +321,10 @@ LibPcdGetEx8 ( This function provides a means by which to retrieve a value for a given PCD token. Returns the 16-bit value for the token specified by TokenNumber and Guid. - - If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that designates + If Guid is NULL, then ASSERT(). + + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to retrieve a value from. @param[in] TokenNumber The PCD token number to retrieve a current value for. @@ -346,9 +346,9 @@ LibPcdGetEx16 ( /** Returns the 32-bit value for the token specified by TokenNumber and Guid. - If Guid is NULL, then ASSERT(). + If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that designates + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to retrieve a value from. @param[in] TokenNumber The PCD token number to retrieve a current value for. @@ -371,12 +371,12 @@ LibPcdGetEx32 ( /** This function provides a means by which to retrieve a value for a given PCD token. - + Returns the 64-bit value for the token specified by TokenNumber and Guid. - - If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that designates + If Guid is NULL, then ASSERT(). + + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to retrieve a value from. @param[in] TokenNumber The PCD token number to retrieve a current value for. @@ -391,7 +391,7 @@ LibPcdGetEx64 ( ) { ASSERT (Guid != NULL); - + return GetPiPcdProtocol()->Get64 (Guid, TokenNumber); } @@ -399,12 +399,12 @@ LibPcdGetEx64 ( /** This function provides a means by which to retrieve a value for a given PCD token. - + Returns the pointer to the buffer of token specified by TokenNumber and Guid. - - If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that designates + If Guid is NULL, then ASSERT(). + + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to retrieve a value from. @param[in] TokenNumber The PCD token number to retrieve a current value for. @@ -427,12 +427,12 @@ LibPcdGetExPtr ( /** This function provides a means by which to retrieve a value for a given PCD token. - - Returns the Boolean value of the token specified by TokenNumber and Guid. - - If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that designates + Returns the Boolean value of the token specified by TokenNumber and Guid. + + If Guid is NULL, then ASSERT(). + + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to retrieve a value from. @param[in] TokenNumber The PCD token number to retrieve a current value for. @@ -455,12 +455,12 @@ LibPcdGetExBool ( /** This function provides a means by which to retrieve the size of a given PCD token. - - Returns the size of the token specified by TokenNumber and Guid. - - If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that designates + Returns the size of the token specified by TokenNumber and Guid. + + If Guid is NULL, then ASSERT(). + + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to retrieve a value from. @param[in] TokenNumber The PCD token number to retrieve a current value for. @@ -484,8 +484,8 @@ LibPcdGetExSize ( #ifndef DISABLE_NEW_DEPRECATED_INTERFACES /** This function provides a means by which to set a value for a given PCD token. - - Sets the 8-bit value for the token specified by TokenNumber + + Sets the 8-bit value for the token specified by TokenNumber to the value specified by Value. Value is returned. @param[in] TokenNumber The PCD token number to set a current value for. @@ -502,7 +502,7 @@ LibPcdSet8 ( ) { GetPcdProtocol()->Set8 (TokenNumber, Value); - + return Value; } @@ -510,8 +510,8 @@ LibPcdSet8 ( /** This function provides a means by which to set a value for a given PCD token. - - Sets the 16-bit value for the token specified by TokenNumber + + Sets the 16-bit value for the token specified by TokenNumber to the value specified by Value. Value is returned. @param[in] TokenNumber The PCD token number to set a current value for. @@ -528,7 +528,7 @@ LibPcdSet16 ( ) { GetPcdProtocol()->Set16 (TokenNumber, Value); - + return Value; } @@ -536,8 +536,8 @@ LibPcdSet16 ( /** This function provides a means by which to set a value for a given PCD token. - - Sets the 32-bit value for the token specified by TokenNumber + + Sets the 32-bit value for the token specified by TokenNumber to the value specified by Value. Value is returned. @param[in] TokenNumber The PCD token number to set a current value for. @@ -562,10 +562,10 @@ LibPcdSet32 ( /** This function provides a means by which to set a value for a given PCD token. - - Sets the 64-bit value for the token specified by TokenNumber + + Sets the 64-bit value for the token specified by TokenNumber to the value specified by Value. Value is returned. - + @param[in] TokenNumber The PCD token number to set a current value for. @param[in] Value The 64-bit value to set. @@ -588,19 +588,19 @@ LibPcdSet64 ( /** This function provides a means by which to set a value for a given PCD token. - - Sets a buffer for the token specified by TokenNumber to the value - specified by Buffer and SizeOfBuffer. Buffer is returned. - If SizeOfBuffer is greater than the maximum size support by TokenNumber, - then set SizeOfBuffer to the maximum size supported by TokenNumber and + + Sets a buffer for the token specified by TokenNumber to the value + specified by Buffer and SizeOfBuffer. Buffer is returned. + If SizeOfBuffer is greater than the maximum size support by TokenNumber, + then set SizeOfBuffer to the maximum size supported by TokenNumber and return NULL to indicate that the set operation was not actually performed. - If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the + If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum size supported by TokenName and NULL must be returned. - + If SizeOfBuffer is NULL, then ASSERT(). If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). - + @param[in] TokenNumber The PCD token number to set a current value for. @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. @param[in] Buffer A pointer to the buffer to set. @@ -638,8 +638,8 @@ LibPcdSetPtr ( /** This function provides a means by which to set a value for a given PCD token. - - Sets the Boolean value for the token specified by TokenNumber + + Sets the Boolean value for the token specified by TokenNumber to the value specified by Value. Value is returned. @param[in] TokenNumber The PCD token number to set a current value for. @@ -664,13 +664,13 @@ LibPcdSetBool ( /** This function provides a means by which to set a value for a given PCD token. - - Sets the 8-bit value for the token specified by TokenNumber and + + Sets the 8-bit value for the token specified by TokenNumber and Guid to the value specified by Value. Value is returned. If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to set a value from. @param[in] TokenNumber The PCD token number to set a current value for. @param[in] Value The 8-bit value to set. @@ -697,13 +697,13 @@ LibPcdSetEx8 ( /** This function provides a means by which to set a value for a given PCD token. - - Sets the 16-bit value for the token specified by TokenNumber and + + Sets the 16-bit value for the token specified by TokenNumber and Guid to the value specified by Value. Value is returned. If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to set a value from. @param[in] TokenNumber The PCD token number to set a current value for. @param[in] Value The 16-bit value to set. @@ -730,13 +730,13 @@ LibPcdSetEx16 ( /** This function provides a means by which to set a value for a given PCD token. - - Sets the 32-bit value for the token specified by TokenNumber and + + Sets the 32-bit value for the token specified by TokenNumber and Guid to the value specified by Value. Value is returned. If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to set a value from. @param[in] TokenNumber The PCD token number to set a current value for. @param[in] Value The 32-bit value to set. @@ -763,13 +763,13 @@ LibPcdSetEx32 ( /** This function provides a means by which to set a value for a given PCD token. - - Sets the 64-bit value for the token specified by TokenNumber and + + Sets the 64-bit value for the token specified by TokenNumber and Guid to the value specified by Value. Value is returned. If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to set a value from. @param[in] TokenNumber The PCD token number to set a current value for. @param[in] Value The 64-bit value to set. @@ -796,18 +796,18 @@ LibPcdSetEx64 ( /** This function provides a means by which to set a value for a given PCD token. - - Sets a buffer for the token specified by TokenNumber to the value specified by - Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than - the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size - supported by TokenNumber and return NULL to indicate that the set operation + + Sets a buffer for the token specified by TokenNumber to the value specified by + Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than + the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size + supported by TokenNumber and return NULL to indicate that the set operation was not actually performed. - + If Guid is NULL, then ASSERT(). If SizeOfBuffer is NULL, then ASSERT(). If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). - - @param[in] Guid The pointer to a 128-bit unique value that + + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to set a value from. @param[in] TokenNumber The PCD token number to set a current value for. @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. @@ -849,13 +849,13 @@ LibPcdSetExPtr ( /** This function provides a means by which to set a value for a given PCD token. - - Sets the Boolean value for the token specified by TokenNumber and + + Sets the Boolean value for the token specified by TokenNumber and Guid to the value specified by Value. Value is returned. If Guid is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to set a value from. @param[in] TokenNumber The PCD token number to set a current value for. @param[in] Value The Boolean value to set. @@ -1217,17 +1217,17 @@ LibPcdSetExBoolS ( /** Set up a notification function that is called when a specified token is set. - - When the token specified by TokenNumber and Guid is set, - then notification function specified by NotificationFunction is called. + + When the token specified by TokenNumber and Guid is set, + then notification function specified by NotificationFunction is called. If Guid is NULL, then the default token space is used. If NotificationFunction is NULL, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that designates which - namespace to set a value from. If NULL, then the default + @param[in] Guid The pointer to a 128-bit unique value that designates which + namespace to set a value from. If NULL, then the default token space is used. @param[in] TokenNumber The PCD token number to monitor. - @param[in] NotificationFunction The function to call when the token + @param[in] NotificationFunction The function to call when the token specified by Guid and TokenNumber is set. **/ @@ -1253,12 +1253,12 @@ LibPcdCallbackOnSet ( /** Disable a notification function that was established with LibPcdCallbackonSet(). - + Disable a notification function that was previously established with LibPcdCallbackOnSet(). If NotificationFunction is NULL, then ASSERT(). - If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, + If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, and NotificationFunction, then ASSERT(). - + @param[in] Guid Specify the GUID token space. @param[in] TokenNumber Specify the token number. @param[in] NotificationFunction The callback function to be unregistered. @@ -1275,7 +1275,7 @@ LibPcdCancelCallback ( EFI_STATUS Status; ASSERT (NotificationFunction != NULL); - + Status = GetPiPcdProtocol()->CancelCallback (Guid, TokenNumber, (EFI_PCD_PROTOCOL_CALLBACK) NotificationFunction); ASSERT_EFI_ERROR (Status); @@ -1286,24 +1286,24 @@ LibPcdCancelCallback ( /** Retrieves the next token in a token space. - - Retrieves the next PCD token number from the token space specified by Guid. - If Guid is NULL, then the default token space is used. If TokenNumber is 0, - then the first token number is returned. Otherwise, the token number that - follows TokenNumber in the token space is returned. If TokenNumber is the last - token number in the token space, then 0 is returned. - + + Retrieves the next PCD token number from the token space specified by Guid. + If Guid is NULL, then the default token space is used. If TokenNumber is 0, + then the first token number is returned. Otherwise, the token number that + follows TokenNumber in the token space is returned. If TokenNumber is the last + token number in the token space, then 0 is returned. + If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT(). - @param[in] Guid The pointer to a 128-bit unique value that designates which namespace + @param[in] Guid The pointer to a 128-bit unique value that designates which namespace to set a value from. If NULL, then the default token space is used. - @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD + @param[in] TokenNumber The previous PCD token number. If 0, then retrieves the first PCD token number. @return The next valid token number. **/ -UINTN +UINTN EFIAPI LibPcdGetNextToken ( IN CONST GUID *Guid, OPTIONAL @@ -1322,12 +1322,12 @@ LibPcdGetNextToken ( /** Used to retrieve the list of available PCD token space GUIDs. - + Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces in the platform. If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned. If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned. - + @param TokenSpaceGuid The pointer to the a PCD token space GUID. @return The next valid token namespace. @@ -1347,24 +1347,24 @@ LibPcdGetNextTokenSpace ( /** Sets a value of a patchable PCD entry that is type pointer. - - Sets the PCD entry specified by PatchVariable to the value specified by Buffer - and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than - MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return - NULL to indicate that the set operation was not actually performed. - If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to + + Sets the PCD entry specified by PatchVariable to the value specified by Buffer + and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than + MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return + NULL to indicate that the set operation was not actually performed. + If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to MaximumDatumSize and NULL must be returned. - + If PatchVariable is NULL, then ASSERT(). If SizeOfBuffer is NULL, then ASSERT(). If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). - @param[out] PatchVariable A pointer to the global variable in a module that is + @param[out] PatchVariable A pointer to the global variable in a module that is the target of the set operation. @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. @param[in] Buffer A pointer to the buffer to used to set the target variable. - + @return Return the pointer to the buffer been set. **/ @@ -1379,7 +1379,7 @@ LibPatchPcdSetPtr ( { ASSERT (PatchVariable != NULL); ASSERT (SizeOfBuffer != NULL); - + if (*SizeOfBuffer > 0) { ASSERT (Buffer != NULL); } @@ -1389,9 +1389,9 @@ LibPatchPcdSetPtr ( *SizeOfBuffer = MaximumDatumSize; return NULL; } - + CopyMem (PatchVariable, Buffer, *SizeOfBuffer); - + return (VOID *) Buffer; } @@ -1414,7 +1414,7 @@ LibPatchPcdSetPtr ( @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. @param[in] Buffer A pointer to the buffer to used to set the target variable. - + @return The status of the set operation. **/ @@ -1429,7 +1429,7 @@ LibPatchPcdSetPtrS ( { ASSERT (PatchVariable != NULL); ASSERT (SizeOfBuffer != NULL); - + if (*SizeOfBuffer > 0) { ASSERT (Buffer != NULL); } @@ -1448,26 +1448,26 @@ LibPatchPcdSetPtrS ( /** Sets a value and size of a patchable PCD entry that is type pointer. - - Sets the PCD entry specified by PatchVariable to the value specified by Buffer - and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than - MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return - NULL to indicate that the set operation was not actually performed. - If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to + + Sets the PCD entry specified by PatchVariable to the value specified by Buffer + and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than + MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return + NULL to indicate that the set operation was not actually performed. + If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to MaximumDatumSize and NULL must be returned. - + If PatchVariable is NULL, then ASSERT(). If SizeOfPatchVariable is NULL, then ASSERT(). If SizeOfBuffer is NULL, then ASSERT(). If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). - @param[out] PatchVariable A pointer to the global variable in a module that is + @param[out] PatchVariable A pointer to the global variable in a module that is the target of the set operation. @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable. @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. @param[in] Buffer A pointer to the buffer to used to set the target variable. - + @return Return the pointer to the buffer been set. **/ @@ -1484,7 +1484,7 @@ LibPatchPcdSetPtrAndSize ( ASSERT (PatchVariable != NULL); ASSERT (SizeOfPatchVariable != NULL); ASSERT (SizeOfBuffer != NULL); - + if (*SizeOfBuffer > 0) { ASSERT (Buffer != NULL); } @@ -1494,10 +1494,10 @@ LibPatchPcdSetPtrAndSize ( *SizeOfBuffer = MaximumDatumSize; return NULL; } - + CopyMem (PatchVariable, Buffer, *SizeOfBuffer); *SizeOfPatchVariable = *SizeOfBuffer; - + return (VOID *) Buffer; } @@ -1522,7 +1522,7 @@ LibPatchPcdSetPtrAndSize ( @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. @param[in] Buffer A pointer to the buffer to used to set the target variable. - + @return The status of the set operation. **/ @@ -1539,7 +1539,7 @@ LibPatchPcdSetPtrAndSizeS ( ASSERT (PatchVariable != NULL); ASSERT (SizeOfPatchVariable != NULL); ASSERT (SizeOfBuffer != NULL); - + if (*SizeOfBuffer > 0) { ASSERT (Buffer != NULL); }