saproto.h revision 285809
1285809Sscottl/******************************************************************************* 2285809Sscottl*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. 3285809Sscottl* 4285809Sscottl*Redistribution and use in source and binary forms, with or without modification, are permitted provided 5285809Sscottl*that the following conditions are met: 6285809Sscottl*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the 7285809Sscottl*following disclaimer. 8285809Sscottl*2. Redistributions in binary form must reproduce the above copyright notice, 9285809Sscottl*this list of conditions and the following disclaimer in the documentation and/or other materials provided 10285809Sscottl*with the distribution. 11285809Sscottl* 12285809Sscottl*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED 13285809Sscottl*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14285809Sscottl*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 15285809Sscottl*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 16285809Sscottl*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 17285809Sscottl*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 18285809Sscottl*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 19285809Sscottl*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 20285809Sscottl* 21285809Sscottl* $FreeBSD$ 22285809Sscottl* 23285809Sscottl********************************************************************************/ 24285809Sscottl/*******************************************************************************/ 25285809Sscottl/*! \file saproto.h 26285809Sscottl * \brief The file defines the function delcaration for internal used function 27285809Sscottl * 28285809Sscottl */ 29285809Sscottl/******************************************************************************/ 30285809Sscottl 31285809Sscottl#ifndef __SAPROTO_H__ 32285809Sscottl 33285809Sscottl#define __SAPROTO_H__ 34285809Sscottl 35285809Sscottl/* function declaration */ 36285809Sscottl/*** SATIMER.C ***/ 37285809SscottlGLOBAL agsaTimerDesc_t *siTimerAdd( 38285809Sscottl agsaRoot_t *agRoot, 39285809Sscottl bit32 timeout, 40285809Sscottl agsaCallback_t pfnTimeout, 41285809Sscottl bit32 Event, 42285809Sscottl void * pParm 43285809Sscottl ); 44285809Sscottl 45285809SscottlGLOBAL void siTimerRemove( 46285809Sscottl agsaRoot_t *agRoot, 47285809Sscottl agsaTimerDesc_t *pTimer 48285809Sscottl ); 49285809Sscottl 50285809SscottlGLOBAL void siTimerRemoveAll(agsaRoot_t *agRoot); 51285809Sscottl 52285809Sscottl/*** SAINIT.C ***/ 53285809SscottlGLOBAL bit32 siConfiguration(agsaRoot_t *agRoot, 54285809Sscottl mpiConfig_t *mpiConfig, 55285809Sscottl agsaHwConfig_t *hwConfig, 56285809Sscottl agsaSwConfig_t *swConfig 57285809Sscottl ); 58285809Sscottl 59285809SscottlGLOBAL bit32 mpiInitialize(agsaRoot_t *agRoot, 60285809Sscottl mpiMemReq_t *memoryAllocated, 61285809Sscottl mpiConfig_t *config 62285809Sscottl ); 63285809Sscottl 64285809SscottlGLOBAL bit32 mpiWaitForConfigTable(agsaRoot_t *agRoot, 65285809Sscottl spc_configMainDescriptor_t *config 66285809Sscottl ); 67285809Sscottl 68285809SscottlGLOBAL void mpiUpdateIBQueueCfgTable(agsaRoot_t *agRoot, 69285809Sscottl spc_inboundQueueDescriptor_t *inQueueCfg, 70285809Sscottl bit32 QueueTableOffset, 71285809Sscottl bit8 pcibar 72285809Sscottl ); 73285809Sscottl 74285809SscottlGLOBAL void mpiUpdateOBQueueCfgTable(agsaRoot_t *agRoot, 75285809Sscottl spc_outboundQueueDescriptor_t *outQueueCfg, 76285809Sscottl bit32 QueueTableOffset, 77285809Sscottl bit8 pcibar 78285809Sscottl ); 79285809SscottlGLOBAL void mpiUpdateFatalErrorTable(agsaRoot_t *agRoot, 80285809Sscottl bit32 FerrTableOffset, 81285809Sscottl bit32 lowerBaseAddress, 82285809Sscottl bit32 upperBaseAddress, 83285809Sscottl bit32 length, 84285809Sscottl bit8 pcibar); 85285809Sscottl 86285809SscottlGLOBAL bit32 mpiGetPCIBarIndex(agsaRoot_t *agRoot, 87285809Sscottl bit32 pciBar 88285809Sscottl ); 89285809Sscottl 90285809SscottlGLOBAL bit32 mpiUnInitConfigTable(agsaRoot_t *agRoot); 91285809Sscottl 92285809SscottlGLOBAL void mpiReadGSTable(agsaRoot_t *agRoot, 93285809Sscottl spc_GSTableDescriptor_t *mpiGSTable); 94285809Sscottl 95285809SscottlGLOBAL void siInitResources(agsaRoot_t *agRoot, 96285809Sscottl agsaMemoryRequirement_t *memoryAllocated, 97285809Sscottl agsaHwConfig_t *hwConfig, 98285809Sscottl agsaSwConfig_t *swConfig, 99285809Sscottl bit32 usecsPerTick); 100285809Sscottl 101285809SscottlGLOBAL void mpiReadCALTable(agsaRoot_t *agRoot, 102285809Sscottl spc_SPASTable_t *mpiCALTable, 103285809Sscottl bit32 index); 104285809Sscottl 105285809SscottlGLOBAL void mpiWriteCALTable(agsaRoot_t *agRoot, 106285809Sscottl spc_SPASTable_t *mpiCALTable, 107285809Sscottl bit32 index); 108285809Sscottl 109285809SscottlGLOBAL void mpiWriteCALAll(agsaRoot_t *agRoot, 110285809Sscottl agsaPhyAnalogSetupTable_t *mpiCALTable); 111285809Sscottl 112285809SscottlGLOBAL void mpiWrIntVecTable(agsaRoot_t *agRoot, 113285809Sscottl mpiConfig_t* config 114285809Sscottl ); 115285809Sscottl 116285809SscottlGLOBAL void mpiWrAnalogSetupTable(agsaRoot_t *agRoot, 117285809Sscottl mpiConfig_t *config 118285809Sscottl ); 119285809Sscottl 120285809Sscottl 121285809SscottlGLOBAL void mpiWrPhyAttrbTable(agsaRoot_t *agRoot, 122285809Sscottl sasPhyAttribute_t *phyAttrib 123285809Sscottl ); 124285809Sscottl 125285809Sscottl/*** SAPHY.C ***/ 126285809SscottlGLOBAL bit32 siPhyStopCB( 127285809Sscottl agsaRoot_t *agRoot, 128285809Sscottl bit32 phyId, 129285809Sscottl bit32 status, 130285809Sscottl agsaContext_t *agContext, 131285809Sscottl bit32 portId, 132285809Sscottl bit32 npipps 133285809Sscottl ); 134285809Sscottl 135285809Sscottl/*** SAPORT.C ***/ 136285809SscottlGLOBAL void siPortInvalid( 137285809Sscottl agsaRoot_t *agRoot, 138285809Sscottl agsaPort_t *pPort 139285809Sscottl ); 140285809Sscottl 141285809SscottlGLOBAL agsaDeviceDesc_t *siPortSASDeviceAdd( 142285809Sscottl agsaRoot_t *agRoot, 143285809Sscottl agsaPort_t *pPort, 144285809Sscottl agsaSASIdentify_t sasIdentify, 145285809Sscottl bit32 sasInitiator, 146285809Sscottl bit32 smpTimeout, 147285809Sscottl bit32 itNexusTimeout, 148285809Sscottl bit32 firstBurstSize, 149285809Sscottl bit8 dTypeSRate, 150285809Sscottl bit32 flag 151285809Sscottl ); 152285809Sscottl 153285809SscottlGLOBAL void siPortDeviceRemove( 154285809Sscottl agsaRoot_t *agRoot, 155285809Sscottl agsaPort_t *pPort, 156285809Sscottl agsaDeviceDesc_t *pDevice, 157285809Sscottl bit32 unmap 158285809Sscottl ); 159285809Sscottl 160285809SscottlGLOBAL agsaDeviceDesc_t *siPortSATADeviceAdd( 161285809Sscottl agsaRoot_t *agRoot, 162285809Sscottl agsaPort_t *pPort, 163285809Sscottl agsaDeviceDesc_t *pSTPBridge, 164285809Sscottl bit8 *pSignature, 165285809Sscottl bit8 pm, 166285809Sscottl bit8 pmField, 167285809Sscottl bit32 smpReqTimeout, 168285809Sscottl bit32 itNexusTimeout, 169285809Sscottl bit32 firstBurstSize, 170285809Sscottl bit8 dTypeSRate, 171285809Sscottl bit32 flag 172285809Sscottl ); 173285809Sscottl 174285809SscottlGLOBAL void siPortDeviceListRemove( 175285809Sscottl agsaRoot_t *agRoot, 176285809Sscottl agsaPort_t *pPort, 177285809Sscottl agsaDeviceDesc_t *pDevice 178285809Sscottl ); 179285809Sscottl 180285809Sscottl/*** SASATA.C ***/ 181285809SscottlGLOBAL void siSATASignatureCpy( 182285809Sscottl bit8 *pDstSignature, 183285809Sscottl bit8 *pSrcSignature 184285809Sscottl ); 185285809Sscottl 186285809Sscottl/*** SASSP.C ***/ 187285809Sscottl 188285809Sscottl/*** SAHW.C ***/ 189285809Sscottl#ifdef SA_ENABLE_HDA_FUNCTIONS 190285809SscottlGLOBAL bit32 siHDAMode( 191285809Sscottl agsaRoot_t *agRoot, 192285809Sscottl bit32 HDAMode, 193285809Sscottl agsaFwImg_t *userFwImg 194285809Sscottl ); 195285809Sscottl 196285809SscottlGLOBAL bit32 siHDAMode_V( 197285809Sscottl agsaRoot_t *agRoot, 198285809Sscottl bit32 HDAMode, 199285809Sscottl agsaFwImg_t *userFwImg 200285809Sscottl ); 201285809Sscottl 202285809Sscottl#endif 203285809Sscottl 204285809SscottlGLOBAL bit32 siBar4Shift( 205285809Sscottl agsaRoot_t *agRoot, 206285809Sscottl bit32 shiftValue 207285809Sscottl ); 208285809Sscottl 209285809Sscottl 210285809SscottlGLOBAL bit32 siSoftReset( 211285809Sscottl agsaRoot_t *agRoot, 212285809Sscottl bit32 signature 213285809Sscottl ); 214285809Sscottl 215285809SscottlGLOBAL bit32 siSpcSoftReset( 216285809Sscottl agsaRoot_t *agRoot, 217285809Sscottl bit32 signature 218285809Sscottl ); 219285809Sscottl 220285809SscottlGLOBAL void siChipReset( 221285809Sscottl agsaRoot_t *agRoot 222285809Sscottl ); 223285809Sscottl 224285809Sscottl 225285809SscottlGLOBAL bit32 siChipResetV( 226285809Sscottl agsaRoot_t *agRoot, 227285809Sscottl bit32 signature 228285809Sscottl ); 229285809Sscottl 230285809SscottlGLOBAL void siChipResetSpc( 231285809Sscottl agsaRoot_t *agRoot 232285809Sscottl ); 233285809Sscottl 234285809Sscottl 235285809Sscottl/*** SAUTIL.C ***/ 236285809SscottlGLOBAL void siPrintBuffer( 237285809Sscottl bit32 debugLevel, 238285809Sscottl siPrintType type, 239285809Sscottl char *header, 240285809Sscottl void *a, 241285809Sscottl bit32 length 242285809Sscottl ); 243285809Sscottlint siIsHexDigit(char a); 244285809SscottlGLOBAL FORCEINLINE void* si_memcpy(void *dst, void *src, bit32 count); 245285809SscottlGLOBAL FORCEINLINE void* si_memset(void *s, int c, bit32 n); 246285809Sscottl 247285809SscottlGLOBAL void siDumpActiveIORequests( 248285809Sscottl agsaRoot_t *agRoot, 249285809Sscottl bit32 count); 250285809Sscottl 251285809Sscottl 252285809SscottlGLOBAL void siClearActiveIORequests( agsaRoot_t *agRoot); 253285809Sscottl 254285809SscottlGLOBAL void siCountActiveIORequestsOnDevice( agsaRoot_t *agRoot, bit32 device ); 255285809SscottlGLOBAL void siClearActiveIORequestsOnDevice( agsaRoot_t *agRoot, bit32 device ); 256285809Sscottl 257285809Sscottl 258285809Sscottl 259285809Sscottl/*** SAINT.C ***/ 260285809SscottlGLOBAL void siEventPhyUpRcvd( 261285809Sscottl agsaRoot_t *agRoot, 262285809Sscottl bit32 phyId, 263285809Sscottl agsaSASIdentify_t *agSASIdentify, 264285809Sscottl bit32 portId, 265285809Sscottl bit32 npipps, 266285809Sscottl bit8 linkRate 267285809Sscottl ); 268285809Sscottl 269285809SscottlGLOBAL void siEventSATASignatureRcvd( 270285809Sscottl agsaRoot_t *agRoot, 271285809Sscottl bit32 phyId, 272285809Sscottl void *pMsg, 273285809Sscottl bit32 portId, 274285809Sscottl bit32 npipps, 275285809Sscottl bit8 linkRate 276285809Sscottl ); 277285809Sscottl 278285809SscottlGLOBAL FORCEINLINE void siIODone( 279285809Sscottl agsaRoot_t *agRoot, 280285809Sscottl agsaIORequestDesc_t *pRequest, 281285809Sscottl bit32 status, 282285809Sscottl bit32 sspTag 283285809Sscottl ); 284285809Sscottl 285285809SscottlGLOBAL void siAbnormal( 286285809Sscottl agsaRoot_t *agRoot, 287285809Sscottl agsaIORequestDesc_t *pRequest, 288285809Sscottl bit32 status, 289285809Sscottl bit32 param, 290285809Sscottl bit32 sspTag 291285809Sscottl ); 292285809Sscottl 293285809SscottlGLOBAL void siDifAbnormal( 294285809Sscottl agsaRoot_t *agRoot, 295285809Sscottl agsaIORequestDesc_t *pRequest, 296285809Sscottl bit32 status, 297285809Sscottl bit32 param, 298285809Sscottl bit32 sspTag, 299285809Sscottl bit32 *pMsg1 300285809Sscottl ); 301285809Sscottl 302285809SscottlGLOBAL void siEventSSPResponseWtDataRcvd( 303285809Sscottl agsaRoot_t *agRoot, 304285809Sscottl agsaIORequestDesc_t *pRequest, 305285809Sscottl agsaSSPResponseInfoUnit_t *pRespIU, 306285809Sscottl bit32 param, 307285809Sscottl bit32 sspTag 308285809Sscottl ); 309285809Sscottl 310285809SscottlGLOBAL void siSMPRespRcvd( 311285809Sscottl agsaRoot_t *agRoot, 312285809Sscottl agsaSMPCompletionRsp_t *pIomb, 313285809Sscottl bit32 payloadSize, 314285809Sscottl bit32 tag 315285809Sscottl ); 316285809Sscottl 317285809SscottlGLOBAL void siEventSATAResponseWtDataRcvd( 318285809Sscottl agsaRoot_t *agRoot, 319285809Sscottl agsaIORequestDesc_t *pRequest, 320285809Sscottl bit32 *agFirstDword, 321285809Sscottl bit32 *pResp, 322285809Sscottl bit32 lengthResp 323285809Sscottl ); 324285809Sscottl 325285809Sscottl/*** SADISC.C ***/ 326285809SscottlGLOBAL bit32 siRemoveDevHandle( 327285809Sscottl agsaRoot_t *agRoot, 328285809Sscottl agsaDevHandle_t *agDevHandle 329285809Sscottl ); 330285809Sscottl 331285809Sscottl/*** SAMPIRSP.C ***/ 332285809SscottlGLOBAL FORCEINLINE bit32 mpiParseOBIomb( 333285809Sscottl agsaRoot_t *agRoot, 334285809Sscottl bit32 *pMsg1, 335285809Sscottl mpiMsgCategory_t category, 336285809Sscottl bit16 opcode 337285809Sscottl ); 338285809Sscottl 339285809SscottlGLOBAL bit32 mpiEchoRsp( 340285809Sscottl agsaRoot_t *agRoot, 341285809Sscottl agsaEchoRsp_t *pIomb 342285809Sscottl ); 343285809Sscottl 344285809SscottlGLOBAL bit32 mpiGetNVMDataRsp( 345285809Sscottl agsaRoot_t *agRoot, 346285809Sscottl agsaGetNVMDataRsp_t *pIomb 347285809Sscottl ); 348285809Sscottl 349285809SscottlGLOBAL bit32 mpiHWevent( 350285809Sscottl agsaRoot_t *agRoot, 351285809Sscottl agsaHWEvent_SPC_OUB_t *pIomb 352285809Sscottl ); 353285809Sscottl 354285809SscottlGLOBAL bit32 mpiPhyStartEvent( 355285809Sscottl agsaRoot_t *agRoot, 356285809Sscottl agsaHWEvent_Phy_OUB_t *pIomb 357285809Sscottl ); 358285809Sscottl 359285809SscottlGLOBAL bit32 mpiPhyStopEvent( 360285809Sscottl agsaRoot_t *agRoot, 361285809Sscottl agsaHWEvent_Phy_OUB_t *pIomb 362285809Sscottl ); 363285809Sscottl 364285809SscottlGLOBAL bit32 mpiSMPCompletion( 365285809Sscottl agsaRoot_t *agRoot, 366285809Sscottl agsaSMPCompletionRsp_t *pIomb 367285809Sscottl ); 368285809Sscottl 369285809SscottlGLOBAL bit32 mpiGetDevInfoRspSpc( 370285809Sscottl agsaRoot_t *agRoot, 371285809Sscottl agsaGetDevInfoRsp_t *pIomb 372285809Sscottl ); 373285809Sscottl 374285809SscottlGLOBAL bit32 mpiGetPhyProfileRsp( 375285809Sscottl agsaRoot_t *agRoot, 376285809Sscottl agsaGetPhyProfileRspV_t *pIomb 377285809Sscottl ); 378285809Sscottl 379285809SscottlGLOBAL bit32 mpiSetPhyProfileRsp( 380285809Sscottl agsaRoot_t *agRoot, 381285809Sscottl agsaSetPhyProfileRspV_t *pIomb 382285809Sscottl ); 383285809Sscottl 384285809SscottlGLOBAL bit32 mpiGetDevInfoRsp( 385285809Sscottl agsaRoot_t *agRoot, 386285809Sscottl agsaGetDevInfoRspV_t *pIomb 387285809Sscottl ); 388285809Sscottl 389285809SscottlGLOBAL bit32 mpiGetDevHandleRsp( 390285809Sscottl agsaRoot_t *agRoot, 391285809Sscottl agsaGetDevHandleRsp_t *pIomb 392285809Sscottl ); 393285809Sscottl 394285809SscottlGLOBAL bit32 mpiPhyCntrlRsp( 395285809Sscottl agsaRoot_t *agRoot, 396285809Sscottl agsaLocalPhyCntrlRsp_t *pIomb 397285809Sscottl ); 398285809Sscottl 399285809SscottlGLOBAL bit32 mpiDeviceRegRsp( 400285809Sscottl agsaRoot_t *agRoot, 401285809Sscottl agsaDeviceRegistrationRsp_t *pIomb 402285809Sscottl ); 403285809Sscottl 404285809SscottlGLOBAL bit32 mpiDeregDevHandleRsp( 405285809Sscottl agsaRoot_t *agRoot, 406285809Sscottl agsaDeregDevHandleRsp_t *pIomb 407285809Sscottl ); 408285809Sscottl 409285809SscottlGLOBAL FORCEINLINE bit32 mpiSSPCompletion( 410285809Sscottl agsaRoot_t *agRoot, 411285809Sscottl bit32 *pIomb 412285809Sscottl ); 413285809Sscottl 414285809SscottlGLOBAL FORCEINLINE bit32 mpiSATACompletion( 415285809Sscottl agsaRoot_t *agRoot, 416285809Sscottl bit32 *pIomb 417285809Sscottl ); 418285809Sscottl 419285809SscottlGLOBAL bit32 mpiSSPEvent( 420285809Sscottl agsaRoot_t *agRoot, 421285809Sscottl agsaSSPEventRsp_t *pIomb 422285809Sscottl ); 423285809Sscottl 424285809SscottlGLOBAL bit32 mpiSATAEvent( 425285809Sscottl agsaRoot_t *agRoot, 426285809Sscottl agsaSATAEventRsp_t *pIomb 427285809Sscottl ); 428285809Sscottl 429285809SscottlGLOBAL bit32 mpiFwFlashUpdateRsp( 430285809Sscottl agsaRoot_t *agRoot, 431285809Sscottl agsaFwFlashUpdateRsp_t *payload 432285809Sscottl ); 433285809Sscottl 434285809Sscottl 435285809SscottlGLOBAL bit32 mpiFwExtFlashUpdateRsp( 436285809Sscottl agsaRoot_t *agRoot, 437285809Sscottl agsaFwFlashOpExtRsp_t *payload 438285809Sscottl ); 439285809Sscottl 440285809Sscottl#ifdef SPC_ENABLE_PROFILE 441285809SscottlGLOBAL bit32 mpiFwProfileRsp( 442285809Sscottl agsaRoot_t *agRoot, 443285809Sscottl agsaFwProfileRsp_t *payload 444285809Sscottl ); 445285809Sscottl#endif 446285809SscottlGLOBAL bit32 mpiSetNVMDataRsp( 447285809Sscottl agsaRoot_t *agRoot, 448285809Sscottl agsaSetNVMDataRsp_t *pIomb 449285809Sscottl ); 450285809Sscottl 451285809SscottlGLOBAL bit32 mpiSSPAbortRsp( 452285809Sscottl agsaRoot_t *agRoot, 453285809Sscottl agsaSSPAbortRsp_t *pIomb 454285809Sscottl ); 455285809Sscottl 456285809SscottlGLOBAL bit32 mpiSATAAbortRsp( 457285809Sscottl agsaRoot_t *agRoot, 458285809Sscottl agsaSATAAbortRsp_t *pIomb 459285809Sscottl ); 460285809Sscottl 461285809SscottlGLOBAL bit32 mpiGPIORsp( 462285809Sscottl agsaRoot_t *agRoot, 463285809Sscottl agsaGPIORsp_t *pIomb 464285809Sscottl ); 465285809Sscottl 466285809SscottlGLOBAL bit32 mpiGPIOEventRsp( 467285809Sscottl agsaRoot_t *agRoot, 468285809Sscottl agsaGPIOEvent_t *pIomb 469285809Sscottl ); 470285809Sscottl 471285809SscottlGLOBAL bit32 mpiSASDiagStartEndRsp( 472285809Sscottl agsaRoot_t *agRoot, 473285809Sscottl agsaSASDiagStartEndRsp_t *pIomb 474285809Sscottl ); 475285809Sscottl 476285809SscottlGLOBAL bit32 mpiSASDiagExecuteRsp( 477285809Sscottl agsaRoot_t *agRoot, 478285809Sscottl agsaSASDiagExecuteRsp_t *pIomb 479285809Sscottl ); 480285809Sscottl 481285809SscottlGLOBAL bit32 mpiGeneralEventRsp( 482285809Sscottl agsaRoot_t *agRoot, 483285809Sscottl agsaGeneralEventRsp_t *pIomb 484285809Sscottl ); 485285809Sscottl 486285809SscottlGLOBAL bit32 mpiSSPReqReceivedNotify( 487285809Sscottl agsaRoot_t *agRoot, 488285809Sscottl agsaSSPReqReceivedNotify_t *pMsg1 489285809Sscottl ); 490285809Sscottl 491285809SscottlGLOBAL bit32 mpiDeviceHandleArrived( 492285809Sscottl agsaRoot_t *agRoot, 493285809Sscottl agsaDeviceHandleArrivedNotify_t *pMsg1 494285809Sscottl ); 495285809Sscottl 496285809SscottlGLOBAL bit32 mpiGetTimeStampRsp( 497285809Sscottl agsaRoot_t *agRoot, 498285809Sscottl agsaGetTimeStampRsp_t *pIomb 499285809Sscottl ); 500285809Sscottl 501285809SscottlGLOBAL bit32 mpiSASHwEventAckRsp( 502285809Sscottl agsaRoot_t *agRoot, 503285809Sscottl agsaSASHwEventAckRsp_t *pIomb 504285809Sscottl ); 505285809Sscottl 506285809SscottlGLOBAL bit32 mpiSetDevInfoRsp( 507285809Sscottl agsaRoot_t *agRoot, 508285809Sscottl agsaSetDeviceInfoRsp_t *pIomb 509285809Sscottl ); 510285809Sscottl 511285809SscottlGLOBAL bit32 mpiSetDeviceStateRsp( 512285809Sscottl agsaRoot_t *agRoot, 513285809Sscottl agsaSetDeviceStateRsp_t *pIomb 514285809Sscottl ); 515285809Sscottl 516285809SscottlGLOBAL bit32 mpiGetDeviceStateRsp( 517285809Sscottl agsaRoot_t *agRoot, 518285809Sscottl agsaGetDeviceStateRsp_t *pIomb 519285809Sscottl ); 520285809Sscottl 521285809SscottlGLOBAL bit32 mpiSasReInitializeRsp( 522285809Sscottl agsaRoot_t *agRoot, 523285809Sscottl agsaSasReInitializeRsp_t *pIomb 524285809Sscottl ); 525285809Sscottl 526285809SscottlGLOBAL bit32 mpiSetControllerConfigRsp( 527285809Sscottl agsaRoot_t *agRoot, 528285809Sscottl agsaSetControllerConfigRsp_t *pIomb 529285809Sscottl ); 530285809Sscottl 531285809SscottlGLOBAL bit32 mpiGetControllerConfigRsp( 532285809Sscottl agsaRoot_t *agRoot, 533285809Sscottl agsaGetControllerConfigRsp_t *pIomb 534285809Sscottl ); 535285809Sscottl 536285809SscottlGLOBAL bit32 mpiKekManagementRsp( 537285809Sscottl agsaRoot_t *agRoot, 538285809Sscottl agsaKekManagementRsp_t *pIomb 539285809Sscottl ); 540285809Sscottl 541285809SscottlGLOBAL bit32 mpiDekManagementRsp( 542285809Sscottl agsaRoot_t *agRoot, 543285809Sscottl agsaDekManagementRsp_t *pIomb 544285809Sscottl ); 545285809Sscottl 546285809SscottlGLOBAL bit32 mpiOperatorManagementRsp( 547285809Sscottl agsaRoot_t *agRoot, 548285809Sscottl agsaOperatorMangmenRsp_t *pIomb 549285809Sscottl ); 550285809Sscottl 551285809SscottlGLOBAL bit32 mpiBistRsp( 552285809Sscottl agsaRoot_t *agRoot, 553285809Sscottl agsaEncryptBistRsp_t *pIomb 554285809Sscottl ); 555285809Sscottl 556285809SscottlGLOBAL bit32 mpiSetOperatorRsp( 557285809Sscottl agsaRoot_t *agRoot, 558285809Sscottl agsaSetOperatorRsp_t *pIomb 559285809Sscottl ); 560285809Sscottl 561285809SscottlGLOBAL bit32 mpiGetOperatorRsp( 562285809Sscottl agsaRoot_t *agRoot, 563285809Sscottl agsaGetOperatorRsp_t *pIomb 564285809Sscottl ); 565285809Sscottl 566285809SscottlGLOBAL bit32 mpiDifEncOffloadRsp( 567285809Sscottl agsaRoot_t *agRoot, 568285809Sscottl agsaDifEncOffloadRspV_t *pIomb 569285809Sscottl ); 570285809Sscottl 571285809SscottlGLOBAL bit32 mpiGetVHistRsp( 572285809Sscottl agsaRoot_t *agRoot, 573285809Sscottl agsaGetVHistCapRsp_t *pIomb 574285809Sscottl ); 575285809Sscottl 576285809Sscottl 577285809Sscottl/*** SAMPICMD.C ***/ 578285809SscottlGLOBAL bit32 mpiBuildCmd( 579285809Sscottl agsaRoot_t *agRoot, 580285809Sscottl bit32 *payload, 581285809Sscottl mpiMsgCategory_t category, 582285809Sscottl bit16 opcode, 583285809Sscottl bit16 size, 584285809Sscottl bit32 queueNum 585285809Sscottl ); 586285809Sscottl 587285809Sscottl 588285809SscottlGLOBAL bit32 mpiVHistCapCmd( 589285809Sscottl agsaRoot_t *agRoot, 590285809Sscottl agsaContext_t *agContext, 591285809Sscottl bit32 queueNum, 592285809Sscottl bit32 Channel, 593285809Sscottl bit32 NumBitLo, 594285809Sscottl bit32 NumBitHi, 595285809Sscottl bit32 PcieAddrLo, 596285809Sscottl bit32 PcieAddrHi, 597285809Sscottl bit32 ByteCount ); 598285809Sscottl 599285809SscottlGLOBAL bit32 mpiEchoCmd( 600285809Sscottl agsaRoot_t *agRoot, 601285809Sscottl bit32 queueNum, 602285809Sscottl agsaContext_t *agContext, 603285809Sscottl void *echoPayload 604285809Sscottl ); 605285809Sscottl 606285809SscottlGLOBAL bit32 mpiGetPhyProfileCmd( 607285809Sscottl agsaRoot_t *agRoot, 608285809Sscottl agsaContext_t *agContext, 609285809Sscottl bit32 Operation, 610285809Sscottl bit32 PhyId, 611285809Sscottl void *agCB 612285809Sscottl ); 613285809Sscottl 614285809SscottlGLOBAL bit32 mpiSetPhyProfileCmd( 615285809Sscottl agsaRoot_t *agRoot, 616285809Sscottl agsaContext_t *agContext, 617285809Sscottl bit32 Operation, 618285809Sscottl bit32 PhyId, 619285809Sscottl bit32 length, 620285809Sscottl void * buffer 621285809Sscottl ); 622285809Sscottl 623285809SscottlGLOBAL bit32 mpiPhyStartCmd( 624285809Sscottl agsaRoot_t *agRoot, 625285809Sscottl bit32 tag, 626285809Sscottl bit32 phyId, 627285809Sscottl agsaPhyConfig_t *agPhyConfig, 628285809Sscottl agsaSASIdentify_t *agSASIdentify, 629285809Sscottl bit32 queueNum 630285809Sscottl ); 631285809Sscottl 632285809SscottlGLOBAL bit32 mpiPhyStopCmd( 633285809Sscottl agsaRoot_t *agRoot, 634285809Sscottl bit32 tag, 635285809Sscottl bit32 phyId, 636285809Sscottl bit32 queueNum 637285809Sscottl ); 638285809Sscottl 639285809SscottlGLOBAL bit32 mpiSMPCmd( 640285809Sscottl agsaRoot_t *agRoot, 641285809Sscottl void *pIomb, 642285809Sscottl bit16 opcode, 643285809Sscottl agsaSMPCmd_t *payload, 644285809Sscottl bit8 inq, 645285809Sscottl bit8 outq 646285809Sscottl ); 647285809Sscottl 648285809SscottlGLOBAL bit32 mpiDeregDevHandleCmd( 649285809Sscottl agsaRoot_t *agRoot, 650285809Sscottl agsaContext_t *agContext, 651285809Sscottl agsaDeviceDesc_t *pDevice, 652285809Sscottl bit32 deviceId, 653285809Sscottl bit32 portId, 654285809Sscottl bit32 queueNum 655285809Sscottl ); 656285809Sscottl 657285809SscottlGLOBAL bit32 mpiGetDeviceHandleCmd( 658285809Sscottl agsaRoot_t *agRoot, 659285809Sscottl agsaContext_t *agContext, 660285809Sscottl bit32 portId, 661285809Sscottl bit32 flags, 662285809Sscottl bit32 maxDevs, 663285809Sscottl bit32 queueNum, 664285809Sscottl bit32 skipCount 665285809Sscottl ); 666285809Sscottl 667285809SscottlGLOBAL bit32 mpiLocalPhyControlCmd( 668285809Sscottl agsaRoot_t *agRoot, 669285809Sscottl bit32 tag, 670285809Sscottl bit32 phyId, 671285809Sscottl bit32 operation, 672285809Sscottl bit32 queueNum 673285809Sscottl ); 674285809Sscottl 675285809SscottlGLOBAL bit32 mpiGetDeviceInfoCmd( 676285809Sscottl agsaRoot_t *agRoot, 677285809Sscottl agsaContext_t *agContext, 678285809Sscottl bit32 deviceid, 679285809Sscottl bit32 option, 680285809Sscottl bit32 queueNum 681285809Sscottl ); 682285809Sscottl 683285809SscottlGLOBAL bit32 mpiDevHandleAcceptCmd( 684285809Sscottl agsaRoot_t *agRoot, 685285809Sscottl agsaContext_t *agContext, 686285809Sscottl bit32 ctag, 687285809Sscottl bit32 deviceId, 688285809Sscottl bit32 action, 689285809Sscottl bit32 flag, 690285809Sscottl bit32 itlnx, 691285809Sscottl bit32 queueNum 692285809Sscottl ); 693285809Sscottl 694285809SscottlGLOBAL bit32 mpiPortControlRsp( 695285809Sscottl agsaRoot_t *agRoot, 696285809Sscottl agsaPortControlRsp_t *pIomb 697285809Sscottl ); 698285809Sscottl 699285809SscottlGLOBAL bit32 mpiSMPAbortRsp( 700285809Sscottl agsaRoot_t *agRoot, 701285809Sscottl agsaSMPAbortRsp_t *pIomb 702285809Sscottl ); 703285809Sscottl 704285809SscottlGLOBAL bit32 siGetRegisterDumpGSM( 705285809Sscottl agsaRoot_t *agRoot, 706285809Sscottl void *destinationAddress, 707285809Sscottl bit32 regDumpNum, 708285809Sscottl bit32 regDumpOffset, 709285809Sscottl bit32 len 710285809Sscottl ); 711285809Sscottl 712285809SscottlGLOBAL bit32 mpiNVMReadRegDumpCmd( 713285809Sscottl agsaRoot_t *agRoot, 714285809Sscottl agsaContext_t *agContext, 715285809Sscottl bit32 queueNum, 716285809Sscottl bit32 cpuId, 717285809Sscottl bit32 cOffset, 718285809Sscottl bit32 addrHi, 719285809Sscottl bit32 addrLo, 720285809Sscottl bit32 len 721285809Sscottl ); 722285809Sscottl 723285809SscottlGLOBAL bit32 mpiDeviceHandleRemoval( 724285809Sscottl agsaRoot_t *agRoot, 725285809Sscottl agsaDeviceHandleRemoval_t *pMsg1); 726285809Sscottl 727285809SscottlGLOBAL bit32 mpiGetNVMDCmd( 728285809Sscottl agsaRoot_t *agRoot, 729285809Sscottl agsaContext_t *agContext, 730285809Sscottl agsaNVMDData_t *NVMDInfo, 731285809Sscottl bit32 queueNum 732285809Sscottl ); 733285809Sscottl 734285809SscottlGLOBAL bit32 mpiSetNVMDCmd( 735285809Sscottl agsaRoot_t *agRoot, 736285809Sscottl agsaContext_t *agContext, 737285809Sscottl agsaNVMDData_t *NVMDInfo, 738285809Sscottl bit32 queueNum 739285809Sscottl ); 740285809Sscottl 741285809SscottlGLOBAL bit32 mpiSetDeviceInfoCmd( 742285809Sscottl agsaRoot_t *agRoot, 743285809Sscottl agsaContext_t *agContext, 744285809Sscottl bit32 deviceid, 745285809Sscottl bit32 option, 746285809Sscottl bit32 queueNum, 747285809Sscottl bit32 param, 748285809Sscottl ossaSetDeviceInfoCB_t agCB 749285809Sscottl ); 750285809Sscottl 751285809SscottlGLOBAL bit32 mpiSetDeviceStateCmd( 752285809Sscottl agsaRoot_t *agRoot, 753285809Sscottl agsaContext_t *agContext, 754285809Sscottl bit32 deviceId, 755285809Sscottl bit32 nds, 756285809Sscottl bit32 queueNum 757285809Sscottl ); 758285809Sscottl 759285809SscottlGLOBAL bit32 mpiGetDeviceStateCmd( 760285809Sscottl agsaRoot_t *agRoot, 761285809Sscottl agsaContext_t *agContext, 762285809Sscottl bit32 deviceId, 763285809Sscottl bit32 queueNum 764285809Sscottl ); 765285809Sscottl 766285809SscottlGLOBAL bit32 mpiSasReinitializeCmd( 767285809Sscottl agsaRoot_t *agRoot, 768285809Sscottl agsaContext_t *agContext, 769285809Sscottl agsaSASReconfig_t *agSASConfig, 770285809Sscottl bit32 queueNum 771285809Sscottl ); 772285809Sscottl 773285809SscottlGLOBAL bit32 mpiSGpioRsp( 774285809Sscottl agsaRoot_t *agRoot, 775285809Sscottl agsaSGpioRsp_t *pInIomb 776285809Sscottl ); 777285809Sscottl 778285809SscottlGLOBAL bit32 mpiPCIeDiagExecuteRsp( 779285809Sscottl agsaRoot_t *agRoot, 780285809Sscottl void *pInIomb 781285809Sscottl ); 782285809Sscottl 783285809SscottlGLOBAL bit32 mpiGetDFEDataRsp( 784285809Sscottl agsaRoot_t *agRoot, 785285809Sscottl void *pInIomb 786285809Sscottl ); 787285809Sscottl 788285809SscottlGLOBAL bit32 mpiGetVisDataRsp( 789285809Sscottl agsaRoot_t *agRoot, 790285809Sscottl void *pIomb 791285809Sscottl ); 792285809Sscottl 793285809SscottlGLOBAL bit32 mpiSetControllerConfigCmd( 794285809Sscottl agsaRoot_t *agRoot, 795285809Sscottl agsaContext_t *agContext, 796285809Sscottl agsaSetControllerConfigCmd_t *agControllerConfig, 797285809Sscottl bit32 queueNum, 798285809Sscottl bit8 modePageContext 799285809Sscottl ); 800285809Sscottl 801285809SscottlGLOBAL bit32 mpiGetControllerConfigCmd( 802285809Sscottl agsaRoot_t *agRoot, 803285809Sscottl agsaContext_t *agContext, 804285809Sscottl agsaGetControllerConfigCmd_t *agControllerConfig, 805285809Sscottl bit32 queueNum 806285809Sscottl ); 807285809Sscottl 808285809SscottlGLOBAL bit32 mpiKekManagementCmd( 809285809Sscottl agsaRoot_t *agRoot, 810285809Sscottl agsaContext_t *agContext, 811285809Sscottl agsaKekManagementCmd_t *agKekMgmt, 812285809Sscottl bit32 queueNum 813285809Sscottl ); 814285809Sscottl 815285809SscottlGLOBAL bit32 mpiDekManagementCmd( 816285809Sscottl agsaRoot_t *agRoot, 817285809Sscottl agsaContext_t *agContext, 818285809Sscottl agsaDekManagementCmd_t *agDekMgmt, 819285809Sscottl bit32 queueNum 820285809Sscottl ); 821285809Sscottl 822285809SscottlGLOBAL bit32 mpiOperatorManagementCmd( 823285809Sscottl agsaRoot_t *agRoot, 824285809Sscottl bit32 queueNum, 825285809Sscottl agsaContext_t *agContext, 826285809Sscottl agsaOperatorMangmentCmd_t *operatorcode ); 827285809Sscottl 828285809SscottlGLOBAL bit32 mpiEncryptBistCmd( 829285809Sscottl agsaRoot_t *agRoot, 830285809Sscottl bit32 queueNum, 831285809Sscottl agsaContext_t *agContext, 832285809Sscottl agsaEncryptBist_t *bist ); 833285809Sscottl 834285809SscottlGLOBAL bit32 mpiSetOperatorCmd( 835285809Sscottl agsaRoot_t *agRoot, 836285809Sscottl bit32 queueNum, 837285809Sscottl agsaContext_t *agContext, 838285809Sscottl agsaSetOperatorCmd_t *operatorcode 839285809Sscottl ); 840285809Sscottl 841285809SscottlGLOBAL bit32 mpiGetOperatorCmd( 842285809Sscottl agsaRoot_t *agRoot, 843285809Sscottl bit32 queueNum, 844285809Sscottl agsaContext_t *agContext, 845285809Sscottl agsaGetOperatorCmd_t *operatorcode 846285809Sscottl ); 847285809Sscottl 848285809SscottlGLOBAL bit32 mpiDIFEncryptionOffloadCmd( 849285809Sscottl agsaRoot_t *agRoot, 850285809Sscottl agsaContext_t *agContext, 851285809Sscottl bit32 queueNum, 852285809Sscottl bit32 op, 853285809Sscottl agsaDifEncPayload_t *agDifEncOffload, 854285809Sscottl ossaDIFEncryptionOffloadStartCB_t agCB 855285809Sscottl ); 856285809Sscottl 857285809Sscottlbit32 siOurMSIXInterrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 858285809Sscottlvoid siDisableMSIXInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 859285809Sscottlvoid siReenableMSIXInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 860285809Sscottl 861285809Sscottlbit32 siOurMSIInterrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 862285809Sscottlvoid siDisableMSIInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 863285809Sscottlvoid siReenableMSIInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 864285809Sscottl 865285809Sscottl 866285809Sscottlbit32 siOurLegacyInterrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 867285809Sscottlvoid siDisableLegacyInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 868285809Sscottlvoid siReenableLegacyInterrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 869285809Sscottl 870285809Sscottlbit32 siOurMSIX_V_Interrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 871285809Sscottlbit32 siOurMSI_V_Interrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 872285809Sscottlbit32 siOurLegacy_V_Interrupt(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 873285809Sscottl 874285809Sscottlvoid siDisableMSIX_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 875285809Sscottlvoid siDisableMSI_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 876285809Sscottlvoid siDisableLegacy_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 877285809Sscottl 878285809Sscottlvoid siReenableMSIX_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 879285809Sscottlvoid siReenableMSI_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 880285809Sscottlvoid siReenableLegacy_V_Interrupts(agsaRoot_t *agRoot,bit32 interruptVectorIndex); 881285809Sscottl 882285809Sscottl 883285809SscottlGLOBAL void siUpdateBarOffsetTable(agsaRoot_t *agRoot, bit32 Spc_Type); 884285809Sscottl 885285809SscottlGLOBAL void siPciCpyMem(agsaRoot_t *agRoot, 886285809Sscottl bit32 soffset, 887285809Sscottl const void *dst, 888285809Sscottl bit32 DWcount, 889285809Sscottl bit32 busBaseNumber 890285809Sscottl ); 891285809Sscottl 892285809SscottlGLOBAL void siHalRegWriteExt( 893285809Sscottl agsaRoot_t *agRoot, 894285809Sscottl bit32 generic, 895285809Sscottl bit32 regOffset, 896285809Sscottl bit32 regValue 897285809Sscottl ); 898285809Sscottl 899285809SscottlGLOBAL bit32 siHalRegReadExt( agsaRoot_t *agRoot, 900285809Sscottl bit32 generic, 901285809Sscottl bit32 regOffset 902285809Sscottl ); 903285809Sscottl 904285809Sscottl#ifdef SA_FW_TIMER_READS_STATUS 905285809Sscottlbit32 siReadControllerStatus( 906285809Sscottl agsaRoot_t *agRoot, 907285809Sscottl bit32 Event, 908285809Sscottl void * pParm 909285809Sscottl ); 910285809Sscottl#endif /* SA_FW_TIMER_READS_STATUS */ 911285809Sscottl 912285809Sscottl 913285809Sscottl#if defined(SALLSDK_DEBUG) 914285809Sscottlvoid sidump_hwConfig(agsaHwConfig_t *hwConfig); 915285809Sscottlvoid sidump_swConfig(agsaSwConfig_t *swConfig); 916285809Sscottlvoid sidump_Q_config( agsaQueueConfig_t *queueConfig ); 917285809Sscottl#endif 918285809SscottlGLOBAL bit32 siGetTableOffset( 919285809Sscottl agsaRoot_t *agRoot, 920285809Sscottl bit32 TableOffsetInTable 921285809Sscottl ); 922285809Sscottl 923285809SscottlGLOBAL bit32 siGetPciBar( 924285809Sscottl agsaRoot_t *agRoot 925285809Sscottl ); 926285809Sscottl 927285809SscottlGLOBAL bit32 siScratchDump(agsaRoot_t *agRoot); 928285809Sscottl 929285809Sscottlvoid si_macro_check(agsaRoot_t *agRoot); 930285809Sscottl 931285809SscottlGLOBAL bit32 si_check_V_HDA(agsaRoot_t *agRoot); 932285809SscottlGLOBAL bit32 si_check_V_Ready(agsaRoot_t *agRoot); 933285809Sscottl 934285809SscottlGLOBAL void siPCITriger(agsaRoot_t *agRoot); 935285809Sscottl 936285809SscottlGLOBAL void siCheckQs(agsaRoot_t *agRoot); 937285809Sscottl 938285809Sscottl 939285809SscottlGLOBAL bit32 smIsCfg_V_ANY( agsaRoot_t *agRoot); 940285809SscottlGLOBAL bit32 smIS_SPC( agsaRoot_t *agRoot); 941285809SscottlGLOBAL bit32 smIS_HIL( agsaRoot_t *agRoot); 942285809SscottlGLOBAL bit32 smIS_SPC6V( agsaRoot_t *agRoot); 943285809SscottlGLOBAL bit32 smIS_SPC12V( agsaRoot_t *agRoot); 944285809SscottlGLOBAL bit32 smIS_SPCV( agsaRoot_t *agRoot); 945285809SscottlGLOBAL bit32 smIS_ENCRYPT( agsaRoot_t *agRoot); 946285809SscottlGLOBAL bit32 smIS_SPCV_2_IOP( agsaRoot_t *agRoot); 947285809Sscottl#endif /*__SAPROTO_H__ */ 948