1 /*
2  * dspbridge/mpu_api/inc/dbdcddef.h
3  *
4  * DSP-BIOS Bridge driver support functions for TI OMAP processors.
5  *
6  * Copyright (C) 2007 Texas Instruments, Inc.
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published
10  * by the Free Software Foundation version 2.1 of the License.
11  *
12  * This program is distributed .as is. WITHOUT ANY WARRANTY of any kind,
13  * whether express or implied; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  */
17 
18 /*
19  *  ======== dbdcddef.h ========
20  *  Description:
21  *      DCD (DSP/BIOS Bridge Configuration Database) constants and types.
22  *
23  *! Revision History:
24  *! ================
25  *! 03-Dec-2003 map Moved and renamed DCD_OBJTYPE to DSP_DCDOBJTYPE in dbdefs.h
26  *! 05-Dec-2002 map Added DCD_CREATELIBTYPE, DCD_EXECUTELIBTYPE,
27  					DCD_DELETELIBTYPE
28  *! 24-Feb-2003 kc  Updated REG entry names to DspBridge.
29  *! 22-Nov-2002 gp  Cleaned up comments, formatting.
30  *! 05-Aug-2002 jeh Added DCD_REGISTERFXN.
31  *! 19-Apr-2002 jeh Added DCD_LIBRARYTYPE to DCD_OBJTYPE, dynamic load
32  *!                 properties to DCD_NODEPROPS.
33  *! 29-Jul-2001 ag  Added extended procObj.
34  *! 13-Feb-2001 kc: Named changed from dcdbsdef.h dbdcddef.h.
35  *! 12-Dec-2000 jeh Added DAIS iAlg name to DCD_NODEPROPS.
36  *! 30-Oct-2000 kc: Added #defines for DCD_AutoRegister function.
37  *! 05-Sep-2000 jeh Added DCD_NODEPROPS.
38  *! 12-Aug-2000 kc: Incoroporated the use of types defined in <dspdefs.h>.
39  *! 29-Jul-2000 kc: Created.
40  */
41 
42 #ifndef DBDCDDEF_
43 #define DBDCDDEF_
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 #include <dbdefs.h>
50 #include <mgrpriv.h>		/* for MGR_PROCESSOREXTINFO */
51 
52 /*
53  *  The following defines are critical elements for the DCD module:
54  *
55  * - DCD_REGKEY enables DCD functions to locate registered DCD objects.
56  * - DCD_REGISTER_SECTION identifies the COFF section where the UUID of
57  *   registered DCD objects are stored.
58  */
59 #define DCD_REGKEY              "Software\\TexasInstruments\\DspBridge\\DCD"
60 #define DCD_REGISTER_SECTION    ".dcd_register"
61 
62 /* DCD Manager Object */
63 	struct DCD_MANAGER;
64 	/*typedef struct DCD_MANAGER *DCD_HMANAGER;*/
65 
66 /* DCD Node Properties */
67 	struct DCD_NODEPROPS {
68 		struct DSP_NDBPROPS ndbProps;
69 		UINT uMsgSegid;
70 		UINT uMsgNotifyType;
71 		PSTR pstrCreatePhaseFxn;
72 		PSTR pstrDeletePhaseFxn;
73 		PSTR pstrExecutePhaseFxn;
74 		PSTR pstrIAlgName;
75 
76 		/* Dynamic load properties */
77 		USHORT usLoadType;	/* Static, dynamic, overlay */
78 		ULONG ulDataMemSegMask;	/* Data memory requirements */
79 		ULONG ulCodeMemSegMask;	/* Code memory requirements */
80 	} ;
81 
82 /* DCD Generic Object Type */
83 	struct DCD_GENERICOBJ {
84 		union dcdObjUnion {
85 			struct DCD_NODEPROPS nodeObj;	/* node object. */
86 			struct DSP_PROCESSORINFO procObj;	/* processor object. */
87 			/* extended proc object (private) */
88 			struct MGR_PROCESSOREXTINFO extProcObj;
89 		} objData;
90 	} ;
91 
92 /* DCD Internal Callback Type */
93 	typedef DSP_STATUS(CDECL * DCD_REGISTERFXN) (IN struct DSP_UUID * pUuid,
94 						     IN DSP_DCDOBJTYPE objType,
95 						     IN PVOID handle);
96 
97 	typedef DSP_STATUS(CDECL * DCD_UNREGISTERFXN) (IN struct DSP_UUID * pUuid,
98 						       IN DSP_DCDOBJTYPE
99 						       objType);
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 #endif				/* DBDCDDEF_ */
105 
106