From 969d2eb3875a700a223840d7ea415e78de4f8cbe Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Thu, 15 Sep 2016 13:33:23 +0100 Subject: ArmVirtPkg/FdtClientDxe: add methods to iterate over memory nodes Add high level methods to iterate over all 'reg' properties of all DT nodes whose device_type properties have the value "memory". Since we are modifying the FdtClient protocol, update the protocol and the only existing implementation at the same time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/Include/Protocol/FdtClient.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'ArmVirtPkg/Include') diff --git a/ArmVirtPkg/Include/Protocol/FdtClient.h b/ArmVirtPkg/Include/Protocol/FdtClient.h index b593c74..aad76db 100644 --- a/ArmVirtPkg/Include/Protocol/FdtClient.h +++ b/ArmVirtPkg/Include/Protocol/FdtClient.h @@ -87,6 +87,29 @@ EFI_STATUS typedef EFI_STATUS +(EFIAPI *FDT_CLIENT_FIND_NEXT_MEMORY_NODE_REG) ( + IN FDT_CLIENT_PROTOCOL *This, + IN INT32 PrevNode, + OUT INT32 *Node, + OUT CONST VOID **Reg, + OUT UINTN *AddressCells, + OUT UINTN *SizeCells, + OUT UINT32 *RegSize + ); + +typedef +EFI_STATUS +(EFIAPI *FDT_CLIENT_FIND_MEMORY_NODE_REG) ( + IN FDT_CLIENT_PROTOCOL *This, + OUT INT32 *Node, + OUT CONST VOID **Reg, + OUT UINTN *AddressCells, + OUT UINTN *SizeCells, + OUT UINT32 *RegSize + ); + +typedef +EFI_STATUS (EFIAPI *FDT_CLIENT_GET_OR_INSERT_CHOSEN_NODE) ( IN FDT_CLIENT_PROTOCOL *This, OUT INT32 *Node @@ -101,6 +124,9 @@ struct _FDT_CLIENT_PROTOCOL { FDT_CLIENT_FIND_COMPATIBLE_NODE_PROPERTY FindCompatibleNodeProperty; FDT_CLIENT_FIND_COMPATIBLE_NODE_REG FindCompatibleNodeReg; + FDT_CLIENT_FIND_MEMORY_NODE_REG FindMemoryNodeReg; + FDT_CLIENT_FIND_NEXT_MEMORY_NODE_REG FindNextMemoryNodeReg; + FDT_CLIENT_GET_OR_INSERT_CHOSEN_NODE GetOrInsertChosenNode; }; -- cgit v1.1