dskt2.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright 2013 by Texas Instruments Incorporated.
00003  *
00004  */
00005 
00006 /*
00007  * Copyright (c) 2012, Texas Instruments Incorporated
00008  * All rights reserved.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions
00012  * are met:
00013  *
00014  * *  Redistributions of source code must retain the above copyright
00015  *    notice, this list of conditions and the following disclaimer.
00016  *
00017  * *  Redistributions in binary form must reproduce the above copyright
00018  *    notice, this list of conditions and the following disclaimer in the
00019  *    documentation and/or other materials provided with the distribution.
00020  *
00021  * *  Neither the name of Texas Instruments Incorporated nor the names of
00022  *    its contributors may be used to endorse or promote products derived
00023  *    from this software without specific prior written permission.
00024  *
00025  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00026  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00027  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00028  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00029  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00032  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00033  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00034  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00035  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036  *
00037  */
00053 #ifndef DSKT2_
00054 #define DSKT2_
00055 
00056 #ifdef __cplusplus
00057 extern "C" {
00058 #endif
00059 
00062 
00063 #include <xdc/std.h>
00064 #include <xdc/runtime/IHeap.h>
00065 
00066 #include <ti/xdais/ialg.h>
00067 #include <ti/xdais/ires.h>
00068 #include <stddef.h>
00069 
00070 #define DSKT2_NUM_SCRATCH_GROUPS 20     
00074 #define DSKT2_MAX_MEM_ALLOCATION_SIZE  0xFFFF   
00078 /* NOTE: DO NOT Change NUM_SHAREDHEAPS*/
00079 #define DSKT2_NUM_SHAREDHEAPS 2
00080 
00089 #define DSKT2_MODNAME  "ti.sdo.fc.dskt2"
00090 
00098 typedef Void (*DSKT2_CacheWBInvFxn)(Ptr blockPtr, size_t byteCnt, Bool wait);
00099 
00100 
00104 extern __FAR__ DSKT2_CacheWBInvFxn DSKT2_cacheWBInvFxn;
00105 
00106 /* TODO: Should these be declared here ? User should know they can initialize
00107          these entries */
00108 extern xdc_runtime_IHeap_Handle DSKT2_daram0Heap;
00109 extern xdc_runtime_IHeap_Handle DSKT2_daram1Heap;
00110 extern xdc_runtime_IHeap_Handle DSKT2_daram2Heap;
00111 extern xdc_runtime_IHeap_Handle DSKT2_saram0Heap;
00112 extern xdc_runtime_IHeap_Handle DSKT2_saram1Heap;
00113 extern xdc_runtime_IHeap_Handle DSKT2_saram2Heap;
00114 extern xdc_runtime_IHeap_Handle DSKT2_iprogHeap;
00115 extern xdc_runtime_IHeap_Handle DSKT2_eprogHeap;
00116 extern xdc_runtime_IHeap_Handle DSKT2_esdataHeap;
00117 extern xdc_runtime_IHeap_Handle _DSKT2_heap;
00118 
00119 extern __FAR__ UInt _DSKT2_ALLOW_EXTERNAL_SCRATCH;
00120 
00121 extern UInt _DSKT2_DARAM_SCRATCH_SIZES[];
00122 extern UInt _DSKT2_SARAM_SCRATCH_SIZES[];
00123 
00124 /* ENDTODO */
00125 
00129 extern __FAR__ Bool ti_sdo_fc_dskt2_DSKT2_disableLazyDeactivate;
00130 
00195 extern Void DSKT2_activateAlg(Int scratchMutexId, IALG_Handle alg);
00196 
00197 
00230 extern Int DSKT2_controlAlg(IALG_Handle alg, IALG_Cmd cmd,
00231     IALG_Status *status);
00232 
00233 
00312 extern IALG_Handle DSKT2_createAlg(Int scratchMutexId, IALG_Fxns * fxns,
00313     IALG_Handle parent, IALG_Params * params);
00314 
00315 
00409 extern IALG_Handle DSKT2_createAlg2(Int scratchMutexId, IALG_Fxns * fxns,
00410         IALG_Handle parent, IALG_Params * params,
00411         xdc_runtime_IHeap_Handle extHeapId);
00412 
00413 
00489 IALG_Handle DSKT2_createAlgExt(Int scratchId, IALG_Fxns * fxns,
00490         IALG_Handle parent, IALG_Params * params);
00491 
00544 extern Void DSKT2_deactivateAlg(Int scratchMutexId, IALG_Handle alg);
00545 
00557 extern Int DSKT2_deactivateAll();
00558 
00593 extern Bool DSKT2_freeAlg(Int scratchMutexId, IALG_Handle alg);
00594 
00624 extern Bool DSKT2_allocScratch(IALG_Handle alg,Int mutexId, IALG_MemRec *memTab,
00625         Int numRecs);
00626 
00627 extern Int DSKT2_getScratchId(IALG_Handle alg);
00628 
00652 extern Void DSKT2_freeScratch(Int mutexId, Void *addr, UInt size);
00653 
00666 extern Bool DSKT2_allocPersistent(IALG_MemRec *memTab, Int numRecs);
00667 
00680 extern Void DSKT2_freePersistent(IALG_MemRec *memTab, Int numRecs);
00681 
00682 /*
00683  * Functions below are friend functions that are used by RMAN and some IRES
00684  * implementations to cooperatively yield to higher priority algorithms.
00685  */
00693 Void DSKT2_yield(IRES_YieldResourceType resource,
00694         IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00695 
00700 IRES_YieldArgs DSKT2_getYieldArgs(Int scratchId);
00701 
00706 IRES_YieldArgs DSKT2_setYieldArgs(Int scratchId, Bool yieldFlag);
00707 
00708 
00709 Void DSKT2_contextRelease(IRES_YieldResourceType resource,
00710         IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00711 
00712 Void DSKT2_contextAcquire(IRES_YieldResourceType resource,
00713         IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00714 
00720 Int DSKT2_getNumAlgs();
00721 
00732 Int DSKT2_getAlgList(IALG_Handle * algList, Int * scratchIds);
00733 
00737 
00738 #ifdef __cplusplus
00739 }
00740 #endif /* extern "C" */
00741 
00742 #endif  /* DSKT2_ */
00743 /*
00744  *  @(#) ti.sdo.fc.dskt2; 1, 0, 4,1; 6-12-2013 19:56:10; /db/atree/library/trees/fc/fc-t09/src/ xlibrary
00745 
00746  */
00747 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2013, Texas Instruments Incorporated