| Age | Commit message (Collapse) | Author | Files | Lines |
|
Update libfdt submodule to commit f48b965 of pylibfdt.
Repo: https://github.com/devicetree-org/pylibfdt
Commit: f48b965
This moves to dtc v1.7.2-24-gf4c53f4ebf78.
Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
|
|
Point the strrchr and strtoul macros in LibFdtSupport.h at the new
AsciiStrRChr() and AsciiStrToUintn() BaseLib APIs instead of the
private fdt_strrchr()/fdt_strtoul() implementations. This removes
duplicated logic and picks up the overflow-detection already present
in the underlying AsciiStrHexToUintnS()/AsciiStrDecimalToUintnS()
conversion routines.
LibFdtWrapper.c is now empty of purpose and is removed, along with
its entry in BaseFdtLib.inf.
Signed-off-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com>
|
|
Add UEFI-native wrappers for libfdt string list count and search APIs.
Signed-off-by: Thamballi Sreelalitha <sreelali@qti.qualcomm.com>
|
|
FdtStrerror
Update the FdtOverlayApply() function to mark the Fdt pointer
as an IN OUT variable. The internal fdt_overlay_apply() function
returns the merged blob in the Fdt variable.
Update FdtStrerror to have it's return type on a single line, aligning
the style with the rest of the file.
Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
|
|
Update FdtGetName() and FdtGetPath() to correctly mark the VOID *Fdt
as a CONST variable. This aligns with the internal libfdt
implementation.
Update MockFdtLib.h to align with the updated inputs for FdtGetName()
and FdtGetPath().
Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
|
|
Add support for the define FdtForEachPropertyOffset and
FdtFindMaxPhandle() wrappers.
Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
|
|
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>
|
|
VS2022 NOOPT IA32 builds of BaseFdtLib introduce use of
intrinsics __allshl and __aullshr from the libfdt submodule
that can not be modified. Add the implementation of
__allshl and __aullshr intrinsics from from the CryptoPkg
to BaseFdtLib.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
Add FDT_HEADER field accessors and FdtOverlayApply() wrapper.
Signed-off-by: Mario Bălănică <mariobalanica02@gmail.com>
|
|
Add wrapper for fdt_get_phandle().
Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
|
|
Add FdtDelNode() and FdtGetPath() mock functions.
Signed-off-by: Bob Morgan <bobm@nvidia.com>
|
|
Removed legacy macros and string helper APIs that are no longer used
in the BaseFdtLib implementation. Specifically:
- Dropped strcmp macro that incorrectly expected 3 arguments but
ignored the third parameter.
- Cleaned up other unused macros and redundant string APIs.
These changes align with the current upstream libfdt module and
reduce dead code.
Signed-off-by: Thamballi Sreelalitha <sreelali@qti.qualcomm.com>
|
|
Add FdtSetPropString(), FdtDelNode() and FdtGetPath().
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
Add wrapper for fdt_get_property_w.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
Commit 8040fdbb8b8b (MdePkg: consistently use "Property" in BaseFdtLib)
got a bit carried away and confused around how libfdt contains both
getprop and get_property functions, which operate quite differently;
the getprop variant returns a pointer to the value of the property,
whereas the get_property returns a pointer to the fdt_property
structure.
Untangle this, including fixing up affected existing in-tree users, and
adding the previously not exported FdtGetProp wrapper on fdt_getprop.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
|
|
gcc 15 switched to use the new ISO C23 standard by default.
'bool', 'true' and 'false' are keywords in C23, so do not
try to define them.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
- FdtOffsetPointer
- FdtParentOffset
- FdtNodeOffsetByPhandle
- FdtStringListContains
- FdtGetAliasNameLen
- FdtPathOffsetNameLen
- FdtPathOffset
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
- FdtSetPropU64
- FdtAppendProp
- FdtDelProp
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
FdtLib.h uses CONST FDT_PROPERTY * return values for some wrapper
functions, but the implementation in FdtLib.c used to original
CONST struct fdt_property * instead of the exported typedef.
Import LibFdt.h in the implementation file and make the
implementation consistent with the declaration.
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
Add a wrapper for fdt_strerror () and add the currently supported error
code defines from submodule.
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
There is currently a mix on functions named as Prop or Property.
The latter is in majority, and the better fit for tianocore coding style,
so rename FdtNodeOffsetByPropValue () and FdtSetProp () for consistency.
To avoid breaking bisect, change existing users in UefiPayloadPkg.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
FdtNumRsv and FdtGetMemRsv were added for the benefit of UefiPayloadPkg,
but their naming matches neither upstream libfdt nor tianocore coding
style rules. And there was scope for improvement of the doxygen
descriptions as well.
These functions currently have only one in-tree user, UefiPayloadPkg
FdtParserLib. So rename them more conformant
FdtGetNumberOfReserveMapEntries
and
FdtGetReserveMapEntry
and update the description comment blocks, at the same time as
updating the existing user.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
Devicetree defines a short hand way of defining reserved memory
ranges. Add APIs to access such nodes
Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
|
|
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4786
Disable some compiling warnings caused by submodule code.
Those can be removed later once issues fixed by submodule owner.
Signed-off-by: Linus Liu <linus.liu@intel.com>
|
|
This adds FdtNodeOffsetByCompatible() to support finding the offset of
the first node with a given 'compatible' value after an offset.
Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
|
|
Rename the standard functions in the LibFdtSupport to remove conflicts
with other libraries that define them.
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: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
Provide Fit format for UniversalPayload, developer can use argument
"--Fit" to build UniversalPayload.fit
Cc: Guo Dong <guo.dong@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Reviewed-by: Gua Guo <gua.guo@intel.com>
Signed-off-by: BruceX Wang <brucex.wang@intel.com>
|
|
Add FdtGetName() and FdtNodeDepth() function.
Cc: Benny Lin <benny.lin@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: James Lu <james.lu@intel.com>
Reviewed-by: Benny Lin <benny.lin@intel.com>
Reviewed-by: Gua Guo <gua.guo@intel.com>
Signed-off-by: BruceX Wang <brucex.wang@intel.com>
|
|
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)
and refer to LibcLib implementation by Pedro.
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: Benny Lin <benny.lin@intel.com>
Acked-by: Pedro Falcato <pedro.falcato@gmail.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4392
Add FDT support in EDK2 by submodule 3rd party libfdt
(https://github.com/devicetree-org/pylibfdt/tree/main/libfdt)
Add submodule libfdt and update ReadMe for the license.
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Benny Lin <benny.lin@intel.com>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
|