summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MdeModulePkg/PciBus: Change PCI_IO_DEVICE.RomSize to UINT32 typeRay Ni2019-02-145-13/+13
| | | | | | | | | Per PCI Spec, the option ROM BAR is 32bit so the maximum option ROM size can be hold by UINT32 type. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* SecurityPkg/OpalPassword: Add NULL pointer check before using itEric Dong2019-02-141-1/+7
| | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1503 A pointer variable should be checked if it is NULL or Valid before using it. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Maggie Chu <maggie.chu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* SecurityPkg/OpalPassword: Update strings on Opal Setup pageEric Dong2019-02-145-48/+14
| | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1506 Updated some descriptions on SETUP page to avoid user confusion. Currently it shows "1.0 UEFI Opal Driver", however it may be mislead user to think it is only for Opal drive but not for Pyrite drive. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Maggie Chu <maggie.chu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* BaseTools: Various typoAntoine Coeur2019-02-14172-515/+510
| | | | | | | | Various typo in BaseTools. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/CapsuleApp: Fix memory leak issue.Chen A Chen2019-02-131-27/+60
| | | | | | | | | | | | | | This issue is caused by FileInfoBuffer variable. This is a pointer array and each elements also pointer to a memory buffer that is allocated and returned by AllocateCopyPool function. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Zhang Chao B <chao.b.zhang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* ArmVirtPkg/ArmVirtXen: don't set Pcd*ImageVerificationPolicyLaszlo Ersek2019-02-133-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-1} (6 builds in total), PcdOptionRomImageVerificationPolicy, PcdFixedMediaImageVerificationPolicy, and PcdRemovableMediaImageVerificationPolicy are not used in any of those builds. Restrict the settings to the ArmVirtQemu and ArmVirtQemuKernel platforms (preserving the -D SECURE_BOOT_ENABLE restriction in the process). ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtXen: don't set PcdTurnOffUsbLegacySupportLaszlo Ersek2019-02-133-2/+4
| | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (12 builds in total), the PCD is not used in any of those builds. Restrict the setting to the ArmVirtQemu and ArmVirtQemuKernel platforms. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtXen: don't set PcdShellFileLaszlo Ersek2019-02-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (12 builds in total), the PCD is not used in any of those builds. Remove the setting. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtXen: don't set PcdTerminalTypeGuidBufferLaszlo Ersek2019-02-134-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (12 builds in total), the PCD is not used in any of those builds. Restrict the setting to the ArmVirtQemu and ArmVirtQemuKernel platforms. Restrict the TTY_TERMINAL define similarly. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtXen: don't set PcdPL031RtcBaseLaszlo Ersek2019-02-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (12 builds in total), the PCD is not used in any of those builds. Remove the setting. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: don't set PcdDebugPrintErrorLevel in RELEASE buildsLaszlo Ersek2019-02-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {RELEASE} x {feat-0,feat-1} (12 builds in total), the PCD is not used in any of those builds. Restrict the PCD setting to ($(TARGET) != RELEASE). ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: don't set PcdDebugClearMemoryValueLaszlo Ersek2019-02-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {RELEASE} x {feat-0,feat-1} (12 builds in total), the PCD is not used in any of those builds. Rather than just restrict the PCD setting to ($(TARGET) != RELEASE), remove the setting completely. The current value is identical to the 0xAF default in "MdePkg/MdePkg.dec", which recognizes Andrew Fish, and so it's unlikely to ever change. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: don't set PcdCoreCountLaszlo Ersek2019-02-133-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (36 builds in total), the PCD is not used in any of those builds. Remove the setting. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/PrePi: drop wrong PcdCoreCount dependencyLaszlo Ersek2019-02-131-2/+0
| | | | | | | | | | | The PcdCoreCount dependency in the "ArmVirtPrePiUniCoreRelocatable.inf" file is false; the module doesn't consume the PCD. Clean up the INF. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: clean up PcdSetNxForStack setting (applies to ArmVirtQemu only)Laszlo Ersek2019-02-132-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {QemuKernel,Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (24 builds in total), the PCD is not used in any of those builds. Move the setting from "ArmVirt.dsc.inc" to "ArmVirtQemu.dsc", to reflect reality. We originally moved the PCD setting in the opposite direction in commit 8aab575c26e9 ("ArmVirtPkg: enable non-executable DXE stack for all platforms", 2017-03-07), generalizing it. However, as the comment itself states, and according to all 36 ArmVirt build reports: {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} the PCD is only consumed by "MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf", and that module is only included in the ArmVirtQemu platform. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: don't set PcdPostCodePropertyMaskLaszlo Ersek2019-02-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (36 builds in total), the PCD is not used in any of those builds. Remove the setting. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/{ArmVirtQemu,ArmVirtQemuKernel}: don't set PcdTrustzoneSupportLaszlo Ersek2019-02-132-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Qemu,QemuKernel} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (24 builds in total), the PCD is not used in any of those builds. Remove the setting. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg: don't set PcdRelocateVectorTableLaszlo Ersek2019-02-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (36 builds in total), the PCD is not used in any of those builds. Remove the setting. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmVirtQemuKernel: don't set PcdCPUCoresStackBaseLaszlo Ersek2019-02-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {QemuKernel} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (12 builds in total), the PCD is not used in any of those builds. Remove the setting. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Julien Grall <julien.grall@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* MdeModulePkg/NvmExpressDxe: Report StatusCode for device init failureSean Brogan2019-02-133-3/+13
| | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1408 According to the information of the above BZ-1408 and other platform owners, NVM Express devices are becoming more likely to be a critical part during the boot process. This commit will add the calls to 'REPORT_STATUS_CODE' when there is a failure happens during the NVM Express controller/device initialization process. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <brbarkel@microsoft.com> Cc: Jian J Wang <jian.j.wang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* MdePkg/BaseLib: implement SpeculationBarrier() for ARM and AArch64Ard Biesheuvel2019-02-126-32/+160
| | | | | | | | | | | | Replace the dummy C implementation of SpeculationBarrier() with implementations consisting of the recommended DSB SY + ISB sequence, as recommended by ARM in the whitepaper "Cache Speculation Side-channels" version 2.4, dated October 2018. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* MdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issueChen A Chen2019-02-122-10/+18
| | | | | | | | | | | | | To avoid potential NULL pointer dereference issue. Initialize them at the beginning of the function. This patch is a supplement which was missed at e98212cb5d59fff8f385d9179ad7f1a3ce9cf215 commit. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* CorebootModulePkg: Fix various typosAntoine Coeur2019-02-1210-57/+57
| | | | | | | | Fix various typos in CorebootModulePkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Benjamin You <benjamin.you@intel.com>
* CorebootPayloadPkg: Fix various typosAntoine Coeur2019-02-127-67/+67
| | | | | | | | Fix various typos in CorebootPayloadPkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Benjamin You <benjamin.you@intel.com>
* NetworkPkg/Ip6Dxe: Uninstall protocols when error happen in Driver Binding ↵Jiaxin Wu2019-02-121-9/+19
| | | | | | | | | | | | | | | | | Start. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1447 This patch is to uninstall Ip6ServiceBindingProtocol and Ip6ConfigProtocol when error happen in Driver Binding Start. Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Signed-off-by: Michael Turner <Michael.Turner@microsoft.com> Reviewed-By: Ye Ting <ting.ye@intel.com>
* MdeModulePkg/Ip4Dxe: Uninstall protocols when error happen in Driver Binding ↵Jiaxin Wu2019-02-121-3/+6
| | | | | | | | | | | | | | | | | Start. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1447 This patch is to uninstall Ip4ServiceBindingProtocol and Ip4Config2Protocol when error happen in Driver Binding Start. Cc: Michael Turner <Michael.Turner@microsoft.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Signed-off-by: Michael Turner <Michael.Turner@microsoft.com> Reviewed-By: Ye Ting <ting.ye@intel.com>
* OvmfPkg: Add TCG2 Configuration menu to the Device Manager menuStefan Berger2019-02-116-0/+21
| | | | | | | | | | | | | | | | | This patch adds the TCG2 Configuration menu to the Device Manager menu. We can apparently reuse the sample Tcg2ConfigDxe from SecurityPkg/Tcg/Tcg2Config without obvious adverse effects. The added TCG2 Configuration menu now shows details about the attached TPM 2.0 and lets one for example configure the active PCR banks or issue commands, among other things. The code is added to Ovmf by building with -DTPM2_ENABLE and -DTPM2_CONFIG_ENABLE. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* MdeModulePkg DxeCapsuleLibFmp: Update SupportCapsuleImage() for Fake CapsuleLiming Gao2019-02-111-0/+6
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1088 Per UEFI spec, the fake capsule image with the header only is a valid case in QueryCapsuleCpapbilities(). So, SupportCapsuleImage() is updated to support this case. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* CryptoPkg: Fix various typosAntoine Coeur2019-02-112-3/+3
| | | | | | | | | Fix various typos in CryptoPkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* ArmVirtPkg: Fix various typosAntoine Coeur2019-02-076-12/+12
| | | | | | | | | Fix various typos in ArmVirtPkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* BaseTools: Fix build failure when specifying multiple BUILDTARGETPhilippe Mathieu-Daud?2019-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With Python3, the dict.value() method returns an iterator. If a dictionary is updated while an iterator on its keys is used, a RuntimeError is generated. Converting the iterator to a list() forces a copy of the mutable keys in an immutable list which can be safely iterated. Commit f8d11e5a4aaa converted various uses but missed one: When specifying multiple BUILDTARGET, the first target builds successfully, but then the PGen.BuildDatabase._CACHE_ dictionary is updated, and accessing the next target triggers a RuntimeError. Convert this iterator to an immutable list, to solve this build error: $ build -a IA32 -t GCC5 -b RELEASE -b NOOPT -p OvmfPkg/OvmfPkgIa32.dsc [...] Processing meta-data ... build.py... : error C0DE: Unknown fatal error when processing [OvmfPkg/OvmfPkgIa32.dsc] (Please send email to edk2-devel@lists.01.org for help, attaching following call stack trace!) (Python 3.5.3 on linux) Traceback (most recent call last): File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 2387, in Main MyBuild.Launch() File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 2141, in Launch self._MultiThreadBuildPlatform() File "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 1921, in _MultiThreadBuildPlatform self.Progress File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 304, in __init__ self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs) File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 477, in _InitWorker for BuildData in PGen.BuildDatabase._CACHE_.values(): RuntimeError: dictionary changed size during iteration Note: The culprit commit (f8d11e5a4aaa) can not be found with bisection. In 9c2d68c0a299 the build tools default to the python version provided by the ${PYTHON} environment variable, however the Python3 transition is not functional before d943b0c339fe. f8d11e5a4aaa falls between the previous two. Reported-by: Leif Lindholm <leif.lindholm@linaro.org> Fixes: f8d11e5a4aaa90bf63b4789f3993dd6d16c60787 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* BaseTools/BuildReport: fix report for platforms/arches without struct PCDsLaszlo Ersek2019-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of commit 97c8f5b9e7d3 ("BaseTools:StructurePCD value display incorrect in "Not used" section.", 2019-02-02) was to display the full contents of such structure PCDs in the build report that were set in the platform DSC or the FDF, but not used in any module INFs. The listings would appear in the PCDs not used by modules or in conditional directives section of the build report. Commit 97c8f5b9e7d3 assumed that any (platform, architecture) combination would have a (possibly empty) set of structure PCD (and so the set of the structure PCDs could be filtered for set-but-unused ones). This is not the case: in "DscBuildData.py", in method UpdateStructuredPcds(), if "S_pcd_set" remains an empty OrderedDict(), then it is not added to "GlobalData.gStructurePcd" *at all*, for the current (platform, architecture) combination. As a result, when the PCD report tries to fetch the set of structure PCDs for the current (platform, architecture), "GlobalData.gStructurePcd" does not return an empty OrderedDict(); instead, it raises a KeyError. Fix it by defaulting to an empty OrderedDict(), with the get() method. Reported-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1513 Fixes: 97c8f5b9e7d3136b6051a05cf056ce5ca9e79893 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* SignedCapsulePkg: enable package build for AARCH64/ARMLeif Lindholm2019-02-041-1/+14
| | | | | | | | | | | | | This package is used by several platforms in edk2-platforms, so ensure it can be built directly by adding AARCH64/ARM to SUPPORTED_ARCHITECTURES. Also force-include CompilerIntrinsicsLib, BaseStackCheckLib and create a resolution for ArmSoftFloatLib for ARM. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: jiewen.yao@intel.com
* SecurityPkg: fix package build on ARMLeif Lindholm2019-02-041-0/+11
| | | | | | | | | | | The CompilerIntrinsicsLib and BaseStackCheckLib need to be included in order for an ARM build of the package .dsc to succeed - so add them. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: jiewen.yao@intel.com
* IntelFrameworkPkg: fix build for AARCH64/ARMLeif Lindholm2019-02-041-1/+1
| | | | | | | | | | | | Contrary to what the name suggests, some modules in this package are used on other architecture. ARM is already listed in SUPPORTED_ARCHITECTURES in the .dsc, but AARCH64 was never added - so do that. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* IntelFrameworkModulePkg: fix build for AARCH64/ARMLeif Lindholm2019-02-041-1/+12
| | | | | | | | | | | | | | Contrary to what the name suggests, some modules in this package are used on other architecture. ARM is already listed in SUPPORTED_ARCHITECTURES in the .dsc, but AARCH64 was never added. Add that, and force inclusion of CompilerIntrinsicsLib and BaseStackCheckLib for AARCH64/ARM to make the build successful. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* AppPkg: fix webserver build for !Ia32/X64Leif Lindholm2019-02-042-1/+1
| | | | | | | | | | | | | | | The WebServer application is not meant to be Ia32/X64 specific, and would build for other architectures, if it wasn't for the #include <Register/Msr.h> in WebServer.h. Move that statement to Mtrr.c instead, which is the only consumer, and is already being filtered out for other architectures. Cc: Daryl McDaniel <edk2-lists@mc2research.org> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* MdePkg: Fix coding style issuesBi, Dandan2019-02-023-12/+12
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1478 Fix issues that reported by Edk2 coding style check tool(ECC) that: in Comment, <@param SystemTable> does NOT consistent with parameter name MmSystemTable. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Fix coding style issuesDandan Bi2019-02-026-11/+11
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1479 Fix issues that reported by Edk2 coding style check tool(ECC) that: Comment description should end with period '.' Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* MdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issueChen A Chen2019-02-023-10/+29
| | | | | | | | | | | To avoid potential NULL pointer dereference issue. Initialize them at the beginning of the function. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* FatPkg/FatPei/Gpt.c: Fix uninitialized variable issueChen A Chen2019-02-021-0/+3
| | | | | | | | | | | | Uninitialized pointer variable may randomly point to a block of memory. In This case, FreePool function will free a block of memory that is not belongs to this function. Cc: Ruiyu Ni <ray.ni@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/BaseLib: Add Base64Encode() and Base64Decode()Mike Turner2019-02-022-0/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce public functions Base64Encode and Base64Decode. https://bugzilla.tianocore.org/show_bug.cgi?id=1370 v2:1.Remove some white space. 2.Add unit test with test vectors in RFC 4648. https://github.com/shenglei10/edk2/tree/encode_test https://github.com/shenglei10/edk2/tree/decode_test v3:1.Align white space. 2.Update comments of Base64Encode and Base64Decode. 3.Change the use of macro RETURN_DEVICE_ERROR to RETURN_INVALID_PARAMETER in string.c. v4:Change parameters' names. v5:1.Update usage of variables. 2.Remove debug message in Base64Decode(). Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools:StructurePCD value display incorrect in "Not used" section.Fan, ZhijuX2019-02-022-2/+9
| | | | | | | | | | | | | | StructurePCD value display incorrect in "Not used" section, that the value defined in structure does not show. StructurePCD will not display in "Not Used" section if main structure not define in dsc and pcd not in inf Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: Fixed incorrect line number in PcdValueInit.cFeng, Bob C2019-02-021-1/+1
| | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1435 This patch is going to fix the issue of incorrect line number in PcdValueInit.c Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Enable CODE format in DEC fileFeng, Bob C2019-02-023-53/+86
| | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1292. Enable CODE format in DEC File. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/ECC: Add a new type of exceptionHess Chen2019-02-021-4/+10
| | | | | | | | Add a new type of exception for function body checkpoint. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hess.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools: PCD value incorrect in structure pcd sku case.Fan, ZhijuX2019-02-021-1/+1
| | | | | | | | | | | | | | | | | | Defined 2 PCDs(Test4 & Test401) and 2 SKUs(DEFAULT & _), then set "SKUID_Defines" to ALL, for FixedAtBuild gEfiStructuredPcdPkgTokenSpaceGuid. Test401 in this case, its value should get from "Default" SKU, not from "_" SKU, but we does not set value in SKU "_" in dsc, so Test401 should only display the value get from dec. Missing the map() function causes SKU specific items to not be deleted Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* EmbeddedPkg/PrePiLib: Correct function nameJeff Brasen2019-02-011-1/+1
| | | | | | | | | Update header file function name for FfsFindFileByName to match implementation function name. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* MdeModulePkg/SdMmcPciHcDxe: Update comment for spec compliance statusHao Wu2019-02-014-8/+14
| | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1441 This commit will update the file-level comments within the SdMmcPciHcDxe to reflect the latest specification compliance status of the driver. Cc: Ray Ni <ray.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* BaseTools: Eot tool Python3 adaptionFeng, Bob C2019-02-018-8/+7740
| | | | | | | | | | | | | | | | | v2: The python files under CParser4 are generated by antlr4 and for python3 usage. They have python3 specific syntax, for example the data type declaration for the arguments of a function. That is not compitable with python2. this patch is to remove these syntax. Eot tool Python3 adaption. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>