]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
7 years agoUefiCpuPkg/Include: Update MSEG structure comments
Michael Kinney [Wed, 7 Dec 2016 07:22:24 +0000 (23:22 -0800)]
UefiCpuPkg/Include: Update MSEG structure comments

Add comments to describe fields of MSEG_HEADER and
add define values for the MonitorFeatures field.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoMdeModulePkg/NonDiscoverablePciDevice: Make variable definition follow rule
Dandan Bi [Thu, 15 Dec 2016 06:15:21 +0000 (14:15 +0800)]
MdeModulePkg/NonDiscoverablePciDevice: Make variable definition follow rule

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdeModulePkg/NonDiscoverablePciDeviceDxe: Add comments for functions
Dandan Bi [Thu, 15 Dec 2016 12:52:52 +0000 (20:52 +0800)]
MdeModulePkg/NonDiscoverablePciDeviceDxe: Add comments for functions

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdeModulePkg/NonDiscoverablePciDeviceDxe: Fix VS2010/2012 build failure
Dandan Bi [Fri, 16 Dec 2016 01:53:03 +0000 (09:53 +0800)]
MdeModulePkg/NonDiscoverablePciDeviceDxe: Fix VS2010/2012 build failure

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoNetworkPkg: Replace ASSERT with error return code in PXE and HTTP boot driver.
Fu Siyuan [Fri, 16 Dec 2016 07:56:42 +0000 (15:56 +0800)]
NetworkPkg: Replace ASSERT with error return code in PXE and HTTP boot driver.

This patch remove the ASSERT when receive a DHCP packet large than the maximum
cache buffer size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdeModulePkg: Replace ASSERT with error return code in PXE driver.
Fu Siyuan [Fri, 16 Dec 2016 06:03:07 +0000 (14:03 +0800)]
MdeModulePkg: Replace ASSERT with error return code in PXE driver.

This patch remove the ASSERT when receive a DHCP packet large than the maximum
cache buffer size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoOmap35xxPkg/PciEmulation: port to new non-discoverable device infrastructure
Ard Biesheuvel [Fri, 9 Dec 2016 15:04:35 +0000 (15:04 +0000)]
Omap35xxPkg/PciEmulation: port to new non-discoverable device infrastructure

Move to the new non-discoverable device protocols for wiring the PCI based
EHCI controller driver to the non-discoverable EHCI controller found on the
OMAP 3530.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoSecurityPkg: Tcg2Dxe: Report correct FinalEventLog size
Zhang, Chao B [Fri, 16 Dec 2016 05:09:44 +0000 (13:09 +0800)]
SecurityPkg: Tcg2Dxe: Report correct FinalEventLog size

Update debug log to report correct FinalEventLog size.

Cc: Yao Jiewen <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoUefiCpuPkg/Cpuid.h: Update CPUID definitions with SDM (Sep.2016)
Hao Wu [Fri, 4 Nov 2016 04:41:18 +0000 (12:41 +0800)]
UefiCpuPkg/Cpuid.h: Update CPUID definitions with SDM (Sep.2016)

https://bugzilla.tianocore.org/show_bug.cgi?id=176

Update CPUID leaf and sub-leaf indexes and structures as described by
Intel(R) 64 and IA-32 Architectures Software Developer's Manual,
Volume 2A, September 2016, CPUID instruction.

Summary of incompatible changes:
1. Field name changes in CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX
Bit 12 has been renamed from 'PQM' to 'RDT_M' and bit 15 has been renamed
from 'PQE' to 'RDT_A'.

2. Stucture and filed name changes for 'CPUID Platform QoS Monitoring
Information' related definitions
Definition 'CPUID_PLATFORM_QOS_MONITORING' has been renamed to
'CPUID_INTEL_RDT_MONITORING'.
Definition 'CPUID_PLATFORM_QOS_MONITORING_ENUMERATION_SUB_LEAF' has been
renamed to 'CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF'.
Definition 'CPUID_PLATFORM_QOS_MONITORING_CAPABILITY_SUB_LEAF' has been
renamed to 'CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF'.

3. Stucture and filed name changes for 'CPUID Platform QoS Enforcement
Information' related definitions
Definition 'CPUID_PLATFORM_QOS_ENFORCEMENT' has been renamed to
'CPUID_INTEL_RDT_ALLOCATION'.
Definition 'CPUID_PLATFORM_QOS_ENFORCEMENT_MAIN_LEAF' has been renamed to
'CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF'.
Definition 'CPUID_PLATFORM_QOS_ENFORCEMENT_RESID_SUB_LEAF' has been
renamed to 'CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF'.

This commit also updates the relating codes in
UefiCpuPkg/Application/Cpuid to reflect the changes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoUefiCpuPkg/Include: Add Goldmont MSR header file with SDM (Sep.2016)
Hao Wu [Thu, 8 Dec 2016 08:35:49 +0000 (16:35 +0800)]
UefiCpuPkg/Include: Add Goldmont MSR header file with SDM (Sep.2016)

https://bugzilla.tianocore.org/show_bug.cgi?id=176

Add the MSR header file of Goldmont processor according to Intel(R) 64 and
IA-32 Architectures Software Developer's Manual, Volume 3, September 2016,
Chapter 35 Model-Specific-Registers (MSR), Section 35.5.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoUefiCpuPkg/Include: Update Skylake MSR header file with SDM (Sep.2016)
Hao Wu [Thu, 8 Dec 2016 08:35:56 +0000 (16:35 +0800)]
UefiCpuPkg/Include: Update Skylake MSR header file with SDM (Sep.2016)

https://bugzilla.tianocore.org/show_bug.cgi?id=176

Update the MSR header file of Skylake processor according to Intel(R) 64
and IA-32 Architectures Software Developer's Manual, Volume 3, September
2016, Chapter 35 Model-Specific-Registers (MSR), Section 35.15.

