summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-07-05OvmfPkg/SmmAccess: support extended TSEG sizeLaszlo Ersek2-2/+5
In SmmAccessPeiEntryPoint(), map TSEG megabyte counts different from 1, 2 and 8 to the MCH_ESMRAMC_TSEG_EXT bit pattern (introduced in the previous patch), for the ESMRAMC.TSEG_SZ bit-field register. (Suggested by Jordan.) In SmramAccessGetCapabilities() -- backing both PEI_SMM_ACCESS_PPI.GetCapabilities() and EFI_SMM_ACCESS2_PROTOCOL.GetCapabilities() --, map the MCH_ESMRAMC_TSEG_EXT bit pattern found in the ESMRAMC.TSEG_SZ bit-field register to a byte count of (mQ35TsegMbytes * SIZE_1MB). (MCH_ESMRAMC_TSEG_EXT is the only possible pattern if none of MCH_ESMRAMC_TSEG_1MB, MCH_ESMRAMC_TSEG_2MB, and MCH_ESMRAMC_TSEG_8MB match.) The new code paths are not exercised just yet; for that, PlatformPei is going to have to set PcdQ35TsegMbytes (and consequently, SmramInternal's "mQ35TsegMbytes") to a value different from 1, 2, and 8. 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>
2017-07-05OvmfPkg/IndustryStandard/Q35MchIch9.h: add extended TSEG size macrosLaszlo Ersek1-0/+4
Add the macros for interfacing with the QEMU feature added in QEMU commit 2f295167e0c4 ("q35/mch: implement extended TSEG sizes", 2017-06-08). 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>
2017-07-05OvmfPkg: make PcdQ35TsegMbytes dynamicLaszlo Ersek4-7/+10
We can now make PcdQ35TsegMbytes dynamic, in preparation for the extended TSEG size feature. At the moment we only move the declaration in OvmfPkg.dec from [PcdsFixedAtBuild] to [PcdsDynamic, PcdsDynamicEx], and provide the dynamic defaults (with the same value, 8) in the DSC files if SMM_REQUIRE is TRUE. Cc: Jordan Justen <jordan.l.justen@intel.com> Suggested-by: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-07-05OvmfPkg/SmmAccess: prepare for PcdQ35TsegMbytes becoming dynamicLaszlo Ersek6-5/+40
In one of the next patches we'll turn PcdQ35TsegMbytes into a dynamic PCD, to be set by PlatformPei. Jordan suggested to use gEfiPeiMemoryDiscoveredPpiGuid as SmmAccessPei's DEPEX for making sure that PlatformPei sets the PCD before SmmAccessPei consumes it. (PlatformPei installs the permanent PEI RAM.) Such a DEPEX is supposed to mirror physical firmware, where anything related to SMRAM cannot run before said platform's physical RAM is discovered (signaled by the presence of gEfiPeiMemoryDiscoveredPpiGuid). Introduce the InitQ35TsegMbytes() function and the "mQ35TsegMbytes" extern variable to "SmramInternal.h" and "SmramInternal.c": - Both SmmAccess modules (PEIM and DXE driver) are supposed to call InitQ35TsegMbytes() in their respective entry point functions, saving PcdQ35TsegMbytes into "mQ35TsegMbytes". This way dynamic PCD fetches can be kept out of PEI_SMM_ACCESS_PPI and EFI_SMM_ACCESS2_PROTOCOL member functions later (when we add support for extended TSEG size). - We can thus replace the current PcdQ35TsegMbytes fetches in SmmAccessPei's entry point function as well, with reads from "mQ35TsegMbytes". 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>
2017-07-05OvmfPkg/PlatformPei: prepare for PcdQ35TsegMbytes becoming dynamicLaszlo Ersek3-3/+23
In one of the next patches we'll turn PcdQ35TsegMbytes into a dynamic PCD, to be set by PlatformPei. Introduce the Q35TsegMbytesInitialization() function and the "mQ35TsegMbytes" global variable to support this. Q35TsegMbytesInitialization() manages the PCD and caches its final value into "mQ35TsegMbytes". Call Q35TsegMbytesInitialization() from InitializePlatform() just in time for the current PCD consumers, PublishPeiMemory(), InitializeRamRegions() and QemuInitializeRam() -- which is called from InitializeRamRegions() -- to be rebased on top of "mQ35TsegMbytes". Call Q35TsegMbytesInitialization() only when PcdSmmSmramRequire is TRUE, given that PcdQ35TsegMbytes is consumed in that case only. 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>
2017-07-05OvmfPkg: widen PcdQ35TsegMbytes to UINT16Laszlo Ersek3-7/+7
Widen PcdQ35TsegMbytes to UINT16, in preparation for setting it dynamically to the QEMU-advertized extended TSEG size (which is 16-bits wide). 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>
2017-07-05OvmfPkg: update -D E1000_ENABLE from Intel PROEFI v.07 to BootUtil v.22Laszlo Ersek4-18/+24
Jiaxin reports that the OvmfPkg/README instructions for downloading the Intel PROEFI drivers, and the filenames in OvmfPkg/OvmfPkg*.fdf for incorporating the same in the OVMF binaries, are no longer up to date; the download link has stopped working. Additionally, the IA32 driver binary is no more distributed by Intel. Update OvmfPkg/README with new download instructions, and adapt the OVMF FDF files. With this driver in use for QEMU's e1000 NIC, the DH shell command prints, as Controller Name, "Intel(R) PRO/1000 MT Network Connection". I successfully tested DHCP and ping from the UEFI shell. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Reported-by: Jiaxin Wu <jiaxin.wu@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=613 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2017-07-05OvmfPkg: disable build-time relocation for DXEFV modulesLaszlo Ersek3-0/+3
When the GenFv utility from BaseTools composes a firmware volume, it checks whether modules in the firmware volume are subject to build-time relocation. The primary indication for relocation is whether the firmware volume has a nonzero base address, according to the [FD] section(s) in the FDF file that refer to the firmware volume. The idea behind build-time relocation is that XIP (execute in place) modules will not be relocated at boot-time: - Pre-DXE phase modules generally execute in place. (OVMF is no exception, despite the fact that we have writeable memory even in SEC: PEI_CORE and PEIMs run in-place from PEIFV, after SEC decompresses PEIFV and DXEFV from FVMAIN_COMPACT (flash) to RAM. PEI_CORE and the PEIMs are relocated at boot-time only after PlatformPei installs the permanent PEI RAM, and the RAM migration occurs.) - Modules dispatched by the DXE Core are generally relocated at boot-time. However, this is not necessarily so. Quoting Liming from <https://lists.01.org/pipermail/edk2-devel/2017-July/012053.html>: > PI spec has no limitation that XIP is for PEIM only. DXE driver may be > built as XIP for other purpose. For example, if DXE driver image address > is not zero, DxeCore will try allocating the preferred address and load > it. In another case, once DXE driver is relocated at build time, DxeCore > will dispatch it and start it directly without loading, it may save boot > performance. Therefore GenFv relocates even DXE and UEFI driver modules if the containing firmware volume has a nonzero base address. In OVMF, this is the case for both PEIV and DXEFV: > [FD.MEMFD] > BaseAddress = $(MEMFD_BASE_ADDRESS) > Size = 0xB00000 > ErasePolarity = 1 > BlockSize = 0x10000 > NumBlocks = 0xB0 > ... > 0x020000|0x0E0000 > gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfPeiMemFvSize > FV = PEIFV > > 0x100000|0xA00000 > gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize > FV = DXEFV While the build-time relocation certainly makes sense for PEIFV (see above), the reasons for which we specify DXEFV under [FD.MEMFD] are weaker: - we set the PcdOvmfDxeMemFvBase and PcdOvmfDxeMemFvSize PCDs here, - and we ascertain that DXEFV, when decompressed by SEC from FVMAIN_COMPACT, will fit into the area allotted here, at build time. In other words, the build-time relocation of the modules in DXEFV is a waste of resources. But, it gets worse: Build-time relocation of an executable is only possible if the on-disk and in-memory layouts are identical, i.e., if the sections of the PE/COFF image adhere to the same alignment on disk and in memory. Put differently, the FileAlignment and SectionAlignment headers must be equal. For boot-time modules that we build as part of edk2, both alignment values are 0x20 bytes. For runtime modules that we build as part of edk2, both alignment values are 0x1000 bytes. This is why the DXEFV relocation, albeit wasteful, is also successful every time. Unfortunately, if we try to include a PE/COFF binary in DXEFV that originates from outside of edk2, the DXEFV relocation can fail due to the binary having unmatched FileAlignment and SectionAlignment headers. This is precisely the case with the E3522X2.EFI network driver for the e1000 NIC, from Intel's BootUtil / PREBOOT.EXE distribution. The solution is to use the FvForceRebase=FALSE override under [FV.DXEFV]. This tells GenFv not to perform build-time relocation on the firmware volume, despite the FV having a nonzero base address. In DXEFV we also have SMM drivers. Those are relocated at boot-time (into SMRAM) unconditionally; SMRAM is always discovered at boot-time. Kudos to Ard and Liming for the PE/COFF sections & relocations explanation, and for the FvForceRebase=FALSE tip. I regression-tested this change in the following configurations (all with normal boot and S3 suspend/resume): IA32, q35, SMM, Linux IA32X64, q35, SMM, Linux IA32X64, q35, SMM, Windows-8.1 X64, i440fx, no-SMM, Linux Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Liming Gao <liming.gao@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=613 Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=615 Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Suggested-by: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com>
2017-07-05ArmVirtPkg: remove status code supportArd Biesheuvel1-9/+2
Commit 7b1dc6c569a 'ArmVirtPkg: switch to generic ResetSystemRuntimeDxe' replaced all references in ArmVirtPkg to the deprecated ResetRuntimeDxe from EmbeddedPkg with the well maintained generic alternative that lives in MdeModulePkg. However, as it turns out, the generic driver has a dependency on the library class ReportStatusCodeLib, whose default resolution is an implementation that is not safe for use at runtime, resulting in crashes when trying to invoke it from the OS. Since we have no use for status codes in any of the ArmVirtPkg platforms, let's replace all resolutions with a common one to the NULL implementation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2017-07-05ArmPlatformPkg: convert VExpress ResetSystemLib to ResetSystemLibLeif Lindholm2-50/+73
Since we're in the process of migrating all of the VExpress platforms to MdeModulePkg ResetSystemRuntimeDxe, convert VExpress ResetSystemLib from EfiResetSystemLib interface to the ResetSystemLib one. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2017-07-05EmbeddedPkg/MmcDxe: Align the ExtCSD bufferJun Nie3-6/+18
ExtCSD structure may be read via DMA. So align it to page to avoid data corruption. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-07-05BaseTools: Update GenFw to clear unused debug entry generated by VS tool chainLiming Gao1-5/+22
https://bugzilla.tianocore.org/show_bug.cgi?id=600 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-07-05BaseTools: Update tools_def.template to remove old XCLANG and XCODE32Liming Gao1-176/+0
https://bugzilla.tianocore.org/show_bug.cgi?id=562 https://bugzilla.tianocore.org/show_bug.cgi?id=563 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Andrew Fish <afish@apple.com>
2017-07-05MdeModulePkg/XhciDxe: Check timeout URB again after stopping endpointRuiyu Ni4-29/+90
This fixes BULK data loss when transfer is detected as timeout but finished just before stopping endpoint. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com>
2017-07-05MdeModulePkg/XhciDxe: Separate common logic to XhcTransferRuiyu Ni1-166/+132
The patch separates the common logic in XhcControlTransfer, XhcBulkTransfer and XhcSyncIntTransfer to a sub-routine XhcTransfer. It doesn't have functionality impact. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com>
2017-07-05MdeModulePkg/XhciDxe: Dump the CMD/EVENT/INT/BULK ring informationRuiyu Ni1-3/+24
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com>
2017-07-05MdeModulePkg/XhciDxe: Refine IsTransferRingTrb and IsAsyncIntTrbRuiyu Ni1-46/+44
Current implementation of IsTransferRingTrb only checks whether the TRB is in the RING of the URB. The patch enhanced the logic to check that whether the TRB belongs to the transaction of URB. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com>
2017-07-04BaseTools: suppress usage instructions with rebuild optionsChris Ruffin1-5/+8
When using edksetup.bat Rebuild, the script outputs usage instructions to the console, when no usage error is encountered. Update the usage instructions and suppress these usage instructions when using the Rebuild, ForceRebuild options. Change-Id: Ica98e19f3d5198df2519106e4c55314c255e04ac Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chris Ruffin <chris.ruffin@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2017-07-03BeagleBoardPkg: switch to use MdeModulePkg ResetSystemLibLeif Lindholm4-132/+71
The BeagleBoard port used EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf for its reset handling. With the arrival MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf As part of this, change BeagleBoardPkg/Library/ResetSystemLib to be an implementation of ResetSystemLib instead of the previous EfiResetSystemLib. Wire all reset variants to ResetCold, except for ResetShutdown and EnterS3WithImmediateWake, which return immediately. Note: this ResetSystemLib never supported being called after ExitBootservices, and this shortcoming is not addressed here. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2017-07-03ArmVirtPkg: switch to generic ResetSystemRuntimeDxeArd Biesheuvel8-54/+91
For obscure reasons, ARM platforms use a different implementation of the ResetSystem() runtime service call than other platforms. So let's switch all ArmVirtPkg platforms to the generic version instead. Given that all platforms use an implementation of EfiResetSystemLib [as consumed by the ResetRuntimeDxe in EmbeddedPkg that we are replacing] which is unlikely to be depended upon by out of tree platforms, let's simply modify this library into an implementation of ResetSystemLib instead [which is what the generic driver in MdeModulePkg consumes] This does mean we need to update all clients at the same time, which is why all changes are part of the same patch. As before, warm reset and platform specific reset are mapped onto cold reset (which is the only thing PSCI implements, at least the version we depend on). The new library function EnterS3WithImmediateWake() is left unimplemented, as permitted by the ResetSystemLib library class. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2017-07-03ArmPkg: implement ResetSystemLib using PSCI 0.2 callsArd Biesheuvel2-0/+150
This adds an implementation of the ResetSystemLib library class as defined in MdeModulePkg. It is used as the platform glue by the generic ResetSystemRuntimeDxe which lives in the same package. This implementation is intended to replace the EfiResetSystemLib based implementation that is deprecated now that we have decided that there is no longer a reason to keep a different ResetSystem() implementation under EmbeddedPkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-07-03MdeModulePkg CapsuleApp: Fix print info in BuildGatherList()Star Zeng1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=614 Print (L"CapsuleApp: capsule data starts at 0x%X with size 0x%X\n", (UINTN) CapsuleBuffer, FileSize); It should use (UINTN) CapsuleBuffer[Index] and FileSize[Index] as parameter. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Cloud Wang <winggundum82@163.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>
2017-07-03MdeModulePkg ResetSystem: Update the comments of ResetSystem()Star Zeng2-1/+12
Update the comments of ResetSystem() that was missed by 37078045d717 and 28426918f0ea. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
2017-07-03MdeModulePkg/ResetSystem: Implement ResetNotification protocolRuiyu Ni4-16/+161
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-07-03MdeModulePkg/ResetSystem: Remove unnecessary global variableRuiyu Ni1-7/+4
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-07-03MdePkg: Add ResetNotification protocol definitionRuiyu Ni2-0/+89
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-06-30MdeModulePkg PeiCore: Correct the comments of PeiResetSystem2Star Zeng2-4/+4
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>
2017-06-30MdePkg: Correct the comments of EFI_PEI_RESET2_SYSTEMStar Zeng1-2/+2
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>
2017-06-29EmbeddedPkg/MmcDxe: Correct argument of ECSD readJun Nie1-1/+1
The argument of CMD8 should be stuff bits according to standard JESD84-A44. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-06-29EmbeddedPkg/MmcDxe: Add non-DDR timing mode supportJun Nie1-2/+14
Only DDR mode is support for 8bit mode currently. Add non-DDR case when configuring ECSD. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-06-29ShellPkg: Update dh command to reflect correct driver field informationTapan Shah2-3/+4
dh command gets driver name and wrongly prints it as 'Child [handle]'. It should print it as 'Driver Name [handle]'. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-06-29UefiCpuPkg: Fix coding style issuesDandan Bi1-2/+2
Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Brijesh Singh <brijesh.singh@amd.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2017-06-28MdeModulePkg/AtaAtapiPassThru: relax PHY detect timeoutArd Biesheuvel2-3/+3
The SATA spec mandates that link detection by the PHY completes within 10 ms after receiving a reset signal. However, there is no obligation to uphold this requirement at the driver end as strictly as we do, and as it turns out, some combinations of host and device (e.g., Samsung 850 EVO connected to a LeMaker Cello) are only borderline compliant, which means the device is not detected reliably. So let's allow for a bit of margin, and increase the PHY detect timeout value to 15 ms. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-06-27MdePkg/IndustryStandard: update ACPI/IORT definitions to revision CArd Biesheuvel1-2/+17
This updates the IORT header to include the definitions that were added in revision C of the IORT spec that was made public recently. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-06-27DuetPkg FsVariable: Update GetNextVariableName to follow UEFI 2.7Star Zeng1-2/+29
"The size must be large enough to fit input string supplied in VariableName buffer" is added in the description for VariableNameSize. And two cases of EFI_INVALID_PARAMETER are added. 1. The input values of VariableName and VendorGuid are not a name and GUID of an existing variable. 2. Null-terminator is not found in the first VariableNameSize bytes of the input VariableName buffer. This patch is to update code to follow them. Cc: Liming Gao <liming.gao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@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> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-06-27MdeModulePkg Variable: Update GetNextVariableName to follow UEFI 2.7Star Zeng5-32/+124
"The size must be large enough to fit input string supplied in VariableName buffer" is added in the description for VariableNameSize. And two cases of EFI_INVALID_PARAMETER are added. 1. The input values of VariableName and VendorGuid are not a name and GUID of an existing variable. 2. Null-terminator is not found in the first VariableNameSize bytes of the input VariableName buffer. This patch is to update code to follow them. 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>
2017-06-27MdePkg: Update comments for GetNextVariableName to follow UEFI 2.7Star Zeng1-1/+7
"The size must be large enough to fit input string supplied in VariableName buffer" is added in the description for VariableNameSize. And two cases of EFI_INVALID_PARAMETER are added. 1. The input values of VariableName and VendorGuid are not a name and GUID of an existing variable. 2. Null-terminator is not found in the first VariableNameSize bytes of the input VariableName buffer. This patch is to update comments for GetNextVariableName to follow them. 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>
2017-06-27ShellPkg DmpStore: Make NameSize to be consistent with name bufferStar Zeng1-0/+1
Current code will allocate pool to hold the null char for name buffer when PrevName==NULL, but the NameSize is still 0. For this case, GetNextVariableName will return EFI_INVALID_PARAMETER to follow UEFI 2.7 spec. UEFI 2.7 spec: The VariableNameSize must not be smaller the size of the variable name string passed to GetNextVariableName() on input in the VariableName buffer. EFI_INVALID_PARAMETER Null-terminator is not found in the first VariableNameSize bytes of the input VariableName buffer. This patch is to make NameSize to be consistent with name buffer. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-06-27MdeModulePkg/BdsDxe: Report Status Code when booting from BootOrder listDandan Bi1-1/+6
Report Status Code to indicate BDS starts attempting booting from the UEFI BootOrder list. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2017-06-27MdePkg/PiStatusCode: Add new Status Code for BDS when attempting BootOrderDandan Bi1-1/+2
According to new PI spec, add new Status Code to indicate BDS starts attempting booting from the UEFI BootOrder list. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2017-06-27Revert "MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol"Star Zeng1-14/+12
This reverts commit 45cfcd8dccf84b8abbc1d6f587fedb5d2037ec79 since it is breaking OVMF platform and also real platforms. REF: https://www.mail-archive.com/edk2-devel@lists.01.org/msg26882.html https://www.mail-archive.com/edk2-devel@lists.01.org/msg26820.html Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com>
2017-06-26UefiCpuPkg: Modify GetProcessorLocationByApicId() to support AMD.Leo Duran2-64/+250
Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran <leo.duran@amd.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2017-06-26UefiCpuPkg: Add CPUID definitions for AMD.Leo Duran1-9/+590
Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leo Duran <leo.duran@amd.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2017-06-26UefiCpuPkg: Define AMD Memory Encryption specific CPUID and MSRBrijesh Singh3-0/+253
The patch defines AMD's Memory Encryption Information CPUID leaf and SEV status MSR. The complete description for CPUID leaf is available in APM volume 2, Section 15.34. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Leo Duran <leo.duran@amd.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2017-06-26MdeModulePkg DxeCore: Only free ScratchBuffer when it is not NULLStar Zeng1-2/+4
There is a case that ExtractGuidedSectionGetInfo return 0 for ScratchBufferSize and ScratchBuffer will be NULL, after AllocatePool fails to allocate buffer for AllocatedOutputBuffer, the code will call FreePool (ScratchBuffer), but ScratchBuffer == NULL. This patch is to only free ScratchBuffer when it is not NULL. 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>
2017-06-26MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocolAmit Kumar1-12/+14
Change since v3: 1) Fixed issue when Attributes = EFI_OPEN_PROTOCOL_TEST_PROTOCOL and Inteface = NULL case. [Reported by:star.zeng at intel.com] Change Since v2: 1) Modified to use EFI_ERROR to get status code Change since v1: 1) Fixed typo protocal to protocol 2) Fixed coding style Modified source code to update Interface as per spec. 1) In case of Protocol is un-supported, interface should be returned NULL. 2) In case of any error, interface should not be modified. 3) In case of Test Protocol, interface is optional. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Amit Kumar <amit.ak@samsung.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-06-26IntelSiliconPkg: Add package DSC fileHao Wu1-0/+46
https://bugzilla.tianocore.org/show_bug.cgi?id=608 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2017-06-26BaseTools/PatchCheck.py: Add warning info for new binary filesHao Wu1-13/+21
The commit adds the detection of adding new binary files in a patch file or in a commit. The following warning messages will be appended at the end of the script output: WARNING - The following binary files will be added into the repository: <BinaryFile1> <BinaryFile2> ... Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-06-26BaseTools/PatchCheck.py: Fix misreport for binary changes in patchHao Wu1-3/+3
For a patch file that: 1. Contains a binary change 2. Contains any other changes after the binary change PatchCheck.py will complains with the following error: * Patch format error: diff found after end of patch Line: literal XXXX This commit resolves this misreport. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-06-24BaseTools: support building the same INF more than once with -m optionYonghong Zhu1-6/+9
Currently DSC file [Components] Section can support building the same INF more than once for the same arch, this patch support build with -m option to generate multiple instances. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>