summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-08-13MdeModulePkg PCD: Reinstall PCD service PPIS when memory availableedk2-stable202108-rc1Yeh, GregX1-1/+70
https://bugzilla.tianocore.org/show_bug.cgi?id=3525 After PciSegmentLib using Dynamic PCD for Pcie base address such long delay found in FSP. The root cause is some of the PCD service PPIs not shadowed to memory and flash cache may have been disabled in NotifyPhase stage. Solution is to shadow all PCD service PPIs to memory. Signed-off-by: GregX Yeh <gregx.yeh@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2021-08-12MdeModulePkg/UefiSortLib:Add UefiSortLib unit testWenyi Xie4-0/+246
Adding two unit test case for UefiSortLib. One is a test on sorting an array of UINT32 by using PerformQuickSort, another is a test on comparing the same buffer by using StringCompare. Add 'main' function name to ECC exception list to avoid ECC error. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
2021-08-11StandaloneMmPkg: build for 32bit arm machinesEtienne Carriere18-37/+49
This change allows to build StandaloneMmPkg components for 32bit Arm StandaloneMm firmware. This change mainly moves AArch64/ source files to Arm/ side directory for several components: StandaloneMmCpu, StandaloneMmCoreEntryPoint and StandaloneMmMemLib. The source file is built for both 32b and 64b Arm targets. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-08-11StandaloneMmPkg: fix pointer/int casts against 32bit architecturesEtienne Carriere3-12/+12
Use intermediate (UINTN) cast when casting int from/to pointer. This is needed as UINT64 values cast from/to 32bit pointer for 32bit architectures. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11GenFv: Arm: support images entered in Thumb modeEtienne Carriere1-9/+29
Change GenFv for Arm architecture to generate a specific jump instruction as image entry instruction, when the target entry label is assembled with Thumb instruction set. This is possible since SecCoreEntryAddress value fetched from the PE32 has its LSBit set when the entry instruction executes in Thumb mode. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11ArmPkg: prepare 32bit ARM build of StandaloneMmPkgEtienne Carriere4-11/+14
Changes in ArmPkg to prepare building StandaloneMm firmware for 32bit Arm architectures. Adds ArmmmuStandaloneMmLib library to the list of the standard components build for ArmPkg on when ARM architectures. Changes path of source file AArch64/ArmMmuStandaloneMmLib.c and compile it for both 32bit and 64bit architectures. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-08-11ArmPkg/IndustryStandard: 32b/64b agnostic FF-A, Mm SVC and Std SMC IDsEtienne Carriere3-0/+35
Defines ARM_SVC_ID_FFA_* and ARM_SVC_ID_SP_* identifiers for 32bit function IDs as per SMCCC specification. Defines also generic ARM SVC identifier macros to wrap 32bit or 64bit identifiers upon target built architecture. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11RedfishPkg/RefishCrtLib: Public RefishCrtLibAbner Chang6-6/+6
Public the header file, move RefishCrtLib.h from PrivateInclude/ to Include/. RefishCrtLib.lib will be public later. (Moved out from PrivateLibrary/) Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
2021-08-11MdePkg: Fix broken coding style in Acpi64.hChris Jones2-12/+17
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Fix a coding style issue raised by EccCheck. This issue (error code 7008) has been fixed by moving a nested union out of its structure. Also add Acpi64.h to the "IgnoreFiles" list to stop the CI flagging naming errors present prior to ACPI 64. Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Add Cache ID to PPTTChris Jones1-2/+4
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5.137, Table 5.140, Table 5.141 - Mantis ID 2138 (https://mantis.uefi.org/mantis/view.php?id=2138) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Add Secure Access Components in the SDEV tableChris Jones1-24/+56
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Section 5.2.26.1.1 - Mantis ID 2111 (https://mantis.uefi.org/mantis/view.php?id=2111) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Add the Platform Health Assessment Table (PHAT)Chris Jones1-0/+79
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5.5, Section 5.2.30 - Mantis ID 2094 (https://mantis.uefi.org/mantis/view.php?id=2094) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Add Multiprocessor Wakeup structureChris Jones1-1/+28
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5.21, Section 5.2.12.19 - Mantis ID 2087 (https://mantis.uefi.org/mantis/view.php?id=2087) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Add 'Type 5' PCC structureChris Jones1-0/+29
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Section 14.1.7, Section 14.4 - Mantis ID 2010 (https://mantis.uefi.org/mantis/view.php?id=2010) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Add flags and MinTransferSize to Generic InitiatorChris Jones1-3/+6
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5.59, Section 5.2.27.1 & Section 5.2.27.4 - Mantis ID 1991 (https://mantis.uefi.org/mantis/view.php?id=1991) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Remove DPPT tableChris Jones1-5/+0
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5.5 - Mantis ID 2133 (https://mantis.uefi.org/mantis/view.php?id=2133) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Add SPA Location Cookie field to SPA Range structureChris Jones1-0/+6
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Section 5.2.25.2 System Physical Address (SPA) Range Structure, Table 5.109 - Mantis ID 1988 (https://mantis.uefi.org/mantis/view.php?id=1988) Also added a blank line between #defines and structure definitions to improve readability. Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Update PMTT to ACPI 6.4Chris Jones1-42/+47
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Section 5.2.21.12 - Mantis ID 1975 (https://mantis.uefi.org/mantis/view.php?id=1975) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Rename SBSA Generic Watchdog to Arm Generic WatchdogChris Jones1-7/+7
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Section 5.2.24, Table 5.100 & Section 5.2.24.2 - Mantis ID 2126 (https://mantis.uefi.org/mantis/view.php?id=2126) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Increment FADT versionChris Jones1-1/+1
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) Make changes to ACPI 6.4 header according to the latest specification: - ACPI 6.4 January 2021, Table 5-9 - Mantis ID 2105 (https://mantis.uefi.org/mantis/view.php?id=2105) Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-11MdePkg: Add ACPI 6.4 header fileChris Jones2-2/+2969
Bugzilla: 3516 (https://bugzilla.tianocore.org/show_bug.cgi?id=3516) This patch introduces a header file for the ACPI specification version 6.4. Currently it is based on the Acpi63.h header file however makes six changes: 1. Replace all occurences of "6_3"/"6.3" with "6_4/6.4". 2. Remove the trailing underscore from the header guard in accordance with the EDK2 coding standards, section 5.3.5. 3. Make Acpi64.h the latest ACPI definition included by Acpi.h. 4. Fix the BGRT Status field comment to match the ACPI 6.3A spec. 5. Fix several typos where definitions were named "PMMT" when it should be "PMTT". 6. Fix a typo: "PPTT Platform Communication Channel" should be "PDTT Platform Communication Channel". Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-10RedfishPkg/JsonLib: Add more JsonLib functionsAbner Chang2-22/+261
Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
2021-08-09UefiPayloadPkg: Fix the non-ascii character in UniversalPayloadEntry.cedk2-stable202108-rc0DunTan1-1/+1
Fix the non-ascii character in UniversalPayloadEntry.c Cc: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: DunTan <dun.tan@intel.com>
2021-08-09UefiPayloadPkg: Add a macro to enable or diable the serial driver.Zhiguang Liu2-0/+6
This patch doesn't change the default behavior. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2021-08-09UefiPayloadPkg: change the default value of some PCDs.Zhiguang Liu1-1/+3
Change the default value of the below PCDs to diable some legacy feature. gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE gEfiMdeModulePkgTokenSpaceGuid.PcdPciDegradeResourceForOptionRom|FALSE gUefiCpuPkgTokenSpaceGuid.PcdCpuNumberOfReservedVariableMtrrs|0 Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2021-08-09UefiPayloadPkg: define some PCD as DynamicEX PCDZhiguang Liu5-21/+18
Define some PCDs as DynamicEX PCD to be used as global variable. Because PcdUartDefaultBaudRate is defined as DynamicEX, remove the code to set it in platformlib. That code was actually redundant. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2021-08-09UefiPayloadPkg: Add Fixed PCDs and use Macro to define the default value.Zhiguang Liu1-1/+10
Add the three PCDs as fixed at build PCD: gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule gPcAtChipsetPkgTokenSpaceGuid.PcdRtcIndexRegister gPcAtChipsetPkgTokenSpaceGuid.PcdRtcTargetRegister The default value is defined as Macro, so it can be passed in at build command. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2021-08-09SecurityPkg: Fix GetSupportedAndActivePcrs counter calculationRodrigo Gonzalez del Cueto1-17/+29
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2855 The Tpm2GetCapabilitySupportedAndActivePcrs function prints a count number that should reflect the *supported and currently active* PCR banks, but the implementation in place displays instead the count of the *supported PCR banks* retrieved directly from the Tpm2GetCapabilityPcrs() TPML_PCR_SELECTION output. The counter should only take into account those PCRs banks which are active. Replaced usage of EFI_D_* for DEBUG_* definitions in debug messages. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Qi Zhang <qi1.zhang@intel.com> Signed-off-by: Rodrigo Gonzalez del Cueto <rodrigo.gonzalez.del.cueto@intel.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
2021-08-09UefiCpuPkg/CpuCacheInfoLib: Sort CpuCacheInfo arrayLou, Yun5-4/+80
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3508 Sort the CpuCacheInfo array by CPU package ID, core type, cache level and cache type. Signed-off-by: Jason Lou <yun.lou@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com>
2021-08-05OvmfPkg: Remove Initrd LINUX_EFI_INITRD_MEDIA_GUIDJeff Brasen2-18/+0
Moving LINUX_EFI_INITRD_MEDIA_GUID to MdePkg, remove it from OvmfPkg. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
2021-08-05MdePkg: add definition of LINUX_EFI_INITRD_MEDIA_GUIDJeff Brasen2-0/+35
Add LINUX_EFI_INITRD_MEDIA_GUID to our collection of GUID definitions, it can be used in a media device path to specify a Linux style initrd that can be loaded by the OS using the LoadFile2 protocol. Move these defines to MdePkg from OvmfPkg as these are relevant to non-OVMF targets as well. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2564 Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
2021-08-05EmbeddedPkg/libfdt: Add strcmp and strncpy to libfdt_env.hAbner Chang1-0/+8
OpenSBI has started using those in v0.9. See: https://github.com/riscv/opensbi/blob/v0.9/lib/utils/fdt/fdt_domain.c Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Cc: Anup Patel <anup.patel@wdc.com> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com> Acked-by: Leif Lindholm <leif@nuviainc.com>
2021-08-05Maintainers.txt: Add new maintainer and reviewer to EmbeddedPkg/Abner Chang1-0/+2
Add Abner Chang as the maintainer of EmbeddedPkg/ Add Daniel Schaefer as the reviewer of EmbeddedPkg/ Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb+tianocore@kernel.org> Reviewed-by: Andrew Fish <afish@apple.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-08-03SecurityPkg: Add option to reset secure boot keys.Grzegorz Bernacki5-0/+166
This commit add option which allows reset content of Secure Boot keys and databases to default variables. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Pete Batard <pete@akeo.ie> Tested-by: Pete Batard <pete@akeo.ie> # on Raspberry Pi 4
2021-08-03SecurityPkg: Add new modules to Security package.Grzegorz Bernacki2-1/+20
This commits adds modules and dependencies related to initialization and usage of default Secure Boot key variables to SecurityPkg. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Pete Batard <pete@akeo.ie> Tested-by: Pete Batard <pete@akeo.ie> # on Raspberry Pi 4
2021-08-03SecurityPkg: Add EnrollFromDefaultKeys application.Grzegorz Bernacki2-0/+163
This application allows user to force key enrollment from Secure Boot default variables. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
2021-08-03SecurityPkg: Add SecureBootDefaultKeysDxe driverGrzegorz Bernacki3-0/+131
This driver initializes default Secure Boot keys and databases based on keys embedded in flash. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Pete Batard <pete@akeo.ie> Tested-by: Pete Batard <pete@akeo.ie> # on Raspberry Pi 4 Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
2021-08-03ArmPlatformPkg: Create include file for default key content.Grzegorz Bernacki1-0/+70
This commits add file which can be included by platform Flash Description File. It allows to specify certificate files, which will be embedded into binary file. The content of these files can be used to initialize Secure Boot default keys and databases. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-08-03SecurityPkg: Remove duplicated functions from SecureBootConfigDxe.Grzegorz Bernacki2-188/+4
This commit removes functions which were added to SecureBootVariableLib. It also adds dependecy on that library. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
2021-08-03EmulatorPkg: add SecureBootVariableLib class resolutionGrzegorz Bernacki1-0/+2
The edk2 patch SecurityPkg: Create library for setting Secure Boot variables. moves generic functions from SecureBootConfigDxe and places them into SecureBootVariableLib. This patch adds SecureBootVariableLib mapping for EmulatorPkg. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2021-08-03OvmfPkg: add SecureBootVariableLib class resolutionGrzegorz Bernacki4-0/+8
The edk2 patch SecurityPkg: Create library for setting Secure Boot variables. moves generic functions from SecureBootConfigDxe and places them into SecureBootVariableLib. This patch adds SecureBootVariableLib mapping for OvmfPkg. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-08-03ArmVirtPkg: add SecureBootVariableLib class resolutionGrzegorz Bernacki1-0/+2
The edk2 patch SecurityPkg: Create library for setting Secure Boot variables. moves generic functions from SecureBootConfigDxe and places them into SecureBootVariableLib. This patch adds SecureBootVariableLib mapping for ArmVirtPkg platform. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-08-03SecurityPkg: Create library for enrolling Secure Boot variables.Grzegorz Bernacki6-0/+715
This commits add library, which consist functions to enrolll Secure Boot keys and initialize Secure Boot default variables. Some of the functions was moved from SecureBootConfigImpl.c file. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
2021-08-03SecurityPkg: Create SecureBootVariableLib.Grzegorz Bernacki6-0/+763
This commits add library, which consist helper functions related to creation/removal Secure Boot variables. Some of the functions was moved from SecureBootConfigImpl.c file. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
2021-08-03MdeModulePkg: Add BootDiscoveryPolicyUiLib.Grzegorz Bernacki8-0/+336
This library extends Boot Maintenance Menu and allows to select Boot Discovery Policy. When choice is made BootDiscoveryPolicy variable is set. Platform code can use this variable to decide which class of device shall be connected. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
2021-08-02BaseTools: use shutil.copyfile instead shutil.copy2Bob Feng1-4/+4
In Split tool, the copy file actions only need to copy file content but not need to copy file metadata. copy2() copies the file metadata that causes split unit test failed under edk2-basetools CI environment. So this patch changes the call of copy2() to copyfile(). Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
2021-08-02BaseTools: Drop check for distutils.utilsCole1-7/+0
distutils.utils is no longer used anywhere, so this check can be dropped. Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
2021-08-02python: Replace distutils.utils.split_quotes with shlex.splitCole2-4/+4
distutils is deprecated and may be removed in python 3.12. Use shlex.split which has been around since python 2.3. shlex.split does not split on all the ASCII control characters that split_quoted will[1], but for edk2 usage I don't think that matters. [1] https://stackoverflow.com/questions/54999301/what-is-the-difference-between-distutils-util-split-quoted-and-shlex-split Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2021-08-02build: Fix python3.10 threading DeprecationWarningsCole1-24/+24
threading camelCase functions have preferred alternatives since python2.6. python3.10 has started emitting DeprecationWarnings for them Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2021-08-02MdeModulePkg/CapsuleApp: Fix typo in error messageSeonghyun Park1-1/+1
Fix typo in error message in CapsuleApp. Signed-off-by: Seonghyun Park <shpark1@protonmail.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>