summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-07-07ArmPlatformPkg: Set Juno debug serial port defaultsEvan Lloyd3-3/+53
Juno has several serial ports, one of which may be used for a remote debug interface (e.g. gdb, WinDbg). The debug serial port needs to be distinct from that used for UEFI trace to prevent corruption of debugger protocol messaging. The UEFI spec requires that serial devices be initialised to default settings. (11.8 Serial I/O Protocol - "The default attributes for all UART-style serial device interfaces are: 115,200 baud, ..." and 17.3.3 EFI Debugport Variable - "These defaults must be used in the absence of a DEBUGPORT variable...") This change adds initialization of the serial device reported in the ACPI DBG2 table. The initialisation is done early in the boot to allow the possibility of remote debug of UEFI itself. NOTE: This is functionally dependent on the DBG2 table being updated in OpenPlatformPkg, but is required as a precursor to that change. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-07ShellPkg:Ping: Ping command hangs with intermittent packet lossesSubramanian, Sriram (EG Servers Platform SW)1-4/+9
When we have intermittent loss of packets, ping command doesnt return to Shell prompt. It keeps looping in the while (Status ==EFI_NOT_READY) since Private->RxCount will never reach Private->SendNum. Addresses the issue with the use of a new varibale in the PRIVATE structure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-07-07ArmPkg/ArmMmuLib: add PEI specific version of ArmMmuLibArd Biesheuvel2-0/+97
This introduces a special version of ArmMmuLib for PEIMs that takes care only to perform cache maintenance on the live entry replacement routine if the module is not executing in place. Not only is such cache maintenance unnecessary in that case, it may be actively harmful on some systems that fail to tolerate cache maintenance operations on NOR flash regions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-07ArmPkg ArmVirtPkg MdeModulePkg: switch to separate ArmMmuLibArd Biesheuvel23-1285/+13
Switch all users of ArmLib that depend on the MMU routines to the new, separate ArmMmuLib. This needs to occur in one go, since the MMU routines are removed from ArmLib build at the same time, to prevent conflicting symbols. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-07-07ArmPkg: introduce base ArmMmuLib implementationArd Biesheuvel6-0/+1406
This base library encapsulates the MMU manipulation routines that have been factored out of ArmLib. The functionality covers initial creation of the 1:1 mapping in the page tables, and remapping regions to change permissions or cacheability attributes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-07ArmPkg: introduce ArmMmuLib library classArd Biesheuvel2-0/+66
Introduce the library class ArmMmuLib, which encapsulates the functionality to set up and modify page table entries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-07IntelFrameworkModulePkg/LegacyUi: Get legacy options when open legacy formDandan Bi1-6/+38
The LegacyBootMaintUiLib depends on the LegacyBootManagerLib to realize its functionality, the LegacyBootManagerLib may initialize after LegacyBootMaintUiLib, so the functionality of LegacyBootMaintUiLib may be incorrect. Now we fix this issue by executing the related codes when opening the legacy forminstead in its the constructor function. Because when opening the legacy form, the LegacyBootManagerLib must have been initialized. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-07-07MdeModulePkg/BootMaintUiLib: Update menus when open BMM formDandan Bi3-9/+46
BootMaintenanceManagerUiLib depend on the LeagcyBootMaintUiLib to show the legacy menus. So we need to do the actions related to LegacyUi in BMM after the LeagcyBootMaintUiLib have been initialized. So now : 1). update menus (including legacy menus), 2) re-scan boot options (including legacy boot option) when opening the BMM form. We think when opening BMM form, the LeagcyBootMaintUiLib must have been initialized. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-07-07MdeModulePkg/HiiDB: Record fail info if fail to save data for EfiVarStoreDandan Bi1-0/+3
HiiConfigRoutingRouteConfig function returns 'Progress' to indicate the failure info in the ConfigResp string. But when fail to route the ConfigResp for EfiVarStore, it doesn't return the correct failure info. Now this patch is to fix this issue and add debug info let user know the reason of failure. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
2016-07-07MdeModulePkg/Bds: MemoryTypeInformation excludes boot option mem useRuiyu Ni3-40/+19
The patch re-orders the sequences by putting updating memory type information before loading the boot option so that the reserved memory usage by HTTP RAM disk boot can be excluded by the memory type information updating. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-07-07MdeModulePkg: Fix IPv4 stack potential disappeared issueJiaxin Wu3-1/+16
IP4_CONFIG2_INSTANCE->DataItem is used to save the configuration data to NV variable. When the policy is changed from static to DHCP, DnsServers info will be cleaned from DataItem first (See Ip4Config2SetPolicy), it's correct because DnsServers info should not be saved to NV variable. But if there is any DnsServers info received from DHCP message, it will be reset to DataItem again (See Ip4Config2SetDnsServerWorker), which may cause the NV variable contain the DnsServers info while the policy is DHCP (See Ip4Config2WriteConfigData). Then, while the platform is reset, the issue happened. Because Ip4Config2DataTypeDnsServer is set under DHCP policy, which is not allowed by UEFI Spec and error returned. This patch is used to resolve this potential issue. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2016-07-06Fix GUID dereferenceThomas Palmer1-3/+3
Print's "%g" argument requires a EFI_GUID pointer, not the EFI_GUID value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>
2016-07-06Change ShellPkg&ShellBinPkg maintainerNi, Ruiyu1-2/+2
Since Shumin has left Intel to pursue a better job, I will temporary be on his position to maintain ShellPkg and ShellBinPkg with Jaben. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>
2016-07-06EmbeddedPkg/AcpiLib: add GICC table init macro for ACPI 6.0Graeme Gregory1-0/+9
ACPI 6.0 added a processor efficiency field and 3 reserved bytes at the end of the GICC structure so add a new macro to initialise the new field. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-07-06MdeModulePkg/BootMaintUi: Add error handling codes when AllocatePool failBi, Dandan3-26/+35
The AllocateCopyPool in function ExtractFileNameFromDevicePath may return NULL, so need to do error handling. This patch is to add error handling codes for function ExtractFileNameFromDevicePath and its caller functions. Cc: Eric Dong <eric.dong@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2016-07-06MdeModulePkg/UefiHiiLib: Add error handling codes when AllocatePool failBi, Dandan1-2/+12
Cc: Eric Dong <eric.dong@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2016-07-06MdeModulePkg UefiPxeBcDxe: Fix build error for lastest VS2015 compilerHao Wu1-1/+1
The UefiPxeBcDxe module encounters a build error for IA32 arch using the latest version of VS2015: UefiPxe4BcDxe.lib(PxeBcDhcp.obj) : error LNK2001: unresolved external symbol __allmul The cause is line 1659 in file MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c. The third parameter for gBS->SetTimer() function is of type UINT64, so the multiplication should use the MultU64x32() function. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
2016-07-05MdeModulePkg: Skip registering BootManagerMenu if absentSunny Wang3-25/+70
This is a enhancement to support the case when platform firmware doesn't support Boot Manager Menu. For now, if BootManagerMenu FFS can not be retrieved from FV, BDS core code will still register a boot option for it. Then, this non-functional boot option will still be booted by user's request (like HotKey or Exit from shell) to cause additional boot time and error status code reported. Therefore, it would be good to skip BootManagerMenu boot option registration and then return error status and Invalid BootOption data for this case so that the BootManagerBoot() or other consumers can directly return without doing anything. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sunny Wang <sunnywang@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-07-05BaseTools MemoryProfileSymbolGen.py: Handle 64bits rva from "nm -l xxx.dll"Star Zeng1-2/+2
Current MemoryProfileSymbolGen.py assumes the rva is 32bits, the patch is to remove the restriction to match any lengths of rva. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-05MdeModulePkg MemoryProfileInfo: Handle "/" character in the PDB pathStar Zeng1-1/+1
Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-05ShellPkg: Update the error prompt for ping6 command.Zhang Lubo2-2/+2
when we use the ping6 command without configuring the network interface, it should give correct prompt to users. Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
2016-07-05BaseTools: Add support for $(FAMILY) macroYonghong Zhu1-0/+23
Build spec mentions $(FAMILY) macro be used in DSC/FDF to specify the tool chain family, like GCC, MSFT. This patch add the support for this macro. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-07-05MdeModulePkg DxeIplPeim: Add ASSERTs for unexpected AllocatePages failureHao Wu1-1/+3
Cc: Star Zeng <star.zeng@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-07-05MdeModulePkg MemoryProfile: Add ASSERTs to make sure pointers are not NULLHao Wu2-0/+6
Code logic ensures that both pointers 'DriverInfoData' and 'AllocInfoData' will not be NULL when they are used. Add ASSERTs as warning for cases that will not happen. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-07-02UefiCpuPkg S3Resume2Pei: Report status code when allocate memory is failedStar Zeng1-3/+15
Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-07-01ArmPkg/CpuDxe: unmask SErrors in DEBUG buildsArd Biesheuvel1-0/+9
SErrors (formerly called asynchronous aborts) are a distinct class of exceptions that are not closely tied to the currently executing instruction. Since execution may be able to proceed in such a condition, this class of exception is masked by default, and software needs to unmask it explicitly if it is prepared to handle such exceptions. On DEBUG builds, we are well equipped to report the CPU context to the user and it makes sense to report an SError as soon as it occurs rather than to wait for the OS to take it when it unmasks them, especially since the current arm64/Linux implementation simply panics in that case. So unmask them when ArmCpuDxe loads. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-01ArmPkg/DefaultExceptionHandlerLib: put ASSERT (FALSE) lastArd Biesheuvel1-1/+1
Putting DEBUG () code after an ASSERT (FALSE) statement is not very useful, since the code will be unreachable on DEBUG builds and compiled out on RELEASE builds. So move the ASSERT () statement after it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-07-01Merge branch 'master' of https://github.com/tianocore/edk2david wei67-936/+6824
2016-07-01Vlv2TbltDevicePkg: fix ASSERT_EFI_ERROR() typosLaszlo Ersek3-8/+8
A number of code locations use ASSERT_EFI_ERROR (BooleanExpression) instead of ASSERT (BooleanExpression) Fix them. Cc: David Wei <david.wei@intel.com> Cc: Tim He <tim.he@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: David Wei <david.wei@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
2016-07-01MdeModulePkg/EmmcDxe: Don't expose BlockIo interface for RPMB partitionFeng Tian1-93/+45
This change is to avoid UEFI SCT failure as UEFI SCT has no knowledge about how to accessing a EMMC RPMB partition. The user needs to access RPMB partition should get access through EFI_SD_MMC_PASS_THRU protocol with authentication key & mac. Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2016-07-01MdeModulePkg/SdMmc: update TPL to notify to fix UEFI SCT hangFeng Tian5-40/+75
We have to upgrade the TPL level used by SdMmc stack because the following flow: DiskIo2ReadWriteDisk() in logical partition -> PartitionReadBlocksEx() in logical partition at TPL callback level -> ProbeMediaStatusEx() with sync request -> DiskIo2ReadWriteDisk() in physical partition -> waiting for async task completion. if the low layer driver doesn't run at TPL_NOTIFY level, it will have no time to trigger async task and cause system hang. Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2016-07-01SecurityPkg/Tcg: Fix bug that prevented SubmitCommand buffers from being Max ↵Zhang, Chao B2-4/+4
size SubmitCommand() was checking the buffer size for ">=" Max size. This would cause code to fail with "EFI_INVALID_PARAMETER" if a buffer was passed that was the "max" size as indicated by the GetCapability() command. Change to ">" to allow for maximum buffer size. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bret Barkelew <brbarkel@microsoft.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
2016-07-01BaseTools Scripts: Add MemoryProfileSymbolGen.pyStar Zeng1-0/+281
This tool depends on DIA2Dump.exe (VS) or nm (gcc) to parse debug entry. Usage: MemoryProfileSymbolGen.py [--version] [-h] [--help] [-i inputfile [-o outputfile]] Copyright (c) 2016, Intel Corporation. All rights reserved. Options: --version show program's version number and exit -h, --help show this help message and exit -i INPUTFILENAME, --inputfile=INPUTFILENAME The input memory profile info file output from MemoryProfileInfo application in MdeModulePkg -o OUTPUTFILENAME, --outputfile=OUTPUTFILENAME The output memory profile info file with symbol, MemoryProfileInfoSymbol.txt will be used if it is not Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg PiSmmCoreMemoryAllocLib: Extend to support MemoryProfileLibStar Zeng9-23/+490
Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg DxeCoreMemoryAllocationLib: Extend to support MemoryProfileLibStar Zeng9-29/+503
Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg: Implement new library instance SmmMemoryAllocationProfileLibStar Zeng5-0/+1369
Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg: Implement new library instance UefiMemoryAllocationProfileLibStar Zeng5-0/+1236
Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg: Introduce new library class MemoryProfileLibStar Zeng2-0/+57
Provides services to record memory profile of multilevel caller. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg MemoryProfileInfo: Enhance output info for memory leak detectionStar Zeng2-162/+725
Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg PiSmmCore: Enhance memory profile for memory leak detectionStar Zeng6-315/+1110
1. Produce SMM memory profile protocol. 2. Consume PcdMemoryProfilePropertyMask to support disable recording at the start. 3. Consume PcdMemoryProfileDriverPath to control which drivers need memory profile data. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg DxeCore: Add lock to pretect memory profile AllocInfo listStar Zeng1-0/+26
Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg DxeCore: Enhance memory profile for memory leak detectionStar Zeng5-233/+657
1. Implement include GetRecordingState/SetRecordingState/Record for memory profile protocol. 2. Consume PcdMemoryProfilePropertyMask to support disable recording at the start. 3. Consume PcdMemoryProfileDriverPath to control which drivers need memory profile data. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg: Extend memory profile definitions for memory leak detectionStar Zeng3-11/+213
Current memory profile feature: 1. Shows which line of code calls gBS->AllocateXXX(). But most entries are from MemoryAllocationLib. 2. Records at the start. 3. Records all modules. Enhanced memory profile feature: 1. User can know which line of code calls AllocateXXX() API instead of gBS->Allocate(). 2. User can know which line of code calls a specific API that will call AllocateXXX(). 3. User can know total memory allocated by a specific line of code. 4. User can configure to record single module. 5. User can configure when to enable recording. 6. User can know RVA<->Symbol (Function, Source, Line). For the enhanced memory profile feature, 1. Extend MEMORY_PROFILE_DRIVER_INFO to include PdbString. 2. Extend MEMORY_PROFILE_ALLOC_INFO to include ActionString. 3. Extend MEMORY_PROFILE_ACTION to indicate action in memory allocation lib and user defined action. 4. Extend memory profile protocol to include GetRecordingState/ SetRecordingState/Record. 5. Define SMM memory profile protocol. 6. Extend PcdMemoryProfilePropertyMask to support disable recording at the start. 7. Introduce new PCD PcdMemoryProfileDriverPath to control which drivers need memory profile data. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-07-01MdeModulePkg/PiSmmCore: Replace BASE_4GB with MAX_ADDRESS check.Jiewen Yao2-2/+2
PI specification Vol 4 - SMM does not have any limitation of BASE_4GB for SMM. So we should replace BASE_4GB check with MAX_ADDRESS check to make sure the SMM memory is accessible by SMM Core. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-07-01IntelFsp2WrapperPkg: Add error handling for possible NULL ptr dereferenceHao Wu2-0/+10
Possible NULL pointer dereference for FspmHeaderPtr/FspsHeaderPtr in module FspmWrapperPeim/FspsWrapperPeim. Add error handling codes to avoid this issue. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
2016-06-30ShellPkg: UefiHandleParsingLib: remove tautological comparisonLaszlo Ersek1-4/+0
The code being removed in this patch dates back to git commit a405b86d274d (Sep 14, 2010; "udk2010.up2.shell initial release."). The condition always evaluates to true, and it breaks DEBUG builds of ArmVirtPkg with gcc-6.1: ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c: In function 'ParseHandleDatabaseByRelationshipWithType': ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c:2465:76: error: self-comparison always evaluates to true [-Werror=tautological-compare] ASSERT((*HandleType)[HandleIndex] == (*HandleType)[HandleIndex]); Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Michael Zimmermann <sigmaepsilon92@gmail.com> Reported-by: Gerd Hoffmann <kraxel@redhat.com> Reported-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Suggested-by: Jaben Carsey <jaben.carsey@intel.com> Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/13794/focus=13939 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-06-30Vlv2TbltDevicePkg: fix ASSERT_EFI_ERROR() typosLaszlo Ersek3-8/+8
A number of code locations use ASSERT_EFI_ERROR (BooleanExpression) instead of ASSERT (BooleanExpression) Fix them. Cc: David Wei <david.wei@intel.com> Cc: Tim He <tim.he@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: David Wei <david.wei@intel.com>
2016-06-30UefiCpuPkg: fix ASSERT_EFI_ERROR() typosLaszlo Ersek1-1/+1
A number of code locations use ASSERT_EFI_ERROR (BooleanExpression) instead of ASSERT (BooleanExpression) Fix them. Cc: Jeff Fan <jeff.fan@intel.com> Reported-by: Gerd Hoffmann <kraxel@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
2016-06-30ShellPkg: don't call functions with side effects in ASSERT_EFI_ERROR()Laszlo Ersek2-3/+12
When ASSERT_EFI_ERROR() is compiled out, dependent on build flags, only the status checking should be removed; the function calls should stay. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Shumin Qiu <shumin.qiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-06-30QuarkPlatformPkg: fix ASSERT_EFI_ERROR() typosLaszlo Ersek4-4/+4
A number of code locations use ASSERT_EFI_ERROR (BooleanExpression) instead of ASSERT (BooleanExpression) Fix them. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>