Summary of incompatible changes:
1. MSR (address 38EH) IA32_PERF_GLOBAL_STAUS has been renamed to
IA32_PERF_GLOBAL_STATUS
Typo 'STAUS' has been fixed in SDM.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoUefiCpuPkg/Include: Update MSR header files with SDM (Sep.2016)
Hao Wu [Tue, 25 Oct 2016 05:35:54 +0000 (13:35 +0800)]
UefiCpuPkg/Include: Update MSR header files with SDM (Sep.2016)

https://bugzilla.tianocore.org/show_bug.cgi?id=176

Update MSR header files of processors (excluding Goldmont and Skylake
processors) according to Intel(R) 64 and IA-32 Architectures Software
Developer's Manual, Volume 3, September 2016, Chapter 35
Model-Specific-Registers (MSR).

Summary of incompatible changes:
General:
1. MSR (address 38EH) IA32_PERF_GLOBAL_STAUS in processor-specific header
files has been removed or renamed to IA32_PERF_GLOBAL_STATUS
Typo 'STAUS' has been fixed in SDM.
If the MSR definition is the same with architectural MSR, we remove it.
Otherwise, we rename the MSR.

2. MSRs (address starting from 400H) MSR_MC{X}_{XXX} (like MSR_MC4_STATUS)
in processor-specific header files have been removed or renamed to
IA32_MC{X}_{XXX} (like IA32_MC4_STATUS)
Register name change from 'MSR_MC{X}_{XXX}' to 'IA32_MC{X}_{XXX}' in SDM.
If the MSR definition is the same with architectural MSR, we remove it.
Otherwise, we rename the MSR.
Please note that for those MSRs still have name like 'MSR_MC{X}_{XXX}' in
SDM are still kept in processor-specific header files.

HaswellMsr.h:
1. MSR (address C80H) IA32_DEBUG_FEATURE has been removed
Register name change from 'IA32_DEBUG_FEATURE' to 'IA32_DEBUG_INTERFACE'
in SDM.
Since the MSR definition is the same with architectural MSR, we remove it.

SandyBridgeMsr.h:
1. MSR (address 391H) MSR_UNC_PERF_GLOBAL_CTRL, name change for bit fields
0:3
Bit description change from 'Core {X} select' to 'Slice {X} select' for
bit 0:3 in SDM.

SilvermontMsr.h:
1. MSR (address 2AH) MSR_EBL_CR_POWERON, structure definition changed
Bit description for this MSR is totally changed in SDM, we modify the
structure definition to align with it.

XeonDMsr.h:
1. MSRs (address 630H to 632H) MSR_PKG_C8_RESIDENCY, MSR_PKG_C9_RESIDENCY
and MSR_PKG_C10_RESIDENCY have been removed
Those 3 MSRs are not defined for this processor in SDM, we remove them.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoShellPkg/setvar: Correct typo in setvar help message
Ruiyu Ni [Thu, 15 Dec 2016 07:28:45 +0000 (15:28 +0800)]
ShellPkg/setvar: Correct typo in setvar help message

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoUefiCpuPkg/PiSmmCpuDxeSmm: Fix .S & .asm build failure
Feng Tian [Thu, 15 Dec 2016 05:25:30 +0000 (13:25 +0800)]
UefiCpuPkg/PiSmmCpuDxeSmm: Fix .S & .asm build failure

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoMdeModulePkg/NonDiscoverablePciDeviceDxe: add support for non-coherent DMA
Ard Biesheuvel [Fri, 9 Dec 2016 15:04:34 +0000 (15:04 +0000)]
MdeModulePkg/NonDiscoverablePciDeviceDxe: add support for non-coherent DMA

Add support for non-coherent DMA, either by performing explicit cache
maintenance when DMA mappings are aligned to the CPU's DMA buffer alignment,
or by bounce buffering via uncached mappings otherwise.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdeModulePkg/CapsuleApp: Fix GUID/protocol format issues
Dandan Bi [Mon, 12 Dec 2016 02:26:54 +0000 (10:26 +0800)]
MdeModulePkg/CapsuleApp: Fix GUID/protocol format issues

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoMdeModulePkg: Add missing info string for PCDs
Dandan Bi [Thu, 24 Nov 2016 07:33:28 +0000 (15:33 +0800)]
MdeModulePkg: Add missing info string for PCDs

Some Pcds are added to the dec file, but miss to add the
prompt&&help info to the uni file, now add them.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoMdeModulePkg: Make the comments align with the function
Dandan Bi [Tue, 22 Nov 2016 07:38:10 +0000 (15:38 +0800)]
MdeModulePkg: Make the comments align with the function

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoUefiCpuPkg/Capsule: Fix coding style issues
Dandan Bi [Tue, 13 Dec 2016 08:08:01 +0000 (16:08 +0800)]
UefiCpuPkg/Capsule: Fix coding style issues

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoUefiCpuPkg/MicrocodeUpdateDxe: Fix coding style issues in INF file
Dandan Bi [Tue, 13 Dec 2016 02:54:25 +0000 (10:54 +0800)]
UefiCpuPkg/MicrocodeUpdateDxe: Fix coding style issues in INF file

1. Add MicrocodeUpdate.h to the [Sources] section.
2. Fix the incorrect Guid/Protocol format issues.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoUefiCpuPkg: Add info string to UNI file for PcdCpuSmmStaticPageTable
Dandan Bi [Tue, 13 Dec 2016 02:49:08 +0000 (10:49 +0800)]
UefiCpuPkg: Add info string to UNI file for PcdCpuSmmStaticPageTable

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoUefiCpuPkg: Make the comments align with the functions
Dandan Bi [Tue, 13 Dec 2016 02:46:28 +0000 (10:46 +0800)]
UefiCpuPkg: Make the comments align with the functions

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoSignedCapsulePkg/IniParsingLib: Update struct name
Dandan Bi [Tue, 13 Dec 2016 02:43:53 +0000 (10:43 +0800)]
SignedCapsulePkg/IniParsingLib: Update struct name

