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>
This commit is contained in:
@@ -85,6 +85,29 @@ EFI_STATUS
|
||||
OUT UINT32 *RegSize
|
||||
);
|
||||
|
||||
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) (
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user