summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-01OvmfPkg: Link AuthVariableLib for following merged variable driver deployStar Zeng
AuthVariableLib and TpmMeasurementLib library classes are now linked with MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf to optionally support secure variables. For OvmfPkg, link AuthVariableLib and DxeTpmMeasurementLib in SecurityPkg when SECURE_BOOT_ENABLE = TRUE, and link AuthVariableLibNull and TpmMeasurementLibNull in MdeModulePkg when SECURE_BOOT_ENABLE = FALSE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17760 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01Nt32Pkg: Link AuthVariableLib for following merged variable driver deployStar Zeng
AuthVariableLib and TpmMeasurementLib library classes are now linked with MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf to optionally support secure variables. For Nt32Pkg, link AuthVariableLib and DxeTpmMeasurementLib in SecurityPkg when SECURE_BOOT_ENABLE = TRUE, and link AuthVariableLibNull and TpmMeasurementLibNull in MdeModulePkg when SECURE_BOOT_ENABLE = FALSE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17759 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01SecurityPkg: Implement AuthVariableLib library instanceStar Zeng
What to do: 1. Implement AuthVariableLib library instance. 2. Temporarily add VARIABLE_ENTRY_CONSISTENCY and variable attribute combinations definitions to AuthenticatedVariableFormat.h for git bisect. Why to do: 1. Share code. Separate auth variable service from Auth Variable driver in SecurityPkg to AuthVariableLib. Then the AuthVariableLib could benefit and be used by different implementation of Auth Variable drivers. 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: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17758 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01MdeModulePkg: Add AuthVariableLib LibraryClassStar Zeng
What to do: 1. Add AuthVariableLib LibraryClass definitions. 2. Implement a NULL AuthVariableLib library instance. 3. Add VARIABLE_ENTRY_PROPERTY definition to VarCheck.h. 4. Add VARIABLE_ENTRY_CONSISTENCY and variable attribute combinations definitions to VariableFormat.h. Why to do: 1. Share code. 1.1. Separate auth variable service from Auth Variable driver in SecurityPkg to AuthVariableLib. Then the AuthVariableLib could benefit and be used by different implementation of Auth Variable drivers. 1.2 The VARIABLE_ENTRY_PROPERTY definition to VarCheck.h, VARIABLE_ENTRY_CONSISTENCY and variable attribute combinations definitions to VariableFormat.h will be shared by merged Variable driver and AuthVariableLib. 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: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17757 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01MdeModulePkg VariablePei: Merge from VariablePei in SecurityPkgStar Zeng
What to do: 1. Merge from VariablePei in SecurityPkg to VariablePei in MdeModulePkg. Why to do: 1. Remove code duplication and reduce maintenance effort. The code logic of VariablePei in SecurityPkg is same with VariablePei in MdeModulePkg. 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: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17756 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01MdeModulePkg VariableInfo: Merge from VariableInfo in SecurityPkgStar Zeng
What to do: 1. Merge VariableInfo in SecurityPkg to VariableInfo in MdeModulePkg. Why to do: 1. Remove code duplication and reduce maintenance effort. The functionality of VariableInfo in SecurityPkg has covered VariableInfo in MdeModulePkg. 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: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17755 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01MdeModulePkg: Move authenticated variable definition from SecurityPkgStar Zeng
What to do: 1. Move authenticated variable definition from AuthenticatedVariableFormat.h to VariableFormat.h with gEfiAuthenticatedVariableGuid and AUTHENTICATED_VARIABLE_HEADER. Why to do: 1. Share code. We are moving forward to separate auth variable service from Auth Variable driver in SecurityPkg to AuthVariableLib. Then the AuthVariableLib could benefit and be used by different implementation of Auth Variable drivers. 2. Remove code duplication and reduce maintenance effort. After auth variable service separated from Auth Variable driver in SecurityPkg to AuthVariableLib. The remaining code logic of Auth Variable driver in SecurityPkg will be almost same with Variable driver in MdeModulePkg. We are going to merge them. 3. gEfiAuthenticatedVariableGuid will be used by both merged Variable driver and AuthVariableLib, AUTHENTICATED_VARIABLE_HEADER will be used by merged Variable driver. 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: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17754 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01MdeModulePkg: Move TpmMeasurementLib LibraryClass from SecurityPkgStar Zeng
What to do: 1. Move TpmMeasurementLib LibraryClass from SecurityPkg to MdeModulePkg. 2. Implement a NULL TpmMeasurementLib library instance. Why to do: 1. Share code. We are moving forward to separate auth variable service from Auth Variable driver in SecurityPkg to AuthVariableLib. Then the AuthVariableLib could benefit and be used by different implementation of Auth Variable drivers. 2. Remove code duplication and reduce maintenance effort. After auth variable service separated from Auth Variable driver in SecurityPkg to AuthVariableLib. The remaining code logic of Auth Variable driver in SecurityPkg will be almost same with Variable driver in MdeModulePkg. We are going to merge them. 3. TpmMeasurementLib is consumed by Auth Variable driver in SecurityPkg now, as Auth Variable driver in SecurityPkg will be merged to Variable driver in MdeModulePkg, so the library class also needs to be moved to MdeModulePkg. 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: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17753 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01MdeModulePkg PlatDriOverrideDxe: Remove unneeded VARIABLE_HEADER referenceStar Zeng
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: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17752 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01NetworkPkg: Add IPv6 DUID configuration support using platform PCD.Samer El-Haj-Mahmoud
The code today always uses DUID-UUID unless there is an error in reading the UUID, which results in falling through to DUID-LLT. This change allows the platform to control the DUID method (DUID-UUID or DUID-LLT) using a platform dynamic PCD. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17751 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01ShellPkg: Refine the code logic of mv.c.Qiu Shumin
When doing the mv we should check whether source is 'above' dest on file path tree. This patch make the check logic more precise. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hp.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17750 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01There needs to be a space between the output section name and the colon, i.e.,Ard Biesheuvel
.text : ALIGN(0x1000) ^ Fix this for all output sections Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17748 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30ShellPkg: Refine code to make catenae length more precise.Qiu Shumin
This commit refine the catenae length. A too long catenae length in StrnCat may cause potential buffer overflow while in StrnCatS it may ASSERT. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17747 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30PerformancePkg Dp_App: Resolve buffer size mismatchHao Wu
CHAR16 array mGaugeString[DP_GAUGE_STRING_LENGTH + 1] is pass into function GetShortPdbFileName(). However, in this function it treats the size of the input buffer as DXE_PERFORMANCE_STRING_SIZE. Though DXE_PERFORMANCE_STRING_SIZE is smaller than DP_GAUGE_STRING_LENGTH now, but this manner might introduce a potential risk of buffer overflow. 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17746 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30PerformancePkg Dp_App: Use safe string functionsHao Wu
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17745 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30UefiCpuPkg S3Resume2Pei: Use safe string functionsHao Wu
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17744 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30IntelFspPkg BaseFspDebugLibSerialPort: Use safe string functionsHao Wu
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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17743 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30MdePkg UefiLib: Use safe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17742 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30MdePkg UefiDevicePathLib: Remove unsafe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17741 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30IntelFrameworkPkg FrameworkUefiLib: Use safe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17740 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30IntelFrameworkModulePkg UpdateDriverDxe: Use safe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17739 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30IntelFrameworkModulePkg DeviceMngr: Use safe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17738 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30IntelFrameworkModulePkg BootMngr: Use safe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17737 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30IntelFrameworkModulePkg BootMaint: Use safe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17736 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30IntelFrameworkModulePkg BdsDxe: Use safe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17735 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30IntelFrameworkModulePkg PeiDxeDebugLib: Use safe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17734 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30IntelFrameworkModulePkg GenericBdsLib: Use safe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17733 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30IntelFrameworkModulePkg IsaFloppyDxe: Use safe string functionsHao Wu
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: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17732 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30CryptoPkg: Fix the dereferenced pointer issueQin Long
This patch is to fix one dereferenced pointer issue in new Pkcs7GetAttachedContent API, and add the memory allocation failure check. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long <qin.long@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17731 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30ShellPkg: Use safe string functions to refine code.Qiu Shumin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17730 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29SecurityPkg: Add MD5 support to Hash2DxeCryptoJonathan Doman
MD5 is part of the HASH2 protocol and it's trivial to support. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jonathan Doman <jonathan.doman@hp.com> Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17729 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29BaseTools: Added GCC ld script to support 4K alignment.Yingke Liu
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17728 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29BaseTools: Update GenFw to support 4K alignment.Ard Biesheuvel
Get maximum section alignment from each ELF section, and this alignment is used to create PE header. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17727 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29BaseTools: Updated tool_def to support 4K alignment.Yingke Liu
Replace '/MERGE:.data=.text /MERGE:.rdata=.text' with /MERGE:.rdata=.data Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17726 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29BaseTools: Update IASL download link and remove specific version info.Yingke Liu
The version of IASL compiler in the tools_def.template file no longer exists on the acpica.org site. Update download link and remove the specific version info from the tools_def.template file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17725 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29MdeModulePkg:Use safe string functionsDandan Bi
Replace unsafe String functions with new added safe string functions Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17724 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29NetworkPkg: Check whether the iSCSI initiator name is null.Zhang Lubo
Popup a warning if iSCSI initiator name is null before attempt configure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17723 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-26OvmfPkg: PlatformPei: invert MTRR setup in QemuInitializeRam()Laszlo Ersek
At the moment we work with a UC default MTRR type, and set three memory ranges to WB: - [0, 640 KB), - [1 MB, LowerMemorySize), - [4 GB, 4 GB + UpperMemorySize). Unfortunately, coverage for the third range can fail with a high likelihood. If the alignment of the base (ie. 4 GB) and the alignment of the size (UpperMemorySize) differ, then MtrrLib creates a series of variable MTRR entries, with power-of-two sized MTRR masks. And, it's really easy to run out of variable MTRR entries, dependent on the alignment difference. This is a problem because a Linux guest will loudly reject any high memory that is not covered my MTRR. So, let's follow the inverse pattern (loosely inspired by SeaBIOS): - flip the MTRR default type to WB, - set [0, 640 KB) to WB -- fixed MTRRs have precedence over the default type and variable MTRRs, so we can't avoid this, - set [640 KB, 1 MB) to UC -- implemented with fixed MTRRs, - set [LowerMemorySize, 4 GB) to UC -- should succeed with variable MTRRs more likely than the other scheme (due to less chaotic alignment differences). Effects of this patch can be observed by setting DEBUG_CACHE (0x00200000) in PcdDebugPrintErrorLevel. Cc: Maoming <maoming.maoming@huawei.com> Cc: Huangpeng (Peter) <peter.huangpeng@huawei.com> Cc: Wei Liu <wei.liu2@citrix.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Maoming <maoming.maoming@huawei.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17722 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-26OvmfPkg: PlatformPei: beautify memory HOB order in QemuInitializeRam()Laszlo Ersek
Build the memory HOBs in a tight block, in increasing base address order. Cc: Maoming <maoming.maoming@huawei.com> Cc: Huangpeng (Peter) <peter.huangpeng@huawei.com> Cc: Wei Liu <wei.liu2@citrix.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Maoming <maoming.maoming@huawei.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17721 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-26OvmfPkg: PlatformPei: create the CPU HOB with dynamic memory space widthLaszlo Ersek
Maoming reported that guest memory sizes equal to or larger than 64GB were not correctly handled by OVMF. Enabling the DEBUG_GCD (0x00100000) bit in PcdDebugPrintErrorLevel, and starting QEMU with 64GB guest RAM size, I found the following error in the OVMF debug log: > GCD:AddMemorySpace(Base=0000000100000000,Length=0000000F40000000) > GcdMemoryType = Reserved > Capabilities = 030000000000000F > Status = Unsupported This message is emitted when the DXE core is initializing the memory space map, processing the "above 4GB" memory resource descriptor HOB that was created by OVMF's QemuInitializeRam() function (see "UpperMemorySize"). The DXE core's call chain fails in: CoreInternalAddMemorySpace() [MdeModulePkg/Core/Dxe/Gcd/Gcd.c] CoreConvertSpace() // // Search for the list of descriptors that cover the range BaseAddress // to BaseAddress+Length // CoreSearchGcdMapEntry() CoreSearchGcdMapEntry() fails because the one entry (with type "nonexistent") in the initial GCD memory space map is too small, and cannot be split to cover the memory space range being added: > GCD:Initial GCD Memory Space Map > GCDMemType Range Capabilities Attributes > ========== ================================= ================ ================ > NonExist 0000000000000000-0000000FFFFFFFFF 0000000000000000 0000000000000000 The size of this initial entry is determined from the CPU HOB (CoreInitializeGcdServices()). Set the SizeOfMemorySpace field in the CPU HOB to mPhysMemAddressWidth, which is the narrowest valid value to cover the entire guest RAM. Reported-by: Maoming <maoming.maoming@huawei.com> Cc: Maoming <maoming.maoming@huawei.com> Cc: Huangpeng (Peter) <peter.huangpeng@huawei.com> Cc: Wei Liu <wei.liu2@citrix.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Wei Liu <wei.liu2@citrix.com> Tested-by: Maoming <maoming.maoming@huawei.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17720 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-26OvmfPkg: PlatformPei: enable larger permanent PEI RAMLaszlo Ersek
We'll soon increase the maximum guest-physical RAM size supported by OVMF. For more RAM, the DXE IPL is going to build more page tables, and for that it's going to need a bigger chunk from the permanent PEI RAM. Otherwise CreateIdentityMappingPageTables() would fail with: > DXE IPL Entry > Loading PEIM at 0x000BFF61000 EntryPoint=0x000BFF61260 DxeCore.efi > Loading DXE CORE at 0x000BFF61000 EntryPoint=0x000BFF61260 > AllocatePages failed: No 0x40201 Pages is available. > There is only left 0x3F1F pages memory resource to be allocated. > ASSERT .../MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c(123): > BigPageAddress != 0 (The above example belongs to the artificially high, maximal address width of 52, clamped by the DXE core to 48. The address width of 48 bits corresponds to 256 TB or RAM, and requires a bit more than 1GB for paging structures.) Cc: Maoming <maoming.maoming@huawei.com> Cc: Huangpeng (Peter) <peter.huangpeng@huawei.com> Cc: Wei Liu <wei.liu2@citrix.com> Cc: Brian J. Johnson <bjohnson@sgi.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Brian J. Johnson <bjohnson@sgi.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17719 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-26SecurityPkg/TcgMor: move TPer Reset operation to this moduleTian Feng
The TPer Reset operation is a common logic. So it's added into SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf module and would be triggered at EndOfDxe. By this way, all encrypted drives which produce EFI_STORAGE_SECURITY_ RPOTOCOL interface would be force reset when MOR is set. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tian Feng <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17718 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-26MdeModulePkg/AtaBus: remove TPer Reset operation in DriverBindingStartTian Feng
The TPer Reset operation would be moved into SecurityPkg/Tcg/ MemoryOverwriteControl/TcgMor.inf module and be triggered at EndOfDxe. By this way, all encrypted drives which produce EFI_STORAGE_SECURITY_ RPOTOCOL interface would be force reset when MOR is set. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tian Feng <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17717 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-26SourceLevelDebugPkg/DebugAgent: Add typecast to fix sign extensionJeff Fan
OffsetHigh is 16bit value and its type is UINT32 and defined in structure. It will be 32bit int type after do 16-bit left-shift operation. Then it will sign extension if cast it to UINT64 if its high bit is 1. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Scott Duplichan <scott@notabs.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17716 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-25CorebootPayloadPkg: Fix "reset -s" issue.Guo Dong
Fix reboot issue after issuing shell command "reset -s" from UEFI payload. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17715 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-25CorebootModulePkg: Get power management register addresses.Guo Dong
This patch will get power management event register address and power management GPE enable register address. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17714 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-25ArmVirtPkg: signal EndOxDxe event in PlatformBsdInitArd Biesheuvel
Currently, the ArmVirtPkg platforms built with the Intel BDS fail to signal the end-of-DXE event 'gEfiEndOfDxeEventGroupGuid' when entering the BDS phase, which results in some loss of functionality, i.e., variable reclaim in the VariableDxe drivers, and the splitting of the memory regions that is part of the recently added UEFI 2.5 properties table feature. As discussed on the edk2-devel mailing list here: http://thread.gmane.org/gmane.comp.bios.tianocore.devel/16088/focus=16109 it is up to the platform BDS to signal that event, since there may be platform specific ordering constraints with respect to the signalling of the event that are difficult to honor at the generic level. So add the SignalEvent () call to PlatformBdsInit () of ArmVirtPkg's PlatformBdsLib implementation for the Intel BDS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17713 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-25BaseTools/Ecc: Fix a bug of determining boolean variable incorrectlyHess Chen
Fix a bug of determining boolean variable incorrectly in C parser Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: YangX Li <yangx.li@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17711 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-25BaseTools/Ecc: Fix two bugs for the checkpoint of GUIDHess Chen
a) Fix a bug of displaying wrong format of a GUID b) Fix a bug of setting wrong exception keyword Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: YangX Li <yangx.li@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17710 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-25BaseTools/Ecc: Fix a bug in parserHess Chen
Fix a bug to not break when parsing a macro and not find its value Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: YangX Li <yangx.li@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17709 6f19259b-4bc3-4df7-8a09-765794883524