]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - qnx/src/ipc3x_dev/ti/syslink/resources/RscTable.h
Linux: Update user AF_RPMSG define for 5.15+ kernels
[ipc/ipcdev.git] / qnx / src / ipc3x_dev / ti / syslink / resources / RscTable.h
1 /**
2  *  @file   RscTable.h
3  *
4  *  @brief      Definitions for the RscTable interface.
5  *
6  *  ============================================================================
7  *
8  *  Copyright (c) 2012-2015, Texas Instruments Incorporated
9  *
10  *  Redistribution and use in source and binary forms, with or without
11  *  modification, are permitted provided that the following conditions
12  *  are met:
13  *
14  *  *  Redistributions of source code must retain the above copyright
15  *     notice, this list of conditions and the following disclaimer.
16  *
17  *  *  Redistributions in binary form must reproduce the above copyright
18  *     notice, this list of conditions and the following disclaimer in the
19  *     documentation and/or other materials provided with the distribution.
20  *
21  *  *  Neither the name of Texas Instruments Incorporated nor the names of
22  *     its contributors may be used to endorse or promote products derived
23  *     from this software without specific prior written permission.
24  *
25  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
27  *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28  *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
29  *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30  *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31  *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32  *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33  *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34  *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35  *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  *  Contact information for paper mail:
37  *  Texas Instruments
38  *  Post Office Box 655303
39  *  Dallas, Texas 75265
40  *  Contact information:
41  *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
42  *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
43  *  ============================================================================
44  *
45  */
48 #ifndef RscTable_H
49 #define RscTable_H
51 #if defined (__cplusplus)
52 extern "C" {
53 #endif
55 #include <ti/syslink/SysLink.h>
56 #include <rsc_types.h>
57 #include <ti/syslink/ProcMgr.h>
58 #include <Processor.h>
60 /*!
61  *  @def    RSCTABLE_MODULEID
62  *  @brief  Module ID for rsctable.
63  */
64 #define RSCTABLE_MODULEID           (UInt16) 0x6a87
66 /* =============================================================================
67  *  All success and failure codes for the module
68  * =============================================================================
69  */
71 /*!
72  *  @def    RSCTABLE_STATUSCODEBASE
73  *  @brief  Error code base for RscTable.
74  */
75 #define RSCTABLE_STATUSCODEBASE      (RSCTABLE_MODULEID << 12u)
77 /*!
78  *  @def    RSCTABLE_MAKE_FAILURE
79  *  @brief  Macro to make failure code.
80  */
81 #define RSCTABLE_MAKE_FAILURE(x)    ((Int)(  0x80000000                       \
82                                             | (RSCTABLE_STATUSCODEBASE + (x))))
84 /*!
85  *  @def    RSCTABLE_MAKE_SUCCESS
86  *  @brief  Macro to make success code.
87  */
88 #define RSCTABLE_MAKE_SUCCESS(x)    (RSCTABLE_STATUSCODEBASE + (x))
90 /*!
91  *  @def    RSCTABLE_E_INVALIDARG
92  *  @brief  Argument passed to a function is invalid.
93  */
94 #define RSCTABLE_E_INVALIDARG       RSCTABLE_MAKE_FAILURE(1)
96 /*!
97  *  @def    RSCTABLE_E_MEMORY
98  *  @brief  Memory allocation failed.
99  */
100 #define RSCTABLE_E_MEMORY           RSCTABLE_MAKE_FAILURE(2)
102 /*!
103  *  @def    RSCTABLE_E_FAIL
104  *  @brief  Generic failure.
105  */
106 #define RSCTABLE_E_FAIL             RSCTABLE_MAKE_FAILURE(3)
108 /*!
109  *  @def    RSCTABLE_E_NOTSUPPORTED
110  *  @brief  Functionality is not supported
111  */
112 #define RSCTABLE_E_NOTSUPPORTED     RSCTABLE_MAKE_FAILURE(4)
114 /*!
115  *  @def    RSCTABLE_E_NOTIMPL
116  *  @brief  Functionality is not implemented
117  */
118 #define RSCTABLE_E_NOTIMPL          RSCTABLE_MAKE_FAILURE(5)
120 /*!
121  *  @def    RSCTABLE_SUCCESS
122  *  @brief  Operation successful.
123  */
124 #define RSCTABLE_SUCCESS            RSCTABLE_MAKE_SUCCESS(0)
127 /*
128  *  @brief  Defines RscTable object handle
129  */
130 typedef struct RscTable_Object * RscTable_Handle;
132 RscTable_Handle RscTable_alloc (Char * fileName, UInt16 procId);
134 Int RscTable_free (RscTable_Handle * handle);
136 Int RscTable_process (UInt16 procId, Bool tryAlloc, UInt32 * numBlocks,
137     Processor_Handle procHandle, ProcMgr_BootMode bootMode);
139 Int RscTable_getMemEntries (UInt16 procId, Ipc_MemEntry * memEntries,
140                             UInt32 * numMemEntries);
142 Int RscTable_getInfo (UInt16 procId, UInt32 type, UInt32 extra, UInt32 * da,
143                       UInt32 *pa, UInt32 * len);
145 Int RscTable_update (UInt16 procId, ProcMgr_Handle procHandle);
147 Int RscTable_free (RscTable_Handle * handle);
149 Int RscTable_setStatus (UInt16 procId, UInt32 value);
151 #if defined (__cplusplus)
153 #endif /* defined (__cplusplus) */
155 #endif /* RscTable_H */