summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* SecurityPkg: AuthVariableLib: Customized SecureBoot Mode transition.Chao Zhang2015-12-075-268/+1912
| | | | | | | | | | | | | Implement Customized SecureBoot Mode transition logic according to Mantis 1263, including AuditMode/DeployedMode/PK update management. Also implement image verification logic in AuditMode. Image Certificate & Hash are recorded to EFI Image Execution Table. https://mantis.uefi.org/mantis/view.php?id=1263 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Zeng Star <star.zeng@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19133 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Add gEdkiiSecureBootModeGuid definitionChao Zhang2015-12-072-1/+6
| | | | | | | | | | | | | Add gEdkiiSecureBootModeGuid definition for Enable Secure Boot feature defined in UEFI2.5 Mantis 1263. It is a private variable GUID. https://mantis.uefi.org/mantis/view.php?id=1263 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Zeng Star <star.zeng@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19132 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: VarCheckUefiLib: Add DeployedMode/AuditMode var check logicChao Zhang2015-12-071-0/+22
| | | | | | | | | | | | DeployedMode & AuditMode are UINT8 Global variable according to Enable Secure Boot feature defined in UEFI2.5 Mantis 1263. Add them to var check list. https://mantis.uefi.org/mantis/view.php?id=1263 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Zeng Star <star.zeng@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19131 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: Add AuditMode/DeployedMode name definitionChao Zhang2015-12-072-3/+20
| | | | | | | | | | | | Add AuditMode/DeployedMode definition from Enable Secure Boot feature defined in UEFI2.5 Mantis 1263. https://mantis.uefi.org/mantis/view.php?id=1263 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Zeng Star <star.zeng@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19130 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: DebugAssert enhancementBaraneedharan Anbazhagan2015-12-071-15/+36
| | | | | | | | | | | | | | If the assert happens in a library, then it's hard to determine which module using that library is generating that assert. Use gEfiCallerBaseName in DebugAssert to display the module name. In V2: Updated patch to use CopyMem instead of AsciiSPrint. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Baraneedharan Anbazhagan <anbazhagan@hp.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19129 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: DebugAssert enhancementBaraneedharan Anbazhagan2015-12-071-15/+36
| | | | | | | | | | | | | | If the assert happens in a library, then it's hard to determine which module using that library is generating that assert. Use gEfiCallerBaseName in DebugAssert to display the module name. V2: Updated code to use copy mem and ModuleNameSize calculation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Baraneedharan Anbazhagan <anbazhagan@hp.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19128 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: DebugAssert enhancementBaraneedharan Anbazhagan2015-12-074-4/+7
| | | | | | | | | | | | | If the assert happens in a library, then it's hard to determine which module using that library is generating that assert. Use gEfiCallerBaseName in DebugAssert to display the module name. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Baraneedharan Anbazhagan <anbazhagan@hp.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@19127 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: Add Ipmi2.0 definitions head file.Daocheng Bu2015-12-079-0/+2417
| | | | | | | | | | | | | | Add Ipmi2.0 definitions head file based on Ipmi category: App, Storage and etc. In V2, correct #include IndustryStandard/IpmiNetFnSensorEventDefinitions.h, and remove trailing space. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daocheng Bu <daocheng.bu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19125 6f19259b-4bc3-4df7-8a09-765794883524
* ArmVirtPkg: HighMemDxe: add memory space for the high memory nodesShannon Zhao2015-12-044-0/+163
| | | | | | | | | | | | | | | Here we add the memory space for the high memory nodes except the lowest one in FDT. So these spaces will show up in the UEFI memory map. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: rewrap at 79 chars, use NULL, print Status] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19124 6f19259b-4bc3-4df7-8a09-765794883524
* ArmVirtPkg: ArmVirtPlatformLib: find the lowest memory nodeShannon Zhao2015-12-041-13/+17
| | | | | | | | | | | | While QEMU NUMA support on ARM will introduce more than one /memory node in the device tree, it needs to find the lowest one and set PcdSystemMemorySize with the actual size of this memory node. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19123 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: Fix VS2015 warning C4459 in XenBusDxeLiming Gao2015-12-041-7/+7
| | | | | | | | | | | | warning C4459: declaration of 'xs' hides global declaration. Update code to rename local variable xs to xsp to be different. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19116 6f19259b-4bc3-4df7-8a09-765794883524
* CryptoPkg: Disable VS2015 warning C4311 in OpensslLibLiming Gao2015-12-041-1/+2
| | | | | | | | | | | Warning C4311: pointer truncation from 'type' to 'type'. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19115 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Fix VS2015 warning C4311 & C4312 in RegularExpressionDxeLiming Gao2015-12-044-39/+39
| | | | | | | | | | | | | warning C4311: pointer truncation from 'void *' to 'unsigned long' warning C4312: conversion from 'unsigned long' to 'void *' of greater size Update code to convert type to UINTN first, then convert it to other type. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Acked-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19114 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Fix VS2015 warning C4456 in RegularExpressionDxeLiming Gao2015-12-042-10/+10
| | | | | | | | | | | | warning C4456: declaration of 'q' hides previous local declaration. Update code to use the different local variable name. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Acked-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19113 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Fix VS2015 warning C4459 in DriverSampleDxeLiming Gao2015-12-041-36/+36
| | | | | | | | | | | warning C4459: declaration of 'PrivateData' hides global declaration. Update DriverSampleDxe to rename global variable name to be different. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19112 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: Disable VS2015 warning C4701 & C4703Liming Gao2015-12-042-6/+6
| | | | | | | | | | | C4701 & C4703 may cause false positive issues. They have been disabled in VS2013. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19111 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Fix wrong return status for Ifconfig.cJiaxin Wu2015-12-041-33/+69
| | | | | | | | | | | | | | | | The Ifconfig command handler tries to return an EFI_STATUS when the return type should be SHELL_STATUS. Cc: Cohen Eugene <eugene@hp.com> Cc: Carsey Jaben <jaben.carsey@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19110 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg: update RVCT assembly functions to use new RVCT_ASM_EXPORT macroEugene Cohen2015-12-0327-277/+156
| | | | | | | | | | | This has the effect of splitting assembly functions into their own sections so the linker can remove unused ones to save space. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@gmail.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19109 6f19259b-4bc3-4df7-8a09-765794883524
* ArmVirtPkg: use explicit KERNEL_BLOB_TYPE castArd Biesheuvel2015-12-031-1/+3
| | | | | | | | | | | | | The ARM RVCT compiler does not allow implicit casts between enumerated types and integer types. In this particular case, the STUB_FILE::Position member is overloaded as a KERNEL_BLOB_TYPE identifier, so it does not hurt to make that cast explicit. 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@19108 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: put missing empty lines at the end of some header filesArd Biesheuvel2015-12-033-3/+3
| | | | | | | | | | | Some compilers (like RVCT) reject input files that do not end in a newline. So add missing newlines to some SecurityPkg header files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19107 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: remove unreachable codeArd Biesheuvel2015-12-033-5/+0
| | | | | | | | | | | Some compilers (like RVCT) are finicky about unreachable code, so remove it. 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@19106 6f19259b-4bc3-4df7-8a09-765794883524
* IntelFrameworkModulePkg: remove unreachable codeArd Biesheuvel2015-12-031-1/+0
| | | | | | | | | | | Some compilers (like RVCT) are finicky about unreachable code, so remove it. 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@19105 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools PatchCheck.py: Support binary diffJordan Justen2015-12-031-0/+6
| | | | | | | | | | | This allows a patch with binary data that is generated with --binary to be parsed by the PatchCheck.py script. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19104 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Add VS2015 tool chain in tools_def.templateWang Yu2015-12-032-21/+536
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Yu <yu.wang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19101 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg/CpuS3DataDxe: Add more detailed description on GUID in INFJeff Fan2015-12-031-1/+1
| | | | | | | | | | | | | Add the GUID gEfiEndOfDxeEventGroupGuid usage description in more details in INF file. Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19100 6f19259b-4bc3-4df7-8a09-765794883524
* EmulatorPkg: Fix GCC49 build hang in PeiCoreJordan Justen2015-12-021-3/+3
| | | | | | | | | | | | | | | | | | | This is a port of 55e96f9c601781b8dc52c40747922f6ca3521f9e / r17902 to EmulatorPkg: commit 55e96f9c601781b8dc52c40747922f6ca3521f9e Author: Ruiyu Ni <ruiyu.ni@intel.com> Date: Thu Jul 9 08:55:23 2015 +0000 OvmfPkg: Fix GCC49 build hang in PeiCore Cc: Andrew Fish <afish@apple.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Fixes: https://github.com/tianocore/edk2/issues/24 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19099 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg RVCT: add asm macro combining EXPORT, AREA and label definitionEugene Cohen2015-12-021-0/+29
| | | | | | | | | | | | | | In response to Leif's request earlier, this adds a new RVCT assembler macro to centralize the exporting of assembly functions including the EXPORT directive (so the linker can see it), the AREA directive (so it's in its own section for code size reasons) and the function label itself. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19098 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools RVCT: add preprocessor preinclude for AutoGen.hEugene Cohen2015-12-021-1/+1
| | | | | | | | | | | Ensure that AutoGen.h is force-included when the RVCT preprocessor is invoked. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19097 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg/CpuMpPei: Fix typo and add some commentsJeff Fan2015-12-021-2/+5
| | | | | | | | | | Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19090 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg/CpuMpPei: Save/Restore CRx/DRx register for APs waking upJeff Fan2015-12-021-0/+10
| | | | | | | | | | | | | | | PeiStartupAllAPs()/PeiStartupThisAP() will send INIT-SIPI-SIPI to wakeup APs to execute AP function. However, some registers will be reset after APs received INIT IPI. We need to restore some registers (For example, CRx/DRx) manually after APs wakeup. Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19089 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg/CpuMpPei: Sync BSP's CRx to APs when initializationJeff Fan2015-12-021-0/+5
| | | | | | | | | | | | Save BSP's volatile register and sync CRx register to APs when AP 1st wake up. Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19088 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg/CpuMpPei: Set AP state to CpuStateIdle after initializationJeff Fan2015-12-021-4/+6
| | | | | | | | | | Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19087 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg/CpuMpPei: Add CPU_VOLATILE_REGISTERS & worker functionsJeff Fan2015-12-022-0/+80
| | | | | | | | | | | | | | | | | Add CPU_VOLATILE_REGISTERS definitions for CRx and DRx required to be restored after APs received INIT IPI. Add worker functions SaveVolatileRegisters()/RestoreVolatileRegisters() used to save/restore CRx and DRx. It also check if Debugging Extensions supported or not. Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19086 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg/CpuMpPei: Exchange whole CPU data in SortApicId()Jeff Fan2015-12-021-6/+8
| | | | | | | | | | | | | Current implementation only exchanges the APIC ID and BIST, this updating is to exchange all CPU data. Cc: Feng Tian <feng.tian@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@Intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19085 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg: Convert whole-cache InvalidateInstructionCache to just ASSERTEugene Cohen2015-12-011-1/+1
| | | | | | | | | | | | | | | | | | In SVN 18756 ("disallow whole D-cache maintenance operations") InvalidateInstructionCache was modified to remove the full data cache clean but left the full instruction cache invalidate. The change was made to address issues in the set/way clean methodology but the resulting code could lead someone to a painful debug. If a component called this function, the proper code would not be flushed to the PoU, since the intent of this function is not only to invalidate the I-cache but to provide coherency after code loading / modification. This change simply places an ASSERT(FALSE) in this function to avoid this hazard. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19084 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/BootLogoLib: Fix INF comments to follow coding standardsRuiyu Ni2015-12-011-6/+6
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19083 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/BmpImageDecoderLib: Fix function header commentsRuiyu Ni2015-12-011-4/+4
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19082 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Clean some coding style issuesYonghong Zhu2015-12-0128-557/+557
| | | | | | | | | | This patch clean some coding style issues, majorly for space character. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19080 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/NvmExpressDxe: Fix wrong logic in GetControllerName()Anbazhagan, Baraneedharan2015-12-011-1/+1
| | | | | | | | | | | | | NvmExpressComponentNameGetControllerName returns EFI_UNSUPPORTED if child handle is passed. gEfiNvmExpressPassThruProtocolGuid needs to be passed to EfiTestChildHandle instead of gEfiPciIoProtocolGuid. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Anbazhagan, Baraneedharan" <anbazhagan@hp.com> Reviewed-by: "Tian, Feng" <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19071 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: replace README fine print about X64 SMM S3 with PlatformPei checkLaszlo Ersek2015-11-303-5/+24
| | | | | | | | | | | | | | | | | | At the moment, the "UefiCpuPkg/Universal/Acpi/S3Resume2Pei" module doesn't support S3 resume if the platform has SMM enabled and the PEI phase is built for X64. We document this in the README, but it is not conspicuous enough. Replace the "fine print" in the README with a runtime check in PlatformPei. Cc: Jordan Justen <jordan.l.justen@intel.com> Suggested-by: 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19070 6f19259b-4bc3-4df7-8a09-765794883524
* CorebootPayloadPkg PlatformHookLib: Fix GCC build failureStar Zeng2015-11-301-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Add return status check to fix GCC build failure below. error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((_gPcd_BinaryPatch_PcdSerialUseMmio = (Value)), RETURN_SUCCESS) error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((_gPcd_BinaryPatch_PcdSerialRegisterBase = (Value)), RETURN_SUCCESS) http://article.gmane.org/gmane.comp.bios.edk2.devel/4949 Cc: Maurice Ma <maurice.ma@intel.com> Cc: Prince Agyeman <prince.agyeman@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Suggested-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19069 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg/PiSmmCpu: Always set WP in CR0Yao, Jiewen2015-11-304-4/+4
| | | | | | | | | | | | | | | | | | | | | | | So that we can use write-protection for code later. It is REPOST. It includes suggestion from Michael Kinney <michael.d.kinney@intel.com>: - "For IA32 assembly, can we combine into a single OR instruction that sets both page enable and WP?" - "For X64, does it make sense to use single OR instruction instead of 2 BTS instructions as well?" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Suggested-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Cc: "Fan, Jeff" <jeff.fan@intel.com> Cc: "Kinney, Michael D" <michael.d.kinney@intel.com> Cc: "Laszlo Ersek" <lersek@redhat.com> Cc: "Paolo Bonzini" <pbonzini@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19068 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg/PiSmmCpu: Always set RW+P bit for page table by defaultYao, Jiewen2015-11-307-26/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | So that we can use write-protection for code later. This is REPOST. It includes the bug fix from "Paolo Bonzini" <pbonzini@redhat.com>: Title: fix generation of 32-bit PAE page tables "Bits 1 and 2 are reserved in 32-bit PAE Page Directory Pointer Table Entries (PDPTEs); see Table 4-8 in the SDM. With VMX extended page tables, the processor notices and fails the VM entry as soon as CR0.PG is set to 1." And thanks "Laszlo Ersek" <lersek@redhat.com> to validate the fix. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Signed-off-by: "Paolo Bonzini" <pbonzini@redhat.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Cc: "Fan, Jeff" <jeff.fan@intel.com> Cc: "Kinney, Michael D" <michael.d.kinney@intel.com> Cc: "Laszlo Ersek" <lersek@redhat.com> Cc: "Paolo Bonzini" <pbonzini@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19067 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: README: document SMM statusLaszlo Ersek2015-11-301-0/+57
| | | | | | | | | Cc: Paolo Bonzini <pbonzini@redhat.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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19066 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: pull in SMM-based variable driver stackLaszlo Ersek2015-11-306-12/+90
| | | | | | | | | | | | | | | | | | | | | | | | When -D SMM_REQUIRE is given, replace both - OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf and - OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf with - OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf. The outermost (= runtime DXE driver) VariableSmmRuntimeDxe enters SMM, and the rest: - the privileged half of the variable driver, VariableSmm, - the fault tolerant write driver, FaultTolerantWriteSmm, - and the FVB driver, FvbServicesSmm, work in SMM purely. We also resolve the BaseCryptLib class for DXE_SMM_DRIVER modules, for the authenticated VariableSmm driver's sake. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19065 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: consolidate variable driver stack in DSC and FDF filesLaszlo Ersek2015-11-306-42/+66
| | | | | | | | | | | | | | | | | | | | | | | | The following modules constitute the variable driver stack: - QemuFlashFvbServicesRuntimeDxe and EmuVariableFvbRuntimeDxe, runtime alternatives for providing the Firmware Volume Block(2) Protocol, dependent on qemu pflash presence, - FaultTolerantWriteDxe, providing the Fault Tolerant Write Protocol, - MdeModulePkg/Universal/Variable/RuntimeDxe, independently of -D SECURE_BOOT_ENABLE, providing the Variable and Variable Write Architectural Protocols. Let's move these drivers closer to each other in the DSC and FDF files, so that we can switch the variable driver stack to SMM with more local changes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19064 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFlashFvbServicesRuntimeDxe: adhere to -D SMM_REQUIRELaszlo Ersek2015-11-305-0/+11
| | | | | | | | | | | | | | When the user requires "security" by passing -D SMM_REQUIRE, and consequently by setting PcdSmmSmramRequire, enforce flash-based variables. Furthermore, add two ASSERT()s to catch if the wrong module were pulled into the build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19063 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFlashFvbServicesRuntimeDxe: add DXE_SMM_DRIVER buildLaszlo Ersek2015-11-302-0/+155
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19062 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: build PiSmmCpuDxeSmm for -D SMM_REQUIRELaszlo Ersek2015-11-306-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | At this point we can enable building PiSmmCpuDxeSmm. CPU specific features, like SMRR detection, and functions that are used to initialize SMM and process SMIs, are abstracted through the SmmCpuFeaturesLib class for the PiSmmCpuDxeSmm module. Resolve it to our own implementation under OvmfPkg -- it allows PiSmmCpuDxeSmm to work with QEMU's and KVM's 64-bit state save map format, which follows the definition from AMD's programmer manual. SmmCpuPlatformHookLib provides platform specific functions that are used to initialize SMM and process SMIs. Resolve it to the one Null instance provided by UefiCpuPkg, which is expected to work for most platforms. Cc: Paolo Bonzini <pbonzini@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> [pbonzini@redhat.com: resolve the SmmCpuFeaturesLib class to OVMF's own instance] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19061 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: build CpuS3DataDxe for -D SMM_REQUIRELaszlo Ersek2015-11-306-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PiSmmCpuDxeSmm driver from UefiCpuPkg depends on the ACPI_CPU_DATA structure -- created by a platform- and CPU-specific driver -- in order to support ACPI S3. The address of this structure is communicated through the dynamic PCD PcdCpuS3DataAddress. The "UefiCpuPkg/Include/AcpiCpuData.h" header file documents the fields of this structure in detail. The simple/generic "UefiCpuPkg/CpuS3DataDxe" driver creates and populates the structure in a conformant way, and it co-operates well with PiSmmCpuDxeSmm, for OVMF's purposes. PlatformBdsLib CpuS3DataDxe PiSmmCpuDxeSmm S3Resume2Pei (DXE_DRIVER) (DXE_DRIVER) (DXE_SMM_DRIVER) (PEIM) -------------- --------------- ---------------- -------------- normal collects data boot except MTRR settings into ACPI_CPU_DATA sets PcdCpuS3Da... signals End-of-Dxe | +----------> collects MTRR settings into ACPI_CPU_DATA installs [Dxe]Smm ReadyToLock | +---------------------------> fetches PcdCpuS3Dat... copies ACPI_CPU_DATA into SMRAM runtime S3 suspend S3 transfers resume control to PiSmmCpuDxe... | uses <----+ ACPI_CPU_DATA from SMRAM Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19060 6f19259b-4bc3-4df7-8a09-765794883524