summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* pip: bump edk2-pytool-library from 0.19.3 to 0.19.4dependabot/pip/edk2-pytool-library-0.19.4dependabot[bot]2023-11-151-1/+1
| | | | | | | | | | | | | | Bumps [edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library) from 0.19.3 to 0.19.4. - [Release notes](https://github.com/tianocore/edk2-pytool-library/releases) - [Commits](https://github.com/tianocore/edk2-pytool-library/compare/v0.19.3...v0.19.4) --- updated-dependencies: - dependency-name: edk2-pytool-library dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* RedfishPkg: RedfishDiscoverDxe: Optimize the Redfish Discover flowIgor Kulchytskyy2023-11-152-33/+105
| | | | | | | | | | Filter out the network interfaces which are not supported by Redfish Host Interface. Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by Mike Maslenkin <mike.maslenkin@gmail.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com>
* RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed after RestExIgor Kulchytskyy2023-11-151-15/+16
| | | | | | | | | | Supported function of the driver changed to wait for all network interface to be installed. Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by Mike Maslenkin <mike.maslenkin@gmail.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com>
* MdeModulePkg/RegularExpressinoDxe: Fix clang errorJake Garver via groups.io2023-11-131-0/+1
| | | | | | | | | | Ignore old style declaration warnings in oniguruma/src/st.c. This was already ignored for MSFT, but newer versions of clang complain as well. Signed-off-by: Jake Garver <jake@nvidia.com> Reviewed-by: Nhi Pham <nhi@os.amperecomputing.com> Tested-by: Nhi Pham <nhi@os.amperecomputing.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* BaseTools/Scripts/GetMaintainer: Sort output addressesMichael D Kinney2023-11-111-4/+6
| | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4593 Sort the list of output addresses alphabetically so this script produces the same output even if the order of patches in a patch series is modified such that that order of files processed by this script changes. Use set() logic instead of OrderedDict to accumulate the list of unique addresses that are sorted alphabetically. 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: Leif Lindholm <quic_llindhol@quicinc.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* BaseTools/Scripts/GetMaintainer: Handle reviewer only caseMichael D Kinney2023-11-111-4/+14
| | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4593 If a package only has reviewers and no maintainers, then also return the <default> maintainers. In order to detect this case, get_maintainers() is updated to return maintainers, reviews, and lists separately instead of a single merged list. This also allows this module to be used by other scripts that need to distinguish between maintainers, reviewers, and lists. 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: Leif Lindholm <quic_llindhol@quicinc.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* BaseTools/Scripts/GetMaintainer: refactor internal returns as dictsLeif Lindholm2023-11-111-9/+10
| | | | | | | | | | | | | | To clean up interfaces, change the lookup functions to return dictionaries rather than multiple values. 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> Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com> Acked-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools/Scripts/GetMaintainer: Simplify logicMichael D Kinney2023-11-111-4/+2
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4593 get_section_maintainers() either returns a list with valid entries or an empty list. It never returns None. Simplify logic that accumulates maintainers and lists by unconditionally appending lists returned from get_section_maintainers(). 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: Leif Lindholm <quic_llindhol@quicinc.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* BaseTools/Scripts/GetMaintainer: Fix logic bug collecting maintainersMichael D Kinney2023-11-111-1/+1
| | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4593 Fix logic bug where maintainers is incorrectly added to lists. 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: Leif Lindholm <quic_llindhol@quicinc.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* UefiCpuPkg/PiSmmCpuDxeSmm: Fix CP Exception when CET enableJiaxin Wu2023-11-103-58/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Root cause: 1. Before DisableReadonlyPageWriteProtect() is called, the return address (#1) is pushed in shadow stack. 2. CET is disabled. 3. DisableReadonlyPageWriteProtect() returns to #1. 4. Page table is modified. 5. EnableReadonlyPageWriteProtect() is called, but the return address (#2) is not pushed in shadow stack. 6. CET is enabled. 7. EnableReadonlyPageWriteProtect() returns to #2. #CP exception happens because the actual return address (#2) doesn't match the return address stored in shadow stack (#1). Analysis: Shadow stack will stop update after CET disable (DisableCet() in DisableReadOnlyPageWriteProtect), but normal smi stack will be continue updated with the function called and return (DisableReadOnlyPageWriteProtect & EnableReadOnlyPageWriteProtect), thus leading stack mismatch after CET re-enabled (EnableCet() in EnableReadOnlyPageWriteProtect). According SDM Vol 3, 6.15-Control Protection Exception: Normal smi stack and shadow stack must be matched when CET enable, otherwise CP Exception will happen, which is caused by a near RET instruction. CET is disabled in DisableCet(), while can be enabled in EnableCet(). This way won't cause the problem because they are implemented in a way that return address of DisableCet() is poped out from shadow stack (Incsspq performs a pop to increases the shadow stack) and EnableCet() doesn't use "RET" but "JMP" to return to caller. So calling EnableCet() and DisableCet() doesn't have the same issue as calling DisableReadonlyPageWriteProtect() and EnableReadonlyPageWriteProtect(). With above root cause & analysis, define below 2 macros instead of functions for WP & CET operation: WRITE_UNPROTECT_RO_PAGES (Wp, Cet) WRITE_PROTECT_RO_PAGES (Wp, Cet) Because DisableCet() & EnableCet() must be in the same function to avoid shadow stack and normal SMI stack mismatch. Note: WRITE_UNPROTECT_RO_PAGES () must be called pair with WRITE_PROTECT_RO_PAGES () in same function. Change-Id: I4e126697efcd8dbfb4887da034d8691bfca969e3 Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zeng Star <star.zeng@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* Maintainers.txt: Remove unused OvmfPkg Confidential Computing pathMichael D Kinney2023-11-091-1/+0
| | | | | | | | | | | | | | | | | | | | The following commit removed PlatformBootManagerLibGub from OvmfPkg. Update Maintainers.txt to remove reference to deleted directory. https://github.com/tianocore/edk2/commit/6fb2760dc8939b16a906b8e6bb224764907168f3 Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Michael Roth <michael.roth@amd.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* BaseTools/tools_def: drop -mgeneral-regs-only for AArch64 CLANGDWARFYeping Song2023-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Commit 0df6c8c157af9 ("BaseTools/tools_def AARCH64: avoid SIMD registers in XIP code") adds -mgeneral-regs-only to GCC_AARCH64_CC_XIPFLAGS, in order to avoid a bug present in certain versions of GCC. This was never a problem for clang. That's given the history of what the problem is. Then we can describe how we fix it: Change *_CLANGDWARF_AARCH64_CC_XIPFLAGS to set the required -mstrict-align option instead of importing the whole GCC variable. Signed-off-by: Yeping Song <quic_yepings@quicinc.com> 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: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* OvmfPkg/BaseMemEncryptTdxLib: Handle retry result of MapGPACeping Sun2023-11-091-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4572 According to section 3.2 of the [GHCI] document, if the return status of MapGPA is "TDG.VP.VMCALL_RETRY", TD must retry this operation for the pages in the region starting at the GPA specified in R11. In this patch, when a retry state is detected, TDVF needs to retry the mapping with the specified address from the output results of TdVmCall. Reference: [GHCI]: TDX Guest-Host-Communication Interface v1.0 https://cdrdv2.intel.com/v1/dl/getContent/726790 Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Michael Roth <michael.roth@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
* MdePkg/Tdx.h: Add TDVMCALL_STATUS_RETRYCeping Sun2023-11-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4572 TDVMCALL_STATUS_RETRY is defined in GHCI spec section 2.4.1. Reference: [GHCI]: TDX Guest-Host-Communication Interface v1.0 https://cdrdv2.intel.com/v1/dl/getContent/726790 Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Michael Roth <michael.roth@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
* MdePkg/BaseLib: Update TdVmcall to always output the value in R11Ceping Sun2023-11-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4572 According to section 3.2 of the [GHCI] spec, if the return status of MapGPA is "TDG.VP.VMCALL_RETRY", TD must retry this operation for the pages in the region starting at the GPA specified in R11. Currently, TDVF has not handled the retry results and always clears the R11 on unsuccessful return status. For this, the TdVmcall needs to output the value of R11 on unsuccessful return status to handle the retry results of MapGPA. Reference: [GHCI]: TDX Guest-Host-Communication Interface v1.0 https://cdrdv2.intel.com/v1/dl/getContent/726790 Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Michael Roth <michael.roth@amd.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
* IntelFsp2WrapperPkg: Add variable initializationJasonX.Hsu2023-11-091-0/+1
| | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4595 Fix build error when remove "-Wno-sometimes-uninitialized" option, Add variable "FspMultiPhaseApiOffset" initialization. Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com> Cc: Ted Kuo <ted.kuo@intel.com> Cc: Susovan Mohapatra <susovan.mohapatra@intel.com> Cc: James Lu <james.lu@intel.com> Reviewed-by: Ashraf Ali S <ashraf.ali.s@intel.com> Reviewed-by: Chen Gang C <gang.c.chen@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: Jason Hsu <jasonx.hsu@intel.com>
* Maintainers.txt: Remove Orphan status optionMichael D Kinney2023-11-081-2/+0
| | | | | | | | | | | | | | | | We would like any proposed change in the edk2 codebase to be assignable to a human maintainer/reviewer. If there is a feature for which there is no longer any support, we should find a way to remove it from the head of the repository. For critical features, we must find community members that are willing to own it. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* ReadMe.rst: Add CodeQL/analyze directory under other licensesMichael Kubacki2023-11-071-0/+1
| | | | | | | | | | | | | | | The code in this directory is licensed under Apache License, Version 2.0. Therefore, the directory is listed under paths with licenses other than BSD-2-Clause Plus Patent. The directory link points to the complete Apache License, Version 2.0 on apache.org. Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
* BaseTools/Plugin/CodeQL: Enable 30 queriesMichael Kubacki2023-11-071-7/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the CodeQL queries opted into by edk2 to a set of queries from the standard CodeQL query package `codeql/cpp-queries`. After testing a large number of queries the included set here were found to be the most useful with the least number of false positives. Some queries had a number of issues that led to them being placed on the exclusion list so that they are not considered in the future without the notes there being taken into account. General details about queries available in the pack are available here: https://codeql.github.com/codeql-query-help/cpp/ The issues found by these queries will need to be fixed over time. In the meantime, the results will show to those that have permission in the repo's GitHub Code Scanning area. The build will not fail due to CodeQL issues (since they are not all fixed) but that can be enabled in the future. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
* .pytool/CISettings: Enable CodeQL audit modeMichael Kubacki2023-11-071-0/+6
| | | | | | | | | | | | | | | | | | Since a large number of CodeQL queries are being enabled to identify issues that the community can collectively resolve, audit mode needs to be enabled to prevent the build from failing. In the future, this global audit mode can be disabled and individual packages can enable/disable audit mode in their package CI YAML file using the instructions in the CodeQL plugin readme. Cc: Sean Brogan <sean.brogan@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> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
* .github/workflows/codeql.yml: Add CodeQL workflowMichael Kubacki2023-11-071-0/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a workflow to run CodeQL against all packages built in .pytool/CISettings.py. The following is done: 1. Determine which packages to build against. Those that support are managed by .pytool/CISettings.py will be selected. For each package: 2. Determine how to interact with the package. Such as whether `stuart_ci_setup` or `stuart_setup` should be used. 3. Perform supported Stuart steps for setup and update. 4. Discover the CodeQL plugin directory in the repo. 5. Attempt to load the CodeQL CLI specific to the host OS from a GitHub cache. 6. Perform the build. 7. Clean up some files after build to improve robustness. 8. Upload the CodeQL results (generated SARIF file) to GitHub Code Scanning. The results will be associated with the trigger of the workflow. After each step that can upload logs such as the setup, update, and build steps the logs are uploaded as an artifact to the workflow run. This allows easy debugging in case there's an error in the step. The SARIF file is also uploaded to the workflow run so it can be downloaded and analyzed. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
* .pytool/CISettings.py: Integrate CodeQLMichael Kubacki2023-11-071-0/+30
| | | | | | | | | | | | | | | | | | | Adds the `--codeql` parameter to `stuart_update` and `stuart_ci_build`. - `stuart_update --codeql` - Downloads the CodeQL CLI locally. The command will pull the appropriate binary for the host OS. - `stuart_ci_build --codeql` - Runs CodeQL during the build resulting in a CodeQL database and SARIF result file in the `Build` directory. Cc: Sean Brogan <sean.brogan@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> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools/Plugin/CodeQL: Add integration helpersMichael Kubacki2023-11-072-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a Python module to the CodeQL plugin directory that exports functions commonly needed for Stuart-based platforms to easily enable CodeQL in their platform build. This functionality has already moved to edk2-pytool-extensions https://github.com/tianocore/edk2-pytool-extensions in the `edk2toolext/codeql.py` file but edk2 is too far behind to use that. Additional integration changes are needed in edk2 and the series to add those has not made it past review. In the meantime, the functions are available locally in this commit and this commit can be reverted after edk2-pytool-extensions 0.24.1 or greater is used in edk2. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools/Plugin/CodeQL: Add CodeQL build pluginMichael Kubacki2023-11-0714-0/+1339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a CodeQL plugin that supports CodeQL in the build system. 1. CodeQlBuildPlugin - Generates a CodeQL database for a given build. 2. CodeQlAnalyzePlugin - Analyzes a CodeQL database and interprets results. 3. External dependencies - Assist with downloading the CodeQL CLI and making it available to the CodeQL plugins. 4. CodeQlQueries.qls - A C/C++ CodeQL query set run against the code. 5. Readme.md - A comprehensive readme file to help: - Platform integrators understand how to configure the plugin - Developers understand how to modify the plugin - Users understand how to use the plugin Read Readme.md for additional details. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
* Remove existing CodeQL infrastructureMichael Kubacki2023-11-073-171/+0
| | | | | | | | | | | | | | | | | | | CodeQL currently runs via the codeql-analysis.yml GitHub workflow which uses the `github/codeql-action/init@v2` action (pre-build) and the `github/codeql-action/analyze@v2` action (post-build) to setup the CodeQL environment and extract results. This infrastructure is removed in preparation for a new design that will directly run the CodeQL CLI as part of the build. This will allow CodeQL to be run locally as part of the normal build process with results that match 1:1 with CI builds. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
* BaseTools: GenFw: auto-set nxcompat flagJoey Vagedes2023-11-062-381/+248
| | | | | | | | | | | | | | | | | | | | Automatically set the nxcompat flag in the DLL Characteristics field of the Optional Header of the PE32+ image. For this flag to be set automatically, the section alignment must be evenly divisible by 4K (EFI_PAGE_SIZE) and no section must be executable and writable. Adds a command line flag to GenFw, --nonxcompat, to ensure the IMAGE_DLLCHARACTERISTICS_NX_COMPAT bit is not set, even if all requirements are met. Updates the manual for GenFw to include the new flag. 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> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Acked-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* MdePkg: IndustryStandard: Add DLL CharacteristicsJoey Vagedes2023-11-061-1/+16
| | | | | | | | | | | | | | | | Add the bit masks for DLL Characteristics, used within the optional header of a PE, to the PeImage.h header file. Update the Visual Studio, Microsoft Portable Executable and Common Object File Format Specification, and the PE/COFF Specification to the latest version. 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: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
* BaseTools: Update PatchCheck.py to allow whitespace issues in .rtf filesRebecca Cran2023-11-061-1/+4
| | | | | | | | | | Allow .rtf files created by applications such as Notepad to be committed as-is without further manual editing by skipping the requirements for CRLF, no tabs and no trailing whitespace. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ShellPkg/Dp: Allow dp command to work without ACPIJeff Brasen2023-11-063-3/+10
| | | | | | | | If the system does not have ACPI setup use the configuration table to get the performance info. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* MdeModulePkg/DxeCorePerformanceLib: Install BPDT in config tableJeff Brasen2023-11-061-0/+2
| | | | | | | | | Install the performance table into the UEFI configuration table. This will allow the shell application to get this if the system is not using ACPI. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* Maintainers.txt: Update based on active community membersMichael D Kinney2023-11-041-51/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over the past few months, all the of the Maintainers and Reviewers listed in Maintainers.txt have been contacted to make sure Maintainers.txt accurately represents the TianoCore community members that are actively participating in their roles. Based on specific feedback, bounced emails, and no responses, updates have been made. * RISCV64: Daniel Schaefer replaced with Andrei Warkentin * ArmVirtPkg Xen has no remaining reviewers and review responsibility defaults to ArmVirtPkg Maintainers/Reviewers. * ACPI modules related to S3 has no remaining reviewers and review responsibility defaults to MdeModulePkg Maintainers/ Reviewers. * OVMF CSM modules has no remaining reviewers and review responsibility defaults to OvmfPkg Maintainers/Reviewers. * Bounce: Chan Laura <laura.chan@intel.com> * Many smaller updates removing individuals that are no longer involved or have replacement coverage. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Andrei Warkentin <andrei.warkentin@intel.com> Cc: Catharine West <catharine.west@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Daniel Schaefer <git@danielschaefer.me> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Debkumar De <debkumar.de@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Julien Grall <julien@xen.org> Cc: Peter Grehan <grehan@freebsd.org> Cc: Qi Zhang <qi1.zhang@intel.com> Cc: Ray Han Lim Ng <ray.han.lim.ng@intel.com> Cc: Stefan Berger <stefanb@linux.ibm.com> Cc: Wenxing Hou <wenxing.hou@intel.com> Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Ray Han Lim Ng <ray.han.lim.ng@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Peter Grehan <grehan@freebsd.org> Acked-by: Julien Grall <julien@xen.org> Acked-by: Jordan Justen <jordan.l.justen@intel.com>
* IntelFsp2Pkg/PatchFv: Fix syntax issue in markdown manualRay Ni2023-11-031-19/+19
| | | | | | | | | | | | | | | | | | | | | | According to the markdown language syntax, headings should be after number signs (#). The number of number signs correspond to the heading level. But current PatchFvUserManual.md doesn't insert a space between the number signs and the heading title, resulting the markdown file is not rendered well in markdown viewers. The patch doesn't change any content but only adds spaces to ensure the headings are correctly recognized. Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com> Cc: Ray Han Lim Ng <ray.han.lim.ng@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ted Kuo <ted.kuo@intel.com> Reviewed-by: Ashraf Ali S <ashraf.ali.s@intel.com> Cc: Susovan Mohapatra <susovan.mohapatra@intel.com>
* IntelFsp2Pkg/SwitchStack: Reserve 32B when calling C function in 64bitNi, Ray2023-11-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When FSP runs in API mode, it saves the IDTR in its own stack then switches to bootloader's stack before it returns from FspMemoryInit. Next time when the bootloader calls TempRamExit, FSP switches to its own stack and restores IDTR from its stack saved earlier. However, due to a bug in BaseFspSwitchStackLib, the IDTR saved on FSP's stack might be corrupted that results the following TempRamExit call fails inside FSP due to PeiServices pointer cannot be retrieved from IDT.base - 8. The bug is the assembly code doesn't reserve 32 bytes before calling the C routine in 64bit. According to the x86-64 calling convention, caller is responsible for allocating 32 bytes of "shadow space" on the stack right before calling the function (regardless of the actual number of parameters used). When FSP is built in optimization-off mode, the C routine makes use of the 32-byte "shadow space" which is not reserved by the assembly caller. That causes the IDTR saved on the stack is corrupted by the C routine. The patch fixes so by reserving the 32 bytes before calling C routine. Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com> Cc: Ray Han Lim Ng <ray.han.lim.ng@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Ted Kuo <ted.kuo@intel.com> Reviewed-by: Ashraf Ali S <ashraf.ali.s@intel.com> Cc: Susovan Mohapatra <susovan.mohapatra@intel.com>
* ReadMe.rst: Add Apache License 2.0 and update submodule listMichael Kubacki2023-11-021-18/+13
| | | | | | | | | | | | | | | | | | | | | | - Adds Apache License 2.0 as an acceptable source license per discussion in https://edk2.groups.io/g/devel/message/110226 - Updates the URL for existing licenses to match the current path used by opensource.org. - The submodule list in this file is stale and is very prone to being forgotten. The list of submodules in the submodules setion is replaced with a link to .gitmodules which has an active list of submodules at any given time. Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Pedro Falcato <pedro.falcato@gmail.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Pedro Falcato <pedro.falcato@gmail.com>
* DynamicTablesPkg: Fix assert in CmObject parserSami Mujawar2023-11-011-1/+2
| | | | | | | | | | | | | | | The patch "f81ee47513e5 DynamicTablesPkg: Add an ET info object parser" updates the Configuration Manager object parser to add support for parsing CM_ARM_ET_INFO object. However, the GicC info structure also has an ET Reference token that points to the CM_ARM_ET_INFO object. Therefore, update the GICC info object parser to add an entry to parse the ET reference token. Without this change an assert stating that the RemainingSize != 0 will be triggered. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: levi.yun <yeoreum.yun@arm.com>
* RedfishPkg/RedfishCrtLib: remove multiple definitions.Nickle Wang2023-11-011-105/+0
| | | | | | | | | | | | | | | | There are two definitions for below functions in RedfishCrtLib.h. Create this change to remote duplicated functions. Function list: strcmp(), strncmp(), strncpy(), strcpy(), strcat(), strlen(), strchr(), strcasecmp(), strstr(), memcmp(), memset(), memcpy(), memchr(), memcmp() and memmove(). Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Cc: Nick Ramirez <nramirez@nvidia.com> Cc: Mike Maslenkin <mike.maslenkin@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Acked-by: Mike Maslenkin <mike.maslenkin@gmail.com>
* UefiCpuPkg: Correct file description for MpHandOff header fileYuanhao Xie2023-10-311-1/+4
| | | | | | | | | | Cc: Eric Dong <eric.dong@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com> Message-Id: <20231007063203.936-1-yuanhao.xie@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Rahul R Kumar <rahul.r.kumar@intel.com>
* .github/workflows: Add Stale CheckMichael Kubacki2023-10-311-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a GitHub workflow that uses the actions/stale GitHub action to automatically leave notifications on and close PRs that have had no activity for a long time. Note: Modifications to a PR reset the staleness counter. This includes pushing to the PR, adding a label to the PR, commenting on the PR, etc. If a PR has been marked "stale", simply leaving a comment will reset the counter. Configuration choices: 1. Do not attempt to close edk2 GitHub issues. 2. Mark edk2 PRs as stale if no activity in the last 60 days. Close PRs marked stale if no further activity in 7 days. 3. Do not exempt PRs with a "push" label. 4. Run the check once daily. Allow manual runs from those that have permission to run GitHub workflows. 5. Add the label "stale" to the PR when it enters the stale state. Rationale: 1. We do not use issues often enough. The limited usage of GitHub issues in Tianocore org GitHub projects are in another repo not impacted by this workflow and expected to track long term tasks. 2. This is the default value. In non-edk2 projects, I've seen these times work fairly well to identify PRs that have fallen stale. 3. Adding a "push" label resets the stale timer. If a PR has had a "push" label for 60+ days and has not been fixed for submission, then it is has very likely been abandoned. 4. This is sufficient to update PRs on the day granularity the configuration settings are applied against. 5. The label makes it easy to filter stale PRs in the PR list and write automation around PRs that are stale. It's also an obvious visual identifier that a PR needs attention in the PR list. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Message-Id: <20231031014120.917-1-mikuback@linux.microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/PlatformCI/ReadMe.md: Update contentsMichael Kubacki2023-10-311-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the code is most regularly tested in CI, distro/versioning details are updated to match the latest CI configuration. CI has moved from Ubuntu 18.04 to Ubuntu 22.04 since the time of the file's creation, but the code is actually built in a Fedora container so Fedora is mentioned as the primary build/test environment. Updates the following information: - Build OS: Fedora 37 Linux - Supported Configuration: Additional DSCs added - Python: 3.12.x - Packaging Tool: dnf instead of apt - Container Details: Added - Primary Build Example: QemuBuild.py instead of PlatformBuild.py Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Julien Grall <julien@xen.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Message-Id: <20231030230902.849-1-mikuback@linux.microsoft.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: don't specify the number of supported firmware builds]
* ArmVirtPkg: Add varpolicy shell commandMichael Kubacki2023-10-314-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the varpolicy EFI shell command to all DSC files that currently include other dynamic shell commands from ShellPkg. This command allows variable policies to be dumped in the EFI shell for convenient auditing and debug. Use the command in the EFI shell as follows: - `"varpolicy"` dumps platform variables - `"varpolicy -?"` shows help text - `"varpolicy -b"` pages output as expected - `"varpolicy -s"` shows accurate variable statistic information - `"varpolicy -p"` shows accurate UEFI variable policy information - `"varpolicy-v -b"` dumps all information including variable data hex dump Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Julien Grall <julien@xen.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Message-Id: <20231030203112.736-5-mikuback@linux.microsoft.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* OvmfPkg: Add varpolicy shell commandMichael Kubacki2023-10-316-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the varpolicy EFI shell command to all DSC files that currently include other dynamic shell commands from ShellPkg. This command allows variable policies to be dumped in the EFI shell for convenient auditing and debug. Use the command in QEMU EFI shell as follows: - `"varpolicy"` dumps platform variables - `"varpolicy -?"` shows help text - `"varpolicy -b"` pages output as expected - `"varpolicy -s"` shows accurate variable statistic information - `"varpolicy -p"` shows accurate UEFI variable policy information - `"varpolicy-v -b"` dumps all information including variable data hex dump Cc: Anatol Belski <anbelski@linux.microsoft.com> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jianyong Wu <jianyong.wu@arm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Julien Grall <julien@xen.org> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Message-Id: <20231030203112.736-4-mikuback@linux.microsoft.com>
* ShellPkg: Add varpolicy dynamic shell command and appMichael Kubacki2023-10-318-0/+1456
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new module (dynamic shell command) to ShellPkg that lists variable policy information for all UEFI variables on the system. Some other UEFI variable related functionality is also included to give a greater sense of platform UEFI variable state. This command is intended to help make variable policies more transparent and easier to understand and configure on a platform. Like all dynamic shell commands, a platform only needs to include `VariablePolicyDynamicCommand.inf` in their flash image to have the command registered in their UEFI shell. Include the following lines in platform DSC (in DXE components section): ``` ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf { <PcdsFixedAtBuild> gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE } ``` Include the following line in platform FDF: ``` INF ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf ``` A standalone UEFI application can also be built that uses the same underlying functional code as the dynamic shell command. The path to use in the DSC and FDF for the app: ``` ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyApp.inf ``` Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Message-Id: <20231030203112.736-3-mikuback@linux.microsoft.com>
* MdeModulePkg/VariablePolicy: Add more granular variable policy queryingMichael Kubacki2023-10-318-46/+1062
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces two new APIs to EDKII_VARIABLE_POLICY_PROTOCOL: 1. GetVariablePolicyInfo() 2. GetLockOnVariableStateVariablePolicyInfo() These allow a caller to retrieve policy information associated with a UEFI variable given the variable name and vendor GUID. GetVariablePolicyInfo() - Returns the variable policy applied to the UEFI variable. If the variable policy is applied toward an individual UEFI variable, that name can optionally be returned. GetLockOnVariableStateVariablePolicyInfo() - Returns the Lock on Variable State policy applied to the UEFI variable. If the Lock on Variable State policy is applied to a specific variable name, that name can optionally be returned. These functions can be useful for a variety of purposes such as auditing, testing, and functional flows. Also fixed some variable name typos in code touched by the changes. Cc: Dandan Bi <dandan.bi@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Message-Id: <20231030203112.736-2-mikuback@linux.microsoft.com>
* .azurepipelines: Fix Python version (to 3.12)Joey Vagedes2023-10-312-2/+2
| | | | | | | | | | | | | | Upgrades python to 3.12 for build as it has been released and all supporting tools have been updated to also support 3.12. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Michael Kubacki <mikuback@linux.microsoft.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Message-Id: <20231030164131.20419-1-joeyvagedes@microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
* MdePkg ACPI65: Add 0x0B/PRM to Generic Address StructureJinlong Xu2023-10-311-0/+1
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4567 ACPI_Spec_6_5_Aug29 Table 5.1, add 0x0B/Platform Runtime Mechanism (PRM) in Address Space ID of Generic Address Structure (GAS) Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Jinlong Xu <jinlong.xu@intel.com> Message-Id: <20231020111348.2921-1-jinlong.xu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* MdeModulePkg/DxeCore: Allow relocation of images with large addressJeff Brasen2023-10-313-1/+11
| | | | | | | | | | | | | | | | Add PCD to control if modules with start addresses in PE/COFF > 0x100000 attempt to load at specified address. If a module has an address in this range and there is untested memory DxeCore will attempt to promote all memory to tested which bypasses any memory testing that would occur later in boot. There are several existing AARCH64 option roms that have base addresses of 0x180000000. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Ashish Singhal <ashishsingha@nvidia.com> Message-Id: <bd36c9c24158590db2226ede05cb8c2f50c93a37.1684194452.git.jbrasen@nvidia.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* ArmPkg/ArmLib: Add ArmHasEte () helper functionSami Mujawar2023-10-303-1/+30
| | | | | | | | | | | | | Create a helper function to query whether ID_AA64MFR1_EL1 indicates presence of the Embedded Trace Extension (ETE). This feature is only visible in AARCH64 state. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
* ArmPkg/ArmLib: Add ArmHasTrbe () helper functionSami Mujawar2023-10-303-0/+31
| | | | | | | | | | | | | Create a helper function to query whether ID_AA64MFR1_EL1 indicates presence of the Trace Buffer Extension (TRBE). This feature is only visible in AARCH64 state. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
* DynamicTablesPkg: Fix referencing of CPC tokenSami Mujawar2023-10-301-1/+1
| | | | | | | | | | | | The CpcToken has been incorrectly referenced in the CreateTopologyFromGicC() and always points to the CPC token in the first GICC Info object. Therefore, fix this by correctly indexing into the GicCInfo object array. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
* DynamicTablesPkg: Add ETE device to CPU node in AMLSami Mujawar2023-10-302-2/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Coresight Embedded Trace Extension (ETE) feature can be detected by the platform firmware by examining the debug feature register ID_AA64DFR0_EL1.TraceVer field. The platform configuration manager can then describe the ETE by creating CM_ARM_ET_INFO object(s) and referencing these in CM_ARM_GICC_INFO.EtToken. The 'Table 3: Compatible IDs for architected CoreSight components' in the 'ACPI for CoreSight 1.2 Platform Design Document' specifies the HID value for Coresight ETE and CoreSight Embedded Trace Macrocell (ETM) v4.x as ARMH C500. Therefore, update the SsdtCpuTopologyGenerator to add an ETE device to the CPU node in the AML CPU hierarchy so that an OS can utilise this information. Note: Although ETE and ETM share the same HID, ETE has a system register interfaces, unlike ETM which requires memory mapped registers. Since this patch aims to support ETE, the AML description does not describe any memory mapped registers. However, support for ETM can be added in the future. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>