]> git.proxmox.com Git - mirror_edk2.git/blob - ArmVirtPkg/Include/Protocol/FdtClient.h
ArmVirtPkg/FdtClientDxe: report address and size cell count directly
[mirror_edk2.git] / ArmVirtPkg / Include / Protocol / FdtClient.h
1 /** @file
2
3 DISCLAIMER: the FDT_CLIENT_PROTOCOL introduced here is a work in progress,
4 and should not be used outside of the EDK II tree.
5
6 Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
7
8 This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
12
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15
16 **/
17
18 #ifndef __FDT_CLIENT_H__
19 #define __FDT_CLIENT_H__
20
21 #define FDT_CLIENT_PROTOCOL_GUID { \
22 0xE11FACA0, 0x4710, 0x4C8E, {0xA7, 0xA2, 0x01, 0xBA, 0xA2, 0x59, 0x1B, 0x4C} \
23 }
24
25 //
26 // Protocol interface structure
27 //
28 typedef struct _FDT_CLIENT_PROTOCOL FDT_CLIENT_PROTOCOL;
29
30 typedef
31 EFI_STATUS
32 (EFIAPI *FDT_CLIENT_GET_NODE_PROPERTY) (
33 IN FDT_CLIENT_PROTOCOL *This,
34 IN INT32 Node,
35 IN CONST CHAR8 *PropertyName,
36 OUT CONST VOID **Prop,
37 OUT UINT32 *PropSize OPTIONAL
38 );
39
40 typedef
41 EFI_STATUS
42 (EFIAPI *FDT_CLIENT_SET_NODE_PROPERTY) (
43 IN FDT_CLIENT_PROTOCOL *This,
44 IN INT32 Node,
45 IN CONST CHAR8 *PropertyName,
46 IN CONST VOID *Prop,
47 IN UINT32 PropSize
48 );
49
50 typedef
51 EFI_STATUS
52 (EFIAPI *FDT_CLIENT_FIND_COMPATIBLE_NODE) (
53 IN FDT_CLIENT_PROTOCOL *This,
54 IN CONST CHAR8 *CompatibleString,
55 OUT INT32 *Node
56 );
57
58 typedef
59 EFI_STATUS
60 (EFIAPI *FDT_CLIENT_FIND_NEXT_COMPATIBLE_NODE) (
61 IN FDT_CLIENT_PROTOCOL *This,
62 IN CONST CHAR8 *CompatibleString,
63 IN INT32 PrevNode,
64 OUT INT32 *Node
65 );
66
67 typedef
68 EFI_STATUS
69 (EFIAPI *FDT_CLIENT_FIND_COMPATIBLE_NODE_PROPERTY) (
70 IN FDT_CLIENT_PROTOCOL *This,
71 IN CONST CHAR8 *CompatibleString,
72 IN CONST CHAR8 *PropertyName,
73 OUT CONST VOID **Prop,
74 OUT UINT32 *PropSize OPTIONAL
75 );
76
77 typedef
78 EFI_STATUS
79 (EFIAPI *FDT_CLIENT_FIND_COMPATIBLE_NODE_REG) (
80 IN FDT_CLIENT_PROTOCOL *This,
81 IN CONST CHAR8 *CompatibleString,
82 OUT CONST VOID **Reg,
83 OUT UINTN *AddressCells,
84 OUT UINTN *SizeCells,
85 OUT UINT32 *RegSize
86 );
87
88 typedef
89 EFI_STATUS
90 (EFIAPI *FDT_CLIENT_GET_OR_INSERT_CHOSEN_NODE) (
91 IN FDT_CLIENT_PROTOCOL *This,
92 OUT INT32 *Node
93 );
94
95 struct _FDT_CLIENT_PROTOCOL {
96 FDT_CLIENT_GET_NODE_PROPERTY GetNodeProperty;
97 FDT_CLIENT_SET_NODE_PROPERTY SetNodeProperty;
98
99 FDT_CLIENT_FIND_COMPATIBLE_NODE FindCompatibleNode;
100 FDT_CLIENT_FIND_NEXT_COMPATIBLE_NODE FindNextCompatibleNode;
101 FDT_CLIENT_FIND_COMPATIBLE_NODE_PROPERTY FindCompatibleNodeProperty;
102 FDT_CLIENT_FIND_COMPATIBLE_NODE_REG FindCompatibleNodeReg;
103
104 FDT_CLIENT_GET_OR_INSERT_CHOSEN_NODE GetOrInsertChosenNode;
105 };
106
107 extern EFI_GUID gFdtClientProtocolGuid;
108
109 #endif