TianoCore EDK2 master
Loading...
Searching...
No Matches
FdtClientDxe.c File Reference
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/HobLib.h>
#include <libfdt.h>
#include <Guid/Fdt.h>
#include <Guid/FdtHob.h>
#include <Guid/PlatformHasDeviceTree.h>
#include <Protocol/FdtClient.h>

Go to the source code of this file.

Functions

STATIC EFI_STATUS EFIAPI GetNodeProperty (IN FDT_CLIENT_PROTOCOL *This, IN INT32 Node, IN CONST CHAR8 *PropertyName, OUT CONST VOID **Prop, OUT UINT32 *PropSize OPTIONAL)
 
STATIC EFI_STATUS EFIAPI SetNodeProperty (IN FDT_CLIENT_PROTOCOL *This, IN INT32 Node, IN CONST CHAR8 *PropertyName, IN CONST VOID *Prop, IN UINT32 PropSize)
 
STATIC BOOLEAN IsNodeEnabled (INT32 Node)
 
STATIC EFI_STATUS EFIAPI FindNextCompatibleNode (IN FDT_CLIENT_PROTOCOL *This, IN CONST CHAR8 *CompatibleString, IN INT32 PrevNode, OUT INT32 *Node)
 
STATIC EFI_STATUS EFIAPI FindCompatibleNode (IN FDT_CLIENT_PROTOCOL *This, IN CONST CHAR8 *CompatibleString, OUT INT32 *Node)
 
STATIC EFI_STATUS EFIAPI FindCompatibleNodeProperty (IN FDT_CLIENT_PROTOCOL *This, IN CONST CHAR8 *CompatibleString, IN CONST CHAR8 *PropertyName, OUT CONST VOID **Prop, OUT UINT32 *PropSize OPTIONAL)
 
STATIC EFI_STATUS EFIAPI FindCompatibleNodeReg (IN FDT_CLIENT_PROTOCOL *This, IN CONST CHAR8 *CompatibleString, OUT CONST VOID **Reg, OUT UINTN *AddressCells, OUT UINTN *SizeCells, OUT UINT32 *RegSize)
 
STATIC EFI_STATUS EFIAPI FindNextMemoryNodeReg (IN FDT_CLIENT_PROTOCOL *This, IN INT32 PrevNode, OUT INT32 *Node, OUT CONST VOID **Reg, OUT UINTN *AddressCells, OUT UINTN *SizeCells, OUT UINT32 *RegSize)
 
STATIC EFI_STATUS EFIAPI FindMemoryNodeReg (IN FDT_CLIENT_PROTOCOL *This, OUT INT32 *Node, OUT CONST VOID **Reg, OUT UINTN *AddressCells, OUT UINTN *SizeCells, OUT UINT32 *RegSize)
 
STATIC EFI_STATUS EFIAPI GetOrInsertChosenNode (IN FDT_CLIENT_PROTOCOL *This, OUT INT32 *Node)
 
