1 /*************************************************************************/ /*!
3 @Title rgx kernel services structues/functions
4 @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
5 @Description RGX initialisation script definitions.
6 @License Dual MIT/GPLv2
8 The contents of this file are subject to the MIT license as set out below.
10 Permission is hereby granted, free of charge, to any person obtaining a copy
11 of this software and associated documentation files (the "Software"), to deal
12 in the Software without restriction, including without limitation the rights
13 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 copies of the Software, and to permit persons to whom the Software is
15 furnished to do so, subject to the following conditions:
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
20 Alternatively, the contents of this file may be used under the terms of
21 the GNU General Public License Version 2 ("GPL") in which case the provisions
22 of GPL are applicable instead of those above.
24 If you wish to allow use of your version of this file only under the terms of
25 GPL, and not to allow others to use your version of this file under the terms
26 of the MIT license, indicate your decision by deleting the provisions above
27 and replace them with the notice and other provisions required by GPL as set
28 out in the file called "GPL-COPYING" included in this distribution. If you do
29 not delete the provisions above, a recipient may use your version of this file
30 under the terms of either the MIT license or GPL.
32 This License is also included in this distribution in the file called
35 EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
36 PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
37 BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
38 PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
39 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
40 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
41 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
42 */ /**************************************************************************/
44 #ifndef __RGXSCRIPT_H__
45 #define __RGXSCRIPT_H__
47 #if defined (__cplusplus)
51 #define RGX_MAX_INIT_COMMANDS (256)
52 #define RGX_MAX_DEBUG_COMMANDS (320)
53 #define RGX_MAX_DBGBUS_COMMANDS (4096)
54 #define RGX_MAX_DEINIT_COMMANDS (32)
55 #define RGX_DBG_CMD_NAME_SIZE (40)
57 typedef enum _RGX_INIT_OPERATION
59 RGX_INIT_OP_ILLEGAL = 0,
60 RGX_INIT_OP_WRITE_HW_REG,
61 RGX_INIT_OP_POLL_64_HW_REG,
62 RGX_INIT_OP_POLL_HW_REG,
63 RGX_INIT_OP_COND_POLL_HW_REG,
64 RGX_INIT_OP_LOOP_POINT,
65 RGX_INIT_OP_COND_BRANCH,
67 RGX_INIT_OP_DBG_READ32_HW_REG,
68 RGX_INIT_OP_DBG_READ64_HW_REG,
71 RGX_INIT_OP_DBG_STRING,
72 RGX_INIT_OP_PDUMP_HW_REG,
75 typedef union _RGX_INIT_COMMAND_
77 RGX_INIT_OPERATION eOp;
80 RGX_INIT_OPERATION eOp;
81 IMG_UINT32 ui32Offset;
86 RGX_INIT_OPERATION eOp;
87 IMG_UINT32 ui32Offset;
93 RGX_INIT_OPERATION eOp;
94 IMG_UINT32 ui32Offset;
101 RGX_INIT_OPERATION eOp;
102 IMG_UINT32 ui32Offset;
103 IMG_UINT32 ui32Value;
109 RGX_INIT_OPERATION eOp;
110 IMG_UINT32 ui32CondOffset;
111 IMG_UINT32 ui32CondValue;
112 IMG_UINT32 ui32CondMask;
113 IMG_UINT32 ui32Offset;
114 IMG_UINT32 ui32Value;
120 RGX_INIT_OPERATION eOp;
125 RGX_INIT_OPERATION eOp;
126 IMG_UINT32 ui32Offset;
127 IMG_UINT32 ui32Value;
130 } sConditionalBranchPoint;
134 RGX_INIT_OPERATION eOp;
135 IMG_UINT32 ui32Offset;
136 IMG_CHAR aszName[RGX_DBG_CMD_NAME_SIZE];
141 RGX_INIT_OPERATION eOp;
142 IMG_UINT32 ui32Offset1;
143 IMG_UINT32 ui32Offset2;
144 IMG_UINT32 ui32Offset3;
145 IMG_CHAR aszName[RGX_DBG_CMD_NAME_SIZE];
150 RGX_INIT_OPERATION eOp;
151 IMG_UINT32 ui32WaitInUs;
156 RGX_INIT_OPERATION eOp;
157 IMG_CHAR aszString[RGX_DBG_CMD_NAME_SIZE];
162 typedef struct _RGX_INIT_SCRIPTS_
164 RGX_INIT_COMMAND asInitCommands[RGX_MAX_INIT_COMMANDS];
165 RGX_INIT_COMMAND asDbgCommands[RGX_MAX_DEBUG_COMMANDS];
166 RGX_INIT_COMMAND asDbgBusCommands[RGX_MAX_DBGBUS_COMMANDS];
167 RGX_INIT_COMMAND asDeinitCommands[RGX_MAX_DEINIT_COMMANDS];
170 #if defined(__cplusplus)
174 #endif /* __RGXSCRIPT_H__ */
176 /*****************************************************************************
177 End of file (rgxscript.h)
178 *****************************************************************************/