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