STATIC VOID EFIAPI OnPlatformHasDeviceTree (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI InitializeFdtClientDxe (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC VOID * mDeviceTreeBase
 
STATIC FDT_CLIENT_PROTOCOL mFdtClientProtocol
 

Detailed Description

FDT client driver

Copyright (c) 2016, Linaro Ltd. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file FdtClientDxe.c.

Function Documentation

◆ FindCompatibleNode()

STATIC EFI_STATUS EFIAPI FindCompatibleNode ( IN FDT_CLIENT_PROTOCOL This,
IN CONST CHAR8 *  CompatibleString,
OUT INT32 *  Node 
)

Definition at line 158 of file FdtClientDxe.c.

◆ FindCompatibleNodeProperty()

STATIC EFI_STATUS EFIAPI FindCompatibleNodeProperty ( IN FDT_CLIENT_PROTOCOL This,
IN CONST CHAR8 *  CompatibleString,
IN CONST CHAR8 *  PropertyName,
OUT CONST VOID **  Prop,
OUT UINT32 *PropSize  OPTIONAL 
)

Definition at line 170 of file FdtClientDxe.c.

◆ FindCompatibleNodeReg()

STATIC EFI_STATUS EFIAPI FindCompatibleNodeReg ( IN FDT_CLIENT_PROTOCOL This,
IN CONST CHAR8 *  CompatibleString,
OUT CONST VOID **  Reg,
OUT UINTN AddressCells,
OUT UINTN SizeCells,
OUT UINT32 *  RegSize 
)

Definition at line 192 of file FdtClientDxe.c.

◆ FindMemoryNodeReg()

STATIC EFI_STATUS EFIAPI FindMemoryNodeReg ( IN FDT_CLIENT_PROTOCOL This,
OUT INT32 *  Node,
OUT CONST VOID **  Reg,
OUT UINTN AddressCells,
OUT UINTN SizeCells,
OUT UINT32 *  RegSize 
)

Definition at line 310 of file FdtClientDxe.c.

◆ FindNextCompatibleNode()

STATIC EFI_STATUS EFIAPI FindNextCompatibleNode ( IN FDT_CLIENT_PROTOCOL This,
IN CONST CHAR8 *  CompatibleString,
IN INT32  PrevNode,
OUT INT32 *  Node 
)

Definition at line 109 of file FdtClientDxe.c.

◆ FindNextMemoryNodeReg()

STATIC EFI_STATUS EFIAPI FindNextMemoryNodeReg ( IN FDT_CLIENT_PROTOCOL This,
IN INT32  PrevNode,
OUT INT32 *  Node,
OUT CONST VOID **  Reg,
OUT UINTN AddressCells,
OUT UINTN SizeCells,
OUT UINT32 *  RegSize 
)

Definition at line 241 of file FdtClientDxe.c.

◆ GetNodeProperty()

STATIC EFI_STATUS EFIAPI GetNodeProperty ( IN FDT_CLIENT_PROTOCOL This,
IN INT32  Node,
IN CONST CHAR8 *  PropertyName,
OUT CONST VOID **  Prop,
OUT UINT32 *PropSize  OPTIONAL 
)

Definition at line 28 of file FdtClientDxe.c.

◆ GetOrInsertChosenNode()

STATIC EFI_STATUS EFIAPI GetOrInsertChosenNode ( IN FDT_CLIENT_PROTOCOL This,
OUT INT32 *  Node 
)

Definition at line 333 of file FdtClientDxe.c.

◆ InitializeFdtClientDxe()

EFI_STATUS EFIAPI InitializeFdtClientDxe ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Definition at line 405 of file FdtClientDxe.c.

◆ IsNodeEnabled()

STATIC BOOLEAN IsNodeEnabled ( INT32  Node)

Definition at line 78 of file FdtClientDxe.c.

◆ OnPlatformHasDeviceTree()

STATIC VOID EFIAPI OnPlatformHasDeviceTree ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Definition at line 372 of file FdtClientDxe.c.

◆ SetNodeProperty()

STATIC EFI_STATUS EFIAPI SetNodeProperty ( IN FDT_CLIENT_PROTOCOL This,
IN INT32  Node,
IN CONST CHAR8 *  PropertyName,
IN CONST VOID *  Prop,
IN UINT32  PropSize 
)

Definition at line 56 of file FdtClientDxe.c.

Variable Documentation

◆ mDeviceTreeBase

STATIC VOID* mDeviceTreeBase

Definition at line 23 of file FdtClientDxe.c.

◆ mFdtClientProtocol

STATIC FDT_CLIENT_PROTOCOL mFdtClientProtocol
Initial value:
= {
GetNodeProperty,
SetNodeProperty,
FindCompatibleNode,
FindNextCompatibleNode,
FindCompatibleNodeProperty,
FindCompatibleNodeReg,
FindMemoryNodeReg,
FindNextMemoryNodeReg,
GetOrInsertChosenNode,
}

Definition at line 357 of file FdtClientDxe.c.