1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32 33 34 35
36
37 import ti.sdo.utils.MultiProc;
38
39 /*!
40 * ======== InterruptIpu ========
41 * IPU interrupt manager
42 */
43 module InterruptIpu inherits ti.sdo.ipc.notifyDrivers.IInterrupt
44 {
45 /*!
46 * Maximum number of cores
47 *
48 * @_nodoc
49 */
50 const UInt8 NUM_CORES = 5;
51
52 /*!
53 * Maximum number of EVE cores
54 *
55 * Although your device may have fewer EVE cores, `NUM_EVES` represents
56 * the maximum number of EVEs that may be present on a system.
57 */
58 const UInt8 NUM_EVES = 1;
59
60 /*!
61 * Maximum number of IPU cores
62 *
63 * @_nodoc
64 */
65 const UInt8 NUM_Ipu_CORES = 2;
66
67 /*!
68 * Number of internal EVE mailboxes
69 *
70 * Each EVE core has 3 mailboxes.
71 *
72 * Although your device may have fewer EVE cores, `NUM_EVE_MBX` represents
73 * the maximum number of EVE mailboxes (including all EVE cores) that may
74 * be present.
75 */
76 const UInt8 NUM_EVE_MBX = NUM_EVES * 2;
77
78 /*!
79 * Number of System mailboxes used by IPC
80 *
81 * This represents the number of System mailboxes used by IPC. IPC
82 * currently uses system mailboxes 5, 6, 7 and 8.
83 */
84 const UInt8 NUM_SYS_MBX = 1;
85
86 /*!
87 * Base address for the mailbox subsystems
88 *
89 * The `mailboxBaseAddr` array indicates the virtual addresses through
90 * which IPC will access various mailboxes.
91 *
92 * Note that these mailboxes are not accessible at their physical
93 * addresses (in the 0x4XXX_XXXX range). So default virtual addresses
94 * through which these mailboxes will be accessed are assigned in the
95 * 0x6XXX_XXXX range. Users must ensure these virtual addresses are
96 * correctly mapped to the 0x4XXX_XXXX-based phys addrs in each IPUs AMMU.
97 */
98 config UInt32 mailboxBaseAddr[NUM_EVE_MBX + NUM_SYS_MBX];
99
100 /*!
101 * Mailbox table for storing encoded Base Address, mailbox user Id,
102 * and sub-mailbox index.
103 *
104 * @_nodoc
105 */
106 config UInt32 mailboxTable[NUM_CORES * NUM_CORES];
107
108 /*!
109 * Base address for the Ducati CTRL register
110 */
111 config UInt32 ducatiCtrlBaseAddr = 0x40001000;
112
113 /*!
114 * Processor Id table
115 *
116 * @_nodoc
117 */
118 config UInt32 procIdTable[NUM_CORES];
119
120 internal:
121
122 /*! Statically retrieve procIds to avoid doing this at runtime */
123 config UInt eve1ProcId = MultiProc.INVALIDID;
124 config UInt dsp1ProcId = MultiProc.INVALIDID;
125 config UInt dsp2ProcId = MultiProc.INVALIDID;
126 config UInt ipu1_0ProcId = MultiProc.INVALIDID;
127 config UInt ipu1_1ProcId = MultiProc.INVALIDID;
128
129 /*! Function table */
130 struct FxnTable {
131 Fxn func;
132 UArg arg;
133 }
134
135 /*! Stub to be plugged for inter-ducati interrupts */
136 Void intShmDucatiStub(UArg arg);
137
138 /*! Stub to be plugged for intra-ducati interrupts */
139 Void intShmMbxStub(UInt16 idx);
140
141 struct Module_State {
142 143 144 145
146 FxnTable fxnTable[NUM_CORES];
147 };
148 }