[processor-sdk/performance-audio-sr.git] / psdk_cust / ipc_3_43_00_00_eng / docs / cdoc / ti / sdo / ipc / family / tda3xx / NotifyDriverMbx-src.html
diff --git a/psdk_cust/ipc_3_43_00_00_eng/docs/cdoc/ti/sdo/ipc/family/tda3xx/NotifyDriverMbx-src.html b/psdk_cust/ipc_3_43_00_00_eng/docs/cdoc/ti/sdo/ipc/family/tda3xx/NotifyDriverMbx-src.html
+++ /dev/null
@@ -1,217 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html><head><title>module ti.sdo.ipc.family.tda3xx.NotifyDriverMbx</title>
-<meta name="googlebot" content="noindex,nofollow">
-<link rel="stylesheet" type="text/css" href="../../../../../src.css"/>
-</head>
-<body>
-<pre class=src>
- 1 <span class="comment">/*
-</span> 2 <span class="comment"> * Copyright (c) 2014 Texas Instruments Incorporated - http://www.ti.com
-</span> 3 <span class="comment"> * All rights reserved.
-</span> 4 <span class="comment"> *
-</span> 5 <span class="comment"> * Redistribution and use in source and binary forms, with or without
-</span> 6 <span class="comment"> * modification, are permitted provided that the following conditions
-</span> 7 <span class="comment"> * are met:
-</span> 8 <span class="comment"> *
-</span> 9 <span class="comment"> * * Redistributions of source code must retain the above copyright
-</span> 10 <span class="comment"> * notice, this list of conditions and the following disclaimer.
-</span> 11 <span class="comment"> *
-</span> 12 <span class="comment"> * * Redistributions in binary form must reproduce the above copyright
-</span> 13 <span class="comment"> * notice, this list of conditions and the following disclaimer in the
-</span> 14 <span class="comment"> * documentation and/or other materials provided with the distribution.
-</span> 15 <span class="comment"> *
-</span> 16 <span class="comment"> * * Neither the name of Texas Instruments Incorporated nor the names of
-</span> 17 <span class="comment"> * its contributors may be used to endorse or promote products derived
-</span> 18 <span class="comment"> * from this software without specific prior written permission.
-</span> 19 <span class="comment"> *
-</span> 20 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-</span> 21 <span class="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-</span> 22 <span class="comment"> * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-</span> 23 <span class="comment"> * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-</span> 24 <span class="comment"> * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-</span> 25 <span class="comment"> * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-</span> 26 <span class="comment"> * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-</span> 27 <span class="comment"> * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-</span> 28 <span class="comment"> * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-</span> 29 <span class="comment"> * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-</span> 30 <span class="comment"> * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-</span> 31 <span class="comment"> */</span>
- 32
- 33 <span class="comment">/*
-</span> 34 <span class="comment"> * ======== NotifyDriverMbx.xdc ================
-</span> 35 <span class="comment"> */</span>
- 36 <span class=key>package</span> ti.sdo.ipc.family.tda3xx;
- 37
- 38 import ti.sdo.utils.MultiProc;
- 39 import ti.sdo.ipc.interfaces.INotifyDriver;
- 40 import ti.sdo.ipc.Notify;
- 41
- 42 import ti.sysbios.hal.Hwi;
- 43
- 44 import xdc.runtime.Assert;
- 45 import xdc.rov.ViewInfo;
- 46
- 47 <span class="xdoc">/*!
-</span> 48 <span class="xdoc"> * ======== NotifyDriverMbx ========
-</span> 49 <span class="xdoc"> * A notify driver based on hardware mailbox.
-</span> 50 <span class="xdoc"> *
-</span> 51 <span class="xdoc"> * This notify driver uses hardware mailboxes to transmit notifications
-</span> 52 <span class="xdoc"> * to remote processors. This driver implements the
-</span> 53 <span class="xdoc"> * {<b>@link</b> ti.sdo.ipc.interfaces.INotifyDriver} interface.
-</span> 54 <span class="xdoc"> *
-</span> 55 <span class="xdoc"> * Unlike the Notify drivers available in the {<b>@link</b> ti.sdo.ipc.notifyDrivers}
-</span> 56 <span class="xdoc"> * package, this driver is not generic and will only work with the TDA3XX
-</span> 57 <span class="xdoc"> * family of devices.
-</span> 58 <span class="xdoc"> *
-</span> 59 <span class="xdoc"> * The driver does not use shared memory. The event IDs and payloads are
-</span> 60 <span class="xdoc"> * transmitted via the hardware mailbox FIFO. The FIFO can hold up to 4
-</span> 61 <span class="xdoc"> * mailbox messages. The number of notification that can be stored in the
-</span> 62 <span class="xdoc"> * FIFO depends on the size of the payloads being sent via Notify_sendEvent.
-</span> 63 <span class="xdoc"> * If the payload is less than 0x7FFFFFF, then a single message will be
-</span> 64 <span class="xdoc"> * sent per notification. Otherwise, two mailbox messages are needed to
-</span> 65 <span class="xdoc"> * send the notification.
-</span> 66 <span class="xdoc"> *
-</span> 67 <span class="xdoc"> * The behavior of Notify_sendEvent when the FIFO is full depends on the
-</span> 68 <span class="xdoc"> * value of the 'waitClear' argument to the function. If 'waitClear' is
-</span> 69 <span class="xdoc"> * TRUE, then Notify_sendEvent will spin waiting for enough room in the
-</span> 70 <span class="xdoc"> * FIFO. If 'waitClear' is FALSE, then Notify_sendEvent will return
-</span> 71 <span class="xdoc"> * Notify_E_FAIL.
-</span> 72 <span class="xdoc"> *
-</span> 73 <span class="xdoc"> * The Notify_enableEvent and Notify_disableEvent APIs are not supported
-</span> 74 <span class="xdoc"> * by this driver.
-</span> 75 <span class="xdoc"> */</span>
- 76 @InstanceFinalize
- 77 @ModuleStartup
- 78
- 79 <span class=key>module</span> NotifyDriverMbx <span class=key>inherits</span> ti.sdo.ipc.interfaces.INotifyDriver
- 80 {
- 81 <span class="xdoc">/*! <b>@_nodoc</b> */</span>
- 82 <span class=key>metaonly</span> <span class=key>struct</span> BasicView {
- 83 String remoteProc;
- 84 }
- 85
- 86 <span class="xdoc">/*! <b>@_nodoc</b> */</span>
- 87 <span class=key>metaonly</span> <span class=key>struct</span> MailboxView {
- 88 String direction;
- 89 String mailboxAddr;
- 90 Int subMbxId;
- 91 Int msgCount;
- 92 Int mbxInterrupt;
- 93 }
- 94
- 95 <span class="xdoc">/*! <b>@_nodoc</b> */</span>
- 96 <span class=key>metaonly</span> <span class=key>struct</span> ModuleView {
- 97 NotifyDriverMbx.Handle drvHandles[NUM_CORES];
- 98 }
- 99
- 100 <span class="xdoc">/*!
-</span> 101 <span class="xdoc"> * ======== rovViewInfo ========
-</span> 102 <span class="xdoc"> */</span>
- 103 @Facet
- 104 <span class=key>metaonly</span> <span class=key>config</span> ViewInfo.Instance rovViewInfo =
- 105 ViewInfo.create({
- 106 viewMap: [
- 107 [<span class="string">'Basic'</span>,
- 108 {
- 109 type: ViewInfo.INSTANCE,
- 110 viewInitFxn: <span class="string">'viewInitBasic'</span>,
- 111 structName: <span class="string">'BasicView'</span>
- 112 }
- 113 ],
- 114 [<span class="string">'Mailbox'</span>,
- 115 {
- 116 type: ViewInfo.INSTANCE_DATA,
- 117 viewInitFxn: <span class="string">'viewInitMailbox'</span>,
- 118 structName: <span class="string">'MailboxView'</span>
- 119 }
- 120 ]
- 121 <span class=comment>// ['Module',</span>
- 122 <span class=comment>// {</span>
- 123 <span class=comment>// type: ViewInfo.MODULE,</span>
- 124 <span class=comment>// viewInitFxn: 'viewInitModule',</span>
- 125 <span class=comment>// structName: 'ModuleView'</span>
- 126 <span class=comment>// }</span>
- 127 <span class=comment>// ]</span>
- 128 ]
- 129 });
- 130
- 131 <span class="xdoc">/*!
-</span> 132 <span class="xdoc"> * Assert raised when trying to use Notify_[enable/disable]Event with
-</span> 133 <span class="xdoc"> * NotifyDriverMbx
-</span> 134 <span class="xdoc"> */</span>
- 135 <span class=key>config</span> Assert.Id A_notSupported = {
- 136 msg: <span class="string">"A_notSupported: [enable/disable]Event not supported"</span>
- 137 };
- 138
- 139 <span class=key>instance</span>:
- 140
- 141 <span class="xdoc">/*!
-</span> 142 <span class="xdoc"> * ======== remoteProcId ========
-</span> 143 <span class="xdoc"> * The MultiProc ID corresponding to the remote processor
-</span> 144 <span class="xdoc"> *
-</span> 145 <span class="xdoc"> * This is a required parameter, it is not optional.
-</span> 146 <span class="xdoc"> */</span>
- 147 <span class=key>config</span> UInt16 remoteProcId = MultiProc.INVALIDID;
- 148
- 149 <span class="xdoc">/*!
-</span> 150 <span class="xdoc"> * ======== intVectorId ========
-</span> 151 <span class="xdoc"> * Interrupt vector ID to be used by the driver.
-</span> 152 <span class="xdoc"> *
-</span> 153 <span class="xdoc"> * This parameter is only used by C66 targets.
-</span> 154 <span class="xdoc"> * This is a required parameter, it is not optional.
-</span> 155 <span class="xdoc"> */</span>
- 156 <span class=key>config</span> UInt intVectorId = ~1u;
- 157
- 158 <span class=key>internal</span>:
- 159 <span class="comment">/* total number of cores on SoC */</span>
- 160 <span class=key>const</span> UInt8 NUM_CORES = 5;
- 161
- 162 <span class="comment">/* number of cores in eve subsystem */</span>
- 163 <span class=key>const</span> UInt8 NUM_EVES = 1;
- 164
- 165 <span class="comment">/* number of internal eve mailboxes */</span>
- 166 <span class=key>const</span> UInt8 NUM_EVE_MBX = 2;
- 167
- 168 <span class="comment">/* number of system mailboxes (used by IPC) */</span>
- 169 <span class=key>const</span> UInt8 NUM_SYS_MBX = 1;
- 170
- 171 <span class="comment">/* Mailbox table for storing encoded base address, mailbox user ID,
-</span> 172 <span class="comment"> * and sub-mailbox index.
-</span> 173 <span class="comment"> */</span>
- 174 <span class=key>config</span> UInt32 mailboxTable[NUM_CORES * NUM_CORES];
- 175
- 176 <span class="comment">/* base address table for the mailbox subsystem */</span>
- 177 <span class="comment">/* TODO use the table in NotifySetup module */</span>
- 178 <span class=key>config</span> UInt32 mailboxBaseAddr[NUM_EVE_MBX + NUM_SYS_MBX];
- 179
- 180 <span class="comment">/* map MultiProc ID to virtual ID, virtId = procIdTable[procId] */</span>
- 181 <span class=key>config</span> UInt32 procIdTable[NUM_CORES];
- 182
- 183 <span class="xdoc">/*! define MultiProcID for each core to avoid doing this at runtime */</span>
- 184 <span class=key>config</span> UInt eve1ProcId = MultiProc.INVALIDID;
- 185 <span class=key>config</span> UInt dsp1ProcId = MultiProc.INVALIDID;
- 186 <span class=key>config</span> UInt dsp2ProcId = MultiProc.INVALIDID;
- 187 <span class=key>config</span> UInt ipu1_0ProcId = MultiProc.INVALIDID;
- 188 <span class=key>config</span> UInt ipu1_1ProcId = MultiProc.INVALIDID;
- 189
- 190 <span class="comment">/* plugs the interrupt and executes the callback functions */</span>
- 191 Void isr(UInt16 idx);
- 192
- 193 <span class="xdoc">/*! instance state structure */</span>
- 194 <span class=key>struct</span> Instance_State {
- 195 Bits32 evtRegMask; <span class="comment">/* local event register mask */</span>
- 196 Notify.Handle notifyHandle; <span class="comment">/* handle to front-end object */</span>
- 197 UInt16 remoteProcId; <span class="comment">/* remote processor ID */</span>
- 198 UInt16 remoteVirtId; <span class="comment">/* remote processor virtual ID */</span>
- 199 Int cpuIntrNum; <span class="comment">/* cpu interrupt number */</span>
- 200 }
- 201
- 202 <span class=key>struct</span> Module_State {
- 203 <span class="comment">/* Used by the isr to retrieve the driver handle. This table is
-</span> 204 <span class="comment"> * indexed by virtual processorID.
-</span> 205 <span class="comment"> */</span>
- 206 NotifyDriverMbx.Handle drvHandles[NUM_CORES];
- 207 };
- 208 }
-</pre>
-</body></html>