1. Change _SECTION_ITEM to _INI_SECTION_ITEM
2. Change _COMMENT_LINE to _INI_COMMENT_LINE
Because _SECTION_ITEM  and _COMMENT_LINE are duplicated with
the one defined in IntelFrameworkModulePkg\Universal\
FirmwareVolume\UpdateDriverDxe\UpdateDriver.h

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoSignedCapsulePkg/SystemFirmwareUpdate: Add source file to INF file
Dandan Bi [Tue, 13 Dec 2016 01:40:04 +0000 (09:40 +0800)]
SignedCapsulePkg/SystemFirmwareUpdate: Add source file to INF file

Add SystemFirmwareDxe.h to [Sources] section of INF file.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoSignedCapsulePkg/RecoveryModuleLoadPei: Add source file to INF file
Dandan Bi [Tue, 13 Dec 2016 01:38:44 +0000 (09:38 +0800)]
SignedCapsulePkg/RecoveryModuleLoadPei: Add source file to INF file

Add RecoveryModuleLoadPei.h to [Sources] section of INF file.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoSignedCapsulePkg/EdkiiSystemCapsuleLib: Fix coding style issues in INF file
Dandan Bi [Tue, 13 Dec 2016 01:35:36 +0000 (09:35 +0800)]
SignedCapsulePkg/EdkiiSystemCapsuleLib: Fix coding style issues in INF file

Fix incorrect Guid/Pcd format issues in INF file.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoSecurityPkg/OpalPasswordDxe: Make comments align with the function
Dandan Bi [Mon, 12 Dec 2016 05:55:44 +0000 (13:55 +0800)]
SecurityPkg/OpalPasswordDxe: Make comments align with the function

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>
7 years agoSecurityPkg/FmpAuthenticationLibRsa2048Sha256: Fix Guid/pcd format issues
Dandan Bi [Mon, 12 Dec 2016 05:38:15 +0000 (13:38 +0800)]
SecurityPkg/FmpAuthenticationLibRsa2048Sha256: Fix Guid/pcd format issues

Cc: Jiewen Yao <jiewen.yao@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: Jiewen Yao <jiewen.yao@intel.com>
7 years agoSecurityPkg/FmpAuthenticationLibPkcs7: Fix incorrect Guid format
Dandan Bi [Mon, 12 Dec 2016 05:35:56 +0000 (13:35 +0800)]
SecurityPkg/FmpAuthenticationLibPkcs7: Fix incorrect Guid format

Cc: Jiewen Yao <jiewen.yao@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: Jiewen Yao <jiewen.yao@intel.com>
7 years agoSecurity:Add info string to UNI file for PcdPkcs7CertBuffer
Dandan Bi [Mon, 12 Dec 2016 05:25:52 +0000 (13:25 +0800)]
Security:Add info string to UNI file for PcdPkcs7CertBuffer

Cc: Jiewen Yao <jiewen.yao@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: Jiewen Yao <jiewen.yao@intel.com>
7 years agoShellPkg/UefiShellNetwork2CommandsLib: Fix incorrect Protocol format
Dandan Bi [Mon, 12 Dec 2016 06:22:03 +0000 (14:22 +0800)]
ShellPkg/UefiShellNetwork2CommandsLib: Fix incorrect Protocol format

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoShellPkg/UefiShellNetwork1CommandsLib: Fix incorrect Protocol format
Dandan Bi [Mon, 12 Dec 2016 06:21:29 +0000 (14:21 +0800)]
ShellPkg/UefiShellNetwork1CommandsLib: Fix incorrect Protocol format

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoShellPkg/UefiShellDebug1CommandsLib: Fix coding style issues
Dandan Bi [Mon, 12 Dec 2016 06:11:14 +0000 (14:11 +0800)]
ShellPkg/UefiShellDebug1CommandsLib: Fix coding style issues

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoFatPkg/EnhancedFatDxe: Remove the file which is not used
Dandan Bi [Mon, 12 Dec 2016 03:08:39 +0000 (11:08 +0800)]
FatPkg/EnhancedFatDxe: Remove the file which is not used

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdeModulePkg EbcDxe: Fix CLANG38 build failure
Liming Gao [Wed, 14 Dec 2016 05:16:34 +0000 (13:16 +0800)]
MdeModulePkg EbcDxe: Fix CLANG38 build failure

Change structure value assignment with CopyMem() API.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoSecurityPkg:/Tcg2Dxe: remove 4G limitation
Jiewen Yao [Mon, 12 Dec 2016 06:35:05 +0000 (14:35 +0800)]
SecurityPkg:/Tcg2Dxe: remove 4G limitation

Tcg2Dxe allocates event log below 4G. It is unnecessary.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
7 years agoMdeModulePkg/NonDiscoverablePciDev: Fix type mismatch in switch/case
Hao Wu [Mon, 12 Dec 2016 01:07:52 +0000 (09:07 +0800)]
MdeModulePkg/NonDiscoverablePciDev: Fix type mismatch in switch/case

Fix switch/case statement type mismatch in functions PciIoMemRead &
PciIoMemWrite.

Parameter 'Width' is of enum type EFI_PCI_IO_PROTOCOL_WIDTH, but the enum
type provided in 'switch (Width)' block is of type
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdeModulePkg/CapsuleLib: Correct debug message.
Jiewen Yao [Sat, 10 Dec 2016 07:08:16 +0000 (15:08 +0800)]
MdeModulePkg/CapsuleLib: Correct debug message.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg PiSmmCore: Retrieve Smram base address from system table
Liming Gao [Mon, 12 Dec 2016 02:09:51 +0000 (10:09 +0800)]
MdeModulePkg PiSmmCore: Retrieve Smram base address from system table

