summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CryptoPkg/BaseCryptLib: Use accessor functions for ASN1_OBJECTDavid Woodhouse2015-10-292-3/+10
| | | | | | | | | | | | | | | | | OpenSSL 1.1 introduces new OBJ_get0_data() and OBJ_length() accessor functions and makes ASN1_OBJECT an opaque type. Unlike the accessors in previous commits which *did* actually exist already but just weren't mandatory, these don't exist in older versions of OpenSSL. So introduce macros which do the right thing, for compatibility. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18701 6f19259b-4bc3-4df7-8a09-765794883524
* CryptoPkg/BaseCryptLib: Use accessor functions for X509_ATTRIBUTEDavid Woodhouse2015-10-291-3/+11
| | | | | | | | | | | | | | | | In OpenSSL 1.1, the X509_ATTRIBUTE becomes an opaque structure and we will no longer get away with accessing its members directly. Use the accessor functions X509_ATTRIBUTE_get0_object0() and X509_ATTRIBUTE_get0_type() instead. Also be slightly more defensive about unlikely failure modes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18700 6f19259b-4bc3-4df7-8a09-765794883524
* CryptoPkg/BaseCryptLib: Use i2d_X509_NAME() instead of abusing X509_NAMEDavid Woodhouse2015-10-291-4/+6
| | | | | | | | | | | | | In OpenSSL 1.1, the X509_NAME becomes an opaque structure and we will no longer get away with accessing its members directly. Use i2d_X509_NAME() instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18699 6f19259b-4bc3-4df7-8a09-765794883524
* CryptoPkg/BaseCryptLib: Add missing OpenSSL includesDavid Woodhouse2015-10-294-4/+7
| | | | | | | | | | | | | | OpenSSL 1.1 has cleaned up its include files a little, and it will now be necessary to directly include things like <openssl/bn.h> if we want to use them, rather than assuming they are included indirectly from other headers. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18698 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg: Add EFIAPI to several Ebl functionsThomas Palmer2015-10-2912-0/+46
| | | | | | | | | | | | | The EFIAPI function declaration is missing for several functions in the EmbeddedPkg/Ebl directory. A few function pointer struct members expect EFIAPI though and GCC46/X64 will fail to compile the directory without them. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18697 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Do not dump NULL padding resource descriptorRuiyu Ni2015-10-291-0/+4
| | | | | | | | | | | | | | | | | | | | Add a check for ResourcePaddingDescriptors being a valid pointer in DumpPpbPaddingResource() to prevent looping on memory not owned by PciBusDxe. The ResourcePaddingDescriptors is initialized to NULL when the PCI_IO_DEVICE structure is allocated and remains NULL if no PCI hot plug controllers are present. This issue is only observed when DEBUG_CODE() macros are enabled and was introduced by the following patch: [edk2] [Patch] MdeModulePkg: Fix a PciBusDxe hot plug bug SVN revsion 18658 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Kinney Michael <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18696 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg SmbiosMeasurementDxe: Correct the commentsStar Zeng2015-10-292-6/+9
| | | | | | | | | | | | | 1. Correct the return comments of entrypoint function. 2. Add parameters' comments for MeasureSmbiosTable(). 3. Correct the Protocols and Guids usage comments in SmbiosMeasurementDxe.inf. 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18695 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg SmbiosMeasurementDxe: Remove the tailing whitespaceStar Zeng2015-10-292-14/+14
| | | | | | | | | 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18694 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg SmbiosMeasurementDxe: Use EFI_D_VERBOSE for internal dump functionsStar Zeng2015-10-291-9/+9
| | | | | | | | | | | | | Use EFI_D_VERBOSE instead of EFI_D_INFO in InternalDumpData() and InternalDumpHex(). And also add DEBUG_CODE wrapper to InternalDumpHex() call. It is to avoid the bother from the internal verbose debug information. 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18693 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg SmbiosMeasurementDxe: Add (VOID **) typecast for GCC build failureStar Zeng2015-10-291-1/+1
| | | | | | | | | Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18692 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg SmbiosMeasurementDxe: Use SMBIOS table and GUID correctlyStar Zeng2015-10-291-6/+14
| | | | | | | | | | | | 1. Smbios3Table used as SmbiosTable wrongly after SmbiosTable got from configuration table. 2. Use correct VendorGuid and VendorTable to measure. 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18691 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg: SmmCpuFeaturesLib: Add MSR_SMM_FEATURE_CONTROL supportMichael Kinney2015-10-281-0/+29
| | | | | | | | | | | | | | | | | Add support for the reading and writing MSR_SMM_FEATURE_CONTROL through the SmmCpuFeaturesIsSmmRegisterSupported(), SmmCpuFeaturesGetSmmRegister(), and SmmCpuFeaturesSetSmmRegister() functions. This MSR is supported if the Family/Model is 06_3C, 06_45, or 06_46. Cc: "Yao, Jiewen" <jiewen.yao@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18690 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Refine code by initializing local variable and adding ASSERT ↵Qiu Shumin2015-10-282-0/+3
| | | | | | | | | | | | | statement. Add ASSERT statement and initialize local variable to make code more readable. 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@18689 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg Variable: Move CacheVariable->InDeletedTransitionPtr NULL ↵Star Zeng2015-10-281-2/+2
| | | | | | | | | | | | | | | | pointer check This change is triggered by R18654 "Enhance variable performance by reading from existed memory cache" that changed the code to use CacheVariable to improve performance. So the CacheVariable->InDeletedTransitionPtr NULL pointer check needs to be moved to the place before it is been used. Cc: Shumin Qiu <shumin.qiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18688 6f19259b-4bc3-4df7-8a09-765794883524
* Publish FspHob to PEI Hob by default.Yao, Jiewen2015-10-272-0/+39
| | | | | | | | | | | | | because most platforms use such logic. PcdDataBaseHobGuid GuidHob is excluded because PCD database in FSP is different with the one in PEI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com> Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18687 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg: PiSmmCpuDxeSmm: Replace PcdSet## with PcdSet##SMichael Kinney2015-10-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | PcdSet## has no error status returned, then the caller has no idea about whether the set operation is successful or not. PcdSet##S were added to return error status and PcdSet## APIs were put in ifndef DISABLE_NEW_DEPRECATED_INTERFACES condition. To adopt PcdSet##S and further code development with DISABLE_NEW_DEPRECATED_INTERFACES defined, we need to Replace PcdSet## usage with PcdSet##S. Normally, DynamicDefault PCD set is expected to be success, but DynamicHii PCD set failure is a legal case. So for DynamicDefault, we add assert when set failure. For DynamicHii, we add logic to handle it. Cc: "Yao, Jiewen" <jiewen.yao@intel.com> Cc: Jeff Fan <jeff.fan@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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18686 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg/BaseSynchronizationLib: fix AArch64 return valuesHaojian Zhuang2015-10-271-0/+2
| | | | | | | | | | | | | | Fix the wrong return value of both InternalSyncIncrement() and InternalSyncDecrement(). The return value shouldn't be the address of input parameter. It should be the updated value of input parameter instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18685 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg:Add new API HiiGetFormSetFromHiiHandle into UefiHiiLibDandan Bi2015-10-272-0/+134
| | | | | | | | | | | This function is mainly through the Hii handle to get the formset opcode. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18684 6f19259b-4bc3-4df7-8a09-765794883524
* Vlv2TbltDevicePkg: Sync the branch changes to trunk.Tim He2015-10-2710-28/+28
| | | | | | | | | | | update some smbios string and macro name for MinnowBoard Turbot board. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tim He <tim.he@intel.com> Reviewed-by: David Wei <david.wei@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18682 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg SetupBrowserDxe: Save global variable values before nest ↵Eric Dong2015-10-272-4/+28
| | | | | | | | | | | | | | function called. The SendForm function can be called nest in it. This function also uses some global variables. So we must save global variable values before it been called again. Checked in the missing change for gBrowserFormSetList. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18681 6f19259b-4bc3-4df7-8a09-765794883524
* Move Smbios measurement from TCG driver to Smbios driver.Yao, Jiewen2015-10-275-0/+686
| | | | | | | | | | | | | | | | | | | This is patch to add smbios measurement. The problem of current SMBIOS measurement is: 1) TCG drivers do not support SMBIOS3.0 table. 2) TCG drivers do not follow TCG platform spec on: "Platform configuration information that is automatically updated, such as clock registers, and system unique information, such as asset numbers or serial numbers, MUST NOT be measured into PCR [1], or any other PCR." So we decide to move Smbios measurement from TCG drivers to Smbios driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zeng, Star" <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18680 6f19259b-4bc3-4df7-8a09-765794883524
* Fix issue that calling GetS3MemoryInfo() with wrong order.Yao, Jiewen2015-10-271-1/+1
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com> Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18679 6f19259b-4bc3-4df7-8a09-765794883524
* Do not deadloop if Microcode not found in FspTempRamInit.Yao, Jiewen2015-10-272-1/+21
| | | | | | | | | | | We do not consider microcode not found as critical error, because Microcode might be applied later. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com> Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18678 6f19259b-4bc3-4df7-8a09-765794883524
* Move Smbios measurement from TCG driver to Smbios driver.Yao, Jiewen2015-10-276-108/+3
| | | | | | | | | | | | | | | | | | | This is patch to remove smbios measurement in TCG driver. There will be other patch to add it in Smbios driver. The problem of current SMBIOS measurement is: 1) TCG drivers do not support SMBIOS3.0 table. 2) TCG drivers do not follow TCG platform spec on: "Platform configuration information that is automatically updated, such as clock registers, and system unique information, such as asset numbers or serial numbers, MUST NOT be measured into PCR [1], or any other PCR." So we decide to move Smbios measurement from TCG drivers to Smbios driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18677 6f19259b-4bc3-4df7-8a09-765794883524
* Add suppressif around TCG hash seleciton checkbox in TCG2Yao, Jiewen2015-10-273-1/+75
| | | | | | | | | | | | Previous TCG2 configuration UI always add all TCG defined hash algorithm to let user select which one need be used. This brings risk that user might select unsupported hash, and selection is rejected later. So we enhance to UI to hide unsupported hash algorithm. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18676 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools:remove the redundant directories for '-f' with absolute path.Yonghong Zhu2015-10-271-10/+15
| | | | | | | | | | | when the absolute path is given to '-f', it would create some redundant empty directories. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18675 6f19259b-4bc3-4df7-8a09-765794883524
* Move Smbios table MAX length definition to Mde header filer.Yao, Jiewen2015-10-272-12/+12
| | | | | | | | | | So that other module can also refer to them. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zeng, Star" <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18674 6f19259b-4bc3-4df7-8a09-765794883524
* UefiCpuPkg: PiSmmCpuDxeSmm: Remove unused references to SmmLibMichael Kinney2015-10-263-3/+0
| | | | | | | | | | | | | | | | | | | | The PiSmmCpuDxeSmm module does not use any services from the SmmLib. This change removes the SmmLib from PiSmmCpuDxeSmm module and also removes the lib mapping in the UefiCpuPkg DSC file because no other modules in the UefiCpuPkg use the SmmLib. Removal of SmmLib is now possible because the only API call to it, ClearSmi(), was ultimately removed from PiSmmCpuDxeSmm -- see the "BUGBUG" comment in git commit 529a5a86. Cc: "Yao, Jiewen" <jiewen.yao@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18673 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFlashFvbServicesRuntimeDxe: clean up includes and librariesLaszlo Ersek2015-10-264-26/+13
| | | | | | | | | | | | | | | | | Before introducing the SMM driver interface, clean up #include directives and [LibraryClasses] by: - removing what's not directly used (HobLib and UefiLib), - adding what's used but not spelled out (DevicePathLib), - sorting the result. This helps with seeing each source file's dependencies and with determining the library classes for the SMM driver. 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@18672 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFlashFvbServicesRuntimeDxe: split out runtime DXE specificsLaszlo Ersek2015-10-267-131/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for introducing an SMM interface to this driver, move the following traits to separate files, so that we can replace them in the new SMM INF file: - Protocol installations. The SMM driver will install protocol interfaces in the SMM protocol database, using SMM services. - Virtual address change handler and pointer conversions. SMM drivers run with physical mappings and pointers must not be converted. There are further restrictions and changes for an SMM driver, but the rest of the code either complies with those already, or will handle the changes transparently. For example: - SMM drivers have access to both UEFI and SMM protocols in their entry points (see the PI spec 1.4, "1.7 SMM Driver Initialization"), - MemoryAllocationLib has an SMM instance that serves allocation requests with the gSmst->SmmAllocatePool() service transparently, allocating runtime-marked SMRAM. 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@18671 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFlashFvbServicesRuntimeDxe: no dual addressing neededLaszlo Ersek2015-10-262-69/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the EFI_FW_VOL_INSTANCE and ESAL_FWB_GLOBAL structures declare the following entries as arrays, with two entries each: - EFI_FW_VOL_INSTANCE.FvBase[2] - ESAL_FWB_GLOBAL.FvInstance[2] In every case, the entry at subscript zero is meant as "physical address", while the entry at subscript one is meant as "virtual address" -- a pointer to the same object. The virtual address entry is originally initialized to the physical address, and then it is converted to the virtual mapping in FvbVirtualddressChangeEvent(). Functions that (a) read the listed fields and (b) run both before and after the virtual address change event -- since this is a runtime DXE driver -- derive the correct array subscript by calling the EfiGoneVirtual() function from UefiRuntimeLib. The problem with the above infrastructure is that it's entirely superfluous. EfiGoneVirtual() "knows" whether EFI has gone virtual only because the UefiRuntimeLib constructor registers the exact same kind of virtual address change callback, and the callback flips a static variabe to TRUE, and EfiGoneVirtual() queries that static variable. In effect this means for QemuFlashFvbServicesRuntimeDxe: "when there is a virtual address change, convert the entries with subscript one from physical to virtual, and from then on use the entries with subscript one". This would only make sense if QemuFlashFvbServicesRuntimeDxe ever needed the original (physical) addresses (ie. the entries with subscript zero) after the virtual address change, but that is not the case. Replace the arrays with single elements. The subscript zero elements simply disappear, and the single elements take the role of the prior subscript one elements. 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@18670 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFlashFvbServicesRuntimeDxe: remove FvbScratchSpace fieldLaszlo Ersek2015-10-262-3/+0
| | | | | | | | | | | | | | | The ESAL_FWB_GLOBAL.FvbScratchSpace array is never initialized (it contains garbage from AllocateRuntimePool()). Its element at subscript one (=FVB_VIRTUAL), containing garbage as well, is converted to virtual mapping. Then the array is never used again. Remove it. 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@18669 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFlashFvbServicesRuntimeDxe: remove FvbDevLock fieldLaszlo Ersek2015-10-262-2/+0
| | | | | | | | | | | The EFI_FW_VOL_INSTANCE.FvbDevLock member is initialized and then never used. Remove it. 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@18668 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFlashFvbServicesRuntimeDxe: fix VALID_ARCHITECTURES in INFLaszlo Ersek2015-10-261-1/+1
| | | | | | | | | | | We build this driver for X64 as well -- the comment isn't overly important, but it shouldn't be misleading. 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@18667 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFlashFvbServicesRuntimeDxe: rewrap source code to 79 charsLaszlo Ersek2015-10-266-292/+347
| | | | | | | | | | | | | | | | | | | Some of the line lengths in this driver are atrocious. While we have to put up with the status quo outside of OvmfPkg, we can at least rewrap this driver before refactoring it. In the FvbInitialize() function there's no way around introducing two local variables, just for the sake of sensibly rewrapping the code. Furthermore, in "FwBlockService.c" the function comment blocks are now indented; their original position causes diff to print bogus function names at the top of hunks. 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@18666 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuFlashFvbServicesRuntimeDxe: strip trailing whitespaceLaszlo Ersek2015-10-263-19/+19
| | | | | | | | 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@18665 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Fix 'EfiShellExecute' doesn't get command status correctly.Qiu Shumin2015-10-264-40/+125
| | | | | | | | | | | | | 1. Add a new function 'RunShellCommand' to return command status, thus 'EfiShellExecute' can get the command return status of 'CommandLine'. 2. Refine the code logic of 'EfiShellExecute' to make the new image of shell be loaded only if 'Environment' isn't NULL. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Signed-off-by: Jin Eric <eric.jin@intel.com> Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18664 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools: Add MultipleWorkspace.py in the common dependency.Liming Gao2015-10-261-0/+1
| | | | | | | | | | | Add new added MultipleWorkspace.py in the common dependency to freeze python tools for Windows. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18663 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Make the BmFindLoadOption function publicSunny Wang2015-10-264-27/+31
| | | | | | | | | | | Make the BmFindLoadOption function public Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sunny Wang <sunnywang@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18662 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools:added extern protocol/PPI/GUID definition in AutoGen for LibraryYonghong Zhu2015-10-261-15/+12
| | | | | | | | | | | | We already added the extern declaration for protocols/PPI/GUID in AutoGen.h file for driver, but missing this feature for the Library. so this patch add it. 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@18661 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg BaseExtractGuidedSectionLib: R15917 removed useful information wronglyStar Zeng2015-10-261-6/+9
| | | | | | | | | | | As the title, this patch is to add back the useful information. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18660 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Update 'tftp' command help output and error messagesTapan Shah2015-10-231-0/+0
| | | | | | | | | | | Changing 'tftp' command's help output .uni file to match other EDK2 Shell commands as well as adjusting error messages text. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18659 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Fix a PciBusDxe hot plug bugRuiyu Ni2015-10-234-102/+204
| | | | | | | | | | | | | | | For a hot plug bridge with device attached, PciBusDxe driver reserves the resources which equal to the total amount of padding resource returned from HotPlug->GetResourcePadding() and the actual occupied resource by the attached device. The behavior is incorrect. Correct behavior is to reserve the bigger one between the padding resource and the actual occupied resource. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18658 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Update UiApp to not display itselfRuiyu Ni2015-10-233-0/+14
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18657 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Update BootManagerMenuApp to not display itselfRuiyu Ni2015-10-232-2/+16
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18656 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: Add a new DxeServicesLib GetFileDevicePathFromAnyFv () functionShia Cinnamon2015-10-232-0/+199
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 From: Shia Cinnamon <cinnamon.shia@hpe.com> Signed-off-by: Wang Nickle <nickle.wang@hpe.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18655 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg Variable: Enhance variable performance by reading from existed ↵Derek Lin2015-10-232-34/+45
| | | | | | | | | | | | | | memory cache. Current variable driver already have memory cache to improve performance. Change the code which read from physical MMIO address to read from memory cache. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Derek Lin <derek.lin2@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18654 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Follow spec to remove the last '\' char in return name of GetCurDir().Qiu Shumin2015-10-2312-21/+91
| | | | | | | | | | | | | | | | | | In Shell spec 2.1 the return name of EFI_SHELL_PROTOCOL.GetCurDir() is defined as 'fs0:\current-dir' while in current implementation it's 'fs0:\current-dir\'. To follow spec the patch removed the redundant '\' char. Since it has been broken for a long time, some codes may depend on the broken behavior. After this change 'EFI_SHELL_PROTOCOL.GetCurDir()' and 'UefiShellLib.ShellGetCurrentDir()' will return a current directory string without tailing '\' (fs0:\current-dir), the value of Shell environment variable 'cwd' will become 'fs0:\current-dir' as well. This patch has updated all the code in EDKII to make them depend on the new behavior. Developers should check whether 'GetCurDir()' and 'ShellGetCurrentDir' are used in their source code. 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@18653 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/Scripts: Add PatchCheck.py scriptJordan Justen2015-10-221-0/+607
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script can be used to check some expected rules for EDK II patches. It only works on git formatted patches. It checks both the commit message and the lines that are added in the patch diff. In the commit message it verifies line lengths, signature formats, and the Contributed-under tag. In the patch, it checks that line endings are CRLF for all files that don't have a .sh extension. It verifies that no trailing whitespace is present and that tab characters are not used. Patch contributors should use this script prior to submitting their patches. Package maintainers can also use it to verify incoming patches. It can also be run by specifying a git revision list, so actual patch files are not always required. For example, to checkout this last 5 patches in your git branch you can run: python PatchCheck.py HEAD~5.. Or, a shortcut (like git log): python PatchCheck.py -5 The --oneline option works similar to git log --oneline. The --silent option enables silent operation. The script supports python 2.7 and python 3. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Erik Bjorge <erik.c.bjorge@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18652 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: XenPvBlkDxe: handle empty cdrom drivesStefano Stabellini2015-10-211-0/+15
| | | | | | | | | | | | | | Empty cdroms are not going to connect, avoid waiting for the backend to switch to state 4, which is never going to happen, and return error instead from XenPvBlockFrontInitialization(). Detect an empty cdrom by looking at the "params" node on xenstore, which is set to "" or "aio:" for empty drives by libxl. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18651 6f19259b-4bc3-4df7-8a09-765794883524