summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* MdeModulePkg/RegularExpressionDxe: Fix Arm build errorNickle Wang2023-04-282-4/+11
| | | | | | | | | | | | | | | | | | | | | | | Arm CI build error: - ArmPkg/Library/CompilerIntrinsicsLib/memset.c:39:1: warning: type of ‘memset’ does not match original declaration [-Wlto-type-mismatch] MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c:123:1: note: type ‘char’ should match type ‘int’ - multiple definition of `memcpy'; OnigurumaUefiPort.obj (symbol from plugin):(.text+0x0): first defined here Fix: - Update memset() implementation to match memset() definition in ArmPkg/Library/CompilerIntrinsicsLib. - memcpy() is supported by ArmPkg/Library/CompilerIntrinsicsLib. Exclude it in OnigurumaUefiPort.c. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* SecurityPkg/DxeImageVerificationLib: Add AUTH_SIG_NOT_FOUND ActionNhi Pham2023-04-281-0/+1
| | | | | | | | | | | | | | | | | | | Add the AUTH_SIG_NOT_FOUND Action to the Image Execution Info Table when the Image is signed but signature is not allowed by DB and the hash of image is not found in DB/DBX. This is documented in the UEFI spec 2.10, table 32.5. This issue is found by the SIE SCT with the error message as follows: SecureBoot - TestImage1.bin in Image Execution Info Table with SIG_NOT_FOUND. --FAILURE B3A670AA-0FBA-48CA-9D01-0EE9700965A9 SctPkg/TestCase/UEFI/EFI/RuntimeServices/SecureBoot/BlackBoxTest/ ImageLoadingBBTest.c:1079:Status Success Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Min Xu <min.m.xu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* UefiPayloadPkg: Clang dependency removalBruceX Wang2023-04-284-125/+923
| | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4426 Use Python to replace llvm-objcopy in UniversalPayloadBuild.py. 1. AddSection32() and AddSection64(): Make a section named <section> with the contents of <file>. 2. RemoveSection32() and RemoveSection64(): Remove <section>. 3. ReplaceFv (): remove the section before add the section if the file exists. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Signed-off-by: BruceX Wang <brucex.wang@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
* .azurepipelines: Switch linux image default to Fedora-37Gua Guo2023-04-271-1/+1
| | | | | | | | | | | | Switch default linux build image from Fedora-35 to Fedora-37 Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Oliver Steffen <osteffen@redhat.com> Cc: Chris Fernald <chfernal@microsoft.com> Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com>
* .azurepipelines: Choose container that have installed lcovGua Guo2023-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Azure should install code coverage tool (lcov), it didn't exist on Fedora and Ubuntu by default. Update docker setting, pick below solution between 47addc9 and 3b3eb8f 3b3eb8f Fixes and improvements to dev containers (#69) 54e5bd1 Enable GTK on Fedora QEMU (#63) f1c7a20 Fedora: install code coverage tools for GCC (#62) 2ce82af Ubuntu-22: Add initial Ubuntu-22 image (#61) 14d2aba Add Fedora 37 image with gcc12 (#60) 5b8a008 Add dotnet runtime to fedora build (#57) f5c874a Fix platform build file name for EDK2 change (#58) 48540ad Ubuntu-20: Fix dev image entrypoint (#55) 98e849d Fedora-35: Add Powershell to build image (#52) Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Oliver Steffen <osteffen@redhat.com> Cc: Chris Fernald <chfernal@microsoft.com> Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com> Reviewed-by: Chris Fernald <chfernal@microsoft.com>
* BaseTools/Plugin: Report error if code coverage failureGua Guo2023-04-271-2/+6
| | | | | | | | | | | If code coverage exist failure, CI/CD need to catch it Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com>
* OvmfPkg/CcExitLib: Use documented XSave area base size for SEV-SNPRoth, Michael via groups.io2023-04-261-5/+4
| | | | | | | | | | | | | Currently OVMF tries to rely on the base size advertised via the CPUID table entries corresponding to leaf 0xD, sub-leafs 0x0/0x1. This will generally work for KVM guests, but might not for other SEV-SNP hypervisor implementations. Make the handling more robust by simply using the base area size documented by the APM. Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Roth <michael.roth@amd.com>
* OvmfPkg/CcExitLib: Fix SEV-SNP XSave area size calculationRoth, Michael via groups.io2023-04-261-3/+1
| | | | | | | | | | | | | | | | | | | | CPUID leaf 0xD sub-leafs 0x0 and 0x1 contain cumulative sizes for the enabled XSave areas. Those sizes are calculated by tallying up all the other sub-leafs that contain per-area size information for XSave areas that are currently enabled in XCr0/XSS. The current check has the logic inverted. Fix that. This doesn't seem to cause problems currently, but could in the future if OVMF made more extensive use of XSave areas. It was noticed while implementing SNP-related tests for KVM Unit Tests, which re-uses the OVMF #VC handler in some cases. Reported-by: Pavan Kumar Paluri <papaluri@amd.com> Cc: Pavan Kumar Paluri <papaluri@amd.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Roth <michael.roth@amd.com>
* OvmfPkg/AmdSevDxe: Update ConfidentialComputing blob struct definitionRoth, Michael via groups.io2023-04-262-3/+7
| | | | | | | | | | | | | | | | | | | | The Confidential Computing blob defined here is intended to match the definition defined by linux guest kernel. Previously, both definitions relied on natural alignment, but that relies on both OVMF and kernel being compiled as 64-bit. While there aren't currently any plans to enable SNP support for 32-bit compilations, the kernel definition has since been updated to use explicit padding/reserved fields to avoid this dependency. Update OVMF to match that definition. While at it, also fix up the Reserved fields to match the numbering used in the kernel. No functional changes (for currently-supported environments, at least). Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Roth <michael.roth@amd.com>
* OvmfPkg/AmdSevDxe: Allocate SEV-SNP CC blob as EfiACPIReclaimMemoryMichael Roth2023-04-261-14/+48
| | | | | | | | | | | | | | The SEV-SNP Confidential Computing blob contains metadata that should remain accessible for the life of the guest. Allocate it as EfiACPIReclaimMemory to ensure the memory isn't overwritten by the guest operating system later. Reported-by: Dov Murik <dovmurik@linux.ibm.com> Suggested-by: Dov Murik <dovmurik@linux.ibm.com> Reviewed-by: Dov Murik <dovmurik@linux.ibm.com> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Roth <michael.roth@amd.com>
* UefiCpuPkg: Update PT code to support enable collect performanceDun Tan2023-04-263-13/+44
| | | | | | | | | | | | | | | | | Update ProcTrace feature code to support enable collect performance data by generating CYC and TSC packets. Add a new dynamic PCD to indicate if enable performance collecting. In ProcTrace.c code, if this new PCD is true, after check cpuid, CYC and TSC packets will be generated by setting the corresponding MSR bits feilds if supported. Bugzila: https://bugzilla.tianocore.org/show_bug.cgi?id=4423 Signed-off-by: Dun Tan <dun.tan@intel.com> Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Xiao X Chen <xiao.x.chen@intel.com>
* UefiCpuPkg: Update code to support enable ProcTrace only on BSPDun Tan2023-04-263-65/+119
| | | | | | | | | | | | | | | Update code to support enable ProcTrace only on BSP. Add a new dynamic PCD to indicate if enable ProcTrace only on BSP. In ProcTrace.c code, if this new PCD is true, only allocate buffer and set CtrlReg.Bits.TraceEn to 1 for BSP. Bugzila: https://bugzilla.tianocore.org/show_bug.cgi?id=4423 Signed-off-by: Dun Tan <dun.tan@intel.com> Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Xiao X Chen <xiao.x.chen@intel.com>
* RedfishPkg: Remove the Discover Token global variablesIgor Kulchytskyy2023-04-263-119/+139
| | | | | | | | | | | | | gRedfishDiscoveredToken may be allocated several times, if multiple NIC installed on the system. To avoid this issue Discover Token related global variables replaced with the local variables. Cc: Abner Chang <abner.chang@amd.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* DynamicTablesPkg/SsdtCpuTopology: Allow multi-packages topologiesPierre Gondois2023-04-252-51/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The topology of a platform is represented in ACPI using the PPTT table. It is possible to append information to CPUs/processor containers using their associated AML nodes in a SSDT table. A platform might have multiple 'physical packages' (or top-level nodes) in their PPTT topology representation. It can be assumed from [1] that a 'physical packages' is always a 'top-level node', and conversely. The SSDT topology generator doesn't support having multiple top-level nodes. The top-level node is also not generated in the SSDT topology representation. Add support to generate multiple top-level nodes in the SSDT topology generator and generate an AML node for this top-level node. This will allow to have matching PPTT and SSDT topology representations. Prior to this patch, this top-level AML node was not generated. Also factorize the flag checking in CheckProcNode() and add more checks. This patch takes inspiration from the discussion at: - v1: https://edk2.groups.io/g/devel/message/99410 - v2: https://edk2.groups.io/g/devel/message/99615 [1] ACPI 6.5, 5.2.30.1 Processor hierarchy node structure (Type 0): - "Multiple trees may be described, covering for example multiple packages. For the root of a tree, the parent pointer should be 0."" - "Each valid processor must belong to exactly one package. That is, the leaf must itself be a physical package or have an ancestor marked as a physical package." Suggested-by: Jeff Brasen <jbrasen@nvidia.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* BaseTools: Add quotes around OBJCOPY cmd in build_rule.templateRebecca Cran2023-04-251-2/+2
| | | | | | | | | | Add quotes around the OBJCOPY command in build_rule.template to fix the case where LLVM is installed on Windows in a path with spaces such as C:\Program Files\LLVM. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* ArmPkg: add ArmCpuInfo EFI applicationMarcin Juszkiewicz2023-04-213-0/+2462
| | | | | | | App goes through ID_AA64*_EL1 system registers and decode their values. Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* ArmLib: add functions to read system registersMarcin Juszkiewicz2023-04-212-9/+99
| | | | | | | | ArmCpuInfo uses those to read system registers and other parts of EDK2 may find them useful. Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* MdePkg: Add DEBUG_MANAGEABILITY print error levelAbner Chang2023-04-212-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #4414 Add DEBUG_MANAGEABILITY print error lever to output debug message of detailed manageability related module information, such as - RedfishPkg: - HTTP header/request/response - JSON plain text - Refish resource - Redfish Host interface information - Redfish credential information - Platform configuration to Redfish mapping - etc. - ManageabilityPKg - Protocol payload of MCTP/PLDM/IPMI - Payload of transport interface transfers - IPMI BLOB transfer - etc. - RedfishClinetPkg - Redfish feature driver dispatcher - Redfish BIOS attributes - Platform configuration (HII) to Redfish property information - Redfish C structure information - etc. Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Isaac Oram <isaac.w.oram@intel.com> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Cc: Tinh Nguyen <tinhnguyen@os.amperecomputing.com>
* BaseTools/Plugin: Clarify code coverage failure messageMichael Kubacki2023-04-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HostBasedUnitTestRunner.py is a build plugin responsible for locating and executing host-based unit tests. Recently, commit 6bb00aa introduced support for the plugin to generate code coverage reports via lcov and OpenCppCoverage. The plugin has discovered unit tests by searching for executables with "Test" in the name for a while. However, the test coverage change makes assumptions about test presence when crafting the OpenCppCoverage command that ultimately fails with an ambiguous error message if no host-based unit tests are discovered (see "ERROR"). ``` SECTION - Run Host based Unit Tests SUBSECTION - Testing for architecture: X64 ERROR - UnitTest Coverage: Failed to generate cobertura format xml in single package. PROGRESS - --->Test Success: Host Unit Test Compiler Plugin NOOPT ``` This change preempts that message with a check in the plugin to determine if any host-based tests were discovered. If not, a message is printed with more guidance about how the developer should proceed to either (1) fix their tests so code coverage is generated as expected or (2) prevent the error message. New message: ``` SECTION - Run Host based Unit Tests SUBSECTION - Testing for architecture: X64 WARNING - UnitTest Coverage: No unit tests discovered. Test coverage will not be generated. Prevent this message by: 1. Adding host-based unit tests to this package 2. Ensuring tests have the word "Test" in their name 3. Disabling HostUnitTestCompilerPlugin in the package CI YAML file PROGRESS - --->Test Success: Host Unit Test Compiler Plugin NOOPT ``` Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* MdePkg/Include: Add DMTF PLDM SMBIOS definitionsAbner Chang2023-04-201-0/+183
| | | | | | | | | | | | | | | | | | | | BZ #4396 This change adds definitions for DMTF PLDM SMBIOS Transfer specification. Spec ref: https://www.dmtf.org/sites/default/files/standards/documents/DSP0246_1.0.1.pdf Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Isaac Oram <isaac.w.oram@intel.com> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* ArmPkg: older assemblers may lack ID_AA64ISAR2_EL1Marcin Juszkiewicz2023-04-201-0/+4
| | | | | | | | | | | ArmCpuInfo needs to be able to read ID_AA64ISAR2_EL1 system register. Older toolchains do not know it. Same solution as one for QEMU: https://www.mail-archive.com/qemu-devel@nongnu.org/msg929586.html Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* UefiPayloadPkg: Move Network modules from Dxe FV to Network FV in elfLinus Wu2023-04-202-2/+42
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4417 Since UefiPayload had supported multiple FV, move Network.fdf.inc to new firmware volume and add this network FV into elf file. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Signed-off-by: Linus Wu <linusx.wu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com>
* MdePkg/Include: Add DMTF PLDM Base definitionsAbner Chang2023-04-201-0/+82
| | | | | | | | | | | | | | | | | | | BZ #4396 This change adds definitions for DMTF PLDM base specification. Spec ref: https://www.dmtf.org/sites/default/files/standards/documents/DSP0240_1.1.0.pdf Signed-off-by: Abner Chang <abner.chang@amd.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Nickle Wang <nicklew@nvidia.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Isaac Oram <isaac.w.oram@intel.com> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* ArmPkg/ArmMmuLib: Fix ArmReplaceLiveTranslationEntry() alignmentMarvin Häuser2023-04-201-6/+8
| | | | | | | | | | | | | | | | | | As the ASM_FUNC() macro performs a section switch, the preceding .balign directive applies the alignment constraint to the current location in the previous section. As the linker may not merge the sections in-order, ArmReplaceLiveTranslationEntry() may be left unaligned. Replace the explicit invocation of .balign with the ASM_FUNC_ALIGN() macro, which guarantees the alignment constraint is applied correctly. To make sure related issues are reliably caught in the future, align the end of the function before checking the total occupied size. This ensures crossing a 0x200 boundary will cause a compilation error. Signed-off-by: Marvin Häuser <mhaeuser@posteo.de> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* ArmPkg/AsmMacroIoLibV8: Introduce ASM_FUNC_ALIGN()Marvin Häuser2023-04-201-0/+11
| | | | | | | | | | | | | | | | With the current ASM_FUNC() macro, there is no good way to declare an alignment constraint for a function. As ASM_FUNC() switches sections, declaring the constraint before the macro invocation applies it to the current location in the previous section. Declaring the constraint after the macro invocation lets the function label point to the location prior to alignment. Depending on toolchain behaviour, this may cause the label to point to alignment padding preceding the actual function definition. To address these issues, introduce the ASM_FUNC_ALIGN() macro, which declares the alignment constraint right before the function label. Signed-off-by: Marvin Häuser <mhaeuser@posteo.de> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* CryptoPkg: Enable DXE_CORE support in DxeCryptLib.infYi Li2023-04-191-1/+1
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4413 Make the DXE_CORE module able to call the crypto protocol, which can reduce FV size on platforms using the Crypto Binaries. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Signed-off-by: Yi Li <yi1.li@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* IntelFsp2Pkg/Tools: Enhance PathFv.py to patch Fd file directlyDuggapu, Chinni B2023-04-182-1/+33
| | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=4412 After shrinking the FSP (FV) component using FMMT, Image size in FSP info header is not in sync with the FV length in FV header. This enhancement helps to patch the FSP image size offset with correct length & can be used to patch any offset directly on the FSP Component Fd. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ted Kuo <ted.kuo@intel.com> Signed-off-by: Duggapu Chinni B <chinni.b.duggapu@intel.com> Reviewed-by: Ted Kuo <ted.kuo@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
* edk2: Add .git-blame-ignore-revs filePedro Falcato2023-04-161-0/+52
| | | | | | | | | | | | | | | | | | | | | | | Add a .git-blame-ignore-revs file containing the hashes of every uncrustify format commit as retrieved in: git log --oneline --no-abbrev-commit | grep "uncrustify" This file can be used by tools (such as GitHub[1]) to ignore certain revisions when git blame-ing a file. It can also be trivially usable locally by doing something akin to: git config blame.ignoreRevsFile .git-blame-ignore-revs It may also be desirable in the future to add more commits to it. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com> Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> [1]: https://github.blog/changelog/2022-03-24-ignore-commits-in-the-blame-view-beta/
* BaseTools: Update SetupGit.py to add new 'fp' alias for patch formattingRebecca Cran2023-04-141-0/+2
| | | | | | | | | To help people format patches with the correct options, add an alias named 'fp' to SetupGit.py that runs format-patch with '-M --stat=1000 --stat-graph-width=20'. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: Update PatchCheck.py to check for __FUNCTION__Rebecca Cran2023-04-141-0/+6
| | | | | | | | | New code should use the C99 macro __func__ instead of the pre-Standard macro __FUNCTION__. Update PatchCheck.py to reject patches with the latter. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* MdeModulePkg/RegularExpressionDxe: Fix GCC build errordevel@edk2.groups.io2023-04-131-4/+3
| | | | | | | | | | | Fix GCC build error on AARCH64 system. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Nick Ramirez <nramirez@nvidia.com> Signed-off-by: Nickle Wang <nicklew@nvidia.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* Maintainer.txt: add myself as reviewer for bhyve's OvmfPkgCorvin Köhne2023-04-131-0/+1
| | | | | | | | | Signed-off-by: Corvin Köhne <corvink@FreeBSD.org> Reviewed-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Peter Grehan <grehan@freebsd.org> Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com>
* ShellPkg: UefiShellDebug1CommandsLib: Uefi Config Tables in Dmem.cSam Kaynor2023-04-133-13/+123
| | | | | | | | | | | | Added entries for UEFI Config Tables not present in current Dmem output. Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Sam Kaynor <Sam.Kaynor@arm.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
* MdePkg: Add new JedecJep106Lib to fetch JEDEC JEP106 manufacturerRebecca Cran2023-04-125-0/+1898
| | | | | | | | | Add a new library, JedecJep106Lib which provides a service to return the JEDEC JEP106 manufacturer string given the code and continuation bytes values. Signed-off-by: Rebecca Cran <rebecca@quicinc.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Fix SetQueueAlignment.Jeff Brasen2023-04-121-1/+3
| | | | | | | Nothing to do here for virtio 1.0 devices Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
* UefiPayloadPkg: Update default memory type information for S4Sean Rhodes2023-04-121-4/+4
| | | | | | | | | | | | | Copied values from OVMF, these are sufficient for a debug build. Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com> Signed-off-by: Sean Rhodes <sean@starlabs.systems>
* UefiPayloadPkg: Always build MemoryTypeInformation HOB for DXE GCDBenjamin Doron2023-04-124-35/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MemoryType information assists GCD with defragmenting the memory map. When the DXE core starts, GCD adds memory descriptors for the resource descriptors HOBs. This allocates heap space which can be reused later as the bins by memory type. It seems memory allocation prefers low ranges. It seems "below 4G" is an artifact of this heap reuse. However, the memory type information determines the DXE core's `MinimalMemorySizeNeeded`, determining which system memory descriptor HOB may be used by DXE. Furthermore, it's important that the memory type information be correct, for an S4 memory map. Therefore, follow other bootloaders, such as [MinPlatform][1], and do this unconditionally. As of [edk2-stable202011][2], it was. [1]: https://github.com/tianocore/edk2-platforms/blob/b6f96743891be51541184bf61dd2970c008e2c43/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c#L164-L201 [2]: https://github.com/tianocore/edk2/blob/edk2-stable202011/UefiPayloadPkg/BlSupportPei/BlSupportPei.c#L462-L466 Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
* UefiCpuLib: Remove UefiCpuLib.Yu Pu2023-04-126-92/+0
| | | | | | | | | | | | Because UefiCpuPkg/UefiCpuLib is merged to MdePkg/CpuLib and all modules are updated to not depend on this library, remove it completely. 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> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
* ShellPkg: Update smbiosview type 0/4/17/41 with SMBIOS 3.5 fieldsLin, MillerX2023-04-112-91/+89
| | | | | | | Signed-off-by: MillerX Lin <millerx.lin@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* FmpDevicePkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-101-1/+1
| | | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout FmpDevicePkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
* UefiPayloadPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-102-3/+3
| | | | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout UefiPayloadPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Gua Guo <gua.guo@intel.com> Reviewed-by: James Lu <james.lu@intel.com>
* EmulatorPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-102-2/+2
| | | | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout EmulatorPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Abner Chang <Abner.Chang@amd.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* SourceLevelDebugPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-102-3/+3
| | | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout SourceLevelDebugPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Ray Ni <ray.ni@intel.com>
* NetworkPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-102-10/+10
| | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout NetworkPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* CryptoPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-102-6/+6
| | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout CryptoPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* StandaloneMmPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-103-20/+20
| | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout StandaloneMmPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* PrmPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-108-71/+71
| | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout PrmPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* UnitTestFrameworkPkg: Update to be more C11 compliant by using __func__Rebecca Cran2023-04-107-25/+25
| | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout UnitTestFrameworkPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* ArmPlatformPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-101-2/+2
| | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout ArmPlatformPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* RedfishPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-109-93/+93
| | | | | | | | | | | | | __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout RedfishPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Nickle Wang <nicklew@nvidia.com>