summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-05-13UefiPayloadPkg: Simplify code logicLiu, Zhiguang2-73/+25
A little overdesign about VisitAllPciInstances function, since there are two call back functions. Simplify the code logic by combining the two call back functions, and unused parameters. Change the PROTOCOL_INSTANCE_CALLBACK to SIMPLE_PROTOCOL_INSTANCE_CALLBACK because the former is also defined in OvmfPkg. Rename it to avoid confusion. 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> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2022-05-13MdeModulePkg: PiSmmCore: Inspect memory guarded with pool headersKun Qin1-5/+5
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3488 Current free pool routine from PiSmmCore will inspect memory guard status for target buffer without considering pool headers. This could lead to `IsMemoryGuarded` function to return incorrect results. In that sense, allocating a 0 sized pool could cause an allocated buffer directly points into a guard page, which is legal. However, trying to free this pool will cause the routine changed in this commit to read XP pages, which leads to page fault. This change will inspect memory guarded with pool headers. This can avoid errors when a pool content happens to be on a page boundary. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Kun Qin <kuqin12@gmail.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-05-11OvmfPkg: Enable 2 different CpuMpPei and CpuDxe driversMin M Xu4-3/+89
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918 In OvmfPkgX64 we enable 2 different CpuMpPei and CpuDxe drivers. The difference between the drivers is the MpInitLib or MpInitLibUp. This is acomplished by adding a MpInitLibDepLib. In IntelTdxX64 we enable 2 versions of CpuDxe drivers. It is because PEI is skipped in IntelTdxX64. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Tested-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-05-11OvmfPkg/TdxDxe: Install MpInitLibDepLib protocolsMin M Xu2-1/+23
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918 In Td guest CpuDxe driver uses the MpInitLibUp, the other guest type use the MpInitLib. So we install different Protocols according to the current working guest type. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Tested-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-05-11OvmfPkg/Sec: Install MpInitLibDepLib PPIs in SecMain.cMin M Xu2-2/+34
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918 Td guest should use MpInitLibUp, other guest use the MpInitLib. So in SecMain.c different PPI is installed according to the working guest type. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Tested-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-05-11OvmfPkg: Add MpInitLibDepLibMin M Xu5-0/+131
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918 There are 4 MpInitLibDepLib: - PeiMpInitLibMpDepLib: MpInitLib multi-processor dependency - PeiMpInitLibUpDepLib: MpInitLib unique-processor dependency - DxeMpInitLibMpDepLib: MpInitLib multi-processor dependency - DxeMpInitLibUpDepLib MpInitLib unique-processor dependency The Pei libs depend on the corresponding PPI. The Dxe libs depend on the corresponding Protocol. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Tested-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-05-11OvmfPkg: Add MpInitLibDepLib related PPI/Protocol definitionsMin M Xu3-0/+61
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918 MpInitLibDepLib is a set of libraries which depend on PPI/Protocol. This patch defines the related PPI/Protocols in OvmfPkg. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Tested-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-05-11UefiCpuPkg: Revert "UefiCpuPkg: Enable Tdx support in MpInitLib"Min M Xu6-308/+5
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3918 This reverts commit 88da06ca763eb6514565c1867a801a427c1f3447. This commit triggers the ASSERT in Non-Td guest. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Tested-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-05-11CryptoPkg/openssl: disable codestyle checks for generated filesYi Li1-1/+13
Files generated by process_files.pl from openssl sources should not be checked for edk2 code style. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2022-05-11CryptoPkg/openssl: update generated filesYi Li5-193/+201
Run process_files.pl with the current openssl submodule version. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2022-05-11CryptoPkg: Update process_files.pl to automatically add PCD config optionYi Li1-3/+74
Recommend from Gerd: (2) Keep the EC config option, but update process_files.pl to automatically add the PcdEcEnabled config option handling to the files it generates. When remove 'no-ec' from openssl configure list, will automatically remove 'OPENSSL_NO_EC', 'OPENSSL_NO_ECDH', 'OPENSSL_NO_ECDSA', 'OPENSSL_NO_TLS1_3', form header, and add '/ec/.', '/sm2/.' files to INF files. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2022-05-11CryptoPkg: Separate auto-generated openssl config and edk2 openssl configYi Li2-328/+352
Move auto-generated openssl config to openssl/opensslconf_generated, And openssl/opensslconf.h will contain both edk2 conditional openssl feature and openssl/opensslconf_generated. Will make two part more clear. New conditional feture code in opensslconf.h will look like: /* Autogenerated conditional openssl feature list starts here */ [.....] /* Autogenerated conditional openssl feature list ends here */ Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2022-05-11CryptoPkg: Rename PCD about openssl EC configurationYi Li10-102/+102
PcdOpensslXXXEnabled is a more appropriate choice. Signed-off-by: Yi Li <yi1.li@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2022-05-09.pytool: Fix python command error in self introduction docChao Li1-2/+2
Fix misspelling of word "Prerequisites". In the step 5 of the Prerequisites section, the python command was missing the "-r" option, what the command really meant was to install from the given requirements file, so fix that. Cc: sean.brogan@microsoft.com Cc: Bret.Barkelew@microsoft.com Cc: michael.d.kinney@intel.com Cc: gaoliming@byosoft.com.cn Signed-off-by: Chao Li <lichao@loongson.cn> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-05-09MdeModulePkg/PCD: Pcd initialize DXE have assertGua Guo1-0/+5
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3917 When PlatformPkg.dsc has multiple SKU IDs but didn't exist delta PCD, System will hang on BuildPcdDxeDataBase. Ideally, if didn't exist delta PCD by different SKU ID, UpdatePcdDatabase () shouldn't return EFI_NOT_FOUND. Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-05-09PcAtChipsetPkg: Change the flow of PcRtcInit()Chao, Zhuoran1-13/+16
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3913 The original flow of PcRtcInit() is like: 1. Guarantee atomic accesses to the RTC time registers and read out the value. 2. Program RTC register B. (adopt 12h mode or 24h mode. Current bios code sets RTC to 24h mode by default). 3. Then function ConvertRtcTimeToEfiTime converts the RTC time value to their 24h mode by checking the hour format bit (1:24h mode,0:12h mode). And here lies the problem: Step3 will fail to adjust the value if Step2 already sets RTC to 24h mode. The hour value in 12h mode will not be converted to its 24h mode. The solution is to program RTC register B a little later when all the original RTC registers' value is retrieved, adjusted and validated. ConvertRtcTimeToEfiTime is modified to be more robust. Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Zhuoran Chao <zhuoran.chao@intel.com>
2022-05-09UefiPayloadPkg: Fix the UPL build failureTan, Dun1-3/+3
Add double quotes to LlvmObjcopyPath. Blank space in LlvmObjcopyPath will cause build failure. This build failure is introduced by 2306555bf908 ( "UefiPayloadPkg: Fix IA32 entry build failure"). Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems>
2022-05-09MdePkg: add SmmCpuRendezvousLib.h and SmmCpuRendezvousLibNull implement.Li, Zhihao7-6/+63
REF? https://bugzilla.tianocore.org/show_bug.cgi?id=3912 UefiCpuPkg define a new Protocol with the new services SmmWaitForAllProcessor(), which can be used by SMI handler to optionally wait for other APs to complete SMM rendezvous in relaxed AP mode. VariableSmm and VariableStandaloneMM driver in MdeModulePkg need to use this services but MdeModulePkg can't depend on UefiCpuPkg. Thus, the solution is moving SmmCpuRendezvouslib.h from UefiCpuPkg to MdePkg and creating SmmCpuRendezvousLib NullLib version implementation in MdePkg as dependency for the pkg that can't depend on UefiCpuPkg. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Zhihao Li <zhihao.li@intel.com> Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-05-06OvmfPkg: Add README for TDVFMin Xu1-0/+88
RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3249 Add README for TDVF. Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2022-05-06UefiPayloadPkg: Add CpuLib to module INFs that depend on UefiCpuLib.Yu Pu3-0/+3
There are two libraries: MdePkg/CpuLib and UefiCpuPkg/UefiCpuLib and UefiCpuPkg/UefiCpuLib will be merged to MdePkg/CpuLib. To avoid build failure, add CpuLib dependency to all modules that depend on UefiCpuLib. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Yu Pu <yu.pu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-05-06UefiCpuPkg: Add CpuLib to module INFs that depend on UefiCpuLib.Yu Pu8-0/+8
There are two libraries: MdePkg/CpuLib and UefiCpuPkg/UefiCpuLib and UefiCpuPkg/UefiCpuLib will be merged to MdePkg/CpuLib. To avoid build failure, add CpuLib dependency to all modules that depend on UefiCpuLib. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Signed-off-by: Yu Pu <yu.pu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-05-06OvmfPkg: Add CpuLib to module INFs that depend on UefiCpuLib.Yu Pu2-0/+2
There are two libraries: MdePkg/CpuLib and UefiCpuPkg/UefiCpuLib and UefiCpuPkg/UefiCpuLib will be merged to MdePkg/CpuLib. To avoid build failure, add CpuLib dependency to all modules that depend on UefiCpuLib. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Yu Pu <yu.pu@intel.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
2022-05-06IntelFsp2WrapperPkg: Add CpuLib to module INFs that depend on UefiCpuLib.Yu Pu2-0/+2
There are two libraries: MdePkg/CpuLib and UefiCpuPkg/UefiCpuLib and UefiCpuPkg/UefiCpuLib will be merged to MdePkg/CpuLib. To avoid build failure, add CpuLib dependency to all modules that depend on UefiCpuLib. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Signed-off-by: Yu Pu <yu.pu@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
2022-05-06IntelFsp2Pkg: Add CpuLib to module INFs that depend on UefiCpuLibYu Pu2-0/+2
There are two libraries: MdePkg/CpuLib and UefiCpuPkg/UefiCpuLib and UefiCpuPkg/UefiCpuLib will be merged to MdePkg/CpuLib. To avoid build failure, add CpuLib dependency to all modules that depend on UefiCpuLib. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Signed-off-by: Yu Pu <yu.pu@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
2022-05-06MdePkg: Add CpuLib to module INFs that depend on UefiCpuLib.Yu Pu1-0/+1
There are two libraries: MdePkg/CpuLib and UefiCpuPkg/UefiCpuLib and UefiCpuPkg/UefiCpuLib will be merged to MdePkg/CpuLib. To avoid build failure, add CpuLib dependency to all modules that depend on UefiCpuLib. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Yu Pu <yu.pu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-05-06UefiPayloadPkg: Add definition for PayloadCommandLine HOBduntan2-0/+29
Add definition for UNIVERSAL_PAYLOAD_COMMAND_LINE Hob. This Hob is used to pass command Line to Payload. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
2022-05-06BaseTools: Add FMMT Python ToolChen, Christine22-0/+2713
The FMMT python tool is used for firmware files operation, which has the Fv/FFs-based 'View'&'Add'&'Delete'&'Replace' operation function: 1.Parse a FD(Firmware Device) / FV(Firmware Volume) / FFS(Firmware Files) 2.Add a new FFS into a FV file (both included in a FD file or not) 3.Replace an FFS in a FV file with a new FFS file 4.Delete an FFS in a FV file (both included in a FD file or not) 5.Extract the FFS from a FV file (both included in a FD file or not) This version of FMMT Python tool does not support PEIM rebase feature, this feature will be added in future update. Currently the FMMT C tool is saved in edk2-staging repo, but its quality and coding style can't meet the Edk2 quality, which is hard to maintain (Hard/Duplicate Code; Regression bugs; Restrict usage). The new Python version keeps same functions with origin C version. It has higher quality and better coding style, and it is much easier to extend new functions and to maintain. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1847 RFC Link: https://edk2.groups.io/g/devel/message/82877 Staging Link: https://github.com/tianocore/edk2-staging/tree/PyFMMT Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-05-03ArmPlatformPkg: Fix EDK2_DSC check in Scripts/MakefileRebecca Cran1-1/+1
With GNU Make 4.2.1, ifeq ($(EDK2_DSC),"") doesn't catch the case where EDK2_DSC isn't defined. So, switch to using ifndef. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-03ArmPlatformPkg: Fix target initialisation in cmd_load_symbols.pyRebecca Cran1-3/+2
The debugger in Arm Development Studio 2021.2 doesn't work with "ec = debugger.getExecutionContext(0)" because it's subsequently unable to access memory. Fix it by switching to "ec = debugger.getCurrentExecutionContext()". The documentation for waitForStop() says: "It is not needed after a call to stop() because stop() is blocking." So, remove the call to waitForStop. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-03ArmPlatformPkg: Fix error message in Scripts/Ds5/edk2_debugger.pyRebecca Cran1-1/+1
An error message in Scripts/Ds5/edk2_debugger.py was missing the word 'not'. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-02OvmfPkg/Bhyve: add support for QemuFwCfgCorvin Köhne3-6/+40
QemuFwCfg is much more powerful than BhyveFwCtl. Sadly, BhyveFwCtl decided to use the same IO ports as QemuFwCfg. It's not possible to use both interfaces simultaneously. So, prefer QemuFwCfg over BhyveFwCtl. Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Peter Grehan <grehan@freebsd.org> Acked-by: Jiewen Yao <jiewen.yao@intel.com>
2022-04-30OvmfPkg: restore CompatImageLoaderDxe chunkGerd Hoffmann1-0/+3
Was dropped by accident. Fixes: b47575801e19 ("OvmfPkg: move tcg configuration to dsc and fdf include files") Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2022-04-28BaseTools/Conf: Fix Dynamic-Library-File templateJake Garver via groups.io1-0/+2
In the Dynamic-Library-File template, add missing output file declarations. These files are generated by the template and other rules explicitly depend on them. This change resolves missing dependency issues we encountered while running a recursive make with job control. Signed-off-by: Jake Garver <jake@nvidia.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2022-04-25OvmfPkg/VirtioGpuDxe: query native display resolution from hostGerd Hoffmann3-5/+99
Try query native display resolution from the host. When successful, setup PcdVideoHorizontalResolution and PcdVideoVerticalResolution accordingly and add the video mode to the GOP mode list if needed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-04-25OvmfPkg/VirtioGpuDxe: move code to GopInitializeGerd Hoffmann1-15/+32
Add new function to initialize the GOP, move over setup code. Handle initialization first, specifically before calling GopQueryMode(), so GopQueryMode is never called before GopInitialize() did complete. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-04-25OvmfPkg/VirtioGpuDxe: use GopQueryMode in GopSetModeGerd Hoffmann1-29/+31
Call GopQueryMode() in GopSetMode(), use the ModeInfo returned when setting the mode. This is needed to properly handle modes which are not on the static mGopResolutions list. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-04-25OvmfPkg/VirtioGpuDxe: add VirtioGpuGetDisplayInfoGerd Hoffmann2-0/+26
Add support for sending a GetDisplayInfo command. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-04-25OvmfPkg/VirtioGpuDxe: add GetDisplayInfo to virtio-gpu spec header.Gerd Hoffmann1-1/+18
Add GetDisplayInfo command, reply and data struct to the virtio-gpu specification header file. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-04-25OvmfPkg/VirtioGpuDxe: add VirtioGpuSendCommandWithReplyGerd Hoffmann1-18/+57
Extend VirtioGpuSendCommand() to support commands which return data, rename the function to VirtioGpuSendCommandWithReply() to indicate that. Add a new VirtioGpuSendCommand() function which is just a thin wrapper around VirtioGpuSendCommandWithReply() so existing code continues to work without changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-04-25ShellPkg: Update smbiosview type 0 with SMBIOS 3.5 fieldsBo Chang Ke2-0/+10
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3906 update smbiosview type 0 related fileds. Signed-off-by: Bo Chang Ke <bo-changx.ke@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2022-04-22ArmVirtPkg: clear PcdConOut{Row,Column}Gerd Hoffmann2-0/+4
ConSplitterDxe will pick the highest available resolution then, thereby making better use of the available display space. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-04-22OvmfPkg: clear PcdConOut{Row,Column}Gerd Hoffmann6-0/+12
ConSplitterDxe will pick the highest available resolution then, thereby making better use of the available display space. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-04-22MdeModulePkg/GraphicsConsoleDxe: add modesGerd Hoffmann1-1/+4
Add modes for a few common display resolutions higher than 800x600, specifically 1024x768, 1280x800 and 1920x1080, so ConSplitterDxe has more options available. The mode list is not use as-is, InitializeGraphicsConsoleTextMode() will check the list and filter out any modes which don't fit to the screen, so this will also work fine for small displays. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-04-22.pytool/Plugin/UncrustifyCheck: Add Azure DevOps UI debug instructionsMichael Kubacki1-0/+5
Adds a link to the log output that contains instructions on how find detailed file formatting errors in the Azure DevOps UI. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
2022-04-22.azurepipelines: Add NOOPT to all package buildsMichael Kubacki1-5/+5
The NOOPT build target is used for host-based unit tests. This change adds the NOOPT target for all packages to ensure that tests are executed if present. If the host-based DSC is not specified in the packages CI YAML file, the host-based compiler plugin will be reported as a skipped test. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
2022-04-22BaseTools: Move gPlatformFinalPcd to Datapipe and optimize sizeLi, Yi15-11/+13
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 This is a bugfix of bf9230a9f3dde065c3c8b4175ccd32e44e8f0362. 1.In the current code, gPlatformFinalPcd will save all PCDs used at whole compile process, which wastes runtime memory and is unnecessary. This patch makes gPlatformFinalPcd save only the PCDes which are assigned in the DSC file, and the PCD that has not been assigned will use the default value in DEC. 2.During the compilation process, gPlatformFinalPcd may be lost, and the current code cannot selectively assign PCD in DSC by specifying ARCH. This patch moves gPlatformFinalPcd into datapipe and modifies the assignment logicto fix this. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: yi1 li <yi1.li@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2022-04-22UefiPayloadPkg: Fix IA32 entry build failureTan, Dun1-6/+12
The ObjCopyFlag and EntryOutputDir need to be modified when building IA32 UniversalPayload Entry Signed-off-by: Dun Tan <dun.tan@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
2022-04-22ShellPkg: Update smbiosview type 9 with SMBIOS 3.5 fieldsBo Chang Ke4-6/+280
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896 update smbiosview type 9 related fileds. Signed-off-by: Bo Chang Ke <bo-changx.ke@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2022-04-22MdePkg: Update smbiosview type 9 with SMBIOS 3.5 fieldsBo Chang Ke1-65/+112
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3896 update smbiosview type 9 related fileds. Signed-off-by: Bo Chang Ke <bo-changx.ke@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-04-21CryptoPkg: Declare PcdEcEnabled in Library consuming OpensslLibYi Li8-2/+20
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3679 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3828 Tls/Base/Pei/Smm/RuntimeCryptLib.inf will use OpensslLib, and the opensslconf.h in openssllib will use PcdEcEnabled, but it is not declared in the inf file now, it will cause warnings in some compilers. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Yi Li <yi1.li@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>