PiSmmIpl records LoadModuleAtFixAddressSmramBase in LMFAConfigurationTable.
Update PiSmmCore to directly get the address from this system table.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg SmmIpl: Fill Smram range for SMM driver when LMFA enable
Liming Gao [Thu, 1 Dec 2016 06:49:33 +0000 (14:49 +0800)]
MdeModulePkg SmmIpl: Fill Smram range for SMM driver when LMFA enable

Allocate the additional Smram range to describe the reserved smram for
SMM core and driver when LMFA feature is enabled.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg PiSmmCore: Update FreePages to handle zero address and pages
Liming Gao [Thu, 1 Dec 2016 06:47:55 +0000 (14:47 +0800)]
MdeModulePkg PiSmmCore: Update FreePages to handle zero address and pages

https://bugzilla.tianocore.org/show_bug.cgi?id=278

Zero memory address or zero number pages are invalid to SmmFreePages().

Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg VariableSmm: Check InfoSize correctly
Star Zeng [Thu, 8 Dec 2016 10:16:05 +0000 (18:16 +0800)]
MdeModulePkg VariableSmm: Check InfoSize correctly

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=290

Current SmmVariableGetStatistics() in VariableSmm.c is always
checking input InfoSize against the first variable info,
it is incorrect.

For instance, there are three variables.
BootOrder
Boot0000
Boot0001

If the input InfoEntry is holding the second variable info (Boot0000)
and InfoSize is sizeof (VARIABLE_INFO_ENTRY) + StrSize (L"Boot0000"),
current code will return EFI_BUFFER_TOO_SMALL, but it should return
the third variable info (Boot0001).

This patch is to refine the code logic.

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>
7 years agoMdeModulePkg VariableSmm: Do not need check CommBufferSize buffer
Star Zeng [Fri, 9 Dec 2016 06:47:03 +0000 (14:47 +0800)]
MdeModulePkg VariableSmm: Do not need check CommBufferSize buffer

Current code in SmmVariableHandler() checks CommBufferSize
buffer to make sure it points to outside SMRAM in
"case SMM_VARIABLE_FUNCTION_GET_STATISTICS".

But after eaae7b33b1cf6b9f21db1636f219c2b6a8d88afd,
CommBufferSize buffer points to SMRAM that was used by
SMM core to cache CommSize from SmmCommunication protocol,
then the check will fail definitely and GET_STATISTICS
feature breaks.

In fact, do not need check CommBufferSize buffer at all
even before eaae7b33b1cf6b9f21db1636f219c2b6a8d88afd.
Before eaae7b33b1cf6b9f21db1636f219c2b6a8d88afd,
CommBufferSize buffer pointed to gSmmCorePrivate->BufferSize
that is outside SMRAM, the check will success definitely;
after eaae7b33b1cf6b9f21db1636f219c2b6a8d88afd,
CommBufferSize buffer points to local variable BufferSize
(in SMRAM) in SmmEntryPoint(), the check is not needed
definitely.

The patch is to remove the check.

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>
7 years agoMdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers
Ard Biesheuvel [Thu, 8 Dec 2016 08:17:22 +0000 (08:17 +0000)]
MdeModulePkg/NonDiscoverablePciDevice: add missing cast and EFIAPI modifiers

Add missing EFIAPI modifiers to the functions that are exposed via the
PCI I/O protocol.

At the same time, add a missing UINT8 cast which breaks the build on
Visual Studio.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
7 years agoFatPkg: Fix format issues in dec/inf/dsc files
Dandan Bi [Thu, 8 Dec 2016 09:09:59 +0000 (17:09 +0800)]
FatPkg: Fix format issues in dec/inf/dsc files

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoFatPkg/EnhancedFatDxe: Add comments for functions
Dandan Bi [Thu, 8 Dec 2016 08:01:15 +0000 (16:01 +0800)]
FatPkg/EnhancedFatDxe: Add comments for functions

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoFatPkg/EnhancedFatDxe: Make the comments align with EDKIIcoding style
Dandan Bi [Fri, 9 Dec 2016 02:07:49 +0000 (10:07 +0800)]
FatPkg/EnhancedFatDxe: Make the comments align with EDKIIcoding style

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoFatPkg/EnhancedFatDxe: Use typedef for complex type
Dandan Bi [Thu, 8 Dec 2016 06:38:26 +0000 (14:38 +0800)]
FatPkg/EnhancedFatDxe: Use typedef for complex type

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoFatPkg/EnhancedFatDxe: Make the variable name follow rule
Dandan Bi [Thu, 8 Dec 2016 05:18:08 +0000 (13:18 +0800)]
FatPkg/EnhancedFatDxe: Make the variable name follow rule

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoFatPkg/EnhancedFatDxe: Make function prototype align with definition
Dandan Bi [Thu, 8 Dec 2016 05:15:22 +0000 (13:15 +0800)]
FatPkg/EnhancedFatDxe: Make function prototype align with definition

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoFatPkg/EnhancedFatDxe: Use global variable replace static local variable
Dandan Bi [Fri, 9 Dec 2016 01:55:15 +0000 (09:55 +0800)]
FatPkg/EnhancedFatDxe: Use global variable replace static local variable

Create global variable "mMonthDays" to replace static local
variable "MonthDays" in FatIsValidTime() function in Misc.c.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoFatPkg/EnhancedFatDxe: Avoid Non-Boolean type uses as Boolean
Dandan Bi [Thu, 8 Dec 2016 05:10:29 +0000 (13:10 +0800)]
FatPkg/EnhancedFatDxe: Avoid Non-Boolean type uses as Boolean

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdeModulePkg/EbcDxe: Fix incorrect Copyright format
Dandan Bi [Thu, 8 Dec 2016 02:21:16 +0000 (10:21 +0800)]
MdeModulePkg/EbcDxe: Fix incorrect Copyright format

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
7 years agoShellPkg: Assign the correct value to ShellStatus
Gary Lin [Wed, 7 Dec 2016 03:40:51 +0000 (11:40 +0800)]
ShellPkg: Assign the correct value to ShellStatus

