9#include <libfdt/libfdt/libfdt.h>
27 return fdt16_to_cpu (Value);
44 return cpu_to_fdt16 (Value);
61 return fdt32_to_cpu (Value);
78 return cpu_to_fdt32 (Value);
95 return fdt64_to_cpu (Value);
112 return cpu_to_fdt64 (Value);
129 return fdt_check_header (Fdt);
148 return fdt_create_empty_tree (Buffer, (
int)BufferSize);
169 return fdt_open_into (Fdt, Buffer, BufferSize);
185 return fdt_pack (Fdt);
205 return fdt_offset_ptr (Fdt, Offset, Length);
226 return fdt_next_node (Fdt, Offset, Depth);
245 return fdt_first_subnode (Fdt, Offset);
264 return fdt_next_subnode (Fdt, Offset);
281 return fdt_num_mem_rsv (Fdt);
304 return fdt_get_mem_rsv (Fdt, Index, Addr, Size);
322 IN INT32 ParentOffset,
327 return fdt_subnode_offset_namelen (Fdt, ParentOffset, Name, NameLength);
344 IN INT32 ParentOffset,
348 return fdt_subnode_offset (Fdt, ParentOffset, Name);
366 return fdt_parent_offset (Fdt, NodeOffset);
385 IN INT32 StartOffset,
388 IN INT32 PropertyLength
391 return fdt_node_offset_by_prop_value (Fdt, StartOffset, PropertyName, PropertyValue, PropertyLength);
409 return fdt_node_offset_by_phandle (Fdt, Phandle);
429 return fdt_stringlist_contains (StringList, ListLength, String);
453 return (
FDT_PROPERTY *)fdt_get_property (Fdt, NodeOffset, Name, Length);
475 return fdt_get_alias_namelen (Fdt, Name, Length);
494 return fdt_first_property_offset (Fdt, NodeOffset);
513 return fdt_next_property_offset (Fdt, Offset);
534 return (
FDT_PROPERTY *)fdt_get_property_by_offset (Fdt, Offset, Length);
552 IN INT32 *Length OPTIONAL
555 return fdt_get_string (Fdt, StrOffset, Length);
572 IN INT32 ParentOffset,
576 return fdt_add_subnode (Fdt, ParentOffset, Name);
601 return fdt_setprop (Fdt, NodeOffset, Name, Value, (
int)Length);
626 Tmp = cpu_to_fdt64 (Value);
628 return fdt_setprop (Fdt, NodeOffset, Name, &Tmp,
sizeof (Tmp));
653 return fdt_appendprop (Fdt, NodeOffset, Name, Value, (
int)Length);
676 return fdt_delprop (Fdt, NodeOffset, Name);
696 return fdt_path_offset_namelen (Fdt, Path, NameLength);
714 return fdt_path_offset (Fdt, Path);
735 return fdt_get_name (Fdt, NodeOffset, Length);
754 return fdt_node_depth (Fdt, NodeOffset);
770 IN INT32 StartOffset,
774 return fdt_node_offset_by_compatible (Fdt, StartOffset, Compatible);
792 return fdt_address_cells (Fdt, NodeOffset);
810 return fdt_size_cells (Fdt, NodeOffset);
821 return fdt_strerror (ErrVal);
INT32 EFIAPI FdtNodeDepth(IN CONST VOID *Fdt, IN INT32 NodeOffset)
INT32 FdtDelProp(IN OUT VOID *Fdt, IN INT32 NodeOffset, IN CONST CHAR8 *Name)
INT32 EFIAPI FdtAppendProp(IN VOID *Fdt, IN INT32 NodeOffset, IN CONST CHAR8 *Name, IN CONST VOID *Value, IN UINT32 Length)
UINT64 EFIAPI CpuToFdt64(IN UINT64 Value)
INT32 EFIAPI FdtStringListContains(IN CONST CHAR8 *StringList, IN INT32 ListLength, IN CONST CHAR8 *String)
CONST VOID *EFIAPI FdtOffsetPointer(IN CONST VOID *Fdt, IN INT32 Offset, IN UINT32 Length)
INT32 EFIAPI FdtNextPropertyOffset(IN CONST VOID *Fdt, IN INT32 Offset)
INT32 EFIAPI FdtNodeOffsetByPropertyValue(IN CONST VOID *Fdt, IN INT32 StartOffset, IN CONST CHAR8 *PropertyName, IN CONST VOID *PropertyValue, IN INT32 PropertyLength)
INT32 EFIAPI FdtFirstSubnode(IN CONST VOID *Fdt, IN INT32 Offset)
CONST FDT_PROPERTY *EFIAPI FdtGetProperty(IN CONST VOID *Fdt, IN INT32 NodeOffset, IN CONST CHAR8 *Name, IN INT32 *Length)
UINT64 EFIAPI Fdt64ToCpu(IN UINT64 Value)
INT32 EFIAPI FdtOpenInto(IN CONST VOID *Fdt, OUT VOID *Buffer, IN INT32 BufferSize)
CONST CHAR8 *EFIAPI FdtGetAliasNameLen(IN CONST VOID *Fdt, IN CONST CHAR8 *Name, IN INT32 Length)
CONST CHAR8 *EFIAPI FdtGetString(IN CONST VOID *Fdt, IN INT32 StrOffset, IN INT32 *Length OPTIONAL)
INT32 EFIAPI FdtSetProperty(IN VOID *Fdt, IN INT32 NodeOffset, IN CONST CHAR8 *Name, IN CONST VOID *Value, IN UINT32 Length)
INT32 EFIAPI FdtPack(IN OUT VOID *Fdt)
UINT16 EFIAPI Fdt16ToCpu(IN UINT16 Value)
INT32 EFIAPI FdtSubnodeOffset(IN CONST VOID *Fdt, IN INT32 ParentOffset, IN CONST CHAR8 *Name)
INT32 EFIAPI FdtNodeOffsetByCompatible(IN CONST VOID *Fdt, IN INT32 StartOffset, IN CONST CHAR8 *Compatible)
INT32 EFIAPI FdtSetPropU64(IN VOID *Fdt, IN INT32 NodeOffset, IN CONST CHAR8 *Name, IN UINT64 Value)
INT32 EFIAPI FdtSubnodeOffsetNameLen(IN CONST VOID *Fdt, IN INT32 ParentOffset, IN CONST CHAR8 *Name, IN INT32 NameLength)
INT32 EFIAPI FdtAddressCells(IN CONST VOID *Fdt, IN INT32 NodeOffset)
INT32 EFIAPI FdtAddSubnode(IN VOID *Fdt, IN INT32 ParentOffset, IN CONST CHAR8 *Name)
UINT16 EFIAPI CpuToFdt16(IN UINT16 Value)
INT32 EFIAPI FdtNextNode(IN CONST VOID *Fdt, IN INT32 Offset, IN INT32 *Depth)
UINT32 EFIAPI CpuToFdt32(IN UINT32 Value)
INT32 EFIAPI FdtCheckHeader(IN CONST VOID *Fdt)
INT32 EFIAPI FdtParentOffset(IN CONST VOID *Fdt, IN INT32 NodeOffset)
INTN EFIAPI FdtGetNumberOfReserveMapEntries(IN CONST VOID *Fdt)
UINT32 EFIAPI Fdt32ToCpu(IN UINT32 Value)
INT32 EFIAPI FdtSizeCells(IN CONST VOID *Fdt, IN INT32 NodeOffset)
INT32 EFIAPI FdtPathOffset(IN CONST VOID *Fdt, IN CONST CHAR8 *Path)
INT32 EFIAPI FdtFirstPropertyOffset(IN CONST VOID *Fdt, IN INT32 NodeOffset)
INTN EFIAPI FdtGetReserveMapEntry(IN CONST VOID *Fdt, IN INTN Index, OUT EFI_PHYSICAL_ADDRESS *Addr, OUT UINT64 *Size)
INT32 EFIAPI FdtPathOffsetNameLen(IN CONST VOID *Fdt, IN CONST CHAR8 *Path, IN INT32 NameLength)
CONST CHAR8 *EFIAPI FdtGetName(IN VOID *Fdt, IN INT32 NodeOffset, IN INT32 *Length)
INT32 EFIAPI FdtNodeOffsetByPhandle(IN CONST VOID *Fdt, IN UINT32 Phandle)
INT32 EFIAPI FdtCreateEmptyTree(IN VOID *Buffer, IN UINT32 BufferSize)
INT32 EFIAPI FdtNextSubnode(IN CONST VOID *Fdt, IN INT32 Offset)
CONST FDT_PROPERTY *EFIAPI FdtGetPropertyByOffset(IN CONST VOID *Fdt, IN INT32 Offset, IN INT32 *Length)
UINT64 EFI_PHYSICAL_ADDRESS