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