xref: /freebsd/sys/dev/pms/RefTisa/sallsdk/api/saosapi.h (revision dd41de95a84d979615a2ef11df6850622bf6184e)
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 saosapi.h
26  *  \brief The file defines the declaration of OS APIs
27  *
28  */
29 /*******************************************************************************/
30 
31 #ifndef  __SSDKOSAPI_H__
32 #define __SSDKOSAPI_H__
33 
34 #ifdef LINUX
35 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
36 
37 #ifdef FORCEINLINE
38 #undef FORCEINLINE
39 #define FORCEINLINE
40 #endif
41 
42 #endif
43 #endif
44 
45 /***************************************************************************
46  * Definition of register access related functions start                   *
47  ***************************************************************************/
48 #ifndef ossaHwRegRead
49 GLOBAL FORCEINLINE
50 bit32 ossaHwRegRead(
51                           agsaRoot_t  *agRoot,
52                           bit32       regOffset
53                           );
54 #endif
55 
56 #ifndef ossaHwRegWrite
57 GLOBAL FORCEINLINE
58 void ossaHwRegWrite(
59                           agsaRoot_t  *agRoot,
60                           bit32       regOffset,
61                           bit32       regValue
62                           );
63 #endif
64 
65 #ifndef ossaHwRegReadExt
66 GLOBAL FORCEINLINE
67 bit32 ossaHwRegReadExt(
68                              agsaRoot_t  *agRoot,
69                              bit32       busBaseNumber,
70                              bit32       regOffset
71                              );
72 #endif
73 
74 #ifndef ossaHwRegWriteExt
75 GLOBAL FORCEINLINE
76 void ossaHwRegWriteExt(
77                              agsaRoot_t  *agRoot,
78                              bit32       busBaseNumber,
79                              bit32       regOffset,
80                              bit32       regValue
81                              );
82 #endif
83 
84 #ifndef ossaHwRegReadConfig32
85 osGLOBAL bit32 ossaHwRegReadConfig32(
86               agsaRoot_t  *agRoot,
87               bit32       regOffset
88               );
89 #endif
90 
91 
92 /***************************************************************************
93  * Definition of register access related functions end                     *
94  ***************************************************************************/
95 
96 /***************************************************************************
97  * Definition of thread related functions start                            *
98  ***************************************************************************/
99 #ifndef ossaSingleThreadedEnter
100 GLOBAL FORCEINLINE void ossaSingleThreadedEnter(
101                                     agsaRoot_t  *agRoot,
102                                     bit32       syncLockId
103                                    );
104 #endif
105 
106 #ifndef ossaSingleThreadedLeave
107 GLOBAL FORCEINLINE void ossaSingleThreadedLeave(
108                                     agsaRoot_t  *agRoot,
109                                     bit32       syncLockId
110                                    );
111 #endif
112 
113 #ifndef ossaStallThread
114 GLOBAL void ossaStallThread(
115                             agsaRoot_t  *agRoot,
116                             bit32       microseconds
117                             );
118 #endif
119 /***************************************************************************
120  * Definition of thread related functions end                              *
121  ***************************************************************************/
122 
123 /***************************************************************************
124  * Definition of interrupt related functions start                         *
125  ***************************************************************************/
126 #ifndef ossaDisableInterrupts
127 #define ossaDisableInterrupts(agRoot, interruptVectorIndex) \
128 do                                                          \
129 {                                                           \
130   agsaLLRoot_t  *saROOT = (agsaLLRoot_t *)(agRoot->sdkData);\
131   saROOT->DisableInterrupts(agRoot, interruptVectorIndex); \
132 } while(0)
133 #endif
134 
135 #ifndef ossaReenableInterrupts
136 #define ossaReenableInterrupts(agRoot, interruptVectorIndex) \
137 do                                                           \
138 {                                                            \
139   agsaLLRoot_t  *saROOT = (agsaLLRoot_t *)(agRoot->sdkData); \
140   saROOT->ReEnableInterrupts(agRoot, interruptVectorIndex); \
141 } while(0)
142 #endif
143 
144 /***************************************************************************
145  * Definition of interrupt related functions end                           *
146  ***************************************************************************/
147 
148 /***************************************************************************
149  * Definition of cache related functions start                             *
150  ***************************************************************************/
151 #ifndef ossaCacheInvalidate
152 GLOBAL FORCEINLINE void ossaCacheInvalidate(
153                                 agsaRoot_t  *agRoot,
154                                 void        *osMemHandle,
155                                 void        *virtPtr,
156                                 bit32       length
157                                 );
158 #endif
159 
160 #ifndef ossaCacheFlush
161 GLOBAL FORCEINLINE void ossaCacheFlush(
162                           agsaRoot_t  *agRoot,
163                           void        *osMemHandle,
164                           void        *virtPtr,
165                           bit32       length
166                           );
167 #endif
168 
169 #ifndef ossaCachePreFlush
170 GLOBAL FORCEINLINE void ossaCachePreFlush(
171                               agsaRoot_t  *agRoot,
172                               void        *osMemHandle,
173                               void        *virtPtr,
174                               bit32       length
175                               );
176 #endif
177 
178 /***************************************************************************
179  * Definition of cache related functions end                               *
180  ***************************************************************************/
181 
182 /***************************************************************************
183  * Definition of hardware related functions start                          *
184  ***************************************************************************/
185 #ifndef ossaHwCB
186 GLOBAL void ossaHwCB(
187                     agsaRoot_t        *agRoot,
188                     agsaPortContext_t *agPortContext,
189                     bit32             event,
190                     bit32             eventParm1,
191                     void              *eventParm2,
192                     void              *eventParm3
193                     );
194 #endif
195 
196 #ifndef ossaHwEventAckCB
197 GLOBAL void ossaHwEventAckCB(
198                             agsaRoot_t    *agRoot,
199                             agsaContext_t *agContext,
200                             bit32         status
201                             );
202 #endif
203 /***************************************************************************
204  * Definition of hardware related functions end                            *
205  ***************************************************************************/
206 
207 /***************************************************************************
208  * Definition of SATA related functions start                              *
209  ***************************************************************************/
210 #ifndef ossaSATACompleted
211 GLOBAL void ossaSATACompleted(
212                               agsaRoot_t        *agRoot,
213                               agsaIORequest_t   *agIORequest,
214                               bit32             agIOStatus,
215                               void              *agFirstDword,
216                               bit32             agIOInfoLen,
217                               void              *agParam
218                               );
219 
220 #endif
221 
222 #ifndef ossaSATAEvent
223 GLOBAL void ossaSATAEvent(
224                         agsaRoot_t              *agRoot,
225                         agsaIORequest_t         *agIORequest,
226                         agsaPortContext_t       *agPortContext,
227                         agsaDevHandle_t         *agDevHandle,
228                         bit32                   event,
229                         bit32                   agIOInfoLen,
230                         void                    *agParam
231                         );
232 #endif
233 
234 #ifndef ossaSATAAbortCB
235  GLOBAL void  ossaSATAAbortCB(
236                         agsaRoot_t               *agRoot,
237                         agsaIORequest_t          *agIORequest,
238                         bit32                    flag,
239                         bit32                    status
240                         );
241 #endif
242 
243 /***************************************************************************
244  * Definition of SATA related functions end                                *
245  ***************************************************************************/
246 
247 
248 /***************************************************************************
249  * Definition of SAS related functions start                               *
250  ***************************************************************************/
251 #ifndef ossaSSPEvent
252 GLOBAL void ossaSSPEvent(
253                   agsaRoot_t        *agRoot,
254                   agsaIORequest_t   *agIORequest,
255                   agsaPortContext_t *agPortContext,
256                   agsaDevHandle_t   *agDevHandle,
257                   bit32             event,
258                   bit16             sspTag,
259                   bit32             agIOInfoLen,
260                   void              *agParam
261                   );
262 #endif
263 
264 osGLOBAL void
265 ossaSMPIoctlCompleted(
266 				 agsaRoot_t            *agRoot,
267                  agsaIORequest_t       *agIORequest,
268                  bit32                 agIOStatus,
269                  bit32                 agIOInfoLen,
270                  agsaFrameHandle_t     agFrameHandle
271                  );
272 
273 #ifndef ossaSMPCompleted
274 GLOBAL void ossaSMPCompleted(
275                             agsaRoot_t            *agRoot,
276                             agsaIORequest_t       *agIORequest,
277                             bit32                 agIOStatus,
278                             bit32                 agIOInfoLen,
279                             agsaFrameHandle_t     agFrameHandle
280                             );
281 #endif
282 
283 #ifndef ossaSMPReqReceived
284 GLOBAL void ossaSMPReqReceived(
285                               agsaRoot_t            *agRoot,
286                               agsaDevHandle_t       *agDevHandle,
287                               agsaFrameHandle_t     agFrameHandle,
288                               bit32                 agFrameLength,
289                               bit32                 phyId
290                               );
291 #endif
292 
293 #ifndef ossaSSPCompleted
294 GLOBAL FORCEINLINE void ossaSSPCompleted(
295                             agsaRoot_t          *agRoot,
296                             agsaIORequest_t     *agIORequest,
297                             bit32               agIOStatus,
298                             bit32               agIOInfoLen,
299                             void                *agParam,
300                             bit16               sspTag,
301                             bit32               agOtherInfo
302                             );
303 #endif
304 
305 #ifdef FAST_IO_TEST
306 GLOBAL void ossaFastSSPCompleted(
307                             agsaRoot_t          *agRoot,
308                             agsaIORequest_t     *cbArg,
309                             bit32               agIOStatus,
310                             bit32               agIOInfoLen,
311                             void                *agParam,
312                             bit16               sspTag,
313                             bit32               agOtherInfo
314                             );
315 #endif
316 
317 #ifndef ossaSSPReqReceived
318 GLOBAL void ossaSSPReqReceived(
319                               agsaRoot_t        *agRoot,
320                               agsaDevHandle_t   *agDevHandle,
321                               agsaFrameHandle_t agFrameHandle,
322                               bit16             agInitiatorTag,
323                               bit32             parameter,
324                               bit32             agFrameLen
325                               );
326 #endif
327 
328 osGLOBAL void
329 ossaSSPIoctlCompleted(
330                 agsaRoot_t                        *agRoot,
331                 agsaIORequest_t           *agIORequest,
332                 bit32                             agIOStatus,
333                 bit32                             agIOInfoLen,
334                 void                              *agParam,
335                 bit16                             sspTag,
336                 bit32                             agOtherInfo
337                 );
338 
339 
340 #ifndef ossaSSPAbortCB
341 GLOBAL void ossaSSPAbortCB(
342                         agsaRoot_t              *agRoot,
343                         agsaIORequest_t         *agIORequest,
344                         bit32                   flag,
345                         bit32                   status
346                         );
347 #endif
348 
349 #ifndef ossaSMPAbortCB
350 GLOBAL void ossaSMPAbortCB(
351                         agsaRoot_t              *agRoot,
352                         agsaIORequest_t         *agIORequest,
353                         bit32                   flag,
354                         bit32                   status
355                         );
356 #endif
357 
358 #ifndef ossaReconfigSASParamsCB
359 GLOBAL void ossaReconfigSASParamsCB(
360                         agsaRoot_t        *agRoot,
361                         agsaContext_t     *agContext,
362                         bit32             status,
363                         agsaSASReconfig_t *agSASConfig
364 );
365 #endif
366 
367 /***************************************************************************
368  * Definition of SAS related functions end                                 *
369  ***************************************************************************/
370 
371 /***************************************************************************
372  * Definition of Discovery related functions start                         *
373  ***************************************************************************/
374 #ifndef ossaDiscoverSataCB
375 GLOBAL void ossaDiscoverSataCB(
376                               agsaRoot_t          *agRoot,
377                               agsaPortContext_t   *agPortContext,
378                               bit32               event,
379                               void                *pParm1,
380                               void                *pParm2
381                               );
382 #endif
383 
384 #ifndef ossaDiscoverSasCB
385 GLOBAL void ossaDiscoverSasCB(
386                               agsaRoot_t          *agRoot,
387                               agsaPortContext_t   *agPortContext,
388                               bit32               event,
389                               void                *pParm1,
390                               void                *pParm2
391                               );
392 #endif
393 
394 #ifndef ossaDeviceHandleAccept
395 GLOBAL bit32 ossaDeviceHandleAccept(
396                                     agsaRoot_t          *agRoot,
397                                     agsaDevHandle_t     *agDevHandle,
398                                     agsaSASDeviceInfo_t *agDeviceInfo,
399                                     agsaPortContext_t   *agPortContext,
400                                     bit32               *hostAssignedDeviceId
401                                     );
402 #endif
403 
404 #ifndef ossaGetDeviceHandlesCB
405 GLOBAL void ossaGetDeviceHandlesCB(
406                                 agsaRoot_t        *agRoot,
407                                 agsaContext_t     *agContext,
408                                 agsaPortContext_t *agPortContext,
409                                 agsaDevHandle_t   *agDev[],
410                                 bit32             validDevs
411                                 );
412 #endif
413 
414 #ifndef ossaGetDeviceInfoCB
415 GLOBAL void ossaGetDeviceInfoCB(
416                                 agsaRoot_t        *agRoot,
417                                 agsaContext_t     *agContext,
418                                 agsaDevHandle_t   *agDevHandle,
419                                 bit32             status,
420                                 void              *agInfo
421                                 );
422 #endif
423 
424 #ifndef ossaDeviceHandleRemovedEvent
425 GLOBAL void ossaDeviceHandleRemovedEvent (
426                                 agsaRoot_t        *agRoot,
427                                 agsaDevHandle_t   *agDevHandle,
428                                 agsaPortContext_t *agPortContext
429                                 );
430 #endif
431 
432 #ifndef ossaGetDeviceStateCB
433 GLOBAL void ossaGetDeviceStateCB(
434                                 agsaRoot_t        *agRoot,
435                                 agsaContext_t     *agContext,
436                                 agsaDevHandle_t   *agDevHandle,
437                                 bit32             status,
438                                 bit32             deviceState
439                                 );
440 #endif
441 
442 #ifndef ossaSetDeviceInfoCB
443 GLOBAL void ossaSetDeviceInfoCB(
444                                 agsaRoot_t        *agRoot,
445                                 agsaContext_t     *agContext,
446                                 agsaDevHandle_t   *agDevHandle,
447                                 bit32             status,
448                                 bit32             option,
449                                 bit32             param
450                                 );
451 #endif
452 
453 #ifndef ossaSetDeviceStateCB
454 GLOBAL void ossaSetDeviceStateCB(
455                                 agsaRoot_t        *agRoot,
456                                 agsaContext_t     *agContext,
457                                 agsaDevHandle_t   *agDevHandle,
458                                 bit32             status,
459                                 bit32             newDeviceState,
460                                 bit32             previousDeviceState
461                                 );
462 #endif
463 
464 /***************************************************************************
465  * Definition of Discovery related functions end                           *
466  ***************************************************************************/
467 
468 /***************************************************************************
469  * Definition of Misc. related functions start                             *
470  ***************************************************************************/
471 
472 #ifndef ossaTimeStamp
473 GLOBAL bit32 ossaTimeStamp(agsaRoot_t     *agRoot);
474 #endif /* ossaTimeStamp */
475 
476 #ifndef ossaTimeStamp64
477 GLOBAL bit64 ossaTimeStamp64(agsaRoot_t     *agRoot);
478 #endif /* ossaTimeStamp64 */
479 
480 
481 #ifndef ossaLocalPhyControlCB
482 GLOBAL void ossaLocalPhyControlCB(
483                       agsaRoot_t     *agRoot,
484                       agsaContext_t  *agContext,
485                       bit32          phyId,
486                       bit32          phyOperation,
487                       bit32          status,
488                       void           *parm);
489 #endif
490 
491 #ifndef ossaGetPhyProfileCB
492 GLOBAL void   ossaGetPhyProfileCB(
493                       agsaRoot_t    *agRoot,
494                       agsaContext_t *agContext,
495                       bit32         status,
496                       bit32         ppc,
497                       bit32         phyID,
498                       void          *parm );
499 #endif
500 
501 #ifndef ossaSetPhyProfileCB
502 GLOBAL void ossaSetPhyProfileCB(
503                      agsaRoot_t    *agRoot,
504                      agsaContext_t *agContext,
505                      bit32         status,
506                      bit32         ppc,
507                      bit32         phyID,
508                      void          *parm );
509 #endif
510 
511 #ifndef ossaFwFlashUpdateCB
512 GLOBAL void ossaFwFlashUpdateCB(
513                       agsaRoot_t    *agRoot,
514                       agsaContext_t *agContext,
515                       bit32         status);
516 #endif
517 
518 #ifndef ossaFlashExtExecuteCB
519 GLOBAL void   ossaFlashExtExecuteCB(
520                       agsaRoot_t               *agRoot,
521                       agsaContext_t            *agContext,
522                       bit32                    status,
523                       bit32                    command,
524                       agsaFlashExtResponse_t  *agFlashExtRsp);
525 
526 #endif
527 
528 #ifdef SPC_ENABLE_PROFILE
529 GLOBAL void ossaFwProfileCB(
530                       agsaRoot_t    *agRoot,
531                       agsaContext_t *agContext,
532                       bit32         status,
533                       bit32         len
534                       );
535 
536 #endif
537 #ifndef ossaEchoCB
538 GLOBAL void ossaEchoCB(
539                       agsaRoot_t    *agRoot,
540                       agsaContext_t *agContext,
541                       void          *echoPayload);
542 #endif
543 
544 #ifndef ossaGpioResponseCB
545 GLOBAL void ossaGpioResponseCB(
546                       agsaRoot_t               *agRoot,
547                       agsaContext_t            *agContext,
548                       bit32                    status,
549                       bit32                    gpioReadValue,
550                       agsaGpioPinSetupInfo_t   *gpioPinSetupInfo,
551                       agsaGpioEventSetupInfo_t *gpioEventSetupInfo);
552 #endif
553 
554 #ifndef ossaGpioEvent
555 GLOBAL void ossaGpioEvent(
556                       agsaRoot_t    *agRoot,
557                       bit32         gpioEvent);
558 #endif
559 
560 #ifndef ossaSASDiagExecuteCB
561 GLOBAL void ossaSASDiagExecuteCB(
562                       agsaRoot_t      *agRoot,
563                       agsaContext_t   *agContext,
564                       bit32           status,
565                       bit32           command,
566                       bit32           reportData);
567 #endif
568 
569 #ifndef ossaSASDiagStartEndCB
570 GLOBAL void ossaSASDiagStartEndCB(
571                       agsaRoot_t      *agRoot,
572                       agsaContext_t   *agContext,
573                       bit32           status);
574 #endif
575 
576 #ifndef ossaGetTimeStampCB
577 GLOBAL void ossaGetTimeStampCB(
578                       agsaRoot_t      *agRoot,
579                       agsaContext_t   *agContext,
580                       bit32           timeStampLower,
581                       bit32           timeStampUpper);
582 #endif
583 
584 #ifndef ossaPortControlCB
585 GLOBAL void ossaPortControlCB(
586                       agsaRoot_t        *agRoot,
587                       agsaContext_t     *agContext,
588                       agsaPortContext_t *agPortContext,
589                       bit32             portOperation,
590                       bit32             status);
591 #endif
592 
593 #ifndef ossaGeneralEvent
594 GLOBAL void ossaGeneralEvent(
595                       agsaRoot_t        *agRoot,
596                       bit32             status,
597                       agsaContext_t     *agContext,
598                       bit32             *msg);
599 #endif
600 
601 #ifndef ossaGetRegisterDumpCB
602 void ossaGetRegisterDumpCB(
603                       agsaRoot_t        *agRoot,
604                       agsaContext_t     *agContext,
605                       bit32             status);
606 #endif
607 
608 GLOBAL void ossaGetForensicDataCB (
609         agsaRoot_t          *agRoot,
610         agsaContext_t       *agContext,
611         bit32                status,
612         agsaForensicData_t  *forensicData
613         );
614 
615 
616 #ifndef ossaGetNVMDResponseCB
617 GLOBAL void ossaGetNVMDResponseCB(
618                       agsaRoot_t        *agRoot,
619                       agsaContext_t     *agContext,
620                       bit32             status,
621                       bit8              indirectPayload,
622                       bit32             agInfoLen,
623                       agsaFrameHandle_t agFrameHandle );
624 #endif
625 
626 #ifndef ossaSetNVMDResponseCB
627 GLOBAL void ossaSetNVMDResponseCB(
628                       agsaRoot_t        *agRoot,
629                       agsaContext_t     *agContext,
630                       bit32             status );
631 #endif
632 
633 #ifndef ossaQueueProcessed
634 #ifdef SALLSDK_TEST_SET_OB_QUEUE
635 GLOBAL void ossaQueueProcessed(agsaRoot_t *agRoot,
636                                           bit32 queue,
637                                           bit32 obpi,
638                                           bit32 obci);
639 #else
640 #define ossaQueueProcessed(agRoot, queue, obpi, obci)
641 #endif
642 #endif
643 
644 #ifndef ossaSGpioCB
645 GLOBAL void ossaSGpioCB(
646                     agsaRoot_t              *agRoot,
647                     agsaContext_t           *agContext,
648                     agsaSGpioReqResponse_t  *pSgpioResponse
649                     );
650 #endif
651 
652 #ifndef ossaPCIeDiagExecuteCB
653 GLOBAL void ossaPCIeDiagExecuteCB(
654             agsaRoot_t             *agRoot,
655             agsaContext_t         *agContext,
656             bit32                  status,
657             bit32                  command,
658             agsaPCIeDiagResponse_t *resp );
659 #endif
660 
661 #ifndef ossaGetDFEDataCB
662 GLOBAL void ossaGetDFEDataCB(
663                              agsaRoot_t     *agRoot,
664                              agsaContext_t  *agContext,
665                              bit32           status,
666                              bit32           agInfoLen
667                              );
668 #endif
669 
670 #ifndef ossaVhistCaptureCB
671 GLOBAL void ossaVhistCaptureCB(
672                             agsaRoot_t    *agRoot,
673                             agsaContext_t *agContext,
674                             bit32         status,
675                             bit32         len);
676 #endif
677 
678 #ifndef ossaGetIOErrorStatsCB
679 GLOBAL void ossaGetIOErrorStatsCB (
680                       agsaRoot_t               *agRoot,
681                       agsaContext_t            *agContext,
682                       bit32                     status,
683                       agsaIOErrorEventStats_t  *stats
684                       );
685 #endif
686 
687 #ifndef ossaGetIOEventStatsCB
688 GLOBAL void ossaGetIOEventStatsCB (
689                       agsaRoot_t               *agRoot,
690                       agsaContext_t            *agContext,
691                       bit32                     status,
692                       agsaIOErrorEventStats_t  *stats
693                       );
694 #endif
695 
696 #ifndef ossaOperatorManagementCB
697 GLOBAL void ossaOperatorManagementCB(
698                   agsaRoot_t    *agRoot,
699                   agsaContext_t *agContext,
700                   bit32          status,
701                   bit32          eq
702                   );
703 #endif
704 
705 
706 #ifndef ossaEncryptSelftestExecuteCB
707 GLOBAL void ossaEncryptSelftestExecuteCB (
708                         agsaRoot_t    *agRoot,
709                         agsaContext_t *agContext,
710                         bit32          status,
711                         bit32          type,
712                         bit32          length,
713                         void          *TestResult
714                         );
715 
716 #endif
717 
718 #ifndef ossaGetOperatorCB
719 GLOBAL void ossaGetOperatorCB(
720                agsaRoot_t    *agRoot,
721                agsaContext_t *agContext,
722                bit32          status,
723                bit32          option,
724                bit32          num,
725                bit32          role,
726                agsaID_t      *id
727                );
728 
729 #endif
730 
731 #ifndef ossaSetOperatorCB
732 GLOBAL void ossaSetOperatorCB(
733               agsaRoot_t    *agRoot,
734               agsaContext_t *agContext,
735               bit32          status,
736               bit32          eq
737               );
738 
739 #endif
740 
741 #ifndef ossaDIFEncryptionOffloadStartCB
742 GLOBAL void ossaDIFEncryptionOffloadStartCB(
743               agsaRoot_t    *agRoot,
744               agsaContext_t *agContext,
745               bit32          status,
746               agsaOffloadDifDetails_t *agsaOffloadDifDetails
747               );
748 #endif
749 
750 /***************************************************************************
751  * Definition of Misc related functions end                                *
752  ***************************************************************************/
753 
754 /***************************************************************************
755  * Definition of Debug related functions start                             *
756  ***************************************************************************/
757 #ifndef ossaLogTrace0
758 GLOBAL void ossaLogTrace0(
759                           agsaRoot_t  *agRoot,
760                           bit32       traceCode
761                           );
762 #endif
763 
764 #ifndef ossaLogTrace1
765 GLOBAL void ossaLogTrace1(
766                           agsaRoot_t  *agRoot,
767                           bit32       traceCode,
768                           bit32       value1
769                           );
770 #endif
771 
772 #ifndef ossaLogTrace2
773 GLOBAL void ossaLogTrace2(
774                           agsaRoot_t  *agRoot,
775                           bit32       traceCode,
776                           bit32       value1,
777                           bit32       value2
778                           );
779 #endif
780 
781 #ifndef ossaLogTrace3
782 GLOBAL void ossaLogTrace3(
783                           agsaRoot_t  *agRoot,
784                           bit32       traceCode,
785                           bit32       value1,
786                           bit32       value2,
787                           bit32       value3
788                           );
789 #endif
790 
791 #ifndef ossaLogTrace4
792 GLOBAL void ossaLogTrace4(
793                           agsaRoot_t  *agRoot,
794                           bit32       traceCode,
795                           bit32       value1,
796                           bit32       value2,
797                           bit32       value3,
798                           bit32       value4
799                           );
800 #endif
801 
802 #ifndef ossaLogDebugString
803 GLOBAL void ossaLogDebugString(
804                          agsaRoot_t   *agRoot,
805                          bit32        level,
806                          char         *string,
807                          void         *ptr1,
808                          void         *ptr2,
809                          bit32        value1,
810                          bit32        value2
811                          );
812 #endif
813 
814 #ifdef SALLSDK_OS_IOMB_LOG_ENABLE
815 GLOBAL void ossaLogIomb(agsaRoot_t  *agRoot,
816                         bit32        queueNum,
817                         agBOOLEAN      isInbound,
818                         void        *pMsg,
819                         bit32        msgLength);
820 #else
821 #define ossaLogIomb(a, b,c,d,e )
822 #endif
823 
824 osGLOBAL void ossaPCI_TRIGGER(agsaRoot_t  *agRoot );
825 
826 #ifdef PERF_COUNT
827 osGLOBAL void ossaEnter(agsaRoot_t *agRoot, int io);
828 osGLOBAL void ossaLeave(agsaRoot_t *agRoot, int io);
829 #define OSSA_INP_ENTER(root) ossaEnter(root, 0)
830 #define OSSA_INP_LEAVE(root) ossaLeave(root, 0)
831 #define OSSA_OUT_ENTER(root) ossaEnter(root, 1)
832 #define OSSA_OUT_LEAVE(root) ossaLeave(root, 1)
833 #else
834 #define OSSA_INP_ENTER(root)
835 #define OSSA_INP_LEAVE(root)
836 #define OSSA_OUT_ENTER(root)
837 #define OSSA_OUT_LEAVE(root)
838 #endif
839 /***************************************************************************
840  * Definition of Debug related functions end                               *
841  ***************************************************************************/
842 
843 #endif  /*__SSDKOSAPI_H__ */
844