summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/Include
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-15 13:33:23 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-15 15:39:29 +0100
commit969d2eb3875a700a223840d7ea415e78de4f8cbe (patch)
tree706dbeca5b060473755ae3efdce38f9dc819c27c /ArmVirtPkg/Include
parentcfc8d51c0cbf97b5e71cfd92dcc6c5760940214f (diff)
downloadedk2-969d2eb3875a700a223840d7ea415e78de4f8cbe.tar.gz
edk2-969d2eb3875a700a223840d7ea415e78de4f8cbe.tar.bz2
edk2-969d2eb3875a700a223840d7ea415e78de4f8cbe.zip
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 <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'ArmVirtPkg/Include')
-rw-r--r--ArmVirtPkg/Include/Protocol/FdtClient.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/ArmVirtPkg/Include/Protocol/FdtClient.h b/ArmVirtPkg/Include/Protocol/FdtClient.h
index b593c74414..aad76db388 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;
};