summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-16BaseTools tools_def.txt: Include AutoGen.h in GCC ASLPP_FLAGSLiming Gao
https://bugzilla.tianocore.org/show_bug.cgi?id=227 Refer to VS ASLPP_FLAGS, force include AutoGen.h so that ASL code can use FixedPcdGetXX to get FixedPcd value. 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>
2016-11-16BaseTools tools_def.txt: Remove -P option in GCC ASLPP_FLAGSLiming Gao
https://bugzilla.tianocore.org/show_bug.cgi?id=227 After -P option is removed, the generated preprocessed ASL file will have line markers. The extra information can be removed by Trim script. ASL code can refer to the definition in C source file. This has been supported in VS and XCODE tool chains. 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>
2016-11-15ArmPkg/Library/ArmDmaLib: Deallocate Map buffer in case of errorDaniil Egranov
The patch is fixing memory leak in case of errors. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daniil Egranov <daniil.egranov@arm.com> Tested-by; Ryan Harkin <ryan.harkin@linaro.org> Style fixes: use goto for error handling, whitespace fixes Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-11-15SecurityPkg: Fix typos in commentsZhang, Chao B
This patch fixes the following typos: - intialized -> initialized - TURE -> TRUE - successull -> successfully - hanlder -> handler - funciton -> function - Seperator -> Separator - Sumbit -> Submit Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
2016-11-15SecurityPkg: Fix typos in commentsZhang, Chao B
This patch fixes the following typos: - intialized -> initialized - TURE -> TRUE - successull -> successfully - hanlder -> handler - funciton -> function - Seperator -> Separator - Sumbit -> Submit Also convert EFI_D_ERROR to DEBUG_ERROR for some debug messages. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
2016-11-15MdeModulePkg/CapsuleApp: remove unused definition.Jiewen Yao
remove EFI_CAPSULE_FROM_FILE_DIR remove EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED. no one uses them. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2016-11-15ShellPkg: Fix typos in comments and variablesGary Lin
- funciton -> function - paramter -> parameter - supresses -> suppresses - Seperator -> Separator - permenant -> permanent Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com>
2016-11-15OptionRomPkg: Fix typos in commentsGary Lin
- stoping -> stopping - Sumbit -> Submit - pionter -> pointer Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com>
2016-11-15Nt32Pkg: Fix typos in comments and variablesGary Lin
- discontiguous -> discontinuous - reloaced -> relocated - supresses -> suppresses - debuging -> debugging - suported -> supported - availble -> available - environmemt -> environment - Seperator -> Separator - remmeber -> remember - interperted -> interpreted - the a new -> the new - initailized -> initialized - attribue -> attribute - boundry -> boundary - nto -> not - permenent -> permanent - immediatly -> immediately - excuted -> executed Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com>
2016-11-15DuetPkg: Fix typos in commentsGary Lin
- TURE -> TRUE - successull -> successfully - Libary -> Library - Incude -> Include - futhure -> future - Predfined -> Predefined - minimue -> minimum - predeined -> predefined - excute -> execute - dirver -> driver - hanlde -> handle - boundry -> boundary Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com>
2016-11-15BaseTools: FILE DATA to support relative path under Multiple workspaceYonghong Zhu
Fix the bug that FILE DATA to support relative path under Multiple workspace. 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>
2016-11-15BaseTools: Fix the bug to support generate FFS by Align=AutoYonghong Zhu
FDF spec support to use 'Auto' as <FfsAlignmentValues>, but current Tool report error about -a=Auto is invalid option when we set Align=Auto for RAW File. 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>
2016-11-15UefiCpuPkg/PiSmmCpuDxeSmm: Decrease mNumberToFinish in AP safe codeJeff Fan
We will put APs into hlt-loop in safe code. But we decrease mNumberToFinish before APs enter into the safe code. Paolo pointed out this gap. This patch is to move mNumberToFinish decreasing to the safe code. It could make sure BSP could wait for all APs are running in safe code. https://bugzilla.tianocore.org/show_bug.cgi?id=216 Reported-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.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: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
2016-11-15UefiCpuPkg/PiSmmCpuDxeSmm: Place AP to 32bit protected mode on S3 pathJeff Fan
On S3 path, we may transfer to long mode (if DXE is long mode) to restore CPU contexts with CR3 = SmmS3Cr3 (in SMM). AP will execute hlt-loop after CPU contexts restoration. Once one NMI or SMI happens, APs may exit from hlt state and execute the instruction after HLT instruction. If APs are running on long mode, page table is required to fetch the instruction. However, CR3 pointer to page table in SMM. APs will crash. This fix is to disable long mode on APs and transfer to 32bit protected mode to execute hlt-loop. Then CR3 and page table will no longer be required. https://bugzilla.tianocore.org/show_bug.cgi?id=216 Reported-by: Laszlo Ersek <lersek@redhat.com> Analyzed-by: Paolo Bonzini <pbonzini@redhat.com> Analyzed-by: Laszlo Ersek <lersek@redhat.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.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: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
2016-11-15UefiCpuPkg/PiSmmCpuDxeSmm: Put AP into safe hlt-loop code on S3 pathJeff Fan
On S3 path, we will wake up APs to restore CPU context in PiSmmCpuDxeSmm driver. However, we place AP in hlt-loop under 1MB space borrowed after CPU restoring CPU contexts. In case, one NMI or SMI happens, APs may exit from hlt state and execute the instruction after HLT instruction. But the code under 1MB is no longer safe at that time. This fix is to allocate one ACPI NVS range to place the AP hlt-loop code. When CPU finished restoration CPU contexts, AP will execute in this ACPI NVS range. https://bugzilla.tianocore.org/show_bug.cgi?id=216 v2: 1. Make stack alignment per Laszlo's comment. 2. Trim whitespace at end of end. 3. Update year mark in file header. Reported-by: Laszlo Ersek <lersek@redhat.com> Analyzed-by: Paolo Bonzini <pbonzini@redhat.com> Analyzed-by: Laszlo Ersek <lersek@redhat.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.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: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
2016-11-15MdeModulePkg/BMMUI: add comments for function parameterDandan Bi
Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-11-14IntelSiliconPkg: Add PCD for Graphics VBT FFS GUIDGiri P Mudusuru
Added PCD PcdIntelGraphicsVbtFileGuid to store raw format Graphics Video BIOS Table (VBT) in FFS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-11-14BaseTools/Scripts: Add BinToPcd utilityMichael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=228 Add a utility that converts a binary file into a VOID* PCD value or a full DSC file VOID* PCD statement with support for all the DSC supported PCD sections. usage: BinToPcd [-h] [--version] -i INPUTFILE [-o OUTPUTFILE] [-p PCDNAME] [-t {VPD,HII}] [-m MAXSIZE] [-f OFFSET] [-n VARIABLENAME] [-g VARIABLEGUID] [-v] [-q] [--debug [0-9]] Convert a binary file to a VOID* PCD value or DSC file VOID* PCD statement. Copyright (c) 2016, Intel Corporation. All rights reserved. optional arguments: -h, --help show this help message and exit --version show program's version number and exit -i INPUTFILE, --input INPUTFILE Input binary filename -o OUTPUTFILE, --output OUTPUTFILE Output filename for PCD value or PCD statement -p PCDNAME, --pcd PCDNAME Name of the PCD in the form <PcdTokenSpaceGuidCName>.<PcdCName> -t {VPD,HII}, --type {VPD,HII} PCD statement type (HII or VPD). Default is standard. -m MAXSIZE, --max-size MAXSIZE Maximum size of the PCD. Ignored with --type HII. -f OFFSET, --offset OFFSET VPD offset if --type is VPD. UEFI Variable offset if --type is HII. -n VARIABLENAME, --variable-name VARIABLENAME UEFI variable name. Only used with --type HII. -g VARIABLEGUID, --variable-guid VARIABLEGUID UEFI variable GUID C name. Only used with --type HII. -v, --verbose Increase output messages -q, --quiet Reduce output messages --debug [0-9] Set debug level This utility can be used in PCD value mode to convert a binary file into a string that can then be copied into the PCD value field of a VOID* PCD. The following is an example of PCD value mode on an 8 byte test.bin file. BinToPcd.py -i test.bin {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} The DSC file VOID* PCD statement mode can be used to generate a complete PCD statement for the PCD section types that a DSC file supports: [PcdsFixedAtBuild] [PcdsPatchableInModule] [PcdsDynamicDefault] [PcdsDynamicExDefault] [PcdsDynamicVpd] [PcdsDynamicExVpd] [PcdsDynamicHii] [PcdsDynamicExHii] The PCD statement mode is useful when combined with a !include statement in a DSC file. BinToPcd.py can be used to convert a binary file to a PCD statement in an output file, and that output file can be included into a DSC file in the matching PCD section to set the value of the PCD to the value from the binary file without having to copy the value into the DSC file. Updates can be made to the included file without editing the DSC file. Some example use cases are the setting the public key PCDs such as: gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer The following example converts a public key binary file to a [PcdsFixedAtBuild] compatible PCD statement: BinToPcd.py -i PublicKey.bin -o PublicKey.pcd --pcd gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBufferkenSpaceGuid The PublicKey.pcd output file contains a single line: gEfiSecurityPkgTokenSpaceGuid.PcdPkcs7CertBuffer|{0x48, ...} A DSC file can be updated to include the PublicKey.pcd file: [PcdsFixedAtBuild] !include PublicKey.pcd Value examples =============== BinToPcd.py -i test.bin {0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} Normal examples: ================= BinToPcd.py -i test.bin -p Guid.Token Guid.Token|{0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} BinToPcd.py -i test.bin -p Guid.Token -m 20 Guid.Token|{0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a}|VOID*|20 VPD examples: ============= BinToPcd.py -i test.bin -p Guid.Token -t VPD Guid.Name|*|8|{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} BinToPcd.py -i test.bin -p Guid.Token -t VPD -f 20 Guid.Name|20|8|{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} BinToPcd.py -i test.bin -p Guid.Token -t VPD -m 10 Guid.Name|*|10|{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} BinToPcd.py -i test.bin -p Guid.Token -t VPD -f 20 -m 10 Guid.Name|20|10|{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x0d, 0x0a} HII examples: ============= BinToPcd.py -i test.bin -p Guid.Token -t HII -g VarGuid -n VarName Guid.Name|L"VarName"|VarGuid|0|{0x48, 0x65, 0x6c, 0x6c} BinToPcd.py -i test.bin -p Guid.Token -t HII -g VarGuid -n VarName -f 8 Guid.Name|L"VarName"|VarGuid|8|{0x48, 0x65, 0x6c, 0x6c} Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2016-11-14EmbeddedPkg: MmcDxe: add SPEC_VERS field in CSD structureHaojian Zhuang
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: Leif Lindholm <leif.lindholm@linaro.org>
2016-11-14EmbeddedPkg: MmcDxe: declare ECSD structureHaojian Zhuang
Declare fields in ECSD structure. And drop the original 128 words arrary. 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: Leif Lindholm <leif.lindholm@linaro.org>
2016-11-14EmbeddedPkg: MmcDxe: move ECSD into CardInfo structureHaojian Zhuang
Since ECSD also describes the information of card, move it into structure CardInfo. 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: Leif Lindholm <leif.lindholm@linaro.org>
2016-11-14EmbeddedPkg: MmcDxe: wait OCR busy bit freeHaojian Zhuang
According to eMMC spec, OCR.PowerUp bit is also busy bit. If the busy bit is '0', CMD1 should be sent and OCR should be fetched again. And add a timeout counter on the repeated steps. 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: Leif Lindholm <leif.lindholm@linaro.org>
2016-11-14DuetPkg: Add POSTBUILD in DSC files to run post-build automaticallyHao Wu
https://bugzilla.tianocore.org/show_bug.cgi?id=220 Currently, the post-build scripts PostBuild.bat/PostBuild.sh in DuetPkg need to be run manually. Especially for Windows batch script, it also requires users to set the build options (like tool chain, target and arch) in file Conf/target.txt. If users using command line options via '-t' or '-a', the post-build script won't work properly. The package DSC files now support the feature to execute post-build script automatically by adding a 'POSTBUILD' definition. This feature also passes the build options into the post-build script as parameters. This commit uses this feature to make the post-build works for DuetPkg more user-friendly. Also, ReadMe.txt is updated to reflect the new steps for UEFI Emulation (DUET) development. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-11-14DuetPkg: Use 'echo off' in BATCH script filesHao Wu
Instead of putting a '@' at the beginning of every command in BATCH script files, use 'echo off' at the beginning of each file. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-11-14DuetPkg: Resolve white-space issues for post-build scripts & ReadMeHao Wu
Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-11-14MdeModulePkg/UsbMass: Revert changes of removing retry logicFeng Tian
This patch is used to revert changes done in commit 17f3e942 bc527fbd75068d2d5752b6af54917487 - "MdeModulePkg/UsbMass: Not retry if usb bot transfer execution fail" It's because Usb Floppy will report DEVICE_ERROR for the first several cmds when it need spin up. so retry logic makes sense. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-11-14IntelFsp2Pkg: Support to return error status from FSP API doneThomaiyar, Richard Marian
Added FspMemoryInitDone2, FspTempRamExitDone2, FspSiliconInitDone2 to return error status to Boot Loader for FSP API calls. To maintain backward compatibility existing functions (FspMemoryInitDone, FspTempRamExitDone, FspSiliconInitDone) declaration left untouched. 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>
2016-11-14MdePkg: Fix spec mismatch in string representation of EMMC dev nodeFeng Tian
Cc: Eric Jin <eric.jin@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-11-14UefiCpuPkg/DxeMpLib: Place APs to suitable state on Legacy OS bootJeff Fan
Currently, DxeMpLib only places APs into specified c-state in Exit Boot Service callback function for UEFI OS boot. We need to put APs into specified c-state for legacy OS boot also. https://bugzilla.tianocore.org/show_bug.cgi?id=210 Cc: Laszlo Ersek <lersek@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Feng Tian <feng.tian@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: Feng Tian <feng.tian@intel.com>
2016-11-14UefiCpuPkg/DxeMpLib: Rename MpInitExitBootServicesCallback()Jeff Fan
Rename MpInitExitBootServicesCallback() to MpInitChangeApLoopCallback() because it will not only be invoked on Exit Boot Service Event, but also will be invoked on Legacy Ready To Boot Event. https://bugzilla.tianocore.org/show_bug.cgi?id=210 Cc: Laszlo Ersek <lersek@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Feng Tian <feng.tian@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: Feng Tian <feng.tian@intel.com>
2016-11-11UefiCpuPkg/DxeMpLib: Allocate below 4GB mem for AsmRelocateApLoopFuncJeff Fan
Current implementation just allocates reserve memory for AsmRelocateApLoopFunc. It not be safe because APs will be placed into 32bit protected mode on long mode DXE. This reserve memory must be located below 4GB memory. This fix is to allocate < 4GB memory for AsmRelocateApLoopFunc. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.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: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: strip whitespace at EOL] Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2016-11-11SignedCapsulePkg/CapsulePkg.dsc: Add capsule related component.Jiewen Yao
Add capsule related component to check build. Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
2016-11-11CryptoPkg/BaseCryptLib: Make comments consistent with the functionDandan Bi
Correct the unaligned parameter names in comments (BaseCryptLib.h and HMAC-SHA256 wrapper implementation) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Qin Long <qin.long@intel.com>
2016-11-11MdeModulePkg/BootLogoLib: Remove invalid if judgmentsSong, BinX
FreePool (Blt) function will be called in while loop, cannot be removed. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bell Song <binx.song@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-11-11ShellPkg/ShellCommandLib: Add missing EFIAPI for public library APIsRuiyu Ni
DumpHex() and CatSDumpHex() are public library APIs but don't have EFIAPI modifier. Add the missing EFIAPI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-11-10BaseTools/GenSec: Return correct status when input file size is 0Hao Wu
Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> 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>
2016-11-10BaseTools/GenFfs: Fix return too early when input file is of size 0Hao Wu
Commit 2cb874352423fcfd180199e6de8298567dff8e7f eliminates possible NULL pointer dereference in GenFfs tool source codes. However, it doesn't correctly handle the case when the input file is of size 0. This will lead to possible build issues. This commits refine the logic to handle the above case. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> 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>
2016-11-10ShellPkg: Fix the coding style issueBi, Dandan
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-11-10Nt32Pkg/PlatformBds: Dispatch deferred images after EndOfDxeRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-11-10QuarkPlatformPkg/PlatformBds: Dispatch deferred images after EndOfDxeRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Cc: Kelly Steele <kelly.steele@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-11-10CorebootPayload/PlatformBds: Dispatch deferred images after EndOfDxeRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> Cc: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-11-10OvmfPkg/PlatformBds: Dispatch deferred images after EndOfDxeRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-11-10ArmVirPkg/PlatformBds: Dispatch deferred images after EndOfDxeRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-11-10MdeModulePkg/SecurityStubDxe: Report failure if image is load earlierRuiyu Ni
The 3rd party image should be loaded after EndOfDxe event signal and DxeSmmReadyToLock protocol installation. But non-SMM platform doesn't published DxeSmmReadyToLock protocol. So the SecurityStubDxe can only depend on EndOfDxe event. This patch enhances the SecurityStubDxe to listen on DxeSmmReadyToLock protocol installation and if any 3rd party image is loaded before DxeSmmReadyToLock, it reports failure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-11-10MdeModulePkg/BdsDxe: Check deferred images before booting to OSRuiyu Ni
The patch adds check of deferred images before booting to OS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-11-10MdeModulePkg/UefiBootManager: Add EfiBootManagerDispatchDeferredImagesRuiyu Ni
The API dispatches the deferred images that are returned from all DeferredImageLoad instances. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-11-10MdeModulePkg/SecurityStubDxe: Defer 3rd party image before EndOfDxeRuiyu Ni
The images not from FV are treated as 3rd party images. They will be deferred to dispatch when they are dispatched before EndOfDxe event. It's a new feature in the BS.LoadImage() path which can disallow executing 3rd party images before EndOfDxe and re-execute them after EndOfDxe (through EfiBootManagerDispatchDeferredImages introduced in next commit). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-11-10IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bugRuiyu Ni
Upon booting to a legacy OS, LegacyBios driver is responsible to initialize the BDA region with the correct COM port base address. But the current logic to get the COM port base address from IsaIo instance is not correct. The patch fixes this bug. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-11-10MdeModulePkg/PciSioSerial: Fix a bug that wrongly produces 2 UARTsRuiyu Ni
When PciSioSerial is firstly started with a non-NULL remaining device path, the UART instance is created using the parameters specified in the remaining device path. Later when the driver is started again on the same UART controller with NULL remaining device path, the correct logic is to directly return SUCCESS instead of current buggy implementation which wrongly produces another UART using the default parameters. The bug causes two UARTs are created when the UART is configured in 57600 baud rate. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com>
2016-11-09CorebootPayloadPkg: Fix GCC build issue on macro definitionMaurice Ma
The previous change to disable deprecated APIs in CorebootPayloadPkg used "/D" instead of "-D". It caused Linux GCC build error. Correct it to use "-D" instead. Cc: Prince Agyeman <prince.agyeman@intel.com> Cc: Rusty Coleman <rcoleman@sigovs.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Rusty Coleman <rcoleman@sigovs.com>