summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg
Commit message (Collapse)AuthorAgeFilesLines
* EmbeddedPkg: add missing BaseLib/BaseMemoryLib declarationsLeif Lindholm2024-09-274-0/+4
| | | | | | | | Add missing includes of BaseMemoryLib.h and declaration of BaseLib/BaseMemoryLib dependencies hidden by use of EmbeddedPkg FdtLib, which is being deleted. Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
* EmbeddedPkg: Add StackCheckLibNullOliver Smith-Denny2024-09-131-3/+2
| | | | | | | Remove the old stack check lib now that MdeLibs.inc includes the new one. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* MdePkg: Move CompilerIntrinsicsLib from ArmPkgOliver Smith-Denny2024-09-121-1/+0
| | | | | | | | | | | | | | | | | | | | As per the emailed RFC in https://edk2.groups.io/g/devel/topic/rfc_move/107675828, this patch moves CompilerIntrinsicsLib from ArmPkg to MdePkg as this library provides compiler intrinsics, which are industry standard. This aligns with the goal of integrating ArmPkg into existing packages: https://bugzilla.tianocore.org/show_bug.cgi?id=4121. The newly placed CompilerIntrinsicsLib is added to MdeLibs.dsc.inc as every DSC that builds ARM/AARCH64 needs this library added. The old location is removed from every DSC in edk2 in this commit also to not break bisectability with minimal hoop jumping. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* EmbeddedPkg/PrePiHobLib: Fix SetBootMode return valueVishal Oliyil Kunnil2024-09-051-1/+1
| | | | | | | After updating Doxygen, we can see that SetBootMode returns the BootMode instead of status code as it should, fix it to return status. Signed-off-by: Vishal Oliyil Kunnil <quic_vishalo@quicinc.com>
* EmbeddedPkg/PrePiHobLib: Align Doxygen comment between code and headerVishal Oliyil Kunnil2024-09-051-12/+5
| | | | | | | | The Doxygen comment for SetBootMode and GetBootMode in PrePiHobLib/Hob.c does not match declaration in PrePiLib.h. The C file has it wrong. Align the text to match the header. Signed-off-by: Vishal Oliyil Kunnil <quic_vishalo@quicinc.com>
* EmbeddedPkg: Improve LocateAndInstallAcpiFromFvConditionalRebecca Cran2024-08-301-41/+45
| | | | | | | | LocateAndInstallAcpiFromFvConditional was always returning EFI_SUCCESS even when it failed to find `AcpiFile`. Fix that, and improve the layout by checking if an error occurred and breaking earlier. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
* EmbeddedPkg: Fix some spelling mistakes found by cspellRebecca Cran2024-08-014-4/+4
| | | | | | | | | | | When cspell is installed (via `npm install cspell`), CI checks for spelling mistakes. There are currently a very large number of them: some are genuine mistakes while others are words or acryonyms that cspell doesn't know. Fix a few of the misspellings in EmbeddedPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
* EmbeddedPkg: Retire EfiResetSystemLib and ResetRuntimeDxeArd Biesheuvel2024-07-317-282/+0
| | | | | | | | | Retire the ancient reset runtime DXE in EmbeddedPkg, and the associated EfiResetSystemLib library class and template implementation. These are incomplete and have been superseded by a generic implementation in MdeModulePkg. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
* EmbeddedPkg: NonCoherentDmaLib: Set EFI_MEMORY_XP Capability on DMA BufferOliver Smith-Denny2024-07-291-4/+32
| | | | | | | | | | | | Commit 8984fba2f22a2cd44e1189403e3553f447b82852 added setting the EFI_MEMORY_XP attribute on DMA buffers. However, it did not ensure that the XP capability was set on that region. This patch adds setting the XP capability before attempting to set the attribute. If setting the capability fails, it defaults to the old behavior of not setting the XP bit. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* EmbeddedPkg: Mark DMA Memory Allocations XP By DefaultOliver Smith-Denny2024-07-221-2/+2
| | | | | | | | | | When allocating memory for a non-coherent DMA device, the current core code removes the XP attribute, allowing code to execute from that region. This is a security vulnerability and unneeded. This change updates to mark the region as XP when allocating memory for the non-coherent DMA device. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* EmbeddedPkg: Add option to disable EFI Memory Attribute ProtocolMario Bălănică2024-07-168-0/+360
| | | | | | | | | | | | | | | | | | | | | Introduce a driver that allows users to disable the EFI Memory Attribute protocol through an HII setup option, in order to work around a broken version of rhboot's shim used in some distros (e.g. CentOS Stream 9) which incorrectly invokes the protocol and results in a Synchronous Exception. Default is enabled, which can also be overridden at build time by changing `gEmbeddedTokenSpaceGuid.PcdMemoryAttributeEnabledDefault`. It is only applicable to ARM64 and there isn't any other technical reason for disabling this security feature. See: - https://github.com/microsoft/mu_silicon_arm_tiano/issues/124 - https://edk2.groups.io/g/devel/topic/99631663 - https://github.com/tianocore/edk2/pull/5840 Signed-off-by: Mario Bălănică <mariobalanica02@gmail.com>
* EmbeddedPkg/VirtualRealTimeClockLib: Support SOURCE_DATE_EPOCHChun-Yi Lee2024-07-041-1/+1
| | | | | | | | | | | | | | | | | | RISC-V ovmf used VirtualRealTimeClockLib but the default epoch is a compilation time. It causes that the RISC-V ovmf binary image is NOT reproducible. This patch added the support of SOURCE_DATE_EPOCH by printenv command. If SOURCE_DATE_EPOCH be found then we use it as BUILD_EPOCH. Otherwise we run date command for setting BUILD_EPOCH. For distributions want a reproducible RISC-V ovmf image, they should export SOURCE_DATE_EPOCH environment variable before building ovmf. References: https://reproducible-builds.org/docs/source-date-epoch/ Cc: Pete Batard <pete@akeo.ie> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
* EmbeddedPkg/.ci.yaml: add temporary workaround ECC exceptionLeif Lindholm2024-07-021-0/+1
| | | | | | | | | | | | | | | A new contributor has a name not describable by the character set developed for 1960s US teleprinters, causing the CI to object and blocking their code from being merged due to the copyright statement. While we do want to keep the code clean from characters other contributors cannot trivially reproduce, this should not extend to requiring intentionally misstating legal claims. Until we figure out the long-term fix, add an exception for the surname triggering the failure. Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
* EmbeddedPkg: Update the comments of ReadKeyStroke and ReadKeyStrokeExQingyu2024-04-032-8/+12
| | | | | | | | | | | | | Refer to Uefi spec 2.10 section 12.3.3, Add a new retval EFI_UNSUPPORTED to EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.ReadKeyStrokeEx and EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke(). Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Qingyu <qingyu.shang@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* EmbeddedPkg/NonCoherentIoMmuDxe: Make SetAttributes always succeedArd Biesheuvel2024-03-121-1/+1
| | | | | | | | | | | | | | NonCoherentIoMmuSetAttribute() does nothing except return EFI_UNSUPPORTED. This was fine when it was introduced, but now, the PCI bus driver will fail a PCI I/O Map() operation if the call to SetAttributes() fails. So return EFI_SUCCESS instead. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Abner Chang <abner.chang@amd.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* EmbeddedPkg/Scripts/LauterbachT32: Fix EfiLoadDxe.cmmRebecca Cran2024-02-273-73/+19
| | | | | | | | | | | There have been many changes since EfiLoadDxe.cmm was last updated in 2011. The EFI_SYSTEM_TABLE can no longer be found by scanning memory on 4KB boundaries, so require users pass in its address instead. Update various offsets so that the debug information can be found and loaded with a recent version of TRACE32. Signed-off-by: Rebecca Cran <rebecca@os.amperecomputing.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* EmbeddedPkg: Align RealTimeClock function headers with return valuesSuqiang Ren2024-02-092-4/+30
| | | | | | | | | | | | | | | RealTimeClock is used to back the runtime services time functions, so align the description of the function return values with the defined values for these services as described in UEFI Spec 2.10. REF: UEFI spec 2.10 section 8 Services ? Runtime Services Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Signed-off-by: Suqiang Ren <suqiangx.ren@intel.com> Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* EmbeddedPkg: compiler error due to arithmetic operation on void pointerJayaprakash N2024-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4668 This commit fixes the issue reported in the BZ4668. The EmbeddedPkg fails to compile with a compiler error generated due to invalid/illegal arithmetic operation on void pointers. It has been fixed by using explicit type conversion of the void pointer to UINTN. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Cc: Jayaprakash N <n.jayaprakash@intel.com> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb+tianocore@kernel.org> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
* EmbeddedPkg: Add PcdPrePiCpuIoSize width for LOONGARCH64Chao Li2024-02-061-0/+3
| | | | | | | | | | | | | Added LoongArch64 architecture CPU IO width. https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Cc: Daniel Schaefer <git@danielschaefer.me> Signed-off-by: Chao Li <lichao@loongson.cn> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* EmbeddedPkg/Hob: Integer Overflow in CreateHob()Gua Guo2024-01-261-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4166 Fix integer overflow in various CreateHob instances. Fixes: CVE-2022-36765 The CreateHob() function aligns the requested size to 8 performing the following operation: ``` HobLength = (UINT16)((HobLength + 0x7) & (~0x7)); ``` No checks are performed to ensure this value doesn't overflow, and could lead to CreateHob() returning a smaller HOB than requested, which could lead to OOB HOB accesses. Reported-by: Marc Beatove <mbeatove@google.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Cc: John Mathew <john.mathews@intel.com> Authored-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gua Guo <gua.guo@intel.com>
* EmbeddedPkg: Add DtPlatformLoaderLib gmock supportJeff Brasen via groups.io2024-01-034-0/+74
| | | | | | Add Google Mock Library for DtPlatformLoaderDtbLib Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
* EmbeddedPkg: Add host based dependency to ciJeff Brasen via groups.io2024-01-031-1/+3
| | | | | | Add UnitTestFrameworkPkg to AcceptableDependencies-HOST_APPLICATION list Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
* EmbeddedPkg/PrePiMemoryAllocationLib: Add ReallocatePoolJeff Brasen via groups.io2024-01-031-0/+57
| | | | | | | | Add implementation of ReallocatePool which is defined in the MemoryAllocationLib header file to allow components to not need special handling for PrePi module types. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
* EmbeddedPkg: Allow longer android kernel command lineAshish Singhal2023-11-303-2/+8
| | | | | | | | | | | | AndroidBootImgLib allows for platforms to append to kernel command line but does not allow for the overall kernel command line to go beyond the limit set by the image header. Address this limitation by adding a pcd where platform can tell how many extra characters they expect on their platform in addition to what the image header specifies. Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* EmbeddedPkg: Fix Android Boot Command Line Length BugAshish Singhal2023-11-301-13/+18
| | | | | | | | | | | Curently, AndroidBootImgLib expects input kernel command line to never exceed 256 unicode characters where the image header allows for 512 ascii characters. If image header allows 512 ascii characters, similar number of unicode characters should be allowed at the minimum. Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* EmbeddedPkg: CI: Add PrEval entryJoey Vagedes2023-10-231-0/+3
| | | | | | | | | | | | | | | | | | | | Adds a PrEval entry to the package's ci.yaml file which is used to verify if the package uses a particular library instance when that library instance file (INF) is updated. When a library instance file (INF) is updated, PrEval will review each package's DSC as described in the ci.yaml file to determine if the package uses said library instance. If the package does use the library instance, it will be built and tested to ensure the package is not broken from the change. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Cc: Daniel Schaefer <git@danielschaefer.me> Signed-off-by: Joey Vagedes <joeyvagedes@gmail.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* EmbeddedPkg/NorFlashInfoLib: Update norflash device listJohn Chew2023-10-201-1/+10
| | | | | | | | | | | Update Gigadevice norflash list: gd25q16, gd25q32, gd25q64, gd25lq64c, gd25q128, gd25lq128, gd25q256 Add Silicon Kaiser norflash list: sk25lp128 Signed-off-by: John Chew <yuinyee.chew@starfivetech.com> Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib classLaszlo Ersek2023-10-181-15/+0
| | | | | | | | | | | | | | | | | | | | | | | The RealTimeClockLib class header in edk2 mistakenly declares a function called LibRtcVirtualNotifyEvent(). No component ever calls this function crossing module boundaries; all RealTimeClockLib instances in edk2 and edk2-platforms are supposed to register (and do register) their SetVirtualAddressMap() notification functions. At this point, the word "LibRtcVirtualNotifyEvent" no longer occurs in any of edk2, edk2-platforms, even edk2-non-osi, except the library class header proper. Remove the LibRtcVirtualNotifyEvent() function declaration. Build-tested only (with "EmbeddedPkg.dsc"). Cc: Abner Chang <abner.chang@amd.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Daniel Schaefer <git@danielschaefer.me> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231012091057.108728-6-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* EmbeddedPkg/VirtualRealTimeClockLib: drop LibRtcVirtualNotifyEventLaszlo Ersek2023-10-181-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | The RealTimeClockLib class header in edk2 mistakenly declares a function called LibRtcVirtualNotifyEvent(). No component ever calls this function crossing module boundaries; all RealTimeClockLib instances in edk2 and edk2-platforms are supposed to register (and do register) their SetVirtualAddressMap() notification functions. In particular, VirtualRealTimeClockLib *itself* doesn't even use LibRtcVirtualNotifyEvent() -- the function is defined with an empty body, clearly in an understandable, but misguided, attempt, to conform to the (bogus) library interface. Remove the function. Build-tested only (with "RiscVVirtQemu.dsc"). Cc: Abner Chang <abner.chang@amd.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Daniel Schaefer <git@danielschaefer.me> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231012091057.108728-5-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEventLaszlo Ersek2023-10-181-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | The RealTimeClockLib class header in edk2 mistakenly declares a function called LibRtcVirtualNotifyEvent(). No component ever calls this function crossing module boundaries; all RealTimeClockLib instances in edk2 and edk2-platforms are supposed to register (and do register) their SetVirtualAddressMap() notification functions. In particular, TemplateRealTimeClockLib *itself* doesn't even use LibRtcVirtualNotifyEvent() -- the function is defined with an empty body, clearly in an understandable, but misguided, attempt, to conform to the (bogus) library interface. Remove the function. Build-tested only (with "EmbeddedPkg.dsc"). Cc: Abner Chang <abner.chang@amd.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Daniel Schaefer <git@danielschaefer.me> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231012091057.108728-4-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* EmbeddedPkg: Update code to be more C11 compliant by using __func__Rebecca Cran2023-04-106-37/+37
| | | | | | | | | | | | | __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 EmbeddedPkg. 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>
* EmbeddedPkg/PrePiLib: Drop unused PCD PcdPrePiCpuIoSizeArd Biesheuvel2023-02-041-2/+0
| | | | | | | | | | | | | | The code never references the PCD so the INF should not reference it either. The last reference was moved to PrePiHobLib in commit 05e48e00834b32e4bd2 (dated 2011!) and dropped from there as well in commit 97106391955337155e7. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Daniel Schaefer <git@danielschaefer.me> Reported-by: Sunil V L <sunilvl@ventanamicro.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
* EmbeddedPkg: Add back FfsFindSectionDataMin M Xu2023-01-192-0/+43
| | | | | | | | | | | In commit c673216f53 a new input parameter is added in FfsFindSectionData. That change breaks the build of ArmVirtPkg. In this patch FfsFindSectionData is added back. It calls FfsFindSectionDataWithHook with a NULL hook. Signed-off-by: Min Xu <min.m.xu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* EmbeddedPkg: Rename FfsFindSectionData as FfsFindSectionDataWithHookMin M Xu2023-01-193-6/+8
| | | | | | | | | | | | | | | | Commit c673216f53 introduces FFS_CHECK_SECTION_HOOK and add it as the second input parameter in FfsFindSectionData. This change breaks the build of ArmVirtPkg. To fix this issue, the new version of FfsFindSectionData is renamed as FfsFindSectionDataWithHook in this patch. In the following patch the original FfsFindSectionData will be added back. FfsFindSectionData is renamed as FfsFindSectionDataWithHook. Accordingly PeilessStartupLib in OvmfPkg should be updated as well. To prevent the build from being broken, the changes in OvmfPkg are in this patch. Signed-off-by: Min Xu <min.m.xu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* EmbeddedPkg/PrePiLib: Add FFS_CHECK_SECTION_HOOK when finding sectionMin M Xu2023-01-183-18/+49
| | | | | | | | | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4152 EmbeddedPkg/PrePiLib provides the service of finding sections based on the input SectionType. But sometimes there maybe multiple sections with the same SectionType. FFS_CHECK_SECTION_HOOK is a hook which can be called to do additional check. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Cc: Daniel Schaefer <git@danielschaefer.me> Cc: Gerd Hoffmann <kraxel@redhat.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> Acked-by: Ard Biesheuvel <ardb+tianocore@kernel.org> Signed-off-by: Min Xu <min.m.xu@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* EmbeddedPkg/MetronomeDxe: Update outdated lower bound commentRebecca Cran2022-11-291-4/+3
| | | | | | | | | | | | | | | | There was previously a lower bound on the value of TickPeriod such that it couldn't be less than 10 us. However, that was removed from the PI Specification in the 1.0 errata released in 2007. From the revision history: "M171 Remove 10 us lower bound restriction for the TickPeriod in the Metronome" Update the documentation of TickPeriod in MetronomeDxe/Metronome.c to remove mention of the lower bound. Signed-off-by: Rebecca Cran <rebecca@quicinc.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
* EmbeddedPkg: Add CI YAML fileMichael Kubacki2022-10-032-0/+97
| | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4046 Adds EmbeddedPkg to the list of supported build packages for edk2 CI and fixes Library Class Check errors reported. These changes allow EmbeddedPkg to pass NO-TARGET CI testing. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Cc: Daniel Schaefer <git@danielschaefer.me> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
* EmbeddedPkg/AcpiLib: Fix code formatting errorsMichael Kubacki2022-10-032-59/+61
| | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4046 This package did not have CI enabled so code changes were merged that fail uncrustify formatting. This change updates those files to include uncustify formatting. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@amd.com> Cc: Daniel Schaefer <git@danielschaefer.me> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
* EmbeddedPkg/PrePi: Check for enough space before aligning heap pointerJeff Brasen2022-09-231-27/+21
| | | | | | | | Update check for enough space to occur prior to alignment offset. This prevents cases where EfiFreeMemoryTop < EfiFreeMemoryBottom. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* EmbeddedPkg: Add AllocateRuntimePages in PrePiMemoryAllocationLibMin M Xu2022-09-062-16/+68
| | | | | | | | | | | | | | AllocateRuntimePages is used to allocate one or more 4KB pages of type EfiRuntimeServicesData. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@hpe.com> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ard Biesheuvel <ardb+tianocore@kernel.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* EmbeddedPkg/GdbSerialDebugPortLib: fix compile warningWenyi Xie2022-09-051-1/+1
| | | | | | | | | The value of gTimeOut is from PcdGdbMaxPacketRetryCount, and this PCD is UINT32. So change the declaratrion of gTimeOut to UINT32 to fix compile warning. Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* EmbeddedPkg: Remove duplicated wordsPierre Gondois2022-09-058-8/+8
| | | | | | | | | In an effort to clean the documentation of the above package, remove duplicated words. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
* EmbeddedPkg: Remove RVCT supportRebecca Cran2022-05-132-11/+0
| | | | | | | | RVCT is obsolete and no longer used. Remove support for it. Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* EmbeddedPkg: Fix a build error in FwVol.c in X64 archMin Xu2022-01-271-3/+3
| | | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3814 CompressedDataLength is declared as UINTN which is UINT64 in X64 arch. But the second parameter of UefiDecompressGetInfo() is declared as UINT32. So a build error is triggered. To declare CompressedDataLength as UINT32 to fix the build error. Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Abner Chang <abner.chang@hpe.com> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
* EmbeddedPkg/AcpiLib: Add more helper functionsNhi Pham2021-12-173-0/+291
| | | | | | | | | | | This adds more helper functions that assist in calculating the checksum, locating an ACPI table by signature, and updating an AML integer object. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Acked-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Abner Chang <abner.chang@hpe.com>
* EmbeddedPkg: Apply uncrustify changesMichael Kubacki2021-12-07106-7837/+9431
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the EmbeddedPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Andrew Fish <afish@apple.com>
* EmbeddedPkg: Change OPTIONAL keyword usage styleMichael D Kinney2021-12-075-6/+5
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Andrew Fish <afish@apple.com>
* EmbeddedPkg: Change use of EFI_D_* to DEBUG_*Michael D Kinney2021-12-0715-179/+170
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739 Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkgAbner Chang2021-10-145-0/+638
| | | | | | | | | | | | | | | | | This is one of the series patches to restructure the location of modules under ArmVirtPkg for RiscVVirtPkg. RiscVVirtPkg leverage FDT Client protocol to parse FDT nodes. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Cc: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Daniel Schaefer <daniel.schaefer@hpe.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
* EmbeddedPkg: Add LoadFile2 for linux initrdJeff Brasen2021-09-233-22/+202
| | | | | | | | | | Add support under a pcd feature for using the new interface to pass initrd to the linux kernel instead of via device tree. This feature is also enabled if ACPI tables are present, and will skip locating and installation of device tree. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>