]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - sys/dev/pms/RefTisa/sallsdk/spc/saproto.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / sys / dev / pms / RefTisa / sallsdk / spc / saproto.h
1 /*******************************************************************************
2 *Copyright (c) 2014 PMC-Sierra, Inc.  All rights reserved. 
3 *
4 *Redistribution and use in source and binary forms, with or without modification, are permitted provided 
5 *that the following conditions are met: 
6 *1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
7 *following disclaimer. 
8 *2. Redistributions in binary form must reproduce the above copyright notice, 
9 *this list of conditions and the following disclaimer in the documentation and/or other materials provided
10 *with the distribution. 
11 *
12 *THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED 
13 *WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 *FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
16 *NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
17 *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
18 *LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
19 *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
20 *
21 * $FreeBSD$
22 *
23 ********************************************************************************/
24 /*******************************************************************************/
25 /*! \file saproto.h
26  *  \brief The file defines the function delcaration for internal used function
27  *
28  */
29 /******************************************************************************/
30
31 #ifndef  __SAPROTO_H__
32
33 #define __SAPROTO_H__
34
35 /* function declaration */
36 /*** SATIMER.C ***/
37 GLOBAL agsaTimerDesc_t *siTimerAdd(
38                                   agsaRoot_t      *agRoot,
39                                   bit32           timeout,
40                                   agsaCallback_t  pfnTimeout,
41                                   bit32           Event,
42                                   void *          pParm
43                                   );
44
45 GLOBAL void siTimerRemove(
46                           agsaRoot_t      *agRoot,
47                           agsaTimerDesc_t *pTimer
48                           );
49
50 GLOBAL void siTimerRemoveAll(agsaRoot_t   *agRoot);
51
52 /*** SAINIT.C ***/
53 GLOBAL bit32 siConfiguration(agsaRoot_t    *agRoot,
54                             mpiConfig_t    *mpiConfig,
55                             agsaHwConfig_t *hwConfig,
56                             agsaSwConfig_t *swConfig
57                             );
58
59 GLOBAL bit32 mpiInitialize(agsaRoot_t  *agRoot,
60                            mpiMemReq_t *memoryAllocated,
61                            mpiConfig_t *config
62                            );
63
64 GLOBAL bit32 mpiWaitForConfigTable(agsaRoot_t *agRoot,
65                                    spc_configMainDescriptor_t *config
66                                    );
67
68 GLOBAL void mpiUpdateIBQueueCfgTable(agsaRoot_t *agRoot,
69                                      spc_inboundQueueDescriptor_t *inQueueCfg,
70                                      bit32 QueueTableOffset,
71                                      bit8 pcibar
72                                      );
73
74 GLOBAL void mpiUpdateOBQueueCfgTable(agsaRoot_t *agRoot,
75                                      spc_outboundQueueDescriptor_t *outQueueCfg,
76                                      bit32 QueueTableOffset,
77                                      bit8 pcibar
78                                      );
79 GLOBAL void mpiUpdateFatalErrorTable(agsaRoot_t             *agRoot, 
80                               bit32                         FerrTableOffset,
81                               bit32                         lowerBaseAddress,
82                               bit32                         upperBaseAddress,
83                               bit32                         length,
84                               bit8                          pcibar);
85
86 GLOBAL bit32 mpiGetPCIBarIndex(agsaRoot_t *agRoot,
87                                bit32 pciBar
88                                );
89
90 GLOBAL bit32 mpiUnInitConfigTable(agsaRoot_t *agRoot);
91
92 GLOBAL void mpiReadGSTable(agsaRoot_t             *agRoot,
93                          spc_GSTableDescriptor_t  *mpiGSTable);
94
95 GLOBAL void siInitResources(agsaRoot_t              *agRoot,
96                             agsaMemoryRequirement_t *memoryAllocated,
97                             agsaHwConfig_t          *hwConfig,
98                             agsaSwConfig_t          *swConfig,
99                             bit32                   usecsPerTick);
100
101 GLOBAL void mpiReadCALTable(agsaRoot_t      *agRoot,
102                             spc_SPASTable_t *mpiCALTable,
103                             bit32           index);
104
105 GLOBAL void mpiWriteCALTable(agsaRoot_t     *agRoot,
106                             spc_SPASTable_t *mpiCALTable,
107                             bit32           index);
108
109 GLOBAL void mpiWriteCALAll(agsaRoot_t     *agRoot,
110                            agsaPhyAnalogSetupTable_t *mpiCALTable);
111
112 GLOBAL void mpiWrIntVecTable(agsaRoot_t *agRoot,
113                             mpiConfig_t* config
114                             );
115
116 GLOBAL void mpiWrAnalogSetupTable(agsaRoot_t *agRoot,
117                             mpiConfig_t      *config
118                             );
119
120
121 GLOBAL void mpiWrPhyAttrbTable(agsaRoot_t *agRoot,
122                             sasPhyAttribute_t *phyAttrib
123                             );
124
125 /*** SAPHY.C ***/
126 GLOBAL bit32 siPhyStopCB(
127                       agsaRoot_t    *agRoot,
128                       bit32         phyId,
129                       bit32         status,
130                       agsaContext_t *agContext,
131                       bit32         portId,
132                       bit32         npipps
133                       );
134
135 /*** SAPORT.C ***/
136 GLOBAL void siPortInvalid(
137                           agsaRoot_t  *agRoot,
138                           agsaPort_t  *pPort
139                           );
140
141 GLOBAL agsaDeviceDesc_t *siPortSASDeviceAdd(
142                                     agsaRoot_t        *agRoot,
143                                     agsaPort_t        *pPort,
144                                     agsaSASIdentify_t sasIdentify,
145                                     bit32             sasInitiator,
146                                     bit32             smpTimeout,
147                                     bit32             itNexusTimeout,
148                                     bit32             firstBurstSize,
149                                     bit8              dTypeSRate,
150                                     bit32              flag
151                                     );
152
153 GLOBAL void siPortDeviceRemove(
154                               agsaRoot_t        *agRoot,
155                               agsaPort_t        *pPort,
156                               agsaDeviceDesc_t  *pDevice,
157                               bit32             unmap
158                               );
159
160 GLOBAL agsaDeviceDesc_t *siPortSATADeviceAdd(
161                                               agsaRoot_t              *agRoot,
162                                               agsaPort_t              *pPort,
163                                               agsaDeviceDesc_t        *pSTPBridge,
164                                               bit8                    *pSignature,
165                                               bit8                    pm,
166                                               bit8                    pmField,
167                                               bit32                   smpReqTimeout,
168                                               bit32                   itNexusTimeout,
169                                               bit32                   firstBurstSize,
170                                               bit8                    dTypeSRate,
171                                               bit32                   flag
172                                               );
173
174 GLOBAL void siPortDeviceListRemove(
175                               agsaRoot_t        *agRoot,
176                               agsaPort_t        *pPort,
177                               agsaDeviceDesc_t  *pDevice
178                               );
179
180 /*** SASATA.C ***/
181 GLOBAL void siSATASignatureCpy(
182                                 bit8  *pDstSignature,
183                                 bit8  *pSrcSignature
184                                 );
185
186 /*** SASSP.C ***/
187
188 /*** SAHW.C ***/
189 #ifdef SA_ENABLE_HDA_FUNCTIONS
190 GLOBAL bit32 siHDAMode(
191                       agsaRoot_t  *agRoot,
192                       bit32       HDAMode,
193                       agsaFwImg_t *userFwImg
194                       );
195
196 GLOBAL bit32 siHDAMode_V(
197                       agsaRoot_t  *agRoot,
198                       bit32       HDAMode,
199                       agsaFwImg_t *userFwImg
200                       );
201
202 #endif
203
204 GLOBAL bit32 siBar4Shift(
205   agsaRoot_t  *agRoot,
206   bit32       shiftValue
207   );
208
209
210 GLOBAL bit32 siSoftReset(
211                        agsaRoot_t  *agRoot,
212                        bit32       signature
213                        );
214
215 GLOBAL bit32 siSpcSoftReset(
216                        agsaRoot_t  *agRoot,
217                        bit32       signature
218                        );
219
220 GLOBAL void siChipReset(
221                        agsaRoot_t  *agRoot
222                        );
223
224
225 GLOBAL bit32 siChipResetV(
226                        agsaRoot_t  *agRoot,
227                        bit32       signature
228                        );
229
230 GLOBAL void siChipResetSpc(
231                       agsaRoot_t  *agRoot
232                       );
233
234
235 /*** SAUTIL.C ***/
236 GLOBAL void siPrintBuffer(
237                           bit32                 debugLevel,
238                           siPrintType           type,
239                           char                  *header,
240                           void                  *a,
241                           bit32                 length
242                           );
243 int siIsHexDigit(char a);
244 GLOBAL FORCEINLINE void* si_memcpy(void *dst, void *src, bit32 count);
245 GLOBAL FORCEINLINE void* si_memset(void *s, int c, bit32 n);
246
247 GLOBAL void siDumpActiveIORequests(
248                           agsaRoot_t              *agRoot,
249                           bit32                   count);
250
251
252 GLOBAL void siClearActiveIORequests(   agsaRoot_t  *agRoot);
253
254 GLOBAL void siCountActiveIORequestsOnDevice( agsaRoot_t *agRoot,  bit32      device );
255 GLOBAL void siClearActiveIORequestsOnDevice( agsaRoot_t *agRoot,  bit32      device );
256
257
258
259 /*** SAINT.C ***/
260 GLOBAL void siEventPhyUpRcvd(
261                              agsaRoot_t  *agRoot,
262                              bit32       phyId,
263                              agsaSASIdentify_t *agSASIdentify,
264                              bit32       portId,
265                              bit32       npipps,
266                              bit8        linkRate
267                              );
268
269 GLOBAL void siEventSATASignatureRcvd(
270                                     agsaRoot_t    *agRoot,
271                                     bit32         phyId,
272                                     void          *pMsg,
273                                     bit32         portId,
274                                     bit32         npipps,
275                                     bit8          linkRate
276                                     );
277
278 GLOBAL FORCEINLINE void siIODone(
279                      agsaRoot_t          *agRoot,
280                      agsaIORequestDesc_t *pRequest,
281                      bit32               status,
282                      bit32               sspTag
283                      );
284
285 GLOBAL void siAbnormal(
286                        agsaRoot_t          *agRoot,
287                        agsaIORequestDesc_t *pRequest,
288                        bit32               status,
289                        bit32               param,
290                        bit32               sspTag
291                        );
292
293 GLOBAL void siDifAbnormal(
294                          agsaRoot_t          *agRoot,
295                          agsaIORequestDesc_t *pRequest,
296                          bit32               status,
297                          bit32               param,
298                          bit32               sspTag,
299                          bit32               *pMsg1
300                          );
301
302 GLOBAL void siEventSSPResponseWtDataRcvd(
303                                         agsaRoot_t                *agRoot,
304                                         agsaIORequestDesc_t       *pRequest,
305                                         agsaSSPResponseInfoUnit_t *pRespIU,
306                                         bit32                     param,
307                                         bit32                     sspTag
308                                         );
309
310 GLOBAL void siSMPRespRcvd(
311                           agsaRoot_t              *agRoot,
312                           agsaSMPCompletionRsp_t  *pIomb,
313                           bit32                   payloadSize,
314                           bit32                   tag
315                           );
316
317 GLOBAL void siEventSATAResponseWtDataRcvd(
318                                           agsaRoot_t          *agRoot,
319                                           agsaIORequestDesc_t *pRequest,
320                                           bit32               *agFirstDword,
321                                           bit32               *pResp,
322                                           bit32               lengthResp
323                                           );
324
325 /*** SADISC.C ***/
326 GLOBAL bit32 siRemoveDevHandle(
327                               agsaRoot_t      *agRoot,
328                               agsaDevHandle_t *agDevHandle
329                               );
330
331 /*** SAMPIRSP.C ***/
332 GLOBAL FORCEINLINE bit32 mpiParseOBIomb(
333                             agsaRoot_t            *agRoot,
334                             bit32                 *pMsg1,
335                             mpiMsgCategory_t      category,
336                             bit16                 opcode
337                             );
338
339 GLOBAL bit32 mpiEchoRsp(
340                         agsaRoot_t          *agRoot,
341                         agsaEchoRsp_t       *pIomb
342                         );
343
344 GLOBAL bit32 mpiGetNVMDataRsp(
345   agsaRoot_t          *agRoot,
346   agsaGetNVMDataRsp_t *pIomb
347   );
348
349 GLOBAL bit32 mpiHWevent(
350   agsaRoot_t        *agRoot,
351   agsaHWEvent_SPC_OUB_t  *pIomb
352   );
353
354 GLOBAL bit32 mpiPhyStartEvent(
355   agsaRoot_t        *agRoot,
356   agsaHWEvent_Phy_OUB_t  *pIomb
357   );
358
359 GLOBAL bit32 mpiPhyStopEvent(
360   agsaRoot_t        *agRoot,
361   agsaHWEvent_Phy_OUB_t  *pIomb
362   );
363
364 GLOBAL bit32 mpiSMPCompletion(
365   agsaRoot_t             *agRoot,
366   agsaSMPCompletionRsp_t *pIomb
367   );
368
369 GLOBAL bit32 mpiGetDevInfoRspSpc(
370   agsaRoot_t          *agRoot,
371   agsaGetDevInfoRsp_t *pIomb
372   );
373
374 GLOBAL bit32 mpiGetPhyProfileRsp(
375   agsaRoot_t             *agRoot,
376   agsaGetPhyProfileRspV_t *pIomb
377   );
378
379 GLOBAL bit32 mpiSetPhyProfileRsp(
380   agsaRoot_t             *agRoot,
381   agsaSetPhyProfileRspV_t *pIomb
382   );
383
384 GLOBAL bit32 mpiGetDevInfoRsp(
385   agsaRoot_t          *agRoot,
386   agsaGetDevInfoRspV_t *pIomb
387   );
388
389 GLOBAL bit32 mpiGetDevHandleRsp(
390   agsaRoot_t            *agRoot,
391   agsaGetDevHandleRsp_t *pIomb
392   );
393
394 GLOBAL bit32 mpiPhyCntrlRsp(
395   agsaRoot_t             *agRoot,
396   agsaLocalPhyCntrlRsp_t *pIomb
397   );
398
399 GLOBAL bit32 mpiDeviceRegRsp(
400   agsaRoot_t                  *agRoot,
401   agsaDeviceRegistrationRsp_t *pIomb
402   );
403
404 GLOBAL bit32 mpiDeregDevHandleRsp(
405   agsaRoot_t              *agRoot,
406   agsaDeregDevHandleRsp_t *pIomb
407   );
408
409 GLOBAL FORCEINLINE bit32 mpiSSPCompletion(
410   agsaRoot_t        *agRoot,
411   bit32             *pIomb
412   );
413
414 GLOBAL FORCEINLINE bit32 mpiSATACompletion(
415   agsaRoot_t        *agRoot,
416   bit32             *pIomb
417   );
418
419 GLOBAL bit32 mpiSSPEvent(
420   agsaRoot_t        *agRoot,
421   agsaSSPEventRsp_t *pIomb
422   );
423
424 GLOBAL bit32 mpiSATAEvent(
425   agsaRoot_t         *agRoot,
426   agsaSATAEventRsp_t *pIomb
427   );
428
429 GLOBAL bit32 mpiFwFlashUpdateRsp(
430   agsaRoot_t             *agRoot,
431   agsaFwFlashUpdateRsp_t *payload
432   );
433
434
435 GLOBAL bit32 mpiFwExtFlashUpdateRsp(
436   agsaRoot_t             *agRoot,
437   agsaFwFlashOpExtRsp_t *payload
438   );
439
440 #ifdef SPC_ENABLE_PROFILE
441 GLOBAL bit32 mpiFwProfileRsp(
442   agsaRoot_t             *agRoot,
443   agsaFwProfileRsp_t *payload
444   );
445 #endif
446 GLOBAL bit32 mpiSetNVMDataRsp(
447   agsaRoot_t          *agRoot,
448   agsaSetNVMDataRsp_t *pIomb
449   );
450
451 GLOBAL bit32 mpiSSPAbortRsp(
452   agsaRoot_t         *agRoot,
453   agsaSSPAbortRsp_t  *pIomb
454   );
455
456 GLOBAL bit32 mpiSATAAbortRsp(
457   agsaRoot_t         *agRoot,
458   agsaSATAAbortRsp_t *pIomb
459   );
460
461 GLOBAL bit32 mpiGPIORsp(
462   agsaRoot_t          *agRoot,
463   agsaGPIORsp_t       *pIomb
464   );
465
466 GLOBAL bit32 mpiGPIOEventRsp(
467   agsaRoot_t          *agRoot,
468   agsaGPIOEvent_t     *pIomb
469   );
470
471 GLOBAL bit32 mpiSASDiagStartEndRsp(
472   agsaRoot_t               *agRoot,
473   agsaSASDiagStartEndRsp_t *pIomb
474   );
475
476 GLOBAL bit32 mpiSASDiagExecuteRsp(
477   agsaRoot_t               *agRoot,
478   agsaSASDiagExecuteRsp_t  *pIomb
479   );
480
481 GLOBAL bit32 mpiGeneralEventRsp(
482   agsaRoot_t               *agRoot,
483   agsaGeneralEventRsp_t    *pIomb
484   );
485
486 GLOBAL bit32 mpiSSPReqReceivedNotify(
487   agsaRoot_t *agRoot,
488   agsaSSPReqReceivedNotify_t *pMsg1
489   );
490
491 GLOBAL bit32 mpiDeviceHandleArrived(
492   agsaRoot_t *agRoot,
493   agsaDeviceHandleArrivedNotify_t *pMsg1
494   );
495
496 GLOBAL bit32 mpiGetTimeStampRsp(
497   agsaRoot_t               *agRoot,
498   agsaGetTimeStampRsp_t    *pIomb
499   );
500
501 GLOBAL bit32 mpiSASHwEventAckRsp(
502   agsaRoot_t               *agRoot,
503   agsaSASHwEventAckRsp_t   *pIomb
504   );
505
506 GLOBAL bit32 mpiSetDevInfoRsp(
507   agsaRoot_t             *agRoot,
508   agsaSetDeviceInfoRsp_t *pIomb
509   );
510
511 GLOBAL bit32 mpiSetDeviceStateRsp(
512   agsaRoot_t              *agRoot,
513   agsaSetDeviceStateRsp_t *pIomb
514   );
515
516 GLOBAL bit32 mpiGetDeviceStateRsp(
517   agsaRoot_t             *agRoot,
518   agsaGetDeviceStateRsp_t *pIomb
519   );
520
521 GLOBAL bit32 mpiSasReInitializeRsp(
522   agsaRoot_t               *agRoot,
523   agsaSasReInitializeRsp_t *pIomb
524   );
525
526 GLOBAL bit32 mpiSetControllerConfigRsp(
527   agsaRoot_t               *agRoot,
528   agsaSetControllerConfigRsp_t *pIomb
529   );
530
531 GLOBAL bit32 mpiGetControllerConfigRsp(
532   agsaRoot_t                  *agRoot,
533   agsaGetControllerConfigRsp_t *pIomb
534   );
535
536 GLOBAL bit32  mpiKekManagementRsp(
537     agsaRoot_t               *agRoot,
538     agsaKekManagementRsp_t   *pIomb
539   );
540
541 GLOBAL bit32  mpiDekManagementRsp(
542     agsaRoot_t               *agRoot,
543     agsaDekManagementRsp_t   *pIomb
544   );
545
546 GLOBAL bit32 mpiOperatorManagementRsp(
547   agsaRoot_t               *agRoot,
548   agsaOperatorMangmenRsp_t *pIomb
549   );
550
551 GLOBAL bit32 mpiBistRsp(
552   agsaRoot_t           *agRoot,
553   agsaEncryptBistRsp_t *pIomb
554   );
555
556 GLOBAL bit32 mpiSetOperatorRsp(
557   agsaRoot_t               *agRoot,
558   agsaSetOperatorRsp_t    *pIomb
559   );
560
561 GLOBAL bit32 mpiGetOperatorRsp(
562   agsaRoot_t               *agRoot,
563   agsaGetOperatorRsp_t    *pIomb
564   );
565
566 GLOBAL bit32 mpiDifEncOffloadRsp(
567   agsaRoot_t               *agRoot,
568   agsaDifEncOffloadRspV_t  *pIomb
569   );
570
571 GLOBAL bit32 mpiGetVHistRsp(
572    agsaRoot_t          *agRoot,
573    agsaGetVHistCapRsp_t *pIomb
574   );
575
576
577 /*** SAMPICMD.C ***/
578 GLOBAL bit32 mpiBuildCmd(
579   agsaRoot_t        *agRoot,
580   bit32             *payload,
581   mpiMsgCategory_t  category,
582   bit16             opcode,
583   bit16             size,
584   bit32             queueNum
585   );
586
587
588 GLOBAL bit32 mpiVHistCapCmd(
589   agsaRoot_t    *agRoot,
590   agsaContext_t *agContext,
591   bit32         queueNum,
592   bit32         Channel,
593   bit32         NumBitLo,
594   bit32         NumBitHi,
595   bit32         PcieAddrLo,
596   bit32         PcieAddrHi,
597   bit32         ByteCount );
598
599 GLOBAL bit32 mpiEchoCmd(
600   agsaRoot_t          *agRoot,
601   bit32               queueNum,
602   agsaContext_t       *agContext,
603   void                *echoPayload
604   );
605
606 GLOBAL bit32 mpiGetPhyProfileCmd(
607   agsaRoot_t          *agRoot,
608   agsaContext_t       *agContext,
609   bit32                Operation,
610   bit32                PhyId,
611   void                *agCB
612   );
613
614 GLOBAL bit32 mpiSetPhyProfileCmd(
615   agsaRoot_t    *agRoot,
616   agsaContext_t *agContext,
617   bit32         Operation,
618   bit32         PhyId,
619   bit32         length,
620   void *        buffer
621   );
622
623 GLOBAL bit32 mpiPhyStartCmd(
624   agsaRoot_t          *agRoot,
625   bit32               tag,
626   bit32               phyId,
627   agsaPhyConfig_t     *agPhyConfig,
628   agsaSASIdentify_t   *agSASIdentify,
629   bit32               queueNum
630   );
631
632 GLOBAL bit32 mpiPhyStopCmd(
633   agsaRoot_t          *agRoot,
634   bit32               tag,
635   bit32               phyId,
636   bit32               queueNum
637   );
638
639 GLOBAL bit32 mpiSMPCmd(
640   agsaRoot_t             *agRoot,
641   void                   *pIomb,
642   bit16                  opcode,
643   agsaSMPCmd_t           *payload,
644   bit8                   inq,
645   bit8                   outq
646   );
647
648 GLOBAL bit32 mpiDeregDevHandleCmd(
649   agsaRoot_t          *agRoot,
650   agsaContext_t       *agContext,
651   agsaDeviceDesc_t    *pDevice,
652   bit32               deviceId,
653   bit32               portId,
654   bit32               queueNum
655   );
656
657 GLOBAL bit32 mpiGetDeviceHandleCmd(
658   agsaRoot_t          *agRoot,
659   agsaContext_t       *agContext,
660   bit32               portId,
661   bit32               flags,
662   bit32               maxDevs,
663   bit32               queueNum,
664   bit32               skipCount
665   );
666
667 GLOBAL bit32 mpiLocalPhyControlCmd(
668   agsaRoot_t          *agRoot,
669   bit32               tag,
670   bit32               phyId,
671   bit32               operation,
672   bit32               queueNum
673   );
674
675 GLOBAL bit32 mpiGetDeviceInfoCmd(
676   agsaRoot_t          *agRoot,
677   agsaContext_t       *agContext,
678   bit32               deviceid,
679   bit32               option,
680   bit32               queueNum
681   );
682
683 GLOBAL bit32 mpiDevHandleAcceptCmd(
684   agsaRoot_t          *agRoot,
685   agsaContext_t       *agContext,
686   bit32               ctag,
687   bit32               deviceId,
688   bit32               action,
689   bit32               flag,
690   bit32               itlnx,
691   bit32               queueNum
692   );
693
694 GLOBAL bit32 mpiPortControlRsp(
695   agsaRoot_t           *agRoot,
696   agsaPortControlRsp_t *pIomb
697   );
698
699 GLOBAL bit32 mpiSMPAbortRsp(
700   agsaRoot_t         *agRoot,
701   agsaSMPAbortRsp_t  *pIomb
702   );
703
704 GLOBAL bit32 siGetRegisterDumpGSM(
705   agsaRoot_t        *agRoot,
706   void              *destinationAddress,
707   bit32             regDumpNum,
708   bit32             regDumpOffset,
709   bit32             len
710   );
711
712 GLOBAL bit32 mpiNVMReadRegDumpCmd(
713   agsaRoot_t          *agRoot,
714   agsaContext_t       *agContext,
715   bit32               queueNum,
716   bit32               cpuId,
717   bit32               cOffset,
718   bit32               addrHi,
719   bit32               addrLo,
720   bit32               len
721   );
722
723 GLOBAL bit32 mpiDeviceHandleRemoval(
724   agsaRoot_t                *agRoot,
725   agsaDeviceHandleRemoval_t *pMsg1);
726
727 GLOBAL bit32 mpiGetNVMDCmd(
728   agsaRoot_t          *agRoot,
729   agsaContext_t       *agContext,
730   agsaNVMDData_t      *NVMDInfo,
731   bit32               queueNum
732   );
733
734 GLOBAL bit32 mpiSetNVMDCmd(
735   agsaRoot_t          *agRoot,
736   agsaContext_t       *agContext,
737   agsaNVMDData_t      *NVMDInfo,
738   bit32               queueNum
739   );
740
741 GLOBAL bit32 mpiSetDeviceInfoCmd(
742   agsaRoot_t          *agRoot,
743   agsaContext_t       *agContext,
744   bit32               deviceid,
745   bit32               option,
746   bit32               queueNum,
747   bit32               param,
748   ossaSetDeviceInfoCB_t   agCB
749   );
750
751 GLOBAL bit32 mpiSetDeviceStateCmd(
752   agsaRoot_t          *agRoot,
753   agsaContext_t       *agContext,
754   bit32               deviceId,
755   bit32               nds,
756   bit32               queueNum
757   );
758
759 GLOBAL bit32 mpiGetDeviceStateCmd(
760   agsaRoot_t          *agRoot,
761   agsaContext_t       *agContext,
762   bit32               deviceId,
763   bit32               queueNum
764   );
765
766 GLOBAL bit32 mpiSasReinitializeCmd(
767   agsaRoot_t        *agRoot,
768   agsaContext_t     *agContext,
769   agsaSASReconfig_t *agSASConfig,
770   bit32             queueNum
771   );
772
773 GLOBAL bit32 mpiSGpioRsp(
774   agsaRoot_t       *agRoot,
775   agsaSGpioRsp_t   *pInIomb
776   );
777
778 GLOBAL bit32 mpiPCIeDiagExecuteRsp(
779   agsaRoot_t    *agRoot,
780   void          *pInIomb
781   );
782
783 GLOBAL bit32 mpiGetDFEDataRsp(
784   agsaRoot_t    *agRoot,
785   void          *pInIomb
786   );
787
788 GLOBAL bit32 mpiGetVisDataRsp(
789   agsaRoot_t    *agRoot,
790   void          *pIomb
791   );
792
793 GLOBAL bit32 mpiSetControllerConfigCmd(
794   agsaRoot_t        *agRoot,
795   agsaContext_t     *agContext,
796   agsaSetControllerConfigCmd_t *agControllerConfig,
797   bit32             queueNum,
798   bit8              modePageContext
799   );
800
801 GLOBAL bit32 mpiGetControllerConfigCmd(
802    agsaRoot_t        *agRoot,
803    agsaContext_t     *agContext,
804    agsaGetControllerConfigCmd_t *agControllerConfig,
805    bit32             queueNum
806    );
807
808 GLOBAL bit32 mpiKekManagementCmd(
809    agsaRoot_t        *agRoot,
810    agsaContext_t     *agContext,
811    agsaKekManagementCmd_t *agKekMgmt,
812    bit32             queueNum
813    );
814
815 GLOBAL bit32 mpiDekManagementCmd(
816    agsaRoot_t        *agRoot,
817    agsaContext_t     *agContext,
818    agsaDekManagementCmd_t *agDekMgmt,
819    bit32             queueNum
820    );
821
822 GLOBAL bit32 mpiOperatorManagementCmd(
823   agsaRoot_t                *agRoot,
824   bit32                     queueNum,
825   agsaContext_t             *agContext,
826   agsaOperatorMangmentCmd_t *operatorcode );
827
828 GLOBAL bit32 mpiEncryptBistCmd(
829   agsaRoot_t        *agRoot,
830   bit32              queueNum,
831   agsaContext_t     *agContext,
832   agsaEncryptBist_t *bist );
833
834 GLOBAL bit32 mpiSetOperatorCmd(
835   agsaRoot_t                *agRoot,
836   bit32                      queueNum,
837   agsaContext_t             *agContext,
838   agsaSetOperatorCmd_t      *operatorcode
839   );
840
841 GLOBAL bit32 mpiGetOperatorCmd(
842   agsaRoot_t                *agRoot,
843   bit32                      queueNum,
844   agsaContext_t             *agContext,
845   agsaGetOperatorCmd_t      *operatorcode
846   );
847
848 GLOBAL bit32 mpiDIFEncryptionOffloadCmd(
849    agsaRoot_t                *agRoot,
850    agsaContext_t             *agContext,
851    bit32                     queueNum,
852    bit32                     op,
853    agsaDifEncPayload_t      *agDifEncOffload,
854    ossaDIFEncryptionOffloadStartCB_t agCB
855    );
856
857 bit32 siOurMSIXInterrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
858 void siDisableMSIXInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
859 void siReenableMSIXInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
860
861 bit32 siOurMSIInterrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
862 void siDisableMSIInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
863 void siReenableMSIInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
864
865
866 bit32 siOurLegacyInterrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
867 void siDisableLegacyInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
868 void siReenableLegacyInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
869
870 bit32 siOurMSIX_V_Interrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
871 bit32 siOurMSI_V_Interrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
872 bit32 siOurLegacy_V_Interrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
873
874 void siDisableMSIX_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
875 void siDisableMSI_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
876 void siDisableLegacy_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
877
878 void siReenableMSIX_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
879 void siReenableMSI_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
880 void siReenableLegacy_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex);
881
882
883 GLOBAL void siUpdateBarOffsetTable(agsaRoot_t     *agRoot, bit32   Spc_Type);
884
885 GLOBAL void siPciCpyMem(agsaRoot_t *agRoot,
886                        bit32 soffset,
887                        const void *dst,
888                        bit32 DWcount,
889                        bit32 busBaseNumber
890                        );
891
892 GLOBAL void siHalRegWriteExt(
893                              agsaRoot_t  *agRoot,
894                              bit32       generic,
895                              bit32       regOffset,
896                              bit32       regValue
897                              );
898
899 GLOBAL bit32 siHalRegReadExt( agsaRoot_t  *agRoot,
900                              bit32       generic,
901                              bit32       regOffset
902                              );
903
904 #ifdef SA_FW_TIMER_READS_STATUS
905 bit32 siReadControllerStatus(
906                                   agsaRoot_t      *agRoot,
907                                   bit32           Event,
908                                   void *          pParm
909                                   );
910 #endif /* SA_FW_TIMER_READS_STATUS */
911
912
913 #if defined(SALLSDK_DEBUG)
914 void sidump_hwConfig(agsaHwConfig_t  *hwConfig);
915 void sidump_swConfig(agsaSwConfig_t  *swConfig);
916 void sidump_Q_config( agsaQueueConfig_t *queueConfig );
917 #endif
918 GLOBAL bit32 siGetTableOffset(
919               agsaRoot_t *agRoot,
920               bit32  TableOffsetInTable
921               );
922
923 GLOBAL bit32 siGetPciBar(
924               agsaRoot_t *agRoot
925               );
926
927 GLOBAL bit32 siScratchDump(agsaRoot_t *agRoot);
928
929 void si_macro_check(agsaRoot_t *agRoot);
930
931 GLOBAL bit32 si_check_V_HDA(agsaRoot_t *agRoot);
932 GLOBAL bit32 si_check_V_Ready(agsaRoot_t *agRoot);
933
934 GLOBAL void siPCITriger(agsaRoot_t *agRoot);
935
936 GLOBAL void siCheckQs(agsaRoot_t *agRoot);
937
938
939 GLOBAL bit32 smIsCfg_V_ANY( agsaRoot_t *agRoot);
940 GLOBAL bit32 smIS_SPC( agsaRoot_t *agRoot);
941 GLOBAL bit32 smIS_HIL( agsaRoot_t *agRoot);
942 GLOBAL bit32 smIS_SPC6V( agsaRoot_t *agRoot);
943 GLOBAL bit32 smIS_SPC12V( agsaRoot_t *agRoot);
944 GLOBAL bit32 smIS_SPCV( agsaRoot_t *agRoot);
945 GLOBAL bit32 smIS_ENCRYPT( agsaRoot_t *agRoot);
946 GLOBAL bit32 smIS_SPCV_2_IOP( agsaRoot_t *agRoot);
947 #endif  /*__SAPROTO_H__ */