Name
GenPatchPcdTable.exe or GenPatchPcdTable.py – Parse the binary EFI image and its map file to get all used patchable PCDs’ name and their offset in EFI image.
Synopsis
GenPatchPcdTable.exe -m <MapFile> -e <EfiFile> -o <OutFile>
Description
GenPatchPcdTable tool parses the binary EFI image and map file generated by the different compilers (including MSFT, ICC, GCC) in EDKII code base. This tool searches the image map file to find every patchable PCD name and its real address, then parse the binary EFI image to get each section name and address, and calculate PCD offset in the binary EFI image. Finally, Pcd name, its offset and section name will be written into the output file. 
GenPatchPcdTable tool usually works together with PatchPcdValue tool to set the specific value of a patchable PCD into the binary EFI image. 
Options
-m MAPFILE, --mapfile=MAPFILE
The map file generated by compiler contains the function and global variable information.
-e EFIFILE, --efifile=EFIFILE
The binary EFI image may contain the patchable PCD.
-o OUTFILE, --outputfile=OUTFILE
The output file stores the found patchable PCD information, which includes PcdName, Offset in EFI image and the section name.
-h, --help
Show this help message and exit.
--version
Show program's version number and exit.
Example
1. Get the patchable Pcds from the binary PeiCore image and PeiCore map file, and output the PCD information into the file PcdTable.txt. 
GenPatchPcdTable.exe -m PeiCore.map -e PeiCore.efi -o PcdTable.txt
  PcdTable.txt file contains the following PCD information:
PCD Name                       Offset    Section Name
PcdDebugPrintErrorLevel        0x6F80     .data 
PcdLoadFixAddressBootTimeCodePageNumber 0x6F84     .data 
PcdLoadFixAddressPeiCodePageNumber 0x6F88     .data 
PcdLoadFixAddressRuntimeCodePageNumber 0x6F8C     .data 
Bugs
No known bugs.
Report bugs to edk2-buildtools-devel@lists.sourceforge.net
Files
None
See also
None
License
Copyright (c) 2008 - 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.