summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ArmPkg/ArmMmuLib: support page tables in cacheable memory onlyArd Biesheuvel2016-11-301-25/+24
| | | | | | | | | | | | | | | | | Translation table walks are always cache coherent on ARMv8-A, so cache maintenance on page tables is never needed. Since there is a risk of loss of coherency when using mismatched attributes, and given that memory is mapped cacheable except for extraordinary cases (such as non-coherent DMA), restrict the page table walker to performing cacheable accesses to the translation tables. For DEBUG builds, retain some of the logic so that we can double check that the memory holding the root translation table is indeed located in memory that is mapped cacheable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* UefiCpuPkg/MicrocodeUpdate: Fix GetImage APIJiewen Yao2016-11-301-0/+10
| | | | | | | | | | | Current GetImage API forgets to return data to caller. Add code to fix it. Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* UefiCpuPkg/PiSmmCpu: relax superpage protection on page split.Jiewen Yao2016-11-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | PiSmmCpu driver may split page for page attribute request. Current logic not only propagates the super page attribute to the leaf page attribut, but also to the directory page attribute. However, the later might be wrong because we cannot clear protection without touching directory page attribute. The effective protection is the strictest combination across the levels. We should always clear protection on directory page and set protection on leaf page for easy clearing later. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* SignedCapsulePkg: GetImage() return EFI_UNSUPPORTED.Jiewen Yao2016-11-301-12/+0
| | | | | | | | | | According to UEFI spec, unsupported function should return EFI_UNSUPPORTED directly. Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* IntelFsp2Pkg: Add PACKAGES_PATH supportThomaiyar, Richard Marian2016-11-301-3/+7
| | | | | | | | | | | | Add PACKAGES_PATH support in GenCfgOpt.py Cc: Maurice Ma <maurice.ma@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Richard Thomaiyar <richard.marian.thomaiyar@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
* SourceLevelDebugPkg: Avoid to re-init IDT table again at SMI entryJeff Fan2016-11-301-1/+9
| | | | | | | | | | | | | | | Current SmmDebugAgentLib will initialize IDT table to support source debugging at each time SMI entry on SMM BSP. Actually, we only need to initialize IDT table at first time SMI entry. Add one flag to avoid re-initializing IDT table. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg/SdMmcPciHcDxe: Replace deprecated debug level macrosFeng Tian2016-11-304-88/+88
| | | | | | | | | | EFI_D_INFO, EFI_D_VERBOSE, EFI_D_WARN and EFI_D_ERROR are replaced with currently recommended values. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jan Dabros <jsd@semihalf.com> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* BaseTools: fix the bug to add PaletteSize info into AutoGenYonghong Zhu2016-11-301-3/+4
| | | | | | | | | | Fix the bug to add PaletteSize info into AutoGen.c when the flag UEFI_HII_RESOURCE_SECTION is set to FALSE. 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>
* BaseTools CommonLib: Update ReadMemoryFileLine() to read line in file scopeLiming Gao2016-11-301-0/+3
| | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=255 Check CurrentFilePointer to make sure it not exceed the end of file. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* Vlv2TbltDevicePkg: Fix IA32 boot timeoutsMichael Kinney2016-11-291-6/+3
| | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=264 The IA32 build gets timeouts booting to the UEFI Shell. Update the IA32 DSC file to match the X64 DSC file disabling the fTPM feature. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: David Wei <david.wei@intel.com> Cc: Mang Guo <mang.guo@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* Vlv2TbltDevicePkg/PlatformFlashAccessLib: Fix IA32 build issuesMichael Kinney2016-11-291-6/+6
| | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=263 Fix IA32 build issues in the PlatformFlashAccessLib. Some of the UINT64 FLASH addresses values need to be typecast to UINTN. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: David Wei <david.wei@intel.com> Cc: Mang Guo <mang.guo@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* Vlv2TbltDevicePkg: Remove SMM binary modules from FDFMichael Kinney2016-11-292-4/+14
| | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=261 https://bugzilla.tianocore.org/show_bug.cgi?id=262 Remove the PowerManagement2 binary SMM module that generates an ASSERT() and the DigitalThermalSensor binary SMM module that causes an AP to be stuck in the busy state. This is a workaround until these two SMM binary modules can be updated. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: David Wei <david.wei@intel.com> Cc: Mang Guo <mang.guo@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* Vlv2TbltDevicePkg/PlatformInitPei: Workaround unaligned SMRAM sizeMichael Kinney2016-11-293-3/+18
| | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=260 The PiSmmCPuDxeSmm module requires the SMRR base address and length to be aligned. The memory initialization for Vlv2TbltDevicePkg produces an SMRAM base address that is on a 16MB boundary and an SMRAM length of 12MB. The SMRAM length is rounded up to 16MB. This is a workaround until the binary module that produces the gEfiSmmPeiSmramMemoryReserveGuid HOB is updated Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: David Wei <david.wei@intel.com> Cc: Mang Guo <mang.guo@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* Vlv2TbltDevicePkg: Set CAPSULE_ENABLE to TRUEMichael Kinney2016-11-291-1/+1
| | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=259 Set CAPSULE_ENABLE to TRUE so the standard Vlv2TbltDevicePkg platform builds can complete. Build_IFWI.bat assumes this flag is TRUE. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: David Wei <david.wei@intel.com> Cc: Mang Guo <mang.guo@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* Vlv2TbltDevicePkg: Allow BaseTools to run from sourcesMichael Kinney2016-11-291-1/+1
| | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=258 Update bld_vlv.bat to run BaseTools build command with a call statement to support running the build command from python sources. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: David Wei <david.wei@intel.com> Cc: Mang Guo <mang.guo@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* BaseTools: Fix bug for decimal value of VPDPCD offset display in reportYonghong Zhu2016-11-291-1/+4
| | | | | | | | | | | current if we set VPD PCD's offset to a decimal value, eg: 22, this value is displayed incorrectly in the "FD VPD Region" section in the report.txt. 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>
* OvmfPkg/PlatformPei: take VCPU count from QEMU and configure MpInitLibLaszlo Ersek2016-11-297-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | These settings will allow CpuMpPei and CpuDxe to wait for the initial AP check-ins exactly as long as necessary. It is safe to set PcdCpuMaxLogicalProcessorNumber and PcdCpuApInitTimeOutInMicroSeconds in OvmfPkg/PlatformPei. OvmfPkg/PlatformPei installs the permanent PEI RAM, producing gEfiPeiMemoryDiscoveredPpiGuid, and UefiCpuPkg/CpuMpPei has a depex on gEfiPeiMemoryDiscoveredPpiGuid. It is safe to read the fw_cfg item QemuFwCfgItemSmpCpuCount (0x0005). It was added to QEMU in 2008 as key FW_CFG_NB_CPUS, in commit 905fdcb5264c ("Add common keys to firmware configuration"). Even if the key is unavailable (or if fw_cfg is entirely unavailable, for example on Xen), QemuFwCfgRead16() will return 0, and then we stick with the current behavior. Cc: Igor Mammedov <imammedo@redhat.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* UefiCpuPkg/MpInitLib: wait no longer than necessary for initial AP startupLaszlo Ersek2016-11-291-1/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes a platform knows exactly how many CPUs it has at boot. It should be able to - set PcdCpuMaxLogicalProcessorNumber dynamically to this number, - set PcdCpuApInitTimeOutInMicroSeconds to a very long time (for example MAX_UINT32, approx. 71 minutes), - and expect that MpInitLib wait exactly as long as necessary for all APs to report in. Other platforms should be able to continue setting a reasonably large upper bound on supported CPUs, and waiting for a reasonable, fixed amount of time for all APs to report in. Add this functionality. The TimedWaitForApFinish() function will return when all APs have reported in, or the timeout has expired -- whichever happens first. (Accessing these PCDs dynamically is safe. The PEI and DXE phase instances of this library are restricted to PEIM and DXE_DRIVER client modules, thus the PCD accesses cannot be linked into runtime code.) Cc: Igor Mammedov <imammedo@redhat.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=116 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>
* MdeModulePkg/EbcDxe: add EBC Debugger configuration applicationPete Batard2016-11-2911-0/+378
| | | | | | | | | | | | | * Introduce a generic Debugger Configuration protocol. * Add private configuration data in the EBC Debugger and make it register the Debugger Configuration protocol on initialization. * Add a shell application that uses the protocol above to access the private data in order to configure the EBC debugger. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Pete Batard <pete@akeo.ie> reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg PeiCore: Make SetPeiServicesTablePointer() early in EntryPointLiming Gao2016-11-291-9/+9
| | | | | | | | | | | | | Make SetPeiServicesTablePointer() earlier than ProcessLibraryConstructorList() so the constructor() function can get the correct pei service table pointer. https://bugzilla.tianocore.org/show_bug.cgi?id=238 Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg: Fix GCC build failureDandan Bi2016-11-294-16/+10
| | | | | | | | Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Pete Batard <pete@akeo.ie> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen.yao@intel.com
* UefiCpuPkg/PiSmmCpuDxeSmm: handle dynamic PcdCpuMaxLogicalProcessorNumberLaszlo Ersek2016-11-282-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "UefiCpuPkg/UefiCpuPkg.dec" already allows platforms to make PcdCpuMaxLogicalProcessorNumber dynamic, however PiSmmCpuDxeSmm does not take this into account everywhere. As soon as a platform turns the PCD into a dynamic one, at least S3 fails. When the PCD is dynamic, all PcdGet() calls translate into PCD DXE protocol calls, which are only permitted at boot time, not at runtime or during S3 resume. We already have a variable called mMaxNumberOfCpus; it is initialized in the entry point function like this: > // > // If support CPU hot plug, we need to allocate resources for possibly > // hot-added processors > // > if (FeaturePcdGet (PcdCpuHotPlugSupport)) { > mMaxNumberOfCpus = PcdGet32 (PcdCpuMaxLogicalProcessorNumber); > } else { > mMaxNumberOfCpus = mNumberOfCpus; > } There's another use of the PCD a bit higher up, also in the entry point function: > // > // Use MP Services Protocol to retrieve the number of processors and > // number of enabled processors > // > Status = MpServices->GetNumberOfProcessors (MpServices, &mNumberOfCpus, > &NumberOfEnabledProcessors); > ASSERT_EFI_ERROR (Status); > ASSERT (mNumberOfCpus <= PcdGet32 (PcdCpuMaxLogicalProcessorNumber)); Preserve these calls in the entry point function, and replace all other uses of PcdCpuMaxLogicalProcessorNumber -- there are only reads -- with mMaxNumberOfCpus. For PcdCpuHotPlugSupport==TRUE, this is an unobservable change. For PcdCpuHotPlugSupport==FALSE, we even save SMRAM, because we no longer allocate resources needlessly for CPUs that can never appear in the system. PcdCpuMaxLogicalProcessorNumber is also retrieved in "UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c", but only in the library instance constructor, which runs even before the entry point function is called. Cc: Igor Mammedov <imammedo@redhat.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=116 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
* SecurityPkg Tcg2ConfigDxe: Align Attempt TPM Device help with optionsStar Zeng2016-11-281-3/+2
| | | | | | | | | | | | Current options only have TPM 1.2 and TPM 2.0, but help shows Disable, TPM1.2, or TPM2.0, they are mismatched. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@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>
* SecurityPkg Tcg2ConfigDxe: Remove BlockSID actions and related stringsStar Zeng2016-11-282-6/+0
| | | | | | | | | | | | | Tcg2ConfigDxe has no related code to handle BlockSID related actions that have been covered by OpalPasswordDxe driver. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Eric Dong <eric.dong@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: Eric Dong <eric.dong@intel.com>
* SecurityPkg OpalPasswordDxe: Use PP actions to enable BlockSIDEric Dong2016-11-287-60/+159
| | | | | | | | | | | Update the implementation to use PP BlockSID related actions. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* SecurityPkg Tcg2PPLib: Support BlockSID related actionsStar Zeng2016-11-284-76/+217
| | | | | | | | | | | | | | Then Tcg2PhysicalPresenceLib can support TCG2 PP TPM2, storage management and vendor specific requests according to Physical Presence Interface Specification. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Eric Dong <eric.dong@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: Eric Dong <eric.dong@intel.com>
* MdePkg IndustryStandard: Add DDR3, DDR4 and LPDDR definition per SPD specLiming Gao2016-11-284-11/+2221
| | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=201 In V3, Use Odt to replace ODT, Cke to replace CKE, Id to replace ID, and Cl to replace CL in structure field name. In V2, separate DDR3, DDR4 and LPDDR definition into the different files; use the different SPD prefix as structure definitions for each SPD type. Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
* MdeModulePkg/NetLib: Handle an invalid IPv6 address caseJiaxin Wu2016-11-282-0/+12
| | | | | | | | | | | | | Handle an invalid IPv6 address in NetLibAsciiStrToIp6(), like '2000:aaaa::1com'. Cc: Zhang Lubo <lubo.zhang@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
* UefiCpuPkg/DxeMpLib: Remove unnecessary ret instructionJeff Fan2016-11-282-2/+0
| | | | | | | | | | | Reported-by: Laszlo Ersek <lersek@redhat.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
* UefiCpuPkg/DxeMpLib: Fix bug when getting target C-State from eaxJeff Fan2016-11-281-1/+1
| | | | | | | | | | | | | | | | | AP will get target C-State from eax[7:4]. We do shift in ebx firstly before set to eax. It will lead ebx is incorrect in the next time. The fix is to set ebx to eax firstly and does shift in eax. Thus, ebx could keep original value. Reported-by: Laszlo Ersek <lersek@redhat.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
* UefiCpuPkg/DxeMpLib: Make sure APs in safe loop codeJeff Fan2016-11-284-4/+15
| | | | | | | | | | | | | Add one semaphore to make sure BSP to wait till all APs run in AP safe loop code. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
* UefiCpuPkg/DxeMpLib: Allocate new safe stack < 4GBJeff Fan2016-11-284-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | For long mode DXE, we will disable paging on AP to protected mode to execute AP safe loop code in reserved memory range under 4GB. But we forget to allocate stack for AP under 4GB and AP still are using original AP stack. If original AP stack is larger than 4GB, it cannot be used after AP is transferred to protected mode. Besides MwaitSupport == TRUE, AP stack is still required during phase of disabling paging in long mode DXE. Moreover, even though AP stack is always under 4GB (a) in Ia32 DXE and (b) with this patch, after transferring to protected mode from X64 DXE, AP stack (in BootServiceData) maybe crashed by OS after Exit Boot Service event. This fix is to allocate reserved memory range under 4GB together with AP safe loop code. APs will switch to new stack in safe loop code. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
* UefiCpuPkg/DxeMpLib: Get safe AP loop handler from global variableJeff Fan2016-11-281-2/+2
| | | | | | | | | | | | | AP loop function is already saved into global variable, needn't to get it from AP function parameter. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
* ArmPlatformPkg: Fix VE RTSM mem map descriptor countSami Mujawar2016-11-251-2/+3
| | | | | | | | | | | | | | | The number of memory map entries used exceeded the allocated count, thereby causing memory corruption. Fixed the number of Virtual Memory Map Descriptors allocated in describing the RTSM Memory Map. Also added an assert to confirm that the descriptor count has not been exceeded, in the hope that it may help highlight the problem should a new entry be added. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPlatformPkg: Reformat VE Memory Map codeEvan Lloyd2016-11-251-54/+45
| | | | | | | | | | | | | | | This change is purely cosmetic, with no functional impact, and only exists to isolate cosmetic changes from a functional fix. Some indentation is adjusted. Overlength lines are re-flowed. alignment on = is adjusted as some lines exceeded 80 columns. if statement converted to conditional assignment. Redundant re-calculation of CacheAttributes removed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPkg: remove the LinuxLoader applicationArd Biesheuvel2016-11-2514-2873/+0
| | | | | | | | | | | | | The LinuxLoader application boots Linux in a way that prevents the OS from accessing UEFI runtime services. Since we have better ways now of invoking the kernel (via GRUB, or directly via the kernel's UEFI stub), remove the obsolete LinuxLoader so that people will no longer mistake it for a suitable reference of how to invoke the OS from UEFI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
* BeagleBoardPkg/BeagleBoardPkg.dsc: remove the LinuxLoader applicationArd Biesheuvel2016-11-252-15/+0
| | | | | | | | | | The LinuxLoader should no longer be used now that both the ARM and arm64 kernels as well as GRUB have full support for acting as an OS loader in the UEFI spec sense. So remove it from the Beagle build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
* EmbeddedPkg/AndroidFastboot: drop dependency on the LinuxLoaderArd Biesheuvel2016-11-251-48/+22
| | | | | | | | | | | When booting the kernel via Fastboot, invoke the kernel image directly rather than passing it to the LinuxLoader app. This requires the kernel image to be built with UEFI stub support. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
* MdeModulePkg/EbcDebugger: Compare ASCII char with '\0'Hao Wu2016-11-251-2/+2
| | | | | | | | | Current code is using L'\0' to compare with a ASCII char. Cc: Jiewen Yao <jiewen.yao@intel.com> 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>
* MdeModulePkg/EbcDebugger: Add ASSERT to ensure FieldBuffer is not NULLHao Wu2016-11-251-1/+2
| | | | | | | | | | | | | | In function EdbLoadCodBySymbolByIec(), AsciiStrGetNewTokenField() at line 1589 will return NULL if the first character in 'LineBuffer' is '\0'. But the previous if statement at line 1576 ensures the above case will not happen. This commit adds ASSERT as warnings for the case that will not happen. Cc: Jiewen Yao <jiewen.yao@intel.com> 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>
* MdeModulePkg/EbcDebugger: Add missing check for symbol not foundHao Wu2016-11-251-2/+2
| | | | | | | | | | | | | | In function DebuggerDisplaySymbolAccrodingToAddress(), when variable 'CandidateAddress' (returned by EbdFindSymbolAddress function) equals (UINTN) -1, it also indicates that the symbol is not found at the given address. This commit adds this missing check. Cc: Jiewen Yao <jiewen.yao@intel.com> 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>
* MdeModulePkg/EbcDebugger: Add check for invalid 'CommandArg'Hao Wu2016-11-251-1/+13
| | | | | | | | | | | Add checks for the return value of function Atoi() in EdbCmdBreakpoint.c. If the input parameter 'CommandArg' contains non-digit character, print corresponding error message. Cc: Jiewen Yao <jiewen.yao@intel.com> 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>
* MdeModulePkg/EbcDebugger: Operands of same size for bitwise operationHao Wu2016-11-251-3/+3
| | | | | | | | | | Operands in a bitwise operation should have the same size to eliminate unexpected results. Cc: Jiewen Yao <jiewen.yao@intel.com> 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>
* MdeModulePkg/DriverSample: Remove the password related codesDandan Bi2016-11-255-294/+1
| | | | | | | | | | | | In current DriverSampleDxe, the sample code of password is not a good example, so we plan to remove it. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/DriverSampleDxe: Remove the non-interactive passwordDandan Bi2016-11-252-11/+0
| | | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Clear the buffer after using itDandan Bi2016-11-252-1/+3
| | | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/SetupBrowser:Don't support password without interactive flagDandan Bi2016-11-251-21/+2
| | | | | | | | | | | | | In current SetupBrowser, the logic related to non-interative password is not correct. How to support it correctly or whether support it is still under investigation. First step remove the incorrect logic. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/DisplayEngine: Popup dialogue when password is not supportedDandan Bi2016-11-254-3/+15
| | | | | | | | | | | | when the password is not supported, pop up a dialogue to let user know the reason. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* EmbeddedPkg/MmcDxe: expand to support multiple blocksHaojian Zhuang2016-11-242-59/+121
| | | | | | | | | | Make use of DMA to transfer multiple blocks at one time. It could improve the performance on MMC/SD driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* EmbeddedPkg/MmcDxe: set I/O speed and bus width in SD stackHaojian Zhuang2016-11-242-0/+122
| | | | | | | | | Add more SD commands to support 4-bit bus width & iospeed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>