summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* SourceLevelDebugPkg: Change the debug message to "v1.5" from "v1.4"Ruiyu Ni2015-09-241-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18534 6f19259b-4bc3-4df7-8a09-765794883524
* ArmVirtPkg: reduce preallocation of boot services data pagesArd Biesheuvel2015-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | Commit SVN r18503 ("MdeModulePkg DxeCore: Take the range in resource HOB for PHIT as higher priority") changed the GCD init logic to take the sum of the region sizes in gMemoryTypeInformation[] into account when estimating the minimal amount of memory needed to boot the system. Unfortunately, as an unintended side effect, this change results in boot failures of ArmVirtQemu when running with QEMU's default memory size of 128 MB. The reason is that the sum of the gMemoryTypeInformation region sizes plus the size of the inital PEI region exceeds 128 MB. Since we do not actually need to preallocate 20,000 pages' worth of BootServicesData memory, reduce this figure to the more reasonable 12,000. Reported-by: Mark Rutland <mark.rutland@arm.com> 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@18533 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: enable SATA controllerReza Jelveh2015-09-226-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, we replace the traditional IDE driver stack that comes from PcAtChipsetPkg and IntelFrameworkModulePkg with more featureful drivers from OvmfPkg and MdeModulePkg. The resultant driver stack is compatible with the previous one, but provides more protocols, on more kinds of virtual hardware. Remove: - PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerDxe.inf (removing EFI_IDE_CONTROLLER_INIT_PROTOCOL [1]) Remove the dependent: - IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf (removing EFI_DISK_INFO_PROTOCOL [2], EFI_BLOCK_IO_PROTOCOL [3]) As replacement, add: - OvmfPkg/SataControllerDxe/SataControllerDxe.inf (supplying EFI_IDE_CONTROLLER_INIT_PROTOCOL [1]) On top of which, add the dependent: - MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf (providing EFI_ATA_PASS_THRU_PROTOCOL, EFI_EXT_SCSI_PASS_THRU_PROTOCOL) On top of which, add the dependent: - MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf (supplying EFI_DISK_INFO_PROTOCOL [2], EFI_BLOCK_IO_PROTOCOL [3], providing EFI_BLOCK_IO2PROTOCOL, EFI_STORAGE_SECURITY_COMMAND_PROTOCOL) Cc: Alexander Graf <agraf@suse.de> Cc: Reza Jelveh <reza.jelveh@tuhh.de> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Gabriel L. Somlo <somlo@cmu.edu> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Reza Jelveh <reza.jelveh@tuhh.de> [lersek@redhat.com: rewrote commit message] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18532 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: QemuBootOrderLib: recognize Q35 SATA disks / CD-ROMsLaszlo Ersek2015-09-221-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenFirmware device paths that QEMU generates for these disks and CD-ROMs are very similar to those generated for the i440fx IDE disks and CD-ROMs (including the same number of devpath nodes necessary for unique parsing). The interpretations and the translation to UEFI devpath fragments are different, of course. (The spaces after "ide@1,1" are inserted below only for illustration purposes.) primary or secondary | master or slave v v i440fx IDE: /pci@i0cf8/ide@1,1 /drive@0/disk@0 Q35 SATA: /pci@i0cf8/pci8086,2922@1f,2/drive@1/disk@0 ^ ^ | device number | (fixed 0) channel (port) number The similarity is reflected in the translation output (spaces again inserted for illustration only): i440fx IDE: PciRoot(0x0)/Pci(0x1,0x1) /Ata(Primary,Master,0x0) Q35 SATA: PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0x0,0x0) ^ ^ ^ | | LUN; | | always 0 on Q35 | port multiplier port | number; always 0 on Q35 channel (port) number Cc: Alexander Graf <agraf@suse.de> Cc: Reza Jelveh <reza.jelveh@tuhh.de> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Gabriel L. Somlo <somlo@cmu.edu> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18531 6f19259b-4bc3-4df7-8a09-765794883524
* PcAtChipsetPkg: IdeControllerDxe: fix protocol usage hints in the INF fileLaszlo Ersek2015-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | IdeControllerDxe installs EFI_IDE_CONTROLLER_INIT_PROTOCOL interface(s), and consumes PciIo. The comments in the INF file state the opposite at the moment, fix them. Cc: Alexander Graf <agraf@suse.de> Cc: Reza Jelveh <reza.jelveh@tuhh.de> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Gabriel L. Somlo <somlo@cmu.edu> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18530 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: AtaAtapiPassThru: select master/slave around DIAG commandReza Jelveh2015-09-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some IDE controllers only update ID fields such as sector information on specific commands such as the DIAG command. The master/slave device is therefore selected both before and after sending the DIAG command; otherwise reading the IDE registers yields the master's ID fields. (Reza's patch originally *moved* the master/slave selection from after the DIAG command before it, however Feng asked for the original master/slave select to be preserved; effectively making the master/slave select *bracket* the DIAG command. See this subthread: <http://thread.gmane.org/gmane.comp.bios.tianocore.devel/10545/focus=10550>.) Cc: Alexander Graf <agraf@suse.de> Cc: Reza Jelveh <reza.jelveh@tuhh.de> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Gabriel L. Somlo <somlo@cmu.edu> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Reza Jelveh <reza.jelveh@tuhh.de> [feng.tian@intel.com: see above] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> [lersek@redhat.com: updated commit message] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18529 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: SataControllerDxe: enable IO / mem access and DMA when bindingLaszlo Ersek2015-09-222-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we bind the SATA controller in SataControllerStart(), we read the NP ("Number of Ports") bitfield from the CAP ("HBA Capabilities") register of the controller. (See the AHCI 1.3.1 spec.) This register is memory mapped. If we'd like to access it, we must at least enable memory space access for the device. In addition, Feng Tian recommended enabling Bus Master DMA in <http://thread.gmane.org/gmane.comp.bios.tianocore.devel/10545/focus=10659>. We also enable IO space access for completeness. Further, because we change the PCI attributes of the device with the above when binding it, we must also restore its original PCI attributes when unbinding it. See the Driver Writer's Guide for UEFI 2.3.1 v1.01, section 18.3 "PCI drivers" | 18.3.2 "Start() and Stop()". (OvmfPkg's copy of SataControllerDxe differs from the same in DuetPkg because Duet inherits a pre-configured SATA controller from the BIOS, as explained by Feng. Technically, DuetPkg's SataControllerDxe could also apply the technique seen in this patch.) Cc: Alexander Graf <agraf@suse.de> Cc: Reza Jelveh <reza.jelveh@tuhh.de> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Gabriel L. Somlo <somlo@cmu.edu> Cc: Feng Tian <feng.tian@intel.com> Suggested-by: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18528 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: SataControllerDxe: add cascading error handling to Start()Laszlo Ersek2015-09-221-27/+32
| | | | | | | | | | | | | | | | | | | | | | In the next patch we'll add another PCI operation to SataControllerStart(), which, on error, has to be rolled back similarly to other actions already being done in SataControllerStart(). Since that PCI operation won't provide a non-NULL pointer on success, its rollback isn't really suitable for the current error handling in SataControllerStart(). Employ the traditional cascading labels instead. Cc: Alexander Graf <agraf@suse.de> Cc: Reza Jelveh <reza.jelveh@tuhh.de> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Gabriel L. Somlo <somlo@cmu.edu> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18527 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: copy SataControllerDxe from DuetPkgReza Jelveh2015-09-224-0/+1816
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Edk2 maintainers reached the consensus that SataControllerDxe was inherently platform specific, for which reason it was not appropriate for either PcAtChipsetPkg nor MdeModulePkg. Hence, if OvmfPkg wanted to use it, it should either reference it directly from under DuetPkg, or copy it. Given that DuetPkg is another "leaf" platform in edk2, and that in the upcoming patches we'll actually modify the driver, the ultimate decision (reached months ago on the list, after Reza's v2 posting) is that OvmfPkg shall copy the driver. This patch does that; the only difference being a fresh FILE_GUID in the INF file. Cc: Alexander Graf <agraf@suse.de> Cc: Reza Jelveh <reza.jelveh@tuhh.de> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Gabriel L. Somlo <somlo@cmu.edu> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Reza Jelveh <reza.jelveh@tuhh.de> [lersek@redhat.com: updated commit message, generated fresh FILE_GUID] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18526 6f19259b-4bc3-4df7-8a09-765794883524
* DuetPkg: SataControllerDxe: fix private array subscriptingLaszlo Ersek2015-09-221-7/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each one of the DisqualifiedModes, IdentifyData and IdentifyValid arrays in the EFI_SATA_CONTROLLER_PRIVATE_DATA structure is a matrix, represented as a flat array. The code currently uses the incorrect formula Channel * Device to index them. The right formula is [Channel][Device] which can be implemented as Channel * NumDevicePerChannel + Device Add a helper function that does this, and replace the incorrect subscripts. Cc: Alexander Graf <agraf@suse.de> Cc: Reza Jelveh <reza.jelveh@tuhh.de> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Gabriel L. Somlo <somlo@cmu.edu> Cc: Feng Tian <feng.tian@intel.com> Reported-by: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18525 6f19259b-4bc3-4df7-8a09-765794883524
* DuetPkg: SataControllerDxe: fix typo in "DisqulifiedModes"Laszlo Ersek2015-09-222-12/+12
| | | | | | | | | | | | | | | | Cc: Alexander Graf <agraf@suse.de> Cc: Reza Jelveh <reza.jelveh@tuhh.de> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Gabriel L. Somlo <somlo@cmu.edu> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Tested-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18524 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Fix typos in some EFI_HTTP_STATUS_CODE definitionsSamer El-Haj-Mahmoud2015-09-212-4/+5
| | | | | | | | | | Fix spelling typos in EFI_HTTP_STATUS_CODE definitions for error 415 and 501. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18521 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: Http.h - Add HttpMethodMax to EFI_HTTP_METHOD.Samer El-Haj-Mahmoud2015-09-211-1/+3
| | | | | | | | | | | Add HttpMethodMax enum value to EFI_HTTP_METHOD to make it easier to iterate through the HTTP methods using a loop. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18520 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: Add RngLib into MdePkgQin Long2015-09-216-0/+272
| | | | | | | | | | | | | | Add one library class (RngLib.h) with three GetRandomNumber16/32/64 APIs to provide random number generator services, and one library instance (BaseRngLib), based on Intel RdRand instruction access, to provide high-quality random numbers generator. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long <qin.long@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18519 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg: Add CPU RdRand access APIs for random number generationQin Long2015-09-216-0/+386
| | | | | | | | | | | | Add AsmRdRand16/32/64 APIs for RdRand instruction access to generate high-quality random number. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long <qin.long@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18518 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Remove event from protocol database only if registeredSamer El-Haj-Mahmoud2015-09-213-6/+19
| | | | | | | | | | | | | | | | | | In a CloseEvent, an UnregisterProtocolNotify is done unconditionally. There is a penalty associated with searching the protocol database on every CloseEvent and impacts performance, especially during Network IO. Unregister needs to be done only if the Event is for a RegisterProtocolNotify. So extend the ExFlag in IEVENT to a UINT8 and define new flags that can be set to indicate if the Event is part of a group, or registered on a protocol notify. Then in CloseEvent, call UnregisterProtocolNotify only if the register protocol notify flag is set. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18517 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/Core/Dxe/Gcd: remove set but not used variablesLaszlo Ersek2015-09-211-6/+0
| | | | | | | | | | | | | | These trip up compilation with gcc. Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18515 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg/build.sh: Use GCC49 toolchain with GCC 5.*Jordan Justen2015-09-181-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18514 6f19259b-4bc3-4df7-8a09-765794883524
* ArmVirtPkg: PlatformIntelBdsLib: signal ReadyToBoot on direct kernel bootLaszlo Ersek2015-09-182-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | According to the UEFI spec, EFI_EVENT_GROUP_READY_TO_BOOT "is notified by the system when the Boot Manager is about to load and execute a boot option". ArmVirtPkg doesn't do this currently when launching a kernel from the QEMU command line. OvmfPkg does (see git commit 28a34033ee). At least two edk2-wide callbacks are worth mentioning: - OnReadyToBoot() in "MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c" performs variable reclaim and (optionally) installs variable usage statistics as a vendor config table; - OnReadyToBoot() in "SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c" installs the image execution info table if it doesn't exist yet, in SecureBoot-enabled builds. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18513 6f19259b-4bc3-4df7-8a09-765794883524
* ShellBinPkg: Ia32/X64 Shell binary update. Qiu Shumin2015-09-185-1/+1
| | | | | | | | | The binaries of ShellBinPkg are generated with ShellPkg project 18507. The binaries are built with no debug information by building with "RELEASE" target. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18511 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Added SMBIOS 2.8 Type 17 changes to smbiosviewSamer El-Haj-Mahmoud2015-09-181-1/+7
| | | | | | | | | | Updated smbiosview to decode SMBIOS Type 17 MinimumVoltage, MaximumVoltage, and ConfiguredVoltage Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18507 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Added SMBIOS 3.0 support in dmem.Samer El-Haj-Mahmoud2015-09-181-1/+6
| | | | | | | | | | Added SMBIOS 3.0 support in dmdem Shell command since SMBIOS 3.0 uses a different GUID in the System Configuration Table. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18506 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg DxeCore: Take the range in resource HOB for PHIT as higher priorityStar Zeng2015-09-181-68/+95
| | | | | | | | | | | | | | | | | | | Take the range in the resource descriptor HOB for the memory region described by the PHIT as higher priority if it is big enough. It can make the memory bin allocated to be at the same memory region with PHIT that has more better compatibility to avoid memory fragmentation for some code practices assume and allocate <4G ACPI memory. Also let the minimal memory size needed include the total memory bin size needed to make sure memory bin could be allocated successfully. Cc: Jiewen Yao <jiewen.yao@intel.com> 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: 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@18503 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Fix GCC build fail and code refine.Qiu Shumin2015-09-181-11/+23
| | | | | | | | | | | | 1. Fix GCC build fail. 2. It's not correct to cast away constness to allow TrimSpaces() to modify 'commandline'. This patch makes a copy of 'commandLine' and work with that in the remainder of the function. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18500 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg DxeCore: Relocate HOB List after other tested memory resources ↵Star Zeng2015-09-171-12/+53
| | | | | | | | | | | | | | | | | | | | | added The HOB List relocation should be at after all the tested memory resources added (except the memory space that covers HOB List) to the memory services, because the memory resource found in CoreInitializeMemoryServices() may have not enough remaining resource for HOB List. And the memory space that covers HOB List should be processed after HOB List relocation to avoid the resources allocated by others to corrupt HOB List before its relocation. Cc: Jiewen Yao <jiewen.yao@intel.com> 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: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18499 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg:Fix the bug the incorrect change of StrCpyS functionDandan Bi2015-09-172-46/+23
| | | | | | | | | | | The pointer to the destination string changed,the max length also changed.Previous change neglect this point. And base on the code logic,we can use StrCatS to replace StrCpyS.Now this patch is to fix this bug. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18497 6f19259b-4bc3-4df7-8a09-765794883524
* MdePkg/SmmServicesTableLib: Return TRUE in InSmm ()Jeff Fan2015-09-171-21/+9
| | | | | | | | | | | SmmServicesTableLib instance only supports DXE_SMM_DRIVER type drivers that will be loaded into SMM range. InSmm() could return TRUE directly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18495 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Fix Shell fail when execute command in ShellProtocol.Execute().Yang Jadis2015-09-171-1/+1
| | | | | | | | | | | | When execute a command with tailing blank spaces in ShellProtocol.Execute() Shell will fail. This patch move the TrimSpaces operation into ParseCommandLineToArgs function to fix the problem. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yang Jadis <jadis.yang@intel.com> 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@18491 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/HiiDatabase: Refine KeywordHandlerProtocol->SetData().Eric Dong2015-09-171-4/+12
| | | | | | | | | | Update this function to follow UEFI spec requirement. 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@18490 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/HiiDatabase: Refine KeywordHandlerProtocol->GetData().Eric Dong2015-09-171-7/+16
| | | | | | | | | | Update this function to follow UEFI spec requirement. 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@18489 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg/HiiDatabase: Fix Progress not point to the correct place issue.Eric Dong2015-09-171-3/+7
| | | | | | | | 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@18488 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Fix connection issue after correct SPD and re-enable IPsecJiaxin Wu2015-09-161-6/+1
| | | | | | | | | | | | | | | | This patch is used to fix connection failure issue after correct the SPD and re-enable IPsec. The driver should not update the SadEntry's SpdSelector when doing SpdEntry modification. SadEntry's SpdSelector may not equal to this edited SpdEntry’s Selector. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18484 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: TrafficDirection not saved in IPsecConfig.Fu Siyuan2015-09-162-6/+9
| | | | | | | | | | Fix a bug that the TrafficDirection field is not saved in IPsecConfig.SetData. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18483 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Enhance the NULL pointer check before dereference it.Fu Siyuan2015-09-161-1/+2
| | | | | | | | | | | This patch enhances the NULL pointer check of the HttpInstance->RemoteHost pointer before dereference it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18482 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Fix a command line unicode string type.Samer El-Haj-Mahmoud2015-09-161-2/+3
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18480 6f19259b-4bc3-4df7-8a09-765794883524
* Nt32Pkg: Fix PlatformBootManagerLib to respect PcdShellFile.Ruiyu Ni2015-09-162-6/+4
| | | | | | | | | | | Fix the code to use PcdShellFile instead of using hard code GUID which always points to new UEFI shell. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Jin <eric.jin@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18478 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Reduce verbosity of TPM DEBUG messagesSamer El-Haj-Mahmoud2015-09-164-29/+33
| | | | | | | | | | | | Some of the TPM/TPM2 DEBUG messages are at EFI_D_INFO level, even though they are simply tracing functions that run on every boot even if there is no TPM installed. Changed verbosity to EFI_D_VERBOSE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Samer El-Haj-Mahmoud" <samer.el-haj-mahmoud@hpe.com> Reviewed-by: "Jiewen Yao" <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18476 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Enhance PCI capability looking up logic to avoid hangRuiyu Ni2015-09-151-0/+8
| | | | | | | | | | | Certain PCI device may have capability pointing to itself. Update LocateCapabilityRegBlock() to break when detecting such loop. 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@18473 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: disable no-exec DXE stack by defaultLaszlo Ersek2015-09-153-3/+3
| | | | | | | | | | | | | | | | | | | (PcdSetNxForStack == TRUE) breaks a number of GRUB versions that, it turns out, are still widely in use. Disable PcdSetNxForStack by default for now. QEMU users can enable it dynamically using the micro-feature added in the previous patch. Reported-by: Anthony Perard <anthony.perard@citrix.com> Cc: Jan Beulich <JBeulich@suse.com> Cc: Ian Campbell <Ian.Campbell@citrix.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Josh Triplett <josh@joshtriplett.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18472 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: PlatformPei: take no-exec DXE settings from the QEMU command lineLaszlo Ersek2015-09-152-2/+65
| | | | | | | | | | | | | | | | | | | | | | Control them with: -fw_cfg name=opt/ovmf/PcdPropertiesTableEnable,file=no.txt \ -fw_cfg name=opt/ovmf/PcdSetNxForStack,file=yes.txt where the contents of the text files can be [0nN1yY](\n|\r\n)? The macro trickery is not optimal, but it is caused by PcdSetBool(), which is itself a macro, and can only take open-coded PCD names (ie. no variables, like function parameters). Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18471 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: make PcdPropertiesTableEnable dynamicLaszlo Ersek2015-09-153-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since PcdPropertiesTableEnable is used by the DXE Core (in the InstallPropertiesTable() function, which runs at End-of-Dxe), we must also change the PcdLib class resolution for that module, from the default BasePcdLibNull to DxePcdLib. Traditionally we've considered the DXE Core to be incapable of accessing dynamic PCDs -- the PCD PPI is not available any longer to the DXE Core, and the PCD Protocol is not available to it *yet*. There are exceptions however: if the DXE Core can ensure, by whatever means, that the PCD Protocol *is* available, then DxePcdLib will just work (the latter even lists DXE_CORE as an allowed client module type). Namely, DxePcdLib looks up the PCD Protocol dynamically, on the first library call that actually needs it (for accessing a dynamic PCD); the lookup doesn't occur in a library constructor. And because the DXE Core fetches PcdPropertiesTableEnable at End-of-Dxe, the PCD Protocol is definitely available then. In addition, we change the default value of PcdPropertiesTableEnable from the inherited TRUE to FALSE. It makes no difference at this point (our runtime DXE drivers are not built with the required 4KB section alignment anyway), but it's better to be clear about this. The properties table feature requires OS compatibility, and it breaks Windows 7 minimally. Therefore the default should be FALSE. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Star Zeng <star.zeng@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@18470 6f19259b-4bc3-4df7-8a09-765794883524
* OvmfPkg: make PcdSetNxForStack dynamicLaszlo Ersek2015-09-153-6/+21
| | | | | | | | | | | | | | | Plus, because PcdSetNxForStack is used by the DXE IPL PEIM (in the HandOffToDxeCore() function, and in the CreateIdentityMappingPageTables() function called by the former), we must change the PcdLib class resolution for that module, from the default BasePcdLibNull to PeiPcdLib. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Star Zeng <star.zeng@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@18469 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: PcdSetNxForStack: enable dynamismLaszlo Ersek2015-09-151-9/+9
| | | | | | | | | | | | | Allow platforms to instantiate this PCD as PcdsDynamic and PcdsDynamicEx too, not just PcdsFixedAtBuild and PcdsPatchableInModule. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18468 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg PiDxeS3BootScriptLib: Remove a hidden assumption.Star Zeng2015-09-155-161/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What to do: 1. Remove a hidden assumption "No SMM driver writes BootScript between SmmReadyToLock and S3SleepEntryCallback". 1.1. Use SmmExitBootServices and SmmLegacyBoot notification to record AtRuntime flag. 1.2. Use mBootScriptDataBootTimeGuid LockBox to save boot time boot script data to handle potential INSERT boot script at runtime in SMM. 2. Do not depend on OS to help restore ACPINvs data and use EfiReservedMemoryType instead of EfiACPIMemoryNVS. 2.1. Use mBootScriptSmmPrivateDataGuid LockBox to save boot script SMM private data with BackFromS3 = TRUE at runtime. S3 resume will help restore it to tell the Library the system is back from S3. Why to do: 1. The hidden assumption "No SMM driver writes BootScript between SmmReadyToLock and S3SleepEntryCallback" will cause confusion to the library's consumer and block the usage of "SMM driver writes BootScript after SmmReadyToLock". So Remove the assumption. 2. In original code, there might be a corner case that malicious code patch ACPINvs boot TableLength field same as SMM boot script. So that it can skip the table restore. The impact is that BootScript in SMM may be overridden by malicious code. -------------------- CopyMem ((VOID*)&TableHeader, (VOID*)mS3BootScriptTablePtr->TableBase, sizeof(EFI_BOOT_SCRIPT_TABLE_HEADER)); if (mS3BootScriptTablePtr->TableLength + sizeof(EFI_BOOT_SCRIPT_TERMINATE) != TableHeader.TableLength) { // TableLength is in NVS ...... // // NOTE: We should NOT use TableHeader.TableLength, because it is already updated to be whole length. // mS3BootScriptTablePtr->TableLength = (UINT32)(mLockBoxLength - sizeof(EFI_BOOT_SCRIPT_TERMINATE)); ? This line can be skipped. -------------------- So use EfiReservedMemoryType instead of EfiACPIMemoryNVS as the code has been updated to not depend on OS to help restore ACPINvs data. 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@18467 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Rename some functions in Dp to avoid build errors.Samer El-Haj-Mahmoud2015-09-153-7/+10
| | | | | | | | | | | There are other libraries with similarly named functions that could be linked with the Shell Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18456 6f19259b-4bc3-4df7-8a09-765794883524
* MdeModulePkg: Change the algorithm in SNP to use the first found BAR index.Fu Siyuan2015-09-151-4/+14
| | | | | | | | | | | | | The driver binding start function in SNP.c goes through all the BARs and get the last BAR index for use. Theoretically it should work with all valid BARs, but we got reports some device did always use the first valid BAR, so we change the logic in SNP to use the first found BAR index instead of the last one. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18455 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Update the help information for 'setvar' command to follow Shell ↵Qiu Shumin2015-09-151-0/+0
| | | | | | | | | | | | behavior. Since Shell will remove the quotes in parameters, setvar cannot receive the quotes from ="ascii" or =L"unicode". User should add ^ to escape quotes in setvar data. 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@18454 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Correct the missed code in r18449.Fu Siyuan2015-09-151-1/+1
| | | | | | | | | | | The fix r18449 missed 1 line which will cause Http.Request() ASSERT. This patch will correct this error. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18453 6f19259b-4bc3-4df7-8a09-765794883524
* ShellPkg: Fix Shell does not support ASCII pipe(|a).Qiu Shumin2015-09-151-11/+25
| | | | | | | | 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@18452 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Update Http driver to use DPC mechanism.Fu Siyuan2015-09-144-10/+56
| | | | | | | | | | | This patch updates the HttpDxe driver to use the DPC mechanism to avoid long time delay when single event. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18451 6f19259b-4bc3-4df7-8a09-765794883524