Since the type of ShellStatus is SHELL_STATUS, we should use
SHELL_INVALID_PARAMETER instead of EFI_INVALID_PARAMETER.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoShellPkg: Add missing header line for SFO flag in 'cls' command
Tapan Shah [Thu, 8 Dec 2016 17:21:11 +0000 (01:21 +0800)]
ShellPkg: Add missing header line for SFO flag in 'cls' command

Adding a missing header line for 'cls -sfo' command

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoShellPkg/Application: Fix ">v" cannot update environment variable
Chen A Chen [Tue, 6 Dec 2016 05:56:46 +0000 (13:56 +0800)]
ShellPkg/Application: Fix ">v" cannot update environment variable

When ">v" is used to redirect the command output to environment
variable (e.g.: "echo xxx >v yyy"), we only called SetVariable()
to update the variable storage but forgot to update the cached
environment variables in gShellEnvVarList.
When updating the variable storage, the existing code unnecessary
saved the ending NULL character into variable storage.

The patch fixes all the above issues.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
7 years agoMdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier
Ruiyu Ni [Mon, 5 Dec 2016 01:49:24 +0000 (09:49 +0800)]
MdeModulePkg/BdsDxe: Initialize gConnectConInEvent earlier

PlatformBootManagerBeforeConsole() might want to trigger this event
to connect ConIn so BdsDxe initializes this event before
PlatformBootManagerBeforeConsole().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
Cc: Chao B Zhang <chao.b.zhang@intel.com>
7 years agoVlv2TbltDevicePkg/PlatformInitPei: Better SMRAM size alignment
Michael Kinney [Fri, 2 Dec 2016 16:40:20 +0000 (08:40 -0800)]
Vlv2TbltDevicePkg/PlatformInitPei: Better SMRAM size alignment

https://bugzilla.tianocore.org/show_bug.cgi?id=260

Update workaround to be more generic.

* Search for the largest region between 1MB and 4GB
* Find all adjacent regions to compute total size
* Minimum aligned size if 4KB
* Mark extended region to align size as EFI_ALLOCATED
* If an adjacent EFI_ALLOCATED region is present, then
  increase the size of the adjacent region.
* If adjacent EFI_ALLOCATED region is not present, then
  allocate a new HOB with one extra entry to describe
  the extended region to align the total size.  Preserve
  the last entry in the descriptor list for compatibility.

This is a workaround until the binary module that produces the
gEfiSmmPeiSmramMemoryReserveGuid HOB is updated

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoMdeModulePkg: implement generic PCI I/O driver for non-discoverable devices
Ard Biesheuvel [Mon, 31 Oct 2016 15:36:50 +0000 (15:36 +0000)]
MdeModulePkg: implement generic PCI I/O driver for non-discoverable devices

This implements support for non-discoverable PCI compatible devices, i.e,
devices that are not on a PCI bus but that can be controlled by generic PCI
drivers in EDK2.

This is implemented as a UEFI driver, which means we take full advantage
of the UEFI driver model, and only instantiate those devices that are
necessary for booting.

Care is taken to deal with DMA addressing limitations: DMA mappings and
allocations are moved below 4 GB if the PCI driver has not informed us
that the device being driven is 64-bit DMA capable. DMA is implemented as
coherent, support for non-coherent DMA is implemented by a subsequent patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Tested-by: Marcin Wojtas <mw@semihalf.com>
7 years agoMdeModulePkg: introduce helper library to register non-discoverable devices
Ard Biesheuvel [Mon, 31 Oct 2016 14:58:18 +0000 (14:58 +0000)]
MdeModulePkg: introduce helper library to register non-discoverable devices

Non-discoverable devices need to be registered explicitly by the platform.
Introduce a helper library that takes care of this.

This implementation currently only supports registering devices that are
covered by one or more MMIO resources. The underlying protocol allows for
more flexibility than that, but this is currently sufficient for the use
cases that we know about.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Tested-by: Marcin Wojtas <mw@semihalf.com>
7 years agoMdeModulePkg: introduce non-discoverable device protocol
Ard Biesheuvel [Mon, 31 Oct 2016 14:54:56 +0000 (14:54 +0000)]
MdeModulePkg: introduce non-discoverable device protocol

Introduce a protocol that can be exposed by a platform for devices that
are not discoverable, usually because they are wired straight to the
memory bus rather than to an enumerable bus like PCI or USB.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Tested-by: Marcin Wojtas <mw@semihalf.com>
7 years agoMdeModulePkg: Fix assert in iSCSI.
Zhang Lubo [Thu, 1 Dec 2016 06:57:38 +0000 (14:57 +0800)]
MdeModulePkg: Fix assert in iSCSI.

The bug is caused by using already freed memory.
If there is already an attempt and execute
'reconnect -r' command, all the ConfigFormEntry structure
will be freed in IScsiDriverBindingStop, but the
mCallbackInfo->Current is not configured as null and
this pointer will be used again in IScsiFormExtractConfig.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoUefiCpuPkg/PiSmmCpuDxeSmm: Remove MTRR field from PSD
Michael Kinney [Tue, 6 Dec 2016 04:39:01 +0000 (20:39 -0800)]
UefiCpuPkg/PiSmmCpuDxeSmm: Remove MTRR field from PSD

https://bugzilla.tianocore.org/show_bug.cgi?id=277

The MTRR field was removed from PROCESS_SMM_DESCRIPTOR
structure in commit:

https://github.com/tianocore/edk2/commit/26ab5ac3621bdefe96987f8c1512ca79e1bb7ac0

