/** @file\r
PCD Library Class Interface Declarations\r
\r
-Copyright (c) 2006, Intel Corporation \r
+Copyright (c) 2006 - 2007, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-\r
-Module Name: PcdLib.h\r
-\r
**/\r
\r
#ifndef __PCD_LIB_H__\r
//\r
// Feature Flag is in the form of a global constant\r
//\r
-#define FeaturePcdGet(TokenName) _PCD_VALUE_##TokenName\r
+#define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName\r
\r
\r
//\r
#define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName\r
\r
\r
-//\r
-// BugBug: This works for strings, but not constants.\r
-//\r
#define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName)\r
\r
\r
#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value))\r
#define PatchPcdSetPtr(TokenName, Size, Buffer) \\r
- CopyMem (_gPcd_BinaryPatch_##TokenName, (Buffer), (Size))\r
+ LibPatchPcdSetPtr ( \\r
+ _gPcd_BinaryPatch_##TokenName, \\r
+ (UINTN)_PCD_PATCHABLE_##TokenName##_SIZE, \\r
+ (Size), \\r
+ (Buffer) \\r
+ )\r
\r
//\r
// Dynamic is via the protocol with only the TokenNumber as argument\r
LibPcdSetPtr (\r
IN UINTN TokenNumber,\r
IN OUT UINTN *SizeOfBuffer,\r
- IN VOID *Value\r
+ IN VOID *Buffer\r
);\r
\r
\r
If Guid is NULL, then the default token space is used. \r
If NotificationFunction is NULL, then ASSERT().\r
\r
+ This notification function serves two purposes. Firstly, it notifies the module which \r
+ did the registration that the value of this PCD token has been set. Secondly, \r
+ it provides a mechanism for the module which did the registration to intercept \r
+ the set operation and override the value been set if necessary. After the invocation \r
+ of the callback function, TokenData will be used by PCD service PEIM or driver to \r
+ modify the internal data in PCD database. \r
+\r
+\r
@param[in] CallBackGuid The PCD token GUID being set.\r
@param[in] CallBackToken The PCD token number being set.\r
- @param[in] TokenData A pointer to the token data being set.\r
+ @param[in, out] TokenData A pointer to the token data being set.\r
@param[in] TokenDataSize The size, in bytes, of the data being set.\r
\r
@retval VOID\r