summaryrefslogtreecommitdiff
path: root/EmbeddedPkg
AgeCommit message (Collapse)AuthorFilesLines
2026-06-24EmbeddedPkg: PrePiLib: Fix uninitialized variable warningsTuan Phan1-7/+7
In FfsProcessSection(), delete CompressionSectionHeaderSize and move CompressedData to avoid the compiler warning without changing functional behavior. Signed-off-by: Tuan Phan <tuan.phan@oss.qualcomm.com>
2026-06-18EmbeddedPkg,MdeModulePkg,DynamicTablesPkg: Move ACPI helper macrosVarshitPandya1-75/+0
Move the ACPI table helper macros from EmbeddedPkg's AcpiLib.h to MdeModulePkg's AcpiHelperMacros.h. These macros describe ACPI data initializers and do not depend on the AcpiLib library interface. Keeping them in AcpiLib.h forces users that only need the macros to include the AcpiLib library header unnecessarily. Place the macros in a common MdeModulePkg public header so ACPI table producers can include the macro definitions directly without implying use of AcpiLib. The companion edk2-platforms change is: "Global: Include AcpiHelperMacros.h for ACPI helper macros" Tested: DynamicTablesPkg: X64/AARCH64 DEBUG/RELEASE/NOOPT MdeModulePkg: X64/AARCH64 DEBUG/RELEASE/NOOPT EmbeddedPkg: X64/AARCH64 DEBUG/RELEASE/NOOPT Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
2026-06-13EmbeddedPkg, OvmfPkg: Produce FV3 HOBs for Extracted FVsOliver Smith-Denny3-18/+43
EmbeddedPkg's PrePiLib and OvmfPkg's PeilessStartupLib (which uses PrePiLib) only produce FV2 HOBs for extracted FVs. However, FV3 HOBs have superceded FV2 HOBs for describing extracted FVs. This commit updates both of these libs to also produce FV3 HOBs, following PEI's pattern of producing an FV, FV2, and FV3 HOB for each extracted FV. Eventually, only FV3 HOBs will be produced, so this paves the way for that. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-06-13EmbeddedPkg, OvmfPkg: PrePiLib: Use Correct FvName in FV2 HOB ProductionDmitry Antipov3-23/+14
PrePiLib is incorrectly producing FV2 HOBs. The FvName field of the FV2 HOB is intended to be the parent FV's name. This way the HOB consumer phase can identify when an FV has already been extracted: if the file name of the extracted FV and the parent FV name match in the FV2 HOB. With the incorrect FvName, DXE will re-extract the already extracted FV, which can be a large performance hit (some platforms we have seen ~1 second). This requires an update to FfsProcessFvFile to pass the parent FV handle through so the FV2 HOB can be correctly produced. OvmfPkg consumers are also updated. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-06-13EmbeddedPkg: PrePiLib: Zero Volume Info Buffer Before WritingOliver Smith-Denny1-1/+1
FfsGetVolumeInfo() in PrePiLib does not zero the VolumeInfo buffer before writing to it. However, it has some fields that are expected to be zero if certain conditions are not met. For example, the FvName is expected to be all 0's if the extended header is not present in the FV. Currently, the FvName field will point to garbage if the caller does not zero the buffer first. Flip the expectation and have FfsGetVolumeInfo() zero the buffer before it writes to it. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-06-13EmbeddedPkg: PrePiLib: Skip Extracting if FV3 HOB FoundOliver Smith-Denny1-10/+16
PrePiLib only searches for the existence of an FV2 HOB to determine if an FV has already been extracted. However, FV2 HOBs have been superceded by FV3 HOBs for describing extracted FVs. This commit updates PrePiLib to check for the existence of either an FV2 or FV3 HOB for this FV and skips extracting if either is found. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-06-13EmbeddedPkg: PrePi.h: Drop Duplicate HOB DefintionsOliver Smith-Denny1-11/+1
PrePi.h has some duplicate HOB definitions from HobLib.h. Instead of redefining them, use HobLib.h. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-06-12EmbeddedPkg: Introduce GBL protocolsDmitrii Merkurev9-0/+773
GBL (Generic Bootloader) is Google's UEFI-based bootloader for Android. It runs as an EFI application and delegates board- and platform-specific operations to the underlying firmware through GBL-defined EFI protocols. This patch adds only the header definitions (GUIDs, revisions and interfaces) for those protocols, covering Android Verified Boot, AVF, A/B boot-control, boot-memory, debug, Fastboot (and its transport) and OS configuration. For details, see: https://cs.android.com/android/kernel/superproject/+/common-android-mainline:bootable/libbootloader/gbl/README.md Co-authored-by: David Pursell <dpursell@google.com> Co-authored-by: Dov Shlachter <dovs@google.com> Co-authored-by: Jakob Vukalović <jakobvukalovic@google.com> Co-authored-by: Kelvin Zhang <zhangkelvin@google.com> Co-authored-by: Ram Muthiah <rammuthiah@google.com> Co-authored-by: Sergii Parubochyi <sergiip@google.com> Co-authored-by: Yecheng Zhao <zyecheng@google.com> Co-authored-by: Yi-Yo Chiang <yochiang@google.com> Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2026-06-09EmbeddedPkg: Replace manual alignment checks with helper macrosMingjie Shen1-6/+6
Replace manual alignment checks with IS_ALIGNED() and ADDRESS_IS_ALIGNED(). Convert the following bitmask and modulo forms: - ((E & ((PowOf2Expr) - ONE)) == ZERO) - ((E & ((PowOf2Expr) - ONE)) != ZERO) - ((E % (PowOf2Expr)) == ZERO) - ((E % (PowOf2Expr)) != ZERO) to the corresponding helper macro forms: + IS_ALIGNED (E, PowOf2Expr) + !IS_ALIGNED (E, PowOf2Expr) PowOf2Expr is limited to known power-of-two expressions, including SIZE_* and BASE_* macros, EFI_PAGE_SIZE, CPU_STACK_ALIGNMENT, RUNTIME_PAGE_ALLOCATION_GRANULARITY, sizeof() of UEFI integer types (e.g. BOOLEAN, CHAR16, UINT32, UINTN) and pointer types, and 1 << E1 expressions. Address checks that cast the checked value to UINTN are written with ADDRESS_IS_ALIGNED(). The change was generated with the Coccinelle semantic patch below. ```smpl @power_of_2_expr@ expression PowOf2Expr; expression E1; typedef BOOLEAN, CHAR8, CHAR16, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, INTN, UINTN; type ScalarType = { BOOLEAN, CHAR8, CHAR16, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, INTN, UINTN }; type AnyType; type PointerType = AnyType *; idexpression ScalarType ScalarValue; idexpression PointerType PointerValue; constant SizeBase =~ "^(SIZE|BASE)_(1|2|4|8|16|32|64|128|256|512)[KMGTPE]B$"; constant NamedPowerOf2 =~ "^(EFI_PAGE_SIZE|CPU_STACK_ALIGNMENT|RUNTIME_PAGE_ALLOCATION_GRANULARITY)$"; constant ONE = {1, 1U, 1u}; @@ ( ( SizeBase | NamedPowerOf2 | ONE << E1 | sizeof (ScalarType) | sizeof (PointerType) | sizeof (ScalarValue) | sizeof (PointerValue) ) & PowOf2Expr ) @aligned depends on power_of_2_expr disable is_zero,isnt_zero@ expression E; expression power_of_2_expr.PowOf2Expr; constant ONE = {1, 1U, 1u}; constant ZERO = {0, 0U, 0u}; @@ ( ((E & (E - ONE)) == ZERO) | - ((E & ((PowOf2Expr) - ONE)) == ZERO) + IS_ALIGNED (E, PowOf2Expr) | ((E & (E - ONE)) != ZERO) | - ((E & ((PowOf2Expr) - ONE)) != ZERO) + !IS_ALIGNED (E, PowOf2Expr) | - ((E % (PowOf2Expr)) == ZERO) + IS_ALIGNED (E, PowOf2Expr) | - ((E % (PowOf2Expr)) != ZERO) + !IS_ALIGNED (E, PowOf2Expr) ) @address_is_aligned@ typedef UINTN; expression *Address; expression Alignment; @@ - IS_ALIGNED ((UINTN) Address, Alignment) + ADDRESS_IS_ALIGNED (Address, Alignment) @normalize_aligned disable paren expression@ expression E, SZ; @@ ( - (IS_ALIGNED (E, SZ)) + IS_ALIGNED (E, SZ) | - (!IS_ALIGNED (E, SZ)) + !IS_ALIGNED (E, SZ) ) @normalize_macro_args disable paren expression@ expression E, SZ; @@ ( - IS_ALIGNED ((E), SZ) + IS_ALIGNED (E, SZ) | - IS_ALIGNED (E, (SZ)) + IS_ALIGNED (E, SZ) ) ``` Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2026-05-22EmbeddedPkg: Add missing EFIAPI for protocol member functionsQihang Gao2-4/+8
According to UEFI spec calling conventions, protocol member functions should use EFIAPI. Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
2026-05-22EmbeddedPkg: Add missing EFIAPI for event callback functionsQihang Gao2-0/+3
According to UEFI spec calling conventions, UEFI event handlers should use EFIAPI. Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
2026-05-06Revert "ArmPlatformPkg,EmbeddedPkg,MdeModulePkg: Move RealTimeClockLib ..."Ard Biesheuvel5-3/+121
This reverts commit 57230fff6b39a665485be1bd43ec608d412ba6fb. RealTimeClockLib is not a generic library class that is intended to be used widely to get access to the RTC when the associated runtime services are not available in the calling context. The purpose of RealTimeClockLib is to abstract the underlying hardware access from the generic RealTimeClockRuntimeDxe driver, which backs the runtime services. This means it does not belong in a different package; it belongs in the same package as the driver. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2026-04-29EmbeddedPkg: Remove duplicate procotol in INF fileQihang Gao1-1/+0
In AndroidFastbootTransportTcpDxe driver, gEfiSimpleTextOutProtocolGuid appears twice in [Procotols] section, so remove the duplicate one. Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
2026-04-21EmbeddedPkg: Add missing FreeAlignedPages() implementationSami Mujawar1-0/+34
The PrePiMemoryAllocationLib supports AllocateAlignedPages(), however is missing the corresponding FreeAlignedPages(). Although the FreeAlignedPages() in PrePiMemoryAllocationLib does not support the ability to free pages in the PrePei Memory Allocator and the allocated memory is lost, it would be good to have an empty implementation of FreeAlignedPages() so that implementations utilises the correct deallocation function. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
2026-04-17Global: Move ArmLib to MdePkgOliver Smith-Denny1-1/+1
Per https://edk2.groups.io/g/devel/topic/move_armlib_to_baselib/118541649, this commit moves ArmLib to MdePkg and updates all consumers. The only change to ArmLib itself is to remove ArmPkg.dec from the inf. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-04-13EmbeddedPkg/PrePiLib: Prevent overread with FFS size macrosGowtham M1-8/+6
Symptom:Unsafe typecasting may lead to out‑of‑bound memory access RootCause: FileSize and FileLength are declared as UINT32 and masked with 0x00FFFFFF to store only the lower 24 bits. Although this approach yields the correct result, it introduces a potential risk due to unsafe typecasting and dereferencing. Solution: Using the predefined macro FFS_FILE_SIZE() from MdePkg\Include\Pi\PiFirmwareFile.h, which safely performs the same operation by reconstructing the size using individual byte access. This commit also addresses the fix for coverity isssue "OVERRUN" Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
2026-03-05EmbeddedPkg: fix mdlint issuesSherry Fan1-3/+7
Fix markdownlint formatting issues in README. Uses the following settings: { "default": true, "MD013": {"line_length": 120, "code_blocks": false, "tables": false}, "MD033": {"allowed_elements": ["br", "center", "img"]} } Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2026-03-02EmbeddedPkg: align Inf file headers with INF Spec standardAlexander Gryanko2-14/+14
The Inf file standard specifies that comments begin with the characters "#". The following files contained incorrectly formatted C-style comments and have been updated: EmbeddedPkg/Library/DxeDtPlatformDtbLoaderLibDefault/DxeDtPlatformDtbLoaderLibDefault.inf EmbeddedPkg/Library/NorFlashInfoLib/NorFlashInfoLib.inf The problems were identified during testing of the parser https://github.com/xpahos/edk2-idea. Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2026-03-02EmbeddedPkg: align UNI file headers with UNI Spec standardAlexander Gryanko3-21/+21
The Uni file standard specifies that comments begin with the characters "//". The following files contained incorrectly formatted C-style comments and have been updated: EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefHii.uni EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformHii.uni EmbeddedPkg/Drivers/MemoryAttributeManagerDxe/MemoryAttributeManagerDxeHii.uni The problems were identified during testing of the parser https://github.com/xpahos/edk2-idea. Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2026-02-24EmbeddedPkg: Replace include guards with #pragma onceMichael Kubacki44-176/+44
Replace traditional `#ifndef`/`#define`/`#endif` include guards with `#pragma` once. `#pragma once` is a widely supported preprocessor directive that prevents header files from being included multiple times. It is supported by all toolchains used to build edk2: GCC, Clang/LLVM, and MSVC. Compared to macro-based include guards, `#pragma once`: - Eliminates the risk of macro name collisions or copy/paste errors where two headers inadvertently use the same guard macro. - Eliminate inconsistency in the way include guard macros are named (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.). - Reduces boilerplate (three lines replaced by one). - Avoids polluting the macro namespace with guard symbols. - Can improve build times as the preprocessor can skip re-opening the file entirely, rather than re-reading it to find the matching `#endif` ("multiple-include optimization"). - Note that some compilers may already optimize traditional include guards, by recognzining the idiomatic pattern. This change is made acknowledging that overall portability of the code will technically be reduced, as `#pragma once` is not part of the C/C++ standards. However, this is considered acceptable given: 1. edk2 already defines a subset of supported compilers in BaseTools/Conf/tools_def.template, all of which have supported `#pragma once` for over two decades. 2. There have been concerns raised to the project about inconsistent include guard naming and potential macro collisions. Approximate compiler support dates: - MSVC: Supported since Visual C++ 4.2 (1996) - GCC: Supported since 3.4 (2004) (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html) - Clang (LLVM based): Since initial release in 2007 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2026-02-11EmbeddedPkg/PrePiMemoryAllocationLib: Update memory hob page alignmentAntaeus Kleinert-Strand1-10/+39
When allocating Runtime memory the MemoryAllocation HOB's length needs to meet the alignment requirements of Runtime memory. On AARCH64 architectures this alignment is not the default of 4KB. Instead it is set by the RUNTIME_PAGE_ALLOCATION_GRANULARITY definition, which is 64KB. This change enforces the RUNTIME alignment as part of generating the MemoryAllocationHob for runtime memory types. Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
2026-02-02EmbeddedPkg: Replace non-ASCII characters with ASCIIdhiineshm5-47/+47
Replacing the non-ASCII characters with ASCII characters fixes build failures onWindows systems using non-English locales. These characters trigger MSVC warningC4819 (“file contains a character that cannot be represented in the current codepage”), which becomes an error when /WX is enabled. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: dhiineshm <dhiineshm@ami.com>
2026-01-23EmbeddedPkg/AndroidBootImgLib: Fix typo in Buffer parameter descriptionDongyan Qian1-1/+1
The comment for the Buffer parameter incorrectly said "then no the size" instead of "then the size". This patch fixes the typo only; no functional changes. Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
2026-01-22EmbeddedPkg/Library/VirtualRealTimeClockLib: Fix type mismatchMichael D Kinney1-2/+2
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2026-01-22EmbeddedPkg/GdbStub/X64: Use X64 system contextMichael D Kinney1-50/+48
Found with VS2022 NOOPT X64 build. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2026-01-22EmbeddedPkg/Universal/MmcDxe: Fix VS2022 NOOPT IA32/X64 issuesMichael D Kinney2-16/+16
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2026-01-15EmbeddedPkg: PrePiMemoryAllocationLib: Add AllocateCopyPoolOliver Smith-Denny1-0/+37
ArmVirtPkg uses PrePiMemoryAllocationLib and PeiServicesLib in the same module. PeiServicesLib depends on MemoryAllocationLib, fulfilled by PrePiMemoryAllocationLib in this instance. However, PeiServicesLib uses AllocateCopyPool() which is not provided in PrePiMemoryAllocationLib. CLANGPDB AARCH64 finds this as a link error. Other toolchains are optimizing the call out since that code path is not used in this module. This adds AllocateCopyPool() to PrePiMemoryAllocationLib to satisfy the dependency. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2026-01-15EmbeddedPkg: PrePiHobLib: Add Library/Protocol DependenciesOliver Smith-Denny1-0/+4
CLANGPDB AARCH64 catches that PrePiHobLib doesn't correctly list the library classes and protocols it uses. This resolves that. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-11-24EmbeddedPkg: Add LOONGARCH64 and RISCV64 as supported architecturesLeif Lindholm1-1/+1
Both LOONGARCH64 and RISCV64 platforms make use of modules in EmbeddedPkg, for example in OvmfPkg. So add them as supported architectures for the package to simplify build tests. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-10-30EmbeddedPkg: Remove DXE_SAL_DRIVERSathya Ravichandran1-1/+1
The DXE_SAL_DRIVER module type was introduced to support Itanium (IPF) platforms. Since support for Itanium processors has been dropped, the instances of DXE_SAL_DRIVER have been removed. Ref: [3cb0a311cb7e747d7be5c5076d0fff76ad256d2b] Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Sathya Ravichandran <sathyar@ami.com>
2025-10-16EmbeddedPkg/VirtualRealTimeClockLib: Use SOURCE_DATE_EPOCHMichael D Kinney2-8/+2
Change VirtualRealTimeClockLib.inf to use SOURCE_DATE_EPOCH instead of Linux only shell command. This allows this library to be used in Windows build environments. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-10-09EmbeddedPkg: Clear keyboard queue buffer after readingnick.wang1-0/+1
There is a possibility to retrieve user input keystroke data stored in the queue buffer via the EFI_SIMPLE_TEXT_INPUT_PROTOCOL pointer. To prevent exposure of the password string, clear the queue buffer by filling it with zeros after reading. Signed-off-by: Nick Wang <nick.wang@insyde.com>
2025-09-26EmbeddedPkg: Drop ARM32 SupportOliver Smith-Denny12-729/+7
edk2 is dropping support for the ARM32 architecture. This commit removes ARM32 code from EmbeddedPkg. This also drops irrelevant VALID_ARCHITECTURES comments from infs that are not arch specific. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-09-12EmbeddedPkg/PrePiLib: minor cleanup in FfsProcessSection ()Leif Lindholm1-8/+8
Drop an else wrapper in FfsProcessSection () on the other side of an if-statemenmt that is an error return. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-09-12EmbeddedPkg/PrePiLib: eliminate unneeded variable in FfsProcessSection ()Leif Lindholm1-9/+5
The "Found" variable provided only a deferred form of success handling, so eliminate it to improve readability. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-09-12EmbeddedPkg/PrePiLib: refactor FfsProcessSection ()Leif Lindholm1-60/+122
Create some helper functions to make FfsProcessSection at least halfway readable by both humans and compilers. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-09-08ArmPlatformPkg,EmbeddedPkg,MdeModulePkg: Move RealTimeClockLib headerINDIA\sachinganesh5-124/+3
RealTimeClockLib is an architectural implementation that is not restricted to the embedded segment or any platform in particular. So the header has been moved to MdeModulePkg. And the package has been added to the relevant INF files. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-08-12MdePkg, EmbeddedPkg: Move Fdt Table Guid to MdePkgPrachotan Bathi2-26/+0
Move Fdt Table Guid from EmbeddedPkg to MdePkg to avoid unnecessary dependencies on EmbeddedPkg for packages like ShellPkg. This change may affect modules dependent on EmbeddedPkg but not on MdePkg, which is unlikely. Also, per 8c721d6, MdePkg has a more refined implementation of Fdt as compared to the EmbeddedPkg which was the initial implementation. Not moving gFdtVariableGuid since it'll be moved to platform code. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
2025-07-23EmbeddedPkg: Fix incorrect define for hardware interrupt2 protocolChris Fernald1-2/+2
In HardwareInterrupt2.h the define for the protocol does not match the definition of the protocol in the dec file. The definition in the dec file is 32898322-2da1-474a-baaa-f3f7cf569470 where in the definition the define is 32898322-2d1a-474a-baaa-f3f7cf569470 and the string is even less correct with various bit swaps. This commit changes all the strings and definitions to be consistent with the dec definition. Signed-off-by: Chris Fernald <chfernal@microsoft.com>
2025-07-08MdePkg, EmbeddedPkg: Moved definition of Fdt Guid to MdePkgAkshay Behl2-22/+0
MdePkg has a more refined implementation of Fdt as compared to the EmbeddedPkg which was the initial implementation, hence moving the Fdt Guid from EmbeddedPkg to MdePkg. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Akshay Behl <cap2k4@rivosinc.com> Co-authored-by: Dhaval Sharma <dhaval@rivosinc.com>
2025-07-08EmbeddedPkg/PrePiMemoryAllocationLib: Add reserved memory allocationsVishal Oliyil Kunnil1-0/+74
PrePiMemoryAllocationLib does not implement functions to allocate EfiMemoryReservedType. These are implemented in other instances of MemoryAllocationLib (Dxe, Uefi, PiSmmCore, SmmMemory). Add AllocateReservedPages() and AllocateAlignedReservedPages() functions to make it consistent with other MemoryAllocationLib intstances. Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
2025-06-26EmbeddedPkg/TimeBaseLib: aligning year with UEFI specificationPankaj Kumar Singh1-2/+2
According to the UEFI Specification version 2.11, the valid range for the Year field in the EFI_TIME structure is from 1900 to 9999. Currently IsTimeValid() checks a restricted range 2000 - 2099. Update range in TimeBaseLib.c to match UEFI specification. Signed-off-by: Pankaj Singh <pansing@qti.qualcomm.com>
2025-06-04EmbeddedPkg: Fix a data error in commentGao Qihang1-1/+1
KEYBOARD_TIMER_INTERVAL is used as TriggerTime parameter of gBS->SetTimer() function. TriggerTime parameter represents the number of 100ns units, so number 500000 indicates 0.05s. Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-06-03EmbeddedPkg: PrePiLib missing header used in fileDoug Flick1-0/+1
PrePiLib.h is missing the header file that defines the structures used in the file. For example: - EFI_PEI_FV_HANDLE - EFI_PEI_FILE_HANDLE Signed-off-by: Doug Flick <dougflick@microsoft.com>
2025-06-02EmbeddedPkg: delete ancient libfdt semi-integrationLeif Lindholm19-6892/+0
With all in-tree users migrated, finally delete this. Any out-of-tree users need to migrate to MdePkg BaseFdtLib. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-04-30ArmVirtPkg,DynamicTablesPkg,EmbeddedPkg,OvmfPkg: use MdePkg BaseFdtLibLeif Lindholm4-32/+32
Migrate these packages to use the up-to-date BaseFdtLib instead of the EmbeddedPkg relic that is going away. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
2025-04-18EmbeddedPkg: Add two new APIs in PrePiHobLibDun Tan1-0/+55
This commit is to add two new APIs in EmbeddedPkg PrePiHobLib: 1.The GetNextMemoryAllocationGuidHob () returns the next instance of the Memory Allocation HOB with the matched GUID from a starting HOB pointer. 2.The TagMemoryAllocationHobWithGuid () searchs the HOB list for the Memory Allocation HOB with a matching base address and set the Name GUID. Then the instance of the tagged Memory Allocation HOB with matched base address is returned. Signed-off-by: Dun Tan <dun.tan@intel.com>
2025-04-10ArmPkg: ArmSmcLib: Move ArmSmcLib to MdePkgKun Qin1-1/+1
As an implementation of an industry specification-defined interface, ArmSmcLib is more appropriately placed in MdePkg. This update relocates both the header definition and the implementation of ArmSmcLib to MdePkg, thereby supporting the monitor call primitives for all other packages that depend on this interface. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-01-17ArmPkg: Retire ArmGicLib implementationsArd Biesheuvel1-1/+0
Retire all implementations of the ArmGicLib library class, which are no longer used. For now, retain the library header and library class declaration: the header file only contains pre-processor defines derived from the GIC architecture spec, and so this code should probably move into MdePkg at a later moment. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-01-15EmbeddedPkg: CodeQL Fixes.Vineel Kovvuri[MSFT]3-1/+7
Makes changes to comply with alerts raised by CodeQL. Most of the issues here fall into the following two categories: 1. Potential use of uninitialized pointer. 2. Inconsistent integer width in comparison. Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com> Co-authored-by: Ken Lautner <kenlautner3@gmail.com> Co-authored-by: Bret Barkelew <bret@corthon.com> Signed-off-by: Vineel Kovvuri[MSFT] <vineelko@microsoft.com>