audk/BaseTools/UserManuals/PatchPcdValue_Utility_Man_P...

54 lines
5.0 KiB
Plaintext
Raw Normal View History

{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab360{\fonttbl{\f0\fswiss\fprq2\fcharset0 Verdana;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0 Arial;}}
{\colortbl ;\red8\green96\blue168;\red0\green0\blue0;}
{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}}
{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Name\par
\pard\nowidctlpar\sb200\cf2\b0\fs18 PatchPcdValue.exe or PatchPcdValue.py \endash Patch the specific value into the binary image.\f1\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\tx1440\cf1\b\f0\fs28 Synopsis\par
\pard\nowidctlpar\sb200\cf2\fs18 PatchPcdValue.exe -f Offset -u Value -t Type [-s MaxSize] <input_file>\f1\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\f0\fs28 Description\par
\pard\nowidctlpar\sb200\cf2\b0\fs18 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\rquote t check the format of the binary image. \f1\par
\f0 PatchPcdValue tool usually works together with GenPatchPcdTable tool to set the specific value of a patchable PCD into the binary EFI image. \f1\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Options\par
\pard\nowidctlpar\sb200\cf2\fs18 -f PCDOFFSET, --offset=PCDOFFSET\f1\par
\pard\nowidctlpar\li360\sb200\b0\f0 Start offset to the image is used to store PCD value.\f1\par
\pard\nowidctlpar\sb200\b\f0 -u PCDVALUE, --value=PCDVALUE\f1\par
\pard\nowidctlpar\li360\sb200\b0\f0 PCD value will be updated into the image. For VOID* type PCD value, if the start string is \ldblquote L \ldblquote , the input string will be unicode string, if the start string is \ldblquote\{\ldblquote and the end string is \ldblquote\}\rdblquote , the input string will be byte array, or the input string will be ASCII string.\f1\par
\pard\nowidctlpar\sb200\b\f0 -t PCDTYPENAME, --type=PCDTYPENAME\f1\par
\pard\nowidctlpar\li360\sb200\b0\f0 The name of PCD data type may be one of VOID*,BOOLEAN, UINT8, UINT16, UINT32, UINT64.\f1\par
\pard\nowidctlpar\sb200\b\f0 -s PCDMAXSIZE, --maxsize=PCDMAXSIZE\f1\par
\pard\nowidctlpar\li360\sb200\b0\f0 Max size of data buffer is taken by PCD value. It must be set when PCD type is VOID*.\f1\par
\pard\nowidctlpar\sb200\b\f0 -v, --verbose\par
\pard\nowidctlpar\fi360\sb200\b0 Run verbosely.\par
\pard\nowidctlpar\sb200\b -d LOGLEVEL, --debug=LOGLEVEL [0-9]\f1\par
\pard\nowidctlpar\fi360\sb200\b0\f0 Enable debug messages at specified level.\par
\pard\nowidctlpar\sb200\b -q, --quiet\f1\par
\pard\nowidctlpar\fi360\sb200\b0\f0 Run with little information in quiet mode.\f1\par
\pard\nowidctlpar\sb200\b\f0 --verbose\f1\par
\pard\nowidctlpar\fi360\sb200\b0\f0 Show program's version number and exit\par
\pard\nowidctlpar\sb200\b -h, --help\par
\pard\nowidctlpar\li360\sb200\b0 Show this help message and exit\f1\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Example\par
\pard\nowidctlpar\sb200\cf2\b0\fs18 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.\f1\par
\b\f0 PatchPcdValue.exe -f 0x6F80 \endash u 0x80000000 \endash t UINT32 PeiCore.efi\f1\par
\b0\f0 2. Patch the unicode string \ldblquote Test\rdblquote 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.\f1\par
\b\f0 PatchPcdValue.exe -f 0x3050 -t VOID* -s 0x40 -u "L Test" HelloWorld.efi\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\fs28 Bugs\par
\pard\nowidctlpar\sb200\cf2\b0\fs18 No known bugs.\par
Report bugs to edk2-buildtools-devel@lists.sourceforge.net\f1\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\f0\fs28 Files\par
\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 See also\par
\pard\nowidctlpar\sb200\cf2\b0\fs18 None\par
\pard\keep\keepn\nowidctlpar\s2\li-1440\sb400\sa60\sl-340\slmult0\cf1\b\fs28 License\par
\pard\nowidctlpar\cf2\b0\fs18 Copyright (c) 2010, Intel Corporation. All rights reserved.\par
This program and the accompanying materials are licensed and made available \par
under the terms and conditions of the BSD License which accompanies this \par
distribution. The full text of the license may be found at\par
http://opensource.org/licenses/bsd-license.php\par
\par
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\par
\pard\nowidctlpar\sb200 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\par
\cf0\f1\par
\pard\nowidctlpar\f2\fs20\par
}