However, the references to the MTRR field in assembly
files were not removed.  Remove the extern reference
to gSmiMtrr and set the Reserved14 field
of PROCESS_SMM_DESCRIPTOR to 0.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoUefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD
Michael Kinney [Tue, 6 Dec 2016 00:53:33 +0000 (16:53 -0800)]
UefiCpuPkg/PiSmmCpuDxeSmm: Always initialze PSD

The following commit moved the initialization of the
default PROCESSOR_SMM_DESCRIPTOR from MpService.c to
SmramSaveState.c and made this initialization
conditional on the value returned by the
SmmCpuFeaturesGetSmiHandlerSize() library function.

https://github.com/tianocore/edk2/commit/f12367a0b1de7838f1cb8e0839e168ed7b862333

This changed the behavior of the PiSmmCpuDxeSmm module.
The initialization of the PROCESSOR_SMM_DESCRIPTOR is
moved before the call to SmmCpuFeaturesGetSmiHandlerSize()
to preserve the previous behavior.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoUefiCpuPkg/PiSmmCpu: Fixed #double fault on #page fault.
Jiewen Yao [Wed, 23 Nov 2016 13:24:32 +0000 (21:24 +0800)]
UefiCpuPkg/PiSmmCpu: Fixed #double fault on #page fault.

This patch fixes https://bugzilla.tianocore.org/show_bug.cgi?id=246

Previously, when SMM exception happens after EndOfDxe,
with StackGuard enabled on IA32, the #double fault exception
is reported instead of #page fault.

Root cause is below:

Current EDKII SMM page protection will lock GDT.
If IA32 stack guard is enabled, the page fault handler will do task switch.
This task switch need write busy flag in GDT, and write TSS.

However, the GDT and TSS is locked at that time, so the
double fault happens.

We decide to not lock GDT for IA32 StackGuard enabled.

This issue does not exist on X64, or IA32 without StackGuard.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.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>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg/PiSmmCore: use EfiPagesToSize to prevent build error.
Jiewen Yao [Wed, 30 Nov 2016 15:20:46 +0000 (23:20 +0800)]
MdeModulePkg/PiSmmCore: use EfiPagesToSize to prevent build error.

EFI_PAGES_TO_SIZE only handles UINTN, so we use EfiPagesToSize
to handle UINT64.

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>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg/PiSmmCore; Use DEBUG_WARN for non 4k aligned image.
Jiewen Yao [Wed, 30 Nov 2016 15:22:38 +0000 (23:22 +0800)]
MdeModulePkg/PiSmmCore; Use DEBUG_WARN for non 4k aligned image.

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>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg/PiSmmCore: MemoryAttributeTable need keep non-PE record.
Jiewen Yao [Wed, 30 Nov 2016 15:17:53 +0000 (23:17 +0800)]
MdeModulePkg/PiSmmCore: MemoryAttributeTable need keep non-PE record.

Current memory attribute table implementation will only mark PE code
to be EfiRuntimeServicesCode, and mark rest to be EfiRuntimeServicesData.

However, there might be a case that a SMM code wants to allocate
EfiRuntimeServicesCode explicitly to let page table protect this region
to be read only. It is unsupported.

This patch enhances the current solution so that MemoryAttributeTable
does not touch non PE image record.
Only the PE image region is forced to be EfiRuntimeServicesCode for
code and EfiRuntimeServicesData for data.

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>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg/PiSmmCore: AllocatePool should use MemoryType.
Jiewen Yao [Wed, 30 Nov 2016 15:08:51 +0000 (23:08 +0800)]
MdeModulePkg/PiSmmCore: AllocatePool should use MemoryType.

PiSmmCore supports page level protection based upon the Memory Type
(EfiRuntimeServicesCode/EfiRuntimeServicesData) and PE image.

However, the Memory Type information is ignored in AllocatePool().
If a caller calls AllocatePool with EfiRuntimeServicesCode,
the final memory is still allocated as EfiRuntimeServicesData.

This patch supports AllocatePool with EfiRuntimeServicesCode.

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>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoOvmfPkg/build.sh: Use GCC49 toolchains with GCC 6.[0-2]
Anthony PERARD [Tue, 6 Dec 2016 12:03:25 +0000 (12:03 +0000)]
OvmfPkg/build.sh: Use GCC49 toolchains with GCC 6.[0-2]

The goal of the patch is to avoid using -flto with GCC 6.0 to 6.2.

This is to workaround a GCC bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70955

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoOvmfPkg/XenHypercallLib: Add EFIAPI
Anthony PERARD [Tue, 6 Dec 2016 12:03:24 +0000 (12:03 +0000)]
OvmfPkg/XenHypercallLib: Add EFIAPI

Because EFIAPI is necessary for functions declared in library class header
files.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Build-tested-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg/SetupBrowserDxe: Fix incorrect local variable used
Dandan Bi [Mon, 5 Dec 2016 11:18:13 +0000 (19:18 +0800)]
MdeModulePkg/SetupBrowserDxe: Fix incorrect local variable used

https://bugzilla.tianocore.org/show_bug.cgi?id=280

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>
7 years agoMdeModulePkg/EbcDxe: Add comments for functions
Dandan Bi [Mon, 5 Dec 2016 03:33:52 +0000 (11:33 +0800)]
MdeModulePkg/EbcDxe: Add comments for functions

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
7 years agoMdeModulePkg/EbcDxe: Avoid Non-Boolean type used as Boolean
Dandan Bi [Thu, 1 Dec 2016 09:07:09 +0000 (17:07 +0800)]
MdeModulePkg/EbcDxe: Avoid Non-Boolean type used as Boolean

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
7 years agoMdeModulePkg/EbcDxe: Make the variable name follow rules
Dandan Bi [Thu, 1 Dec 2016 08:22:49 +0000 (16:22 +0800)]
MdeModulePkg/EbcDxe: Make the variable name follow rules

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
7 years agoMdeModulePkg/EbcDxe: Initialize variable after declaration
Dandan Bi [Thu, 1 Dec 2016 07:11:50 +0000 (15:11 +0800)]
MdeModulePkg/EbcDxe: Initialize variable after declaration

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
7 years agoMdeModulePkg/EbcDxe: Make the comments align with EDKII coding style
Dandan Bi [Tue, 29 Nov 2016 03:01:00 +0000 (11:01 +0800)]
MdeModulePkg/EbcDxe: Make the comments align with EDKII coding style

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Pete Batard <pete@akeo.ie>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen.yao@intel.com
7 years agoShellPkg: Add error prompt message in Ifconfig6 command.
Zhang Lubo [Tue, 29 Nov 2016 01:56:02 +0000 (09:56 +0800)]
ShellPkg: Add error prompt message in Ifconfig6 command.

