summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* ArmVirtPkg: disable PcdHiiOsRuntimeSupportLaszlo Ersek2016-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Edk2 commit 8a45f80edad4 ("MdeModulePkg: Make HII configuration settings available to OS runtime") implements the optional UEFI feature described in "31.2.11.1 OS Runtime Utilization" in UEFI v2.6. While this feature might show benefits down the road even in QEMU virtual machines, at the moment it only presents drawbacks: - it increases the EfiRuntimeServicesData footprint, - it triggers HII compatibility problems between edk2 and external drivers unconditionally, even if the end-user is not interested in HII and/or in configuring said drivers (see <https://www.redhat.com/archives/vfio-users/2016-March/msg00153.html> and <http://thread.gmane.org/gmane.comp.bios.edk2.devel/9894> for an example). While the feature was being introduced, popular demand for a controlling Feature PCD rose (see <http://thread.gmane.org/gmane.comp.bios.edk2.devel/7626>), which is why we can set it now to FALSE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPkg/ArmArchTimerLib: add GetTimeInNanoSecond() to ArmArchTimerLibSami Mujawar2016-04-011-1/+50
| | | | | | | | | | FirmwarePerformanceDxe.c utilizes the Timer Library function GetTimeInNanoSecond() which was not implemented by the ArmArchTimerLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPkg/ArchArmTimerLib: refactor MultU64xN and TimerFreq definitionsSami Mujawar2016-04-011-18/+31
| | | | | | | | | | | | | | This refactors some timer code to define MultU64xN as a preprocessor symbol rather than a function pointer, and to factor out the code that obtains the timer frequency into GetPlatformTimerFreq (). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 [ard.biesheuvel: split off from 'add GetTimeInNanoSecond() to ArmArchTimerLib'] Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* NetworkPkg: Check received packet size before use it.Fu Siyuan2016-04-014-10/+40
| | | | | | | | | | | | | | | | | Arbitrary length of packet may be received from network, including the packets with zero payload data or malformed protocol header. So the code much check the actually received data size before using it. For example, in current edk2 network stack, an zero payload UDP packet may cause the platform ASSERT in NetbufFromExt() because of the zero fragment number. This patch update the IpIoLib and UdpIoLib to check and discard the zero payload data packet to avoid above assert. Some other network drivers are also updated to check the packet size to guarantee the minimum length of protocol header is received from upper layer driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* MdeModulePkg: Check received packet size before use it.Fu Siyuan2016-04-015-34/+111
| | | | | | | | | | | | | | | | | Arbitrary length of packet may be received from network, including the packets with zero payload data or malformed protocol header. So the code much check the actually received data size before using it. For example, in current edk2 network stack, an zero payload UDP packet may cause the platform ASSERT in NetbufFromExt() because of the zero fragment number. This patch update the IpIoLib and UdpIoLib to check and discard the zero payload data packet to avoid above assert. Some other network drivers are also updated to check the packet size to guarantee the minimum length of protocol header is received from upper layer driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg: Check pointer for NULL before use.Fu Siyuan2016-04-011-0/+4
| | | | | | | Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
* Revert "TerminalDxe: select the UART's default receive FIFO depth"Ruiyu Ni2016-04-012-2/+2
| | | | | | | | | | | | | | This reverts commit 31ae446b1a039a55d0336f2201d77d1032533413. Changing the receive FIFO depth in Terminal driver Start() is not recommended. A new PCD PcdUartDefaultReceiveFifoDepth was added and MdeModulePkg/SerialDxe driver uses the PCD as the default receive FIFO depth. Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
* ArmVirtPkg/ArmVirtQemu: gate FDT config table install with build optionArd Biesheuvel2016-03-311-0/+5
| | | | | | | | | | | | | | | | | | This introduces the .DSC define 'PURE_ACPI_BOOT_ENABLE', defaulting to FALSE, which controls the value of the feature PCD 'PcdPureAcpiBoot'. This allows an ArmVirtQemu image to be built that restricts the OS to booting in ACPI mode. This feature is only added to ArmVirtQemu, and not to ArmVirtQemuKernel, the reason being that the latter is mostly intended for development work, where the burden of adding 'acpi=force' if you need it is much more tolerable than when trying to boot an installer on a production KVM guest instance. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/VirtFdtDxe: make installation of FDT as config table optionalArd Biesheuvel2016-03-313-31/+48
| | | | | | | | | | | | The arm64 kernel is hardwired to prefer DT over ACPI, unless 'acpi=force' is passed on the kernel command line. The only other way to force the kernel to use ACPI is not to pass an FDT to it in the first place. So introduce a PCD that inhibits the installation of the QEMU supplied FDT as a configuration table. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg RamDiskDxe: Fix incorrect RAM disk memory address calculationSamer El-Haj-Mahmoud2016-03-312-3/+4
| | | | | | | | | | | | | | | | | EndingAddress is calculated incorrectly. Original code calculates it as (StartingAddress + Size). Correct value should be (StartingAddress + Size - 1. Note: Besides the changes made by Samer, Hao also fixed a similar issue in RamDiskImpl.c Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Signed-off-by: Tapan Shah <tapandshah@hpe.com> Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
* MdeModulePkg EmmcDxe: Fix GCC build failure with set but unused variablesZeng, Star2016-03-311-3/+1
| | | | | | | Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: Tcg2Dxe: Fix undersized TempBufZhang, Chao B2016-03-311-1/+1
| | | | | | | | | | TempBuf in SetupEventLog needs to include sizeof(UINT32) to hold NumberOfAlgorithms. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
* MdeModulePkg/UefiBootManagerLib: BmGetActiveConsoleIn code cleanupThomas Palmer2016-03-311-2/+5
| | | | | | | | | | | Check for NULL from AllocateCopyPool before setting Count to 1. Also change sizeof (EFI_HANDLE*) to sizeof (EFI_HANDLE). Handles is a EFI_HANDLE pointer, so the allocated memory must be the size of EFI_HANDLE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* OptionRomPkg: Ax88772b: Fixing register access issue in Apple Eth AdapterShivamurthy Shastri2016-03-313-9/+51
| | | | | | | | | | | | The USB command CMD_RXQTC ("RX Queue Cascade Threshold Control") tries to access the register and is always failing when using the Apple Ethernet adapter. It is fixed by checking flag before sending command. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* OptionRomPkg: Ax88772b: Fixing compilationShivamurthy Shastri2016-03-301-2/+0
| | | | | | | | | error: pNicDevice variable set but not used Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linaro.org> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* OptionRomPkg: Ax88772b: support for multiple dongles and chipsShivamurthy Shastri2016-03-302-15/+30
| | | | | | | | | | | | Driver code is modified to support multiple ethernet dongles, which uses similar ASIX chips. Also, it can be used for multiple ASIX chips with similar register map. Enabled support for Apple Ethernet Adapter Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg/SdMmc: Add EDKII SD/MMC stackFeng Tian2016-03-3052-0/+24405
| | | | | | | | | | | | | | | | | | | | | | | This stack includes: 1. Dxe phase support by: 1) SdMmcPciHcDxe driver to consume PciIo and produce SdMmcPassThru. 2) SdDxe driver to consume SdMmcPassThru to produce BlkIo1/BlkIo2. 3) EmmcDxe driver to consume SdMmcPassThru to produce BlkIo1/BlkIo2/SSP. 2. Pei phase support 1) SdBlockIoPei driver to consume SdMmcHostController Ppi and produce VirutalBlkIo1&2. 2) EmmcBlockIoPei driver to consume SdMmcHostController Ppi and produce VirutalBlkIo1&2. 3) SdMmcPciHcPei driver to produce SdMmcHostController Ppi. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdePkg/IndustryStandard: Add SD/EMMC common definitionsFeng Tian2016-03-302-0/+478
| | | | | | | | | These definitions are defined in SD physical layer simplified spec and eMMC electrical standard spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdePkg/DevicePath: Add EMMC device path definitionFeng Tian2016-03-303-0/+72
| | | | | | | | This device path node is introduced in UEFI2.6 spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdePkg: Add EFI_SD_MMC_PASS_THRU_PROTOCOL definitionFeng Tian2016-03-302-0/+267
| | | | | | | | This protocol is introduced in UEFI2.6 spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* UefiCpuPkg/Cpuid.h: Display Intel SGX Resource Enumeration LeavesJeff Fan2016-03-301-0/+117
| | | | | | | | Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
* UefiCpuPkg/Cpuid.h: Add CPUID defines and structures for Intel SGXJeff Fan2016-03-301-1/+280
| | | | | | | | | | | | Add Intel SGX Resource Enumeration Leaves as described by Section 37.7 in Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 3D, December 2015. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
* ShellPkg: Refine the comparisons code in ShellPkg.Qiu Shumin2016-03-291-7/+7
| | | | | | | | | For Boolean values not use explicit comparisons to TRUE or FALSE. For non-Boolean comparisons we should use a compare operator. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* MdeModulePkg PartitionDxe: Add Re-entry handling logic for BindingStopHao Wu2016-03-292-21/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | There are scenario when the BindingStop service of PartitionDxe driver be re-entered. An example will be ejecting a DVD from a SATA DVDROM and then run "reconnect -r" under shell. In this specific case, part of the calling stack will be: PartitionDriverBindingStop() (PartitionDxe) -> Stop first child handle (PartitionDxe) -> ScsiDiskFlushBlocksEx() (ScsiDiskDxe) -> A media change is detected (ScsiDiskDxe) -> Reinstall of BlockIO(2) protocols (ScsiDiskDxe) -> Entering PartitionDriverBindingStop() again (PartitionDxe) -> Potential risk of referencing already stopped child handle (PartitionDxe) ... The current code has potential issue of referencing of already stopped child handle. This commit adds re-entry handling logic to resolve such issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: Enable Opal password solution build.Eric Dong2016-03-291-4/+25
| | | | | | | | | This patch used to enable opal password solution build in Security package level build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: OpalPasswordSmm: Add Opal password Smm driver.Eric Dong2016-03-2910-0/+7466
| | | | | | | | This driver used to unlock device in S3 resume phase. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: OpalPasswordDxe: Add Opal password dxe driver.Eric Dong2016-03-2912-0/+4675
| | | | | | | | | This driver used to enables opal feature in bios. It adds setup menu and unlock device process in boot phase. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: OpalPasswordSupportLib: Add Opal password support library.Eric Dong2016-03-296-0/+1196
| | | | | | | | APIs used to support opal password solution to trig opal command. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: TcgStorageOpalLib: Add TCG storage opal library.Eric Dong2016-03-294-0/+3447
| | | | | | | | Library APIs used to create commands defined by TCG storage opal spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: TcgStorageCoreLib: Add TCG storage core library.Eric Dong2016-03-294-0/+3905
| | | | | | | | APIs used to create commands defined by TCG storage core spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdePkg: Add definition for TCG Storage Core and Opal specs.Eric Dong2016-03-292-0/+558
| | | | | | | | The definitions are defined in TCG storage core and opal spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* BaseTools: Add two new sections for PCD in the build reportYonghong Zhu2016-03-293-17/+104
| | | | | | | | | | | | | Build Spec updated to add two new sections for PCD in the build report. 1.Conditional directives section:If the DSC or FDF file contains conditional directive statements. 2.Unused PCDs section: If the DSC or FDF file define values for PCDs that are not used by any module and are not used in conditional directive statements. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/SerialDxe: Set FIFO depth with PCDHeyi Guo2016-03-292-5/+7
| | | | | | | | | | | | Set UART receive FIFO depth with PCD instead of fixed number "1". The default value of PCD is also 1, so it makes no difference for platforms which do not explicitly set this PCD. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdePkg: Add PCD for UART default receive FIFO depthHeyi Guo2016-03-291-0/+4
| | | | | | | | | | | | PcdUartDefaultReceiveFifoDepth is added to indicate UART default receive FIFO depth. Type of UINT16 is enough for FIFO depth. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg DiskIoDxe: Media status check not be done at DiskIo levelHao Wu2016-03-291-13/+1
| | | | | | | | | | | | | | | | | | | | | | Found an issue that file system cannot be started on a DVD when doing the following process: Boot to shell with a DVD inside a SATA DVDROM. Eject the DVD and run "reconnect -r". Put the DVD inside again and run "reconnect -r". The cause is that after executing the second reconnect action, DiskIo immediately returns EFI_NO_MEDIA in function DiskIo2ReadWriteDisk() when checking the media information. However, at this time, the media information does not get updated by the ScsiDisk driver. Therefore, DiskIo driver should left the no media check to ScsiDisk driver. Generally, the media changed and media write protect check should also be left to lower-level device driver. Thus, these two checks in function DiskIo2ReadWriteDisk() are also removed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg PartitionDxe: Some ISO images cannot be recognized properlyHao Wu2016-03-291-7/+7
| | | | | | | | | Some ISO images cannot be recognized properly when they are on media whose block size is not 2048 bytes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdeModulePkg ScsiDiskDxe: Fix hang issue when reconnecting an ISCSI deviceHao Wu2016-03-291-5/+13
| | | | | | | | | | | | | The 'Reset' function for BlockIO(2) in ScsiDiskDxe should return EFI_SUCCESS instead of EFI_DEVICE_ERROR when a device does not support reset feature. Otherwise, a 'reconnect -r' action when an ISCSI device is attached will cause system hang. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* PcAtChipsetPkg/PciHostBridge: Remove PciHostBridge driverRuiyu Ni2016-03-2912-5480/+0
| | | | | | | | | MdeModulePkg contains a new PciHostBridgeDxe driver which is a super set of PcAtChipsetPkg/PciHostBridgeDxe. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ShellPkg/UefiDpLib: Fix a memory leak issue in Dp.Cinnamon Shia2016-03-291-0/+3
| | | | | | | | | The allocated memory of ParamPackage is not freed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* PerformancePkg/Dp_App: Fix a memory leak issue in Dp.Cinnamon Shia2016-03-291-0/+3
| | | | | | | | | The allocated memory of ParamPackage is not freed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* BaseTools: Remove the unnecessary check for RAW FileYonghong Zhu2016-03-281-2/+0
| | | | | | | | | Because the __VerifyFile function already checked whether the file is valid. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: generate alignment when the FV content come from the filesystemYonghong Zhu2016-03-271-1/+19
| | | | | | | | | | | when the FV contents come from the filesystem instead of from a named FDF section, the build tool missed to generate alignment for this FV. The fix is get the alignment value from FV header and use this value to generate alignment. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Extend the RAW format to support multiple binary filesYonghong Zhu2016-03-273-3/+107
| | | | | | | | | | | | | | | | Current FDF spec updated to support multiple binary files for RAW File in the [FV] and [Capsule] section. For the multiple normal files, it may have the optional FfsAlignment. Example: FILE RAW = 197DB236-F856-4924-91F8-C1F12FB875F3 { Align=16 $(PLATFORM_PACKAGE)/Binaries/File1.pdb Align=16 $(PLATFORM_PACKAGE)/Binaries/File2.pdb Align=16 $(PLATFORM_PACKAGE)/Binaries/File3.pdb } Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* ShellPkg AARCH64: remove DEBUG BuildOptions overrideArd Biesheuvel2016-03-251-7/+0
| | | | | | | | | | | | | | | The BuildOptions for AARCH64 in Application/Shell/Shell.inf only affect the core Shell binary, and not the Shell component libraries which are merged into the final Shell binary via NULL library class resolution. This means we need to override the UEFI_APPLICATION build options in the platform .DSC anyway, there is no point in setting these options here as well. So remove them. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* BaseTools AARCH64: move DEBUG GCC49 to the small code modelArd Biesheuvel2016-03-251-4/+6
| | | | | | | | | | | | | | | | | | | When building AARCH64 platforms that include a Shell binary built from source, we run into trouble when using the tiny code model for DEBUG builds. The reason is that the Shell binary built in DEBUG mode exceeds the 1 MB range of the ADR instruction, so anything that gets pulled into the final link of the Shell binary either needs to be built with the small or large model, or needs to be sorted in some way to put the ADR references close to their targets. Since code size is not a big concern for DEBUG builds anyway, let's move to the small code model for all modules when using DEBUG GCC49. This way, there is no need for workarounds that are specific to UEFI_APPLICATION modules in general, or the Shell application in particular. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* OvmfPkg: Increase the maximum size for Authenticated variablesJames Bottomley2016-03-253-0/+3
| | | | | | | | | | | | | | | | | During real world testing I was getting an error with too many entries in db: On my Secure boot laptop, I currently have seven certificates: two Microsoft ones, Three Kernel ones from various distributions, my own Secure Key and a temporary test key. That gives a total EFI Signature List size of 8317 which is over the 0x2000 maximum. Fix this by setting the PcdMaxAuthVariableSize to 0x2800 (10K) which isn't much of an increase but allows for 9-10 certificates. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* BaseTools/GCC: set -Wno-unused-but-set-variables only on RELEASE buildsArd Biesheuvel2016-03-251-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | This aligns the GCC definitions for 4.6 and up to align with the ARM and AARCH64 definitions, which is to ignore unused but set variables only on RELEASE builds. This allows us to find instances of unused variables that are left behind after refactoring. It also allows us to find bad new code, which, due to the EDK2 coding style which disallows initialized automatic variables, may contain such variables without having been noticed by other toolchains. (Slightly edited) observation from Jordan Justen <jordan.l.justen@intel.com>: RELEASE builds must keep the flag because debug code (such as assertions) may collapse to nothing -- e.g. if a platform defines MDEPKG_NDEBUG for RELEASE -- and therefore trigger the warning. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> [lersek@redhat.com: incorporate commit message update from Jordan] Signed-off-by: Laszlo Ersek <lersek@redhat.com>
* UefiCpuPkg: CpuMpPei: remove set but unused variablesLaszlo Ersek2016-03-251-2/+1
| | | | | | | | | Cc: Jeff Fan <jeff.fan@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: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* UefiCpuPkg: PiSmmCpuDxeSmm: remove set but unused variablesLaszlo Ersek2016-03-251-23/+11
| | | | | | | | | Cc: Jeff Fan <jeff.fan@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: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* UefiCpuPkg/MtrrLib: remove unused but set variableArd Biesheuvel2016-03-251-2/+0
| | | | | | | | | | | | | | | Remove variable TempQWord that is declared, assigned but never referenced. This fixes a warning emitted by GCC when -Wunused-but-set-variable is in effect. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Cc: Jeff Fan <jeff.fan@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>