MdeModulePkg/DumpDynPcd: Add application to dump dynamic PCD settings

This is a shell application to dump dynamic PCD settings.
Type DumpDynPcd -?/h/H to get help information.
Type DumpDynPcd -v/V to get version information.
Type DumpDynPcd [PcdName] to get Pcd information.
https://bugzilla.tianocore.org/show_bug.cgi?id=1541

v2:1.Add static for global variables.
   2.Change the parameter amount of InternalStrnCatGrow in DumpDynPcd.c.
   3.Add open brace according to EDK II C Coding Standards Specification.
   4.Remove the dependency on ShellPkg.dec in DumpDynPcd.inf.

v3:Add static for all global variables and internal functions.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
Zhang, Shenglei
2019-05-07 13:55:05 +08:00
committed by Hao A Wu
parent df7c81b5b2
commit a642e2b42e
4 changed files with 689 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,50 @@
## @file
# DumpDynPcd is a shell application to dump dynamic pcd information.
#
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010006
BASE_NAME = DumpDynPcd
FILE_GUID = 31ADA2B2-62EA-4866-9B87-03FEA8425974
MODULE_TYPE = UEFI_APPLICATION
VERSION_STRING = 1.0
ENTRY_POINT = DumpDynPcdMain
#
# This flag specifies whether HII resource section is generated into PE image.
#
UEFI_HII_RESOURCE_SECTION = TRUE
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 EBC
#
[Sources]
DumpDynPcd.c
DumpDynPcdStr.uni
[Packages]
MdePkg/MdePkg.dec
[LibraryClasses]
BaseLib
UefiApplicationEntryPoint
DebugLib
MemoryAllocationLib
UefiLib
UefiBootServicesTableLib
[Protocols]
gEfiUnicodeCollation2ProtocolGuid ## SOMETIMES_CONSUMES
gEfiPcdProtocolGuid ## CONSUMES
gPcdProtocolGuid ## CONSUMES
gEfiGetPcdInfoProtocolGuid ## CONSUMES
gGetPcdInfoProtocolGuid ## CONSUMES
gEfiShellParametersProtocolGuid ## CONSUMES
@@ -0,0 +1,28 @@
//
// DumpDynPcd is a shell application to dump dynamic pcd information.
//
// Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
//**/
/=#
#langdef en-US "English"
#string STR_DUMP_DYN_PCD_HELP_INFORMATION #language en-US ""
".TH DumpDynPcd 0 "Dump dynamic[ex] PCD info."\r\n"
".SH NAME\r\n"
"Dump dynamic[ex] PCD info.\r\n"
".SH SYNOPSIS\r\n"
" \r\n"
"DumpDynPcd [PcdName].\r\n"
".SH OPTIONS\r\n"
" \r\n"
" PcdName Specifies the name of PCD.\r\n"
" A literal[or partial] name or a pattern as specified in\r\n"
" the MetaiMatch() function of the EFI_UNICODE_COLLATION2_PROCOOL.\r\n"
" If it is absent, dump all PCDs' info.\r\n"
"The PCD data is printed as hexadecimal dump.\n"
"\r\n"
+1
View File
@@ -206,6 +206,7 @@
[Components]
MdeModulePkg/Application/HelloWorld/HelloWorld.inf
MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.inf
MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.inf
MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf