SysLink API Reference  2.21.03.11
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SysLink.h
Go to the documentation of this file.
1 
9 /*
10  * ============================================================================
11  *
12  * Copyright (c) 2008-2012, Texas Instruments Incorporated
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions
16  * are met:
17  *
18  * * Redistributions of source code must retain the above copyright
19  * notice, this list of conditions and the following disclaimer.
20  *
21  * * Redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution.
24  *
25  * * Neither the name of Texas Instruments Incorporated nor the names of
26  * its contributors may be used to endorse or promote products derived
27  * from this software without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
31  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
33  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
35  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
36  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
37  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
38  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
39  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  * Contact information for paper mail:
41  * Texas Instruments
42  * Post Office Box 655303
43  * Dallas, Texas 75265
44  * Contact information:
45  * http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
46  * DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
47  * ============================================================================
48  *
49  */
50 
51 
52 
53 #ifndef _SysLink_H_
54 #define _SysLink_H_
55 
56 
57 #if defined (__cplusplus)
58 extern "C" {
59 #endif
60 
61 /* =============================================================================
62  * macros & defines
63  * =============================================================================
64  */
65 
66 /* The bulk of this file is wrapped in this doxygen INTERNAL as it's not intended
67  * to be used by end users. Most of this is implementation details that users
68  * shouldn't see or bind to.
69  */
70 
80 #define IPC_BUFFER_ALIGN(x, y) (UInt32)((UInt32)((x + y - 1) / y) * y)
81 
82 
86 #define SYSLINK_MAX_MEMENTRIES 10
87 
91 #define SYSLINK_MAX_NAMELENGTH 32
92 
93 /* =============================================================================
94  * Structures & Enums
95  * =============================================================================
96  */
97 
98 typedef UInt32 SysLink_MapMask;
99 
103 #define SysLink_MASTERKNLVIRT (SysLink_MapMask)(1 << 0)
104 
108 #define SysLink_MASTERUSRVIRT (SysLink_MapMask)(1 << 1)
109 
113 #define SysLink_SLAVEVIRT (SysLink_MapMask)(1 << 2)
114 
118 typedef enum SysLink_NotifyType_tag {
119  SysLink_NOTIFICATION_NONE = 0,
121  SysLink_NOTIFICATION_ALWAYS = 1,
123  SysLink_NOTIFICATION_ONCE = 2,
128  SysLink_NOTIFICATION_HDWRFIFO_ALWAYS = 3,
132  SysLink_NOTIFICATION_HDWRFIFO_ONCE = 4
138 } SysLink_NotifyType;
139 
143 typedef struct SysLink_MemEntry_tag {
144  UInt32 slaveVirtAddr;
145  UInt32 masterPhysAddr;
146  UInt32 size;
147  SysLink_MapMask mapMask;
148  Bool map;
151  Bool isCached;
154  Bool isValid;
155 } SysLink_MemEntry;
156 
160 typedef struct SysLink_MemEntry_Block_tag {
161  Char procName[SYSLINK_MAX_NAMELENGTH];
163  UInt32 numEntries;
165  SysLink_MemEntry memEntries [SYSLINK_MAX_MEMENTRIES];
167 } SysLink_MemEntry_Block;
168 
169 
173 typedef struct SysLink_MemoryMap_tag {
174  UInt16 numBlocks;
176  SysLink_MemEntry_Block * memBlocks;
178 } SysLink_MemoryMap;
179 
207 extern String SysLink_params;
208 
209 
210 /* =============================================================================
211  * APIs
212  * =============================================================================
213  */
243 
253 
254 
255 #if defined (__cplusplus)
256 }
257 #endif
258 
259 
260 #endif /*_SysLink_H_*/
Copyright 2014, Texas Instruments Incorporated