Home | History | Annotate | Download | only in inc
      1 /*
      2  *  Copyright 2001-2008 Texas Instruments - http://www.ti.com/
      3  *
      4  *  Licensed under the Apache License, Version 2.0 (the "License");
      5  *  you may not use this file except in compliance with the License.
      6  *  You may obtain a copy of the License at
      7  *
      8  *     http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  *  Unless required by applicable law or agreed to in writing, software
     11  *  distributed under the License is distributed on an "AS IS" BASIS,
     12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  *  See the License for the specific language governing permissions and
     14  *  limitations under the License.
     15  */
     16 
     17 /*
     18  * Qosti.h
     19  * DSP-BIOS Bridge driver support functions for TI OMAP processors.
     20  */
     21 
     22 
     23 #ifndef _RQOSTI_H
     24 #define _RQOSTI_H
     25 #include <dbapi.h>
     26 #include <qosti_dspdecl.h>
     27 #include <stdio.h>
     28 /* This must match QOS_TI_GetMemStatArg1::ALLHEAPS */
     29 #define KAllHeaps 0x100
     30 /* This must match QOS_TI_GetSharedScratchMsgArg2::ALL_SCRATCHGROUPS */
     31 #define KAllScratchGroups 0
     32 /*
     33  *  ======== QOS_TI_GetDynLoaderMemStatArg1 ========
     34  *  The enumeration defines the memory heap resources available for querying.
     35  */
     36 typedef enum QOS_TI_GetDynLoaderMemStatArg1 {
     37 	EDynloadDaram = 0,
     38 	EDynloadSaram = 1,
     39 	EDynloadExternal = 2,
     40 	EDynloadSram = 3
     41 } QOS_TI_GetDynLoaderMemStatArg1;
     42 
     43 /*
     44  *  ======== QOS_TI_GetSharedScratchMsgArg1 ========
     45  *  The enumeration defines the control command selector for *arg1*
     46  *  of the QOS_TI_GETSHAREDSCRATCH message.
     47  */
     48 typedef enum QOS_TI_GetSharedScratchMsgArg1 {
     49 
     50 	ESharedScratchAllHeaps,
     51 
     52 	ESharedScratchDaram,
     53 
     54 	ESharedScratchSaram
     55 } QOS_TI_GetSharedScratchMsgArg1;
     56 
     57 void DbgMsg(DWORD dwZone, char *szFormat, ...);
     58 
     59 /*  ============================================================================
     60   func   MsgToDsp
     61   desc   Send Message to DSP
     62   ret    DSP_SOK if Message was transferred to DSP successfully.
     63  ============================================================================*/
     64 
     65 DSP_STATUS QosTI_DspMsg(DWORD dwCmd, DWORD dwArg1, DWORD dwArg2, DWORD *dwOut1,
     66 																DWORD *dwOut2);
     67 
     68 /*  ========================================================================
     69   func   Create
     70   desc   Create the Qos service.
     71   ret    DSP_SOK if successfully created.
     72   ========================================================================*/
     73 
     74 DSP_STATUS QosTI_Create();
     75 
     76 /* ========================================================================
     77   func   Delete
     78   desc   Delete Qos service.
     79   ========================================================================*/
     80 
     81 void QosTI_Delete();
     82 
     83 /*  ========================================================================
     84   func   GetDynLoaderMemStat
     85   desc   Get the current memory utilization for heaps used in dynamic loading.
     86   arg   IN heapDesc:  value in range 0..4 => Heap Identifier
     87                   Valid values:
     88                         EDynloadDaram    = DYN_DARAM heap (internal)
     89                         EDynloadSaram    = DYN_SARAM heap (internal)
     90                         EDynloadExternal = DYN_EXTERNAL heap (external)
     91                         EDynloadSram     = DYN_SRAM heap (internal)
     92   arg   OUT memInitSize:             initially configured size of heap
     93   arg   OUT memUsed:                 size of heap in use (not free)
     94   arg   OUT memLargestFreeBlockSize: size of largest contiguous free memory
     95   arg   OUT memFreeBlocks:           number of free blocks in heap
     96   arg   OUT memAllocBlocks:          number of allocated blocks in heap
     97   ret   DSP_SOK if successful.
     98   ========================================================================*/
     99 
    100 DSP_STATUS QosTI_GetDynLoaderMemStat(UINT heapDesc, UINT *memInitSize,
    101 								UINT *memUsed, UINT *memLargestFreeBlockSize,
    102 								UINT *memFreeBlocks, UINT *memAllocBlocks);
    103 
    104 #endif				/* _RQOSTI_H*/
    105 
    106