Name
PatchPcdValue.exe or PatchPcdValue.py – Patch the specific value into the binary image.
Synopsis
PatchPcdValue.exe -f Offset -u Value -t Type [-s MaxSize] <input_file>
Description
PatchPcdValue tool sets the specific value into the binary image according to the input PCD offset and type. When PCD type is VOID*, MaxSize must be specified to say how much value need to be updated. This tool checks whether the input PCD information is valid for the input binary image, but doesn’t check the format of the binary image. 
PatchPcdValue tool usually works together with GenPatchPcdTable tool to set the specific value of a patchable PCD into the binary EFI image. 
Options
-f PCDOFFSET, --offset=PCDOFFSET
Start offset to the image is used to store PCD value.
-u PCDVALUE, --value=PCDVALUE
PCD value will be updated into the image. For VOID* type PCD value, if the start string is “L “, the input string will be unicode string, if the start string is “{“ and the end string is “}”, the input string will be byte array, or the input string will be ASCII string.
-t PCDTYPENAME, --type=PCDTYPENAME
The name of PCD data type may be one of VOID*,BOOLEAN, UINT8, UINT16, UINT32, UINT64.
-s PCDMAXSIZE, --maxsize=PCDMAXSIZE
Max size of data buffer is taken by PCD value. It must be set when PCD type is VOID*.
-v, --verbose
Run verbosely.
-d LOGLEVEL, --debug=LOGLEVEL [0-9]
Enable debug messages at specified level.
-q, --quiet
Run with little information in quiet mode.
--verbose
Show program's version number and exit
-h, --help
Show this help message and exit
Example
1. Patch 0x80000000 to the patchable PcdDebugPrintErrorLevel in the binary PeiCore image. This PCD type is UINT32. Its offset in PeiCore image is 0x6F80 got by GenPatchPcdTable tool.
PatchPcdValue.exe -f 0x6F80 –u 0x80000000 –t UINT32 PeiCore.efi
2. Patch the unicode string “Test” to the patchable PcdHelloWorldPrintString in the binary HelloWorld image. This PCD type is VOID*. Its max byte array size is 0x40, and its offset in HelloWorld image is 0x3050.
PatchPcdValue.exe -f 0x3050 -t VOID* -s 0x40 -u "L Test" HelloWorld.efi
Bugs
No known bugs.
Report bugs to edk2-buildtools-devel@lists.sourceforge.net
Files
None
See also
None
License
Copyright (c) 2010, 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.