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