v2: update the prompt message more readable.

It should display error prompt message when Ifconfig6 can
not configure correctly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed by : Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoNetworkPkg/IpSecDxe: correct one comment and remove the unused buf
Jiaxin Wu [Wed, 30 Nov 2016 02:15:55 +0000 (10:15 +0800)]
NetworkPkg/IpSecDxe: correct one comment and remove the unused buf

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@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: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoVlv2TbltDevicePkg: Remove use of IntelFrameworkModulePkg legacy libs
Leif Lindholm [Thu, 1 Dec 2016 15:16:42 +0000 (15:16 +0000)]
Vlv2TbltDevicePkg: Remove use of IntelFrameworkModulePkg legacy libs

LzmaCustomDecompressLib and PeiDxeDebugLibReportStatusCode were copied
from IntelFrameworkModulePkg to MdeModulePkg, but the originals were
kept for compatibility.

Since the libraries are identical, move Vlv2TbltDevicePkg to use the
MdeModulePkg versions instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: David Wei <david.wei@intel.com>
7 years agoMdeModulePkg/PciSioSerial: Fix bad EOL
Ruiyu Ni [Tue, 6 Dec 2016 09:08:07 +0000 (17:08 +0800)]
MdeModulePkg/PciSioSerial: Fix bad EOL

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoPcAtChipsetPkg/PcRtc: Fix bad EOL
Ruiyu Ni [Tue, 6 Dec 2016 09:07:47 +0000 (17:07 +0800)]
PcAtChipsetPkg/PcRtc: Fix bad EOL

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoVlv2TbltDevicePkg: Update PlatformPkgGccX64.dsc
Michael Kinney [Wed, 30 Nov 2016 03:31:49 +0000 (19:31 -0800)]
Vlv2TbltDevicePkg: Update PlatformPkgGccX64.dsc

Update PlatformPkgGccX64.dsc to align with PlatformPkgX64.dsc
on library mappings and PCD settings.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoVlv2TbltDevicePkg/PlatformBdsLib: Add DebugAgent Console
Michael Kinney [Wed, 30 Nov 2016 00:53:42 +0000 (16:53 -0800)]
Vlv2TbltDevicePkg/PlatformBdsLib: Add DebugAgent Console

https://bugzilla.tianocore.org/show_bug.cgi?id=276

Add the UART console produced by the DebugAgent when
SOURCE_DEBUG_ENABLE is TRUE.  Without this change, the
debugger connects but the Boot Manager and the UEFI
Shell do not have an active console because the Boot
Manager does not know about the DebugAgent UART
Console device path and the Debug Agent is using the
UART device.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoVlv2TbltDevicePkg: Fix SOURCE_DEBUG_ENABLE feature
Michael Kinney [Wed, 30 Nov 2016 00:17:18 +0000 (16:17 -0800)]
Vlv2TbltDevicePkg: Fix SOURCE_DEBUG_ENABLE feature

https://bugzilla.tianocore.org/show_bug.cgi?id=276

Fix library mapping and PCD settings required to use
the SOURCE_DEBUG_ENABLE feature in PEI, DXE, and SMM.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoVlv2TbltDevicePkg: Make !if statement usage consistent
Michael Kinney [Tue, 29 Nov 2016 21:10:05 +0000 (13:10 -0800)]
Vlv2TbltDevicePkg: Make !if statement usage consistent

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoOvmfPkg/QemuFwCfgLib: support QEMU's DMA-like fw_cfg access method
Laszlo Ersek [Wed, 30 Nov 2016 12:13:40 +0000 (13:13 +0100)]
OvmfPkg/QemuFwCfgLib: support QEMU's DMA-like fw_cfg access method

The benefits of the DMA-like access method are (a) speed, (b) write
support in QEMU 2.9+.

(IOPort-based write support was discontinued in QEMU 2.4, and the
DMA-based one is being added to QEMU 2.9. Write support needs no separate
feature detection because writeability is governed on the level of
individual fw_cfg files -- if a file meant to be written by the firmware
exists in the directory, then it is writeable with the DMA method.)

We don't enable this feature for the SEC library instance, because:
- the SEC instance remains without clients (I've checked that it builds
  though),
- in SEC, any possible fw_cfg use is expected to be small and read-only.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoArmVirtPkg/QemuFwCfgLib: rebase lib instance to updated lib class header
Laszlo Ersek [Fri, 2 Dec 2016 18:40:09 +0000 (19:40 +0100)]
ArmVirtPkg/QemuFwCfgLib: rebase lib instance to updated lib class header

Put the FW_CFG_F_DMA constant, introduced in the last patch, to use.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoOvmfPkg/QemuFwCfgLib: extend lib class header with more definitions
Laszlo Ersek [Fri, 2 Dec 2016 18:37:26 +0000 (19:37 +0100)]
OvmfPkg/QemuFwCfgLib: extend lib class header with more definitions

The last patch consists purely of code movement; going forward, we should
use a few more symbolic constants.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoArmVirtPkg, OvmfPkg: QemuFwCfgLib: move DMA-related defs to lib class
Laszlo Ersek [Wed, 30 Nov 2016 10:35:00 +0000 (11:35 +0100)]
ArmVirtPkg, OvmfPkg: QemuFwCfgLib: move DMA-related defs to lib class

