PatchPcdValue.exe

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.
-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
Run with debug information
-q, --quiet Run quietly
-? show this help message and exit
--version show program's version number and exit
-h, --help show this help message and exit

Status codes returned

Return Code

Description

0

The action was completed as requested.

Nonzero

The action failed.

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
  1. 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 [email protected]

Files

None

See also

None

License

Copyright (c) 2010 - 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.