summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg/metafile: Add PCD PcdCpuStackGuardJian J Wang2017-12-082-0/+14
| | | | | | | | | | | | | | | | PcdCpuStackGuard is introduced to enable/disable Stack Guard feature. Its value is FALSE by default. This feature is suggested to be enabled only if the cpu driver and CpuExceptionHandlerLib have supported stack switch for the processor used in platform. Otherwise the exception dump message won't be printed out when there's a stack overflow happened. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Suggested-by: Ayellet Wolman <ayellet.wolman@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Jeff Fan <vanjeff_919@hotmail.com> Reviewed-by: Jiewen.yao@intel.com
* IntelFrameworkModulePkg/KeyboardDxe: Use macro to enable/disable page 0Jian J Wang2017-12-082-109/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation uses following two methods EnableNullDetection() DisableNullDetection() to enable/disable page 0. These two methods will check PCD PcdNullPointerDetectionPropertyMask to know if the page 0 is disabled or not. This is due to the fact that old GCD service doesn't provide paging related attributes of memory block. Since this issue has been fixed, GCD services can be used to determine the paging status of page 0. This is also make it possible to just use a new macro ACCESS_PAGE0_CODE( <code accessing page 0> ); to replace above methods to do the same job, which also makes code more readability. Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* IntelFrameworkModulePkg/LegacyBios: Use macro to enable/disable page 0Jian J Wang2017-12-087-273/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation uses following two methods EnableNullDetection() DisableNullDetection() to enable/disable page 0. These two methods will check PCD PcdNullPointerDetectionPropertyMask to know if the page 0 is disabled or not. This is due to the fact that old GCD service doesn't provide paging related attributes of memory block. Since this issue has been fixed, GCD services can be used to determine the paging status of page 0. This is also make it possible to just use a new macro ACCESS_PAGE0_CODE( <code accessing page 0> ); to replace above methods to do the same job, which also makes code more readability. Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* IntelFrameworkPkg/LegacyBios.h: Add a macro to guarantee page 0 accessJian J Wang2017-12-081-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the introduction of NULL pointer detection feature, page 0 will be disabled if the feature is enabled, which will cause legacy code failed to update legacy data in page 0. This macro is introduced to make sure the page 0 is enabled before those code and restore the original status of it afterwards. Another reason to introduce this macro is to eliminate the dependency on the PcdNullPointerDetectionPropertyMask. Because this is a new PCD, it could cause some backward compatibility issue for some old packages. This macro will simply check if the page 0 is disabled or not. If it's disabled, it will enable it before code updating page 0 and disable it afterwards. Otherwise, this macro will do nothing to page 0. The usage of the macro will be look like (similar to DEBUG_CODE macro): ACCESS_PAGE0_CODE( <code accessing page 0> ); Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbolMichael Kinney2017-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=573 https://bugzilla.tianocore.org/show_bug.cgi?id=796 The same issue is reported again by GCC. Resend this patch again. This patch renames the duplicated function name to fix it. The SecPeiDebugAgentLib uses the global variable mMemoryDiscoveredNotifyList for a PPI notification on the Memory Discovered PPI. This same variable name is used in the DxeIplPeim for the same PPI notification. The XCODE5 tool chain detects this duplicate symbol when the OVMF platform is built with the flag -D SOURCE_DEBUG_ENABLE. The fix is to rename this global variable in the SecPeiDebugAgentLib library. Cc: Andrew Fish <afish@apple.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* SignedCapsulePkg: Update EdkiiSystemCapsuleLib to check PCD valueLiming Gao2017-12-082-2/+87
| | | | | | | | | If PCD value is not set, register PcdCallBack to hook PCD value set Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* UefiCpuPkg: Update SecCore to get BFV size based on BFV header FvLengthLiming Gao2017-12-081-1/+1
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* UefiCpuPkg: SmmCpuFeaturesLib Add the missing ASM_PFX in nasm codeLiming Gao2017-12-081-3/+3
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* UefiCpuPkg: PiSmmCpuDxeSmm Add the missing ASM_PFX in nasm codeLiming Gao2017-12-081-5/+5
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* UefiCpuPkg PiSmmCpuDxeSmm: SMM profile and static paging mutual exclusionStar Zeng2017-12-084-9/+35
| | | | | | | | | | | | | | | | | | SMM profile and static paging could not be enabled at the same time, this patch is to add check and comments to make sure it. Similar comments are also added for the case of static paging and heap guard for SMM. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg/NetLib: Fix an error when AIP doesn't support network media ↵fanwang22017-12-081-0/+18
| | | | | | | | | | | | | | | | state detection AIP may not support detecting network media state, in this case, should call NetLibDetectMedia to get media state. This patch is to fix this issue. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* UefiCpuPkg PiSmmCpuDxeSmm: Only DumpCpuContext in error caseStar Zeng2017-12-082-4/+8
| | | | | | | | | | | | | | | | | | Only DumpCpuContext in error case, otherwise there will be too many debug messages from DumpCpuContext() when SmmProfile feature is enabled by setting PcdCpuSmmProfileEnable to TRUE. Those debug messages are not needed for SmmProfile feature as it will record those information to buffer for further dump. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 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> Acked-by: Laszlo Ersek <lersek@redhat.com>
* BaseTools: Fix GenSec can't found the depex fileYunhua Feng2017-12-082-4/+5
| | | | | | | | | | | Filter the FileList when multiple genfds thread options is not enabled. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Arm/AArch64 - filter #pragma pack() when __ASSEMBLER__Leif Lindholm2017-12-072-2/+2
| | | | | | | | | | | | clang, when used as a preprocessor for dtc, does not discard #pragma statements although -x assembler-with-cpp is specified. This causes dtc to barf at a #pragma pack() statement that is already filtered out for __GNUC__. So add a check to also filter this out if __ASSEMBLER__. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg PiSmmIpl: Handle CommSize OPTIONAL caseStar Zeng2017-12-072-23/+40
| | | | | | | | | | | | Handle CommSize OPTIONAL case for SmmCommunicate. And return EFI_ACCESS_DENIED when CommunicationBuffer is not valid for SMM to access. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdePkg MmCommunication.h: Follow PI spec to update EFI_MM_COMMUNICATEStar Zeng2017-12-071-2/+12
| | | | | | | | | | | | Follow PI spec (>= 1.5) to add new return status code description and make CommSize OPTIONAL. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* EmulatorPkg: Fix build failure due to Tftp library removalRuiyu Ni2017-12-072-5/+8
| | | | | | | | | | | | | | | | | | The TFTP command was converted from a NULL class library instance to a dynamic shell command in commit 0961002352e9. The ShellLib and FileHandleLib resolutions are moved from Shell app <LibraryClasses> to [LibraryClasses.common] because dynamic shell commands implemented as DXE_DRIVER modules also depend on these libraries. PcdShellLibAutoInitialize must be set to FALSE for both the shell app itself and the dynamic shell command modules. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmbeddedPkg: AndroidBootApp: fix clang compilationLeif Lindholm2017-12-062-6/+7
| | | | | | | | | | | | Address an incorrect function prototype (using ; instead of ,) in AndroidBootImg.h. Also restructure code slightly to avoid a "may be used uninitialized" warning. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: add NOOPT target to platform .DSCsArd Biesheuvel2017-12-063-3/+3
| | | | | | | | | In order to allow the ArmVirtPkg platforms to be built using the NOOPT target, add it explicitly to the BUILD_TARGETS define. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg/NetLib: Add NetLibDetectMediaWaitTimeout() API to support ↵fanwang22017-12-063-0/+205
| | | | | | | | | | | | | | | | | | | | | | | | | EFI_NOT_READY media state detection In wireless connection, connecting state needs to be cared more about. ECR 1772 redefined the state EFI_NOT_READY to represent connecting state and can be retrieved from Aip protocol. This patch adds a new API to check media state at a specified time interval when network is connecting until the connection process finishes or timeout. V2: * Return error status code directly when Aip protocol falied to detect media rather than wait for another time's check. * Set media state default value to EFI_SUCCESS since some platforms may not support retrieving media state from Aip protocol. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* BaseTools: Fix GenSec GCC make failureYonghong Zhu2017-12-061-3/+3
| | | | | | | | | | | | | | | It is a regression bug introduced by the patch b37b108, it cause GenSec make failure on GCC Env. Cc: Liming Gao <liming.gao@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/DisplayEngineDxe: Remove unnecessary parentheses in 'if'Hao Wu2017-12-061-1/+1
| | | | | | | | | | | | This commit removes unnecessary parentheses in 'if' statements to resolve the build failures by the XCODE5 tool chain. Cc: Eric Dong <eric.dong@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/PartitionDxe: Remove unnecessary parentheses in 'if'Hao Wu2017-12-061-1/+1
| | | | | | | | | | | | This commit removes unnecessary parentheses in 'if' statements to resolve the build failures by the XCODE5 tool chain. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/Core/Dxe: log informative memprotect msgs at DEBUG_INFO levelLaszlo Ersek2017-12-051-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 7eb927db3e25 ("MdeModulePkg/DxeCore: implement memory protection policy", 2017-02-24), we added two informative messages with the InitializeDxeNxMemoryProtectionPolicy() function: > InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to > active memory regions and > InitializeDxeNxMemoryProtectionPolicy: applying strict permissions to > inactive memory regions The messages don't report errors or warnings, thus downgrade their log masks from DEBUG_ERROR to DEBUG_INFO. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Eric Dong <eric.dong@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1520485 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com>
* NetworkPkg: Update IScsiDxe to pass XCODE buildLiming Gao2017-12-052-3/+3
| | | | | | | | | Fix the warning equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liang Vincent <vincent.liang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* MdeModulePkg: Update PeiCore to pass XCODE tool chainLiming Gao2017-12-051-1/+2
| | | | | | | | It fixes the warning for loop has empty body [-Werror,-Wempty-body]. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liang Vincent <vincent.liang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg CapsulePei: Sort and merge memory resource entriesStar Zeng2017-12-051-0/+90
| | | | | | | | | | | | | | | | | Sort and merge memory resource entries to handle the case that the memory resource HOBs are reported differently between BOOT_ON_FLASH_UPDATE boot mode and normal boot mode, and the capsule buffer from UpdateCapsule at normal boot sits across two memory resource descriptors at BOOT_ON_FLASH_UPDATE boot mode. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Dakota Chiang <dakota.chiang@intel.com> Tested-by: Dakota Chiang <dakota.chiang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
* BaseTools: Update Makefile to support FFS file generationYonghong Zhu2017-12-0524-411/+793
| | | | | | | | | | | Update Makefile to support FFS file generation with new build option --genfds-multi-thread. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Update Gensec to set PROCESSING_REQUIRED valueYonghong Zhu2017-12-051-0/+74
| | | | | | | | | | | This patch add new option --dummy file, and we compare the dummpy file with input file to decide whether we need to set PROCESSING_REQUIRED value. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Update Trim to generate VfrBinOffset BinaryYonghong Zhu2017-12-051-3/+78
| | | | | | | | | | Its usage is "Trim --Vfr-Uni-Offset -o $(OUTPUT_DIR)(+)$(MODULE_NAME)VfrOffset.sec --ModuleName=$(MODULE_NAME) --DebugDir=$(DEBUG_DIR)" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: GenFfs support to get alignment value from SectionFileYonghong Zhu2017-12-051-3/+132
| | | | | | | | | | Update GenFfs tool to get alignment value from SectionFile when use the new option -n 0. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/NvmExpressDxe: fix error status overrideHeyi Guo2017-12-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f6b139b added return status handling to PciIo->Mem.Write. However, the second status handling will override EFI_DEVICE_ERROR returned in this branch: // // Check the NVMe cmd execution result // if (Status != EFI_TIMEOUT) { if ((Cq->Sct == 0) && (Cq->Sc == 0)) { Status = EFI_SUCCESS; } else { Status = EFI_DEVICE_ERROR; ^^^^^^^^^^^^^^^^ Since PciIo->Mem.Write will probably return SUCCESS, it causes NvmExpressPassThru to return SUCCESS even when DEVICE_ERROR occurs. Callers of NvmExpressPassThru will then continue executing which may cause further unexpected results, e.g. DiscoverAllNamespaces couldn't break out the loop. So we save previous status before calling PciIo->Mem.Write and restore the previous one if it already contains error. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Eric Dong <eric.dong@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* ArmPlatformPkg/LcdGraphicsOutputDxe: remove VExpressPkg dependencyArd Biesheuvel2017-12-042-2/+0
| | | | | | | | | | | The two instantiations of LcdGraphicsOutputDxe reference VExpressPkg.dec without actually relying on anything it defines. In preparation of moving out VExpressPkg into edk2-platforms, drop these references so we can keep LcdGraphicsOutputDxe in EDK2. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: remove PlatformIntelBdsLibArd Biesheuvel2017-12-043-508/+0
| | | | | | | | | | Now that the last user has switched to the generic BDS, the PlatformIntelBdsLib code in ArmPlatformPkg is no longer used, so remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmVirtPkg/ArmVirtXen: move from Intel to generic BDSArd Biesheuvel2017-12-042-4/+20
| | | | | | | | | | | | ArmVirtXen is the only remaining consumer of ArmPlatformPkg's PlatformIntelBdsLib implementation, which is tightly coupled to the deprecated Intel BDS. So move ArmVirtXen to the generic BDS as well, allowing us to get rid of PlatformIntelBdsLib entirely. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Julien Grall <julien.grall@linaro.org>
* ShellPkg/ShellPkg.dec: Change comments for PcdShellLibAutoInitializeRuiyu Ni2017-12-021-0/+1
| | | | | | | | | | | | | | When Dynamic command drivers links to ShellLib, the ShellLib constructor shouldn't be called because the Shell and ShellParameters protocols don't exist when the driver starts. So it's required to set PcdShellLibAutoInitialize to FALSE for dynamic command drivers. Update the comments in DEC file to describe such requirement for this PCD. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* QuarkPlatformPkg: Use DpDynamicCommand to replace PerformancePkg/dpRuiyu Ni2017-12-024-22/+31
| | | | | | | | | | Remove FvSimpleFileSystemDxe from Quark.dsc/fdf because it's not needed by using DpDynamicCommand driver. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Kelly Steele <kelly.steele@intel.com>
* Vlv2TbltDevicePkg: Use DpDynamicCommand to replace PerformancePkg/dpRuiyu Ni2017-12-025-25/+47
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: David David <david.wei@intel.com>
* MdeModulePkg DxeCore: Support USED_SIZE FV_EXT_TYPEStar Zeng2017-12-011-1/+83
| | | | | | | | | | | | | | | | The USED_SIZE FV_EXT_TYPE is introduced by PI 1.6 spec. The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find out how many EFI_FVB2_ERASE_POLARITY bytes are at the end of the FV. When the FV gets shadowed into memory you only need to copy the used bytes into memory and fill the rest of the memory buffer with the erase value. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg DxeCore: Check FvImage alignmentStar Zeng2017-12-011-13/+19
| | | | | | | | | | | | | No need to allocate aligned buffer if FvImage has been at required alignment. Then the code logic will be aligned with ProcessFvFile() in MdeModulePkg/Core/Pei/FwVol/FwVol.c. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg PeiCore: Support USED_SIZE FV_EXT_TYPEStar Zeng2017-12-011-3/+87
| | | | | | | | | | | | | | | | The USED_SIZE FV_EXT_TYPE is introduced by PI 1.6 spec. The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find out how many EFI_FVB2_ERASE_POLARITY bytes are at the end of the FV. When the FV gets shadowed into memory you only need to copy the used bytes into memory and fill the rest of the memory buffer with the erase value. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg PiFirmwareVolume.h: Add USED_SIZE FV_EXT_TYPE definitionsStar Zeng2017-12-011-2/+21
| | | | | | | | | | | | | | | | The definitions are introduced by PI 1.6 spec. The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find out how many EFI_FVB2_ERASE_POLARITY bytes are at the end of the FV. When the FV gets shadowed into memory you only need to copy the used bytes into memory and fill the rest of the memory buffer with the erase value. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* IntelSiliconPkg: Update MicrocodeUpdate build path in dscStar Zeng2017-12-011-2/+2
| | | | | | | | | | | That was missed in 43e12eeac8b125165b8a93c3501925a8893544ef. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* ArmPlatformPkg/PrePi: remove bogus IntelFrameworkModulePkg referenceArd Biesheuvel2017-11-302-2/+0
| | | | | | | | | PrePi does not use anything from IntelFrameworkModulePkg so remove the reference from its [Packages] sections. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/MemoryInitPeiLib: don't reserve primary FV in memoryMeenakshi Aggarwal2017-11-301-69/+0
| | | | | | | | | | | | | | Now that PrePi no longer exposes its internal code via special HOBs, we can remove the special handling of the primary FV, which needed to be reserved so that DXE core could call into the PE/COFF and LZMA libraries in the PrePi module. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Udit Kumar <udit.kumar@nxp.com> Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> [ardb: updated commit log] Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/PrePi: don't expose PE/COFF and LZMA libraries via HOBsArd Biesheuvel2017-11-304-116/+0
| | | | | | | | | | Avoid the need to preserve all memory exposed by PrePi indefinitely by removing the 'feature' that exposes the PE/COFF and LZMA libraries via special HOBs to other modules that may want to reuse the code. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* BeagleBoardPkg: clone MemoryInitPeiLibArd Biesheuvel2017-11-303-1/+263
| | | | | | | | | | | | | | | The common MemoryInitPeiLib implementation preserves the primary FV holding the PrePi module and the compressed secondary FV, and removes the memory it occupies from the memory map, hiding it from the OS. The only platform that actual requires this is BeagleBoardPkg, since it exposes the PeCoff and LZMA libraries in PrePi to DXE core via special HOBs. So let's give BeagleBoard its own MemoryInitPeiLib, so that we can clean up the generic version. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* BeagleBoardPkg: create private PrePi implementationArd Biesheuvel2017-11-3010-3/+839
| | | | | | | | | | | | | | | Clone the PrePi implementation for BeagleBoardPkg, so we can start removing some of the awkward optimizations that we'd rather not keep in reference code. Note that we only clone the unicore ARM flavor, which is all we need for BeagleBoard. In the case of PrePi, it involves libraries included by the SEC startup code that are exposed to DXE core via HOBs containing function pointers, which forces us to keep the primary FV reserved in memory. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/PrePi: call all constructors by handArd Biesheuvel2017-11-302-14/+7
| | | | | | | | | Call ProcessLibraryConstructorList () to invoke all library constructors by hand rather than calling only some of them explicitly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* EmbeddedPkg BeagleBoardPkg: move special HOB reuse libraries into platformArd Biesheuvel2017-11-306-5/+3
| | | | | | | | | | | | | | The BeagleBoard platform uses PeCoffLib and CustomDecompressLib implementations that invoke the library code that resides in the PrePi module via pointers exposed via special GUIDed HOBs. This is a nice hack, but not necessarily something we want to carry in reference code. So as a first step, move the libraries that expose this reused code into BeagleBoardPkg, and remove it from EmbeddedPkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>