Move the type and macro definitions related to QEMU's DMA-like fw_cfg
access method to the library class header.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoOvmfPkg/QemuFwCfgLib: move InternalQemuFwCfgIsAvailable() to lib instances
Laszlo Ersek [Wed, 30 Nov 2016 09:22:30 +0000 (10:22 +0100)]
OvmfPkg/QemuFwCfgLib: move InternalQemuFwCfgIsAvailable() to lib instances

InternalQemuFwCfgIsAvailable() is an API that is incorrectly exposed by
the "OvmfPkg/Include/Library/QemuFwCfgLib.h" library class header; the API
is meant to be used internally to library instances (if it's needed at
all).

In OvmfPkg, we have two lib instances (for SEC and PEI/DXE); they provide
different implementations of InternalQemuFwCfgIsAvailable(), for the
shared file "OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c". Move the API
declaration to a new internal header called "QemuFwCfgLibInternal.h", and
drop EFIAPI in the process.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoArmVirtPkg/QemuFwCfgLib: remove superfluous InternalQemuFwCfgIsAvailable()
Laszlo Ersek [Wed, 30 Nov 2016 09:07:06 +0000 (10:07 +0100)]
ArmVirtPkg/QemuFwCfgLib: remove superfluous InternalQemuFwCfgIsAvailable()

InternalQemuFwCfgIsAvailable() is an API that is incorrectly exposed by
the "OvmfPkg/Include/Library/QemuFwCfgLib.h" library class header; the API
is meant to be used internally to library instances (if it's needed at
all). ArmVirtPkg's instance has no use for it actually, so simplify the
code and remove the function definition.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoOmap35xxPkg, BeagleBoardPkg: Use Pcd for INTERRUPT_BASE
Leif Lindholm [Sun, 27 Nov 2016 23:26:06 +0000 (23:26 +0000)]
Omap35xxPkg, BeagleBoardPkg: Use Pcd for INTERRUPT_BASE

The base address for the interrupt controller is hard-coded in
Omap3530Interrupt.h, although Omap35xxPkg/InterruptDxe appears to
have initially intended to make use of PcdInterruptBaseAddress from
EmbeddedPkg. Move it to use said Pcd, and also declare use of it in
BeagleBoardLib, which makes a direct access.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoEmbeddedPkg: Remove use of IntelFrameworkModulePkg legacy libs
Leif Lindholm [Thu, 1 Dec 2016 15:13:33 +0000 (15:13 +0000)]
EmbeddedPkg: Remove use of IntelFrameworkModulePkg legacy libs

LzmaCustomDecompressLib and PeiDxeDebugLibReportStatusCode were copied
from IntelFrameworkModulePkg to MdeModulePkg, but the originals were
kept for compatibility.

Since the libraries are identical, move EmbeddedPkg to use the
MdeModulePkg versions instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoBeagleBoardPkg: Remove use of IntelFrameworkModulePkg legacy libs
Leif Lindholm [Thu, 1 Dec 2016 15:11:44 +0000 (15:11 +0000)]
BeagleBoardPkg: Remove use of IntelFrameworkModulePkg legacy libs

LzmaCustomDecompressLib and PeiDxeDebugLibReportStatusCode were copied
from IntelFrameworkModulePkg to MdeModulePkg, but the originals were
kept for compatibility.

Since the libraries are identical, move BeagleBoardPkg to use the
MdeModulePkg versions instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoMdeModulePkg PiSmmCore: Update comments in InitializeMemoryServices
Liming Gao [Thu, 1 Dec 2016 06:30:18 +0000 (14:30 +0800)]
MdeModulePkg PiSmmCore: Update comments in InitializeMemoryServices

Add the comments to describe Free and Allocated SMRAM are added separately.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoIntelFsp2Pkg: 41d739e breaks flat tree build
Zeng, Star [Mon, 5 Dec 2016 02:52:45 +0000 (10:52 +0800)]
IntelFsp2Pkg: 41d739e breaks flat tree build

There may be no environment variable PACKAGES_PATH defined
in flat tree, then 41d739e breaks flat tree build.
This patch is to update GenCfgOpt.py to be compatible with
both flat tree and package path build.

Cc: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@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: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
Tested-by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com>
7 years agoBaseTools/VolInfo: Fix printf issue using '%ls' in format string
Hao Wu [Mon, 28 Nov 2016 07:18:20 +0000 (15:18 +0800)]
BaseTools/VolInfo: Fix printf issue using '%ls' in format string

https://bugzilla.tianocore.org/show_bug.cgi?id=257

For GCC compilers, when building with option '-fshort-wchar', wide char
string format '%ls' does not work properly for printf() function. The
string specified by '%ls' will not be printed.

This commit avoids using '%ls' for printf() function and converts the wide
char string to char string for printing.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@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>
7 years agoShellPkg/MV: Fix MV to deny moving parent of current directory
Chen A Chen [Tue, 22 Nov 2016 08:16:02 +0000 (16:16 +0800)]
ShellPkg/MV: Fix MV to deny moving parent of current directory

When user types "mv -r fs0:\A\ fs1:\" under directory
"fs0:\A\B\", MV command should deny such movement.

The patch fixes the above issue.
It also denies moving current directory.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoEmulatorPkg: Remove use of IntelFrameworkModulePkg legacy libs
Leif Lindholm [Thu, 1 Dec 2016 15:14:25 +0000 (15:14 +0000)]
EmulatorPkg: Remove use of IntelFrameworkModulePkg legacy libs

LzmaCustomDecompressLib and PeiDxeDebugLibReportStatusCode were copied
from IntelFrameworkModulePkg to MdeModulePkg, but the originals were
kept for compatibility.

Since the libraries are identical, move EmulatorPkg to use the
MdeModulePkg versions instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>