33#ifdef SA_ENABLE_TRACE_FUNCTIONS
37#define siTraceFileID 'F'
42#if defined(SALLSDK_DEBUG)
43bit32 gLLDebugLevelSet = 0;
44bit32 gLLLogFuncDebugLevel = 0;
45bit32 gLLSoftResetCounter = 0;
51void *eventLogAddress =
NULL;
82 bit32 memoryReqCount = 0;
97 SA_DBG1((
"saGetRequirements:agRoot %p swConfig %p memoryRequirement %p usecsPerTick %p maxNumLocks %p\n",agRoot, swConfig,memoryRequirement,usecsPerTick,maxNumLocks));
98 SA_DBG1((
"saGetRequirements: usecsPerTick 0x%x (%d)\n",*usecsPerTick,*usecsPerTick));
113 SA_DBG1((
"saGetRequirements: agMemory[LLROOT_MEM_INDEX] singleElementLength = 0x%x totalLength = 0x%x align = 0x%x type %x\n",
127 SA_DBG1((
"saGetRequirements: agMemory[DEVICELINK_MEM_INDEX] singleElementLength = 0x%x totalLength = 0x%x align = 0x%x type %x\n",
145 SA_DBG1((
"saGetRequirements: agMemory[IOREQLINK_MEM_INDEX] singleElementLength = 0x%x totalLength = 0x%x align = 0x%x type %x\n",
158 SA_DBG1((
"saGetRequirements: agMemory[TIMERLINK_MEM_INDEX] singleElementLength = 0x%x totalLength = 0x%x align = 0x%x type %x\n",
164#ifdef SA_ENABLE_TRACE_FUNCTIONS
174 SA_DBG1((
"saGetRequirements: agMemory[LL_FUNCTION_TRACE] singleElementLength = 0x%x totalLength = 0x%x align = 0x%x type %x\n",
195 SA_DBG1((
"saGetRequirements: agMemory[LL_FAST_IO] singleElementLength = 0x%x totalLength = 0x%x align = 0x%x type %x\n",
204#ifdef SA_ENABLE_HDA_FUNCTIONS
216 SA_DBG1((
"saGetRequirements: agMemory[HDA_DMA_BUFFER] singleElementLength = 0x%x totalLength = 0x%x align = 0x%x type %x\n",
225 for ( i = 0; i < mpiMemoryRequirement.
count; i ++ )
232 SA_DBG1((
"saGetRequirements:MPI agMemory[%d] singleElementLength = 0x%x totalLength = 0x%x align = 0x%x type %x\n",
246 SA_DBG1((
"saGetRequirements: param3 == agNULL maxNumLocks %d\n", *maxNumLocks ));
253 SA_DBG1((
"saGetRequirements: maxNumLocks %d\n", *maxNumLocks ));
263 memoryRequirement->
count = memoryReqCount;
269 SA_DBG1((
"saGetRequirements: swConfig->stallUsec %d\n",swConfig->
stallUsec ));
271#ifdef SA_CONFIG_MDFD_REGISTRY
276#ifdef SA_ENABLE_HDA_FUNCTIONS
319 bit32 maxNumIODevices;
336 SA_ASSERT((LLROOT_MEM_INDEX < memoryAllocated->count),
"");
337 SA_ASSERT((DEVICELINK_MEM_INDEX < memoryAllocated->count),
"");
338 SA_ASSERT((IOREQLINK_MEM_INDEX < memoryAllocated->count),
"");
339 SA_ASSERT((TIMERLINK_MEM_INDEX < memoryAllocated->count),
"");
346 SA_DBG1((
"saInitialize: usecsPerTick %d\n", usecsPerTick ));
366 for ( i = 0; i < memoryAllocated->
count; i ++ )
376 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE Memory[%d] singleElementLength = 0x%x numElements = 0x%x NOT allocated\n",
385 SA_DBG1((
"saInitialize: Memory[%d] singleElementLength = 0x%x numElements = 0x%x allocated %p\n",
399 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE saRoot\n"));
403 agRoot->
sdkData = (
void *) saRoot;
405 SA_DBG1((
"saInitialize: saRoot %p\n",saRoot));
417 *memA = *memoryAllocated;
423#if defined(SALLSDK_DEBUG)
424 if(gLLDebugLevelSet == 0)
426 gLLDebugLevelSet = 1;
432#ifdef SA_ENABLE_TRACE_FUNCTIONS
448 size =
sizeof(saRoot->freeFastReq) /
sizeof(saRoot->freeFastReq[0]);
453 sizeof(saFastRequest_t)) &&
454 (agMemory[
LL_FAST_IO].numElements == LL_FAST_IO_SIZE) &&
456 agMemory[
LL_FAST_IO].singleElementLength),
"");
458 for (i = 0, alignment = agMemory[
LL_FAST_IO].alignment,
462 alignment - 1) & ~(alignment - 1))))
464 saRoot->freeFastReq[i] = fr;
466 saRoot->freeFastIdx = size;
481#ifdef SA_ENABLE_PCI_TRIGGER
483 SA_DBG1((
"saInitialize: SA_ENABLE_PCI_TRIGGER a 0x%08x %p\n", saRoot->
swConfig.PCI_trigger,&saRoot->
swConfig.PCI_trigger));
487 SA_DBG1((
"saInitialize: SA_ENABLE_PCI_TRIGGER 0x%08x %p\n", saRoot->
swConfig.PCI_trigger,&saRoot->
swConfig.PCI_trigger));
488 saRoot->
swConfig.PCI_trigger &= ~PCI_TRIGGER_INIT_TEST;
496 SA_DBG1((
"saInitialize: saRoot->ChipId 0x%08x\n", saRoot->
ChipId));
503 SA_DBG1((
"saInitialize: smIS_SPC macro fail !!!!\n" ));
508 SA_DBG1((
"saInitialize: SPC \n" ));
512 SA_DBG1((
"saInitialize: SPC HIL\n" ));
515 SA_DBG1((
"saInitialize: smIS_SPC macro fail !!!!\n" ));
522 SA_DBG1((
"saInitialize: SPC V\n" ));
525 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
532 SA_DBG1((
"saInitialize: SPC VE\n" ));
535 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
542 SA_DBG1((
"saInitialize: SPC VP\n" ));
545 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
552 SA_DBG1((
"saInitialize: SPC VEP\n" ));
555 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
562 SA_DBG1((
"saInitialize: Adaptec 8088\n" ));
566 SA_DBG1((
"saInitialize: Adaptec 8089\n" ));
570 SA_DBG1((
"saInitialize: SPC 12V\n" ));
573 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
580 SA_DBG1((
"saInitialize: SPC 12VE\n" ));
583 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
590 SA_DBG1((
"saInitialize: SPC 12VP\n" ));
593 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
600 SA_DBG1((
"saInitialize: SPC 12VEP\n" ));
603 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
610 SA_DBG1((
"saInitialize: SPC 12ADP\n" ));
613 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
620 SA_DBG1((
"saInitialize: SPC 12ADPE\n" ));
623 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
630 SA_DBG1((
"saInitialize: SPC 12ADPP\n" ));
633 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
640 SA_DBG1((
"saInitialize: SPC 12ADPEP\n" ));
643 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
650 SA_DBG1((
"saInitialize: SPC12SATA\n" ));
653 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
660 SA_DBG1((
"saInitialize: SPC 12V FPGA\n" ));
663 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
670 SA_DBG1((
"saInitialize: SPC 12V FPGA B\n" ));
673 SA_DBG1((
"saInitialize: smIS_SPCV macro fail !!!!\n" ));
680 SA_DBG1((
"saInitialize: SFC \n" ));
738 SA_DBG2((
"saInitialize: [%d] saRoot->deviceLinkMem VirtPtr=%p PhysicalLo=%x Count=%x Total=%x type %x\n",
747 SA_DBG2((
"saInitialize: maxNumIODevices=%d, swConfig->numDevHandles=%d \n",
751#ifdef SA_ENABLE_PCI_TRIGGER
752 SA_DBG1((
"saInitialize: swConfig->PCI_trigger= 0x%x\n", swConfig->PCI_trigger));
757 for ( i = 0; i < (
bit32) maxNumIODevices; i ++ )
783 SA_DBG2((
"saInitialize: [%d] saRoot->IORequestMem VirtPtr=%p PhysicalLo=%x Count=%x Total=%x type %x\n",
804 pRequestDesc->
HTag = i;
826 SA_DBG2((
"saInitialize: [%d] saRoot->timerLinkMem VirtPtr=%p PhysicalLo=%x Count=%x Total=%x type %x\n",
846 pTimerDesc->
Event = 0;
859 for ( i = 0; i < saRoot->
phyCount; i ++ )
873 for ( i = 0; i < saRoot->
portCount; i ++ )
876 pPort = &(saRoot->
ports[i]);
886 for ( j = 0; j < saRoot->
phyCount; j ++ )
922 for ( i = 0; i < saRoot->
portCount; i ++ )
924 pPortMap = &(saRoot->
PortMap[i]);
944 pIOMap = &(saRoot->
IOMap[i]);
980 SA_DBG1((
"saInitialize:InterruptCoalescingTimer should not be zero. Force to 1\n"));
999 for ( i = 0; i < mpiMemoryAllocated.
count; i ++ )
1010 SA_DBG2((
"saInitialize: memoryAllocated->agMemory[%d] VirtPtr=%p PhysicalLo=%x Count=%x Total=%x type %x\n",
1019 SA_DBG1((
"saInitialize: Zero memory region %d virt %p allocated %d\n",
1030 SA_DBG1((
"saInitialize: configured as polling mode\n"));
1043 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE InterruptVectors A\n"));
1051 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE InterruptVectors B\n"));
1059 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE InterruptVectors C\n"));
1067 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE InterruptVectors D\n"));
1076 SA_DBG1((
"saInitialize: SPC interrupts\n" ));
1106 SA_DBG1((
"saInitialize: SPC V interrupts\n" ));
1109 SA_DBG1((
"saInitialize: SPC V legacyInt_X\n" ));
1123 SA_DBG1((
"saInitialize: SPC V max_MSI_InterruptVectors\n" ));
1131 SA_DBG1((
"saInitialize: SPC V polling mode\n" ));
1136 SA_DBG1((
"saInitialize: SPC V\n" ));
1149#ifdef SA_LL_IBQ_PROTECT
1157#ifdef SA_FW_TEST_BUNCH_STARTS
1158 saRoot->BunchStarts_Enable =
FALSE;
1159 saRoot->BunchStarts_Threshold = 5;
1160 saRoot->BunchStarts_Pending = 0;
1161 saRoot->BunchStarts_TimeoutTicks = 10;
1171#if defined(SALLSDK_DEBUG)
1183 bit32 ScratchPad1 =0;
1184 bit32 ScratchPad3 =0;
1200#ifdef SA_ENABLE_HDA_FUNCTIONS
1202 Double_Reset_HDA =
TRUE;
1208 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE siHDAMode\n"));
1216 if(Double_Reset_HDA ==
agFALSE)
1220 Double_Reset_HDA =
TRUE;
1231 SA_DBG1((
"saInitialize: No HDA mode enable and FW is not running.\n"));
1232 if(Tried_NO_HDA !=
agTRUE )
1235 Tried_NO_HDA =
TRUE;
1258 SA_DBG1((
"saInitialize: No HDA mode enable and FW is not running.\n"));
1272 SA_DBG1((
"saInitialize: SPCv load HDA\n"));
1276 SA_DBG1((
"saInitialize: hda_status 0x%x\n",hda_status));
1286 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE soft_reset_status\n"));
1295 SA_DBG1((
"saInitialize: hda_status not SPC_V_HDAR_IDLE 0x%08x\n", hda_status));
1300 SA_DBG1((
"saInitialize: 2 reset hda_status not SPC_V_HDAR_IDLE 0x%08x\n", hda_status));
1306 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE soft_reset_status A\n"));
1311#ifdef SA_ENABLE_HDA_FUNCTIONS
1314 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE siHDAMode_V\n"));
1326 SA_DBG1((
"saInitialize: SPCv normal\n"));
1336 si_memset(&saRoot->LLCounters, 0,
sizeof(agsaIOCountInfo_t));
1347 SA_DBG1((
"saInitialize: siBar4Shift FAILED ******************************************\n"));
1354 SA_DBG1((
"saInitialize: saRoot->ChipId == VEN_DEV_SPCV\n"));
1362#ifdef SA_ENABLE_HDA_FUNCTIONS
1377 SA_DBG1((
"saInitialize: AGSA_RC_FAILURE mpiInitialize\n"));
1396 SA_DBG1((
"saInitialize: SPC_V Not set hwInterruptCoalescingTimer\n" ));
1397 SA_DBG1((
"saInitialize: SPC_V Not set hwInterruptCoalescingControl\n" ));
1415#ifdef SA_CONFIG_MDFD_REGISTRY
1425 SA_DBG1((
"saInitialize:AGSA_RC_FAILURE mpiInitialize\n"));
1433#ifdef SA_FW_TIMER_READS_STATUS
1434 siTimerAdd(agRoot,SA_FW_TIMER_READS_STATUS_INTERVAL, siReadControllerStatus,0,
agNULL );
1460 SA_DBG1((
"saInitialize: Doorbell_Set %08X U %08X\n",
1463 SA_DBG1((
"saInitialize: Doorbell_Mask %08X U %08X\n",
1469 SA_DBG1((
"saInitialize: Doorbell_Set %08X U %08X\n",
1472 SA_DBG1((
"saInitialize: Doorbell_Mask %08X U %08X\n",
1478 SA_DBG1((
"saInitialize: siDumpActiveIORequests\n"));
1488#ifdef SA_FW_TIMER_READS_STATUS
1490bit32 siReadControllerStatus(
1502 if(saRoot->Iop1Tcnt_last == saRoot->mpiGSTable.Iop1Tcnt )
1503 SA_DBG2((
"siReadControllerStatus: Iop1 %d STUCK\n", saRoot->mpiGSTable.Iop1Tcnt));
1506 if( saRoot->MsguTcnt_last == saRoot->mpiGSTable.MsguTcnt || saRoot->IopTcnt_last == saRoot->mpiGSTable.IopTcnt )
1508 SA_DBG1((
"siReadControllerStatus: Msgu %d Iop %d\n",saRoot->mpiGSTable.MsguTcnt, saRoot->mpiGSTable.IopTcnt));
1511 SA_DBG2((
"siReadControllerStatus: Msgu %d Iop %d\n",saRoot->mpiGSTable.MsguTcnt, saRoot->mpiGSTable.IopTcnt));
1513 saRoot->MsguTcnt_last = saRoot->mpiGSTable.MsguTcnt;
1514 saRoot->IopTcnt_last = saRoot->mpiGSTable.IopTcnt;
1515 saRoot->Iop1Tcnt_last = saRoot->mpiGSTable.Iop1Tcnt;
1537 siTimerAdd(agRoot,SA_FW_TIMER_READS_STATUS_INTERVAL, siReadControllerStatus,Event,pParm );
1564 bit32 intOption, enable64 = 0;
1574 SA_DBG1((
"siConfiguration: si_memset mpiConfig\n"));
1576#if defined(SALLSDK_DEBUG)
1577 sidump_swConfig(swConfig);
1585 SA_DBG1((
"siConfiguration: swConfig->param3 == agNULL\n"));
1640#
if defined(SALLSDK_DEBUG)
1641 sidump_Q_config( queueConfig );
1644 SA_DBG1((
"siConfiguration: swConfig->param3 == %p\n",queueConfig));
1650 SA_DBG1((
"siConfiguration:AGSA_RC_FAILURE MAX_Q\n"));
1659 SA_DBG1((
"siConfiguration:AGSA_RC_FAILURE NO_Q\n"));
1679#if defined(SALLSDK_DEBUG)
1680 sidump_hwConfig(hwConfig);
1706#ifdef SA_CONFIG_MDFD_REGISTRY
1759 SA_DBG2((
"siConfiguration: numInboundQueues=%d numOutboundQueues=%d\n",
1771 SA_DBG2((
"siConfiguration: IBQ%d:elementCount=%d elementSize=%d priority=%d Total Size 0x%X\n",
1790 SA_DBG2((
"siConfiguration: OBQ%d:elementCount=%d elementSize=%d interruptCount=%d interruptEnable=%d\n",
1801 SA_DBG1((
"siConfiguration:enable64 0x%X\n",enable64));
1810#ifdef FW_EVT_LOG_TST
1813 U32 **eventLogAddress_)
1819 *eventLogAddress_ = (
U32*)eventLogAddress;
1846 bit16 qIdx, i, indexoffset;
1848 bit32 MSGUCfgTblDWIdx, GSTLenMPIS;
1850 bit32 value, togglevalue;
1852 bit32 inboundoffset, outboundoffset;
1858 bit32 max_wait_time;
1859 bit32 max_wait_count;
1865 bit32 mpiUnInitFailed = 0;
1866 bit32 mpiStartToggleFailed = 0;
1869#if defined(SALLSDK_DEBUG)
1873 SA_DBG1((
"mpiInitialize: Entering\n"));
1874 SA_ASSERT(
NULL != agRoot,
"agRoot argument cannot be null");
1875 SA_ASSERT(
NULL != memoryAllocated,
"memoryAllocated argument cannot be null");
1876 SA_ASSERT(
NULL != config,
"config argument cannot be null");
1888 SA_DBG1((
"mpiInitialize: saRoot == agNULL\n"));
1900 SA_DBG1((
"mpiInitialize: siBar4Shift FAILED ******************************************\n"));
1911 SA_DBG1((
"mpiInitialize: mpiWaitForConfigTable FAILED ******************************************\n"));
1923 SA_DBG1((
"mpiInitialize: MSGUCfgTblBase = 0x%x\n", MSGUCfgTblBase));
1924#if defined(SALLSDK_DEBUG)
1928 SA_DBG1((
"mpiInitialize: Number of PHYs = 0x%x\n", phycount));
1937 SA_DBG1((
"mpiInitialize: High Priority IQ support from SPC\n"));
1942 SA_DBG1((
"mpiInitialize: Interrupt Coalescing support from SPC\n"));
1959 SA_DBG1((
"mpiInitialize: Number of IQ %d\n", maxinbound));
1960 SA_DBG1((
"mpiInitialize: Number of OQ %d\n", maxoutbound));
1969 SA_DBG2((
"mpiInitialize: Offset of IQ %d\n", (inboundoffset & 0xFF000000) >> 24));
1970 SA_DBG2((
"mpiInitialize: Offset of OQ %d\n", (outboundoffset & 0xFF000000) >> 24));
1971 inboundoffset &= 0x00FFFFFF;
1972 outboundoffset &= 0x00FFFFFF;
1978 saveOffset = MSGUCfgTblDWIdx;
1983 SA_DBG1((
"ERROR: The memory region [%d] 0x%X != 0x%X does not have the size of the MSGU event log ******************************************\n",
2028#ifdef FW_EVT_LOG_TST
2041 SA_DBG1((
"ERROR: The memory region does not have the size of the IOP event log\n"));
2072#ifdef FW_EVT_LOG_TST
2073 SA_DBG3((
"mpiInitialize: eventLogAddress 0x%p\n", eventLogAddress));
2154 SA_DBG1((
"mpiInitialize:SPCV - MAIN_IO_ABORT_DELAY_END_TO_END_CRC_DISABLE\n" ));
2158 SA_DBG1((
"mpiInitialize:SPCV - END_TO_END_CRC On\n" ));
2160 SA_DBG3((
"mpiInitialize:SPCV - rest reserved field \n" ));
2194 SA_DBG1((
"mpiInitialize:SPCV12G - END_TO_END_CRC ON rev B %d ****************************\n",
smIsCfgVREV_B(agRoot) ));
2254 for(qIdx = 0; qIdx < maxinbound; qIdx++)
2259 MSGUCfgTblDWIdx = saveOffset;
2260 MSGUCfgTblDWIdx += inboundoffset;
2262 SA_DBG1((
"mpiInitialize: A saveOffset 0x%x MSGUCfgTblDWIdx 0x%x\n",saveOffset ,MSGUCfgTblDWIdx));
2285 bit32 remainder = memSize & 127;
2290 memSize += (128 - remainder);
2298 SA_DBG1((
"mpiInitialize: ERROR The memory region does not have the right size for this inbound queue"));
2317 SA_DBG1((
"mpiInitialize: queue %d PI CI zero\n",qIdx));
2344 memOffset += memSize;
2347 (qIdx == (maxinbound - 1)))
2365 for(qIdx = 0; qIdx < maxoutbound; qIdx++)
2368 MSGUCfgTblDWIdx = saveOffset;
2369 MSGUCfgTblDWIdx += outboundoffset;
2393 bit32 remainder = memSize & 127;
2398 memSize += (128 - remainder);
2406 SA_DBG1((
"ERROR: The memory region does not have the right size for this outbound queue"));
2479 memOffset += memSize;
2482 (qIdx == (maxoutbound - 1)))
2524 SA_DBG1((
"mpiInitialize: mpiContextTable TableOffset 0x%08X contains 0x%08X\n",TableOffset,
ossaHwRegReadExt(agRoot, pcibar, TableOffset )));
2528 SA_DBG1((
"mpiInitialize: AGSA_MPI_MAIN_CONFIGURATION_TABLE 0x%08X\n", 0));
2548 SA_DBG1((
"mpiInitialize: mpiContextTable TableOffset 0x%08X contains 0x%08X\n",TableOffset,
ossaHwRegReadExt(agRoot, pcibar, TableOffset )));
2553 SA_DBG1((
"mpiInitialize: TableOffset 0x%x reads 0x%x expect 0x%x \n",TableOffset,
ossaHwRegReadExt(agRoot, pcibar, TableOffset ),0x53434D50));
2566 SA_DBG1((
"mpiInitialize: AGSA_MPI_MAIN_CONFIGURATION_TABLE %d 0x%x + 0x%x = 0x%x\n",context->
MPITableType,TableOffset, context->
offset, context->
value));
2567 OffsetInMain = TableOffset;
2613 SA_DBG1((
"mpiInitialize: MAIN_AWT_MIDRANGE 0x%08X\n",
2636 SA_DBG1((
"mpiInitialize:TableOffset 0x%x reads 0x%x expect 0x%x \n",TableOffset,
ossaHwRegReadExt(agRoot, pcibar, TableOffset ),0x53434D50));
2678 }
while ((value != togglevalue) && (max_wait_count -=
WAIT_INCREMENT));
2682 if (!max_wait_count && mpiStartToggleFailed < 5 )
2684 SA_DBG1((
"mpiInitialize: mpiStartToggleFailed count %d\n", mpiStartToggleFailed));
2685 mpiStartToggleFailed++;
2689 if (!max_wait_count )
2692 SA_DBG1((
"mpiInitialize: TIMEOUT:IBDB value/toggle = 0x%x 0x%x\n", value, togglevalue));
2693 MSGUCfgTblDWIdx = saveOffset;
2695 SA_DBG1((
"mpiInitialize: MPI State = 0x%x\n", GSTLenMPIS));
2703 MSGUCfgTblDWIdx = saveOffset;
2707 SA_DBG1((
"mpiInitialize: MPI State = 0x%x mpiUnInitFailed count %d\n", GSTLenMPIS &
GST_MPI_STATE_MASK,mpiUnInitFailed));
2724 GSTLenMPIS = GSTLenMPIS >>
SHIFT16;
2725 if (0x0000 != GSTLenMPIS)
2727 SA_DBG1((
"mpiInitialize: MPI Error = 0x%x\n", GSTLenMPIS));
2737 for(qIdx = 0; qIdx < maxinbound; qIdx++)
2740 MSGUCfgTblDWIdx = saveOffset;
2741 MSGUCfgTblDWIdx += inboundoffset;
2752 SA_DBG1((
"mpiInitialize: Error,IQ0 or OQ0 have to enable\n"));
2771 SA_DBG1((
"mpiInitialize: SPC V writes IQ %2d offset 0x%x\n",i ,circularIQ->
PIPCIOffset));
2789 SA_DBG2((
"mpiInitialize: SPC V writes OQ %2d offset 0x%x\n",i ,circularOQ->
CIPCIOffset));
2800 MSGUCfgTblDWIdx = saveOffset;
2803 SA_DBG1((
"mpiInitialize: upperEventLogAddress 0x%x\n", value));
2806 SA_DBG1((
"mpiInitialize: lowerEventLogAddress 0x%x\n", value));
2809 SA_DBG1((
"mpiInitialize: eventLogSize 0x%x\n", value));
2812 SA_DBG1((
"mpiInitialize: eventLogOption 0x%x\n", value));
2817 SA_DBG1((
"mpiInitialize: upperIOPLogAddress 0x%x\n", value));
2820 SA_DBG1((
"mpiInitialize: lowerIOPLogAddress 0x%x\n", value));
2824 SA_DBG1((
"mpiInitialize: IOPeventLogSize 0x%x\n", value));
2827 SA_DBG1((
"mpiInitialize: IOPeventLogOption 0x%x\n", value));
2830#ifdef SA_PRINTOUT_IN_WINDBG
2832 DbgPrint(
"mpiInitialize: EventLog (%d) dd /p %08X`%08X L %x\n",
2837 DbgPrint(
"mpiInitialize: IOPLog (%d) dd /p %08X`%08X L %x\n",
2851 SA_DBG1((
"mpiInitialize: FatalErrorInterrupt 0x%x\n", value));
2856 SA_DBG1((
"mpiInitialize: FatalErrorDumpOffset0 0x%x\n", value));
2859 SA_DBG1((
"mpiInitialize: FatalErrorDumpLength0 0x%x\n", value));
2862 SA_DBG1((
"mpiInitialize: FatalErrorDumpOffset1 0x%x\n", value));
2865 SA_DBG1((
"mpiInitialize: FatalErrorDumpLength1 0x%x\n", value));
2870 SA_DBG1((
"mpiInitialize: PortRecoveryTimerPortResetTimer 0x%x\n", value));
2874 SA_DBG1((
"mpiInitialize: InterruptReassertionDelay 0x%x\n", value));
2883 SA_DBG1((
"mpiInitialize: SCRATCH_PAD1_V_ERROR_STAT 0x%x\n",sp1 ));
2910 bit32 value, value1;
2911 bit32 max_wait_time;
2912 bit32 max_wait_count;
2916 SA_DBG2((
"mpiWaitForConfigTable: Entering\n"));
2917 SA_ASSERT(
NULL != agRoot,
"agRoot argument cannot be null");
2928 SA_DBG1((
"mpiWaitForConfigTable: Waiting for SPC FW becoming ready.P1 0x%X P2 0x%X\n",value,value1));
2934 SA_DBG1((
"mpiWaitForConfigTable: AAP error state and code 0x%x, ScratchPad2=0x%x\n", value, value1));
2935#if defined(SALLSDK_DEBUG)
2947 SA_DBG1((
"mpiWaitForConfigTable: IOP error state and code 0x%x, ScratchPad1=0x%x\n", value1, value));
2948#if defined(SALLSDK_DEBUG)
2961 SA_DBG1((
"mpiWaitForConfigTable: wrong state failure, scratchPad1 0x%x\n", value));
2963#if defined(SALLSDK_DEBUG)
2975 SA_DBG1((
"mpiWaitForConfigTable: wrong state failure, scratchPad2 0x%x\n", value1));
2977#if defined(SALLSDK_DEBUG)
2998 SA_DBG1((
"mpiWaitForConfigTable:VEN_DEV_SPCV force SCRATCH_PAD2 RDY 1 %08X 2 %08X\n" ,value,value1));
3004 SA_DBG1((
"mpiWaitForConfigTable: Timeout!! SCRATCH_PAD1/2 value = 0x%x 0x%x\n", value, value1));
3009 if (!max_wait_count)
3011 SA_DBG1((
"mpiWaitForConfigTable: timeout failure\n"));
3012#if defined(SALLSDK_DEBUG)
3025 SA_DBG1((
"mpiWaitForConfigTable: HDA mode set in SEEPROM SP1 0x%X\n",value));
3028 (value == 0xffffffff))
3030 SA_DBG1((
"mpiWaitForConfigTable: Waiting for _V_ FW becoming ready.P1 0x%X P2 0x%X\n",value,value1));
3044 SA_DBG1((
"mpiWaitForConfigTable: Timeout!! SCRATCH_PAD1/2 value = 0x%x 0x%x\n", value, value1));
3048 (value == 0xffffffff));
3053 SA_DBG1((
"mpiWaitForConfigTable: FW Ready, SCRATCH_PAD1/2 value = 0x%x 0x%x\n", value, value1));
3066 if (
BAR4 != MSGUCfgTblBase)
3068 SA_DBG1((
"mpiWaitForConfigTable: smIS_spc8081 PCI BAR is not BAR4, bar=0x%x - failure\n", MSGUCfgTblBase));
3075 if (
BAR5 != MSGUCfgTblBase)
3077 SA_DBG1((
"mpiWaitForConfigTable: PCI BAR is not BAR5, bar=0x%x - failure\n", MSGUCfgTblBase));
3162 SA_DBG1((
"mpiWaitForConfigTable: Interface Revision value = 0x%08x\n", config->
InterfaceRev));
3163 SA_DBG1((
"mpiWaitForConfigTable: FW Revision value = 0x%08x\n", config->
FWRevision));
3179 SA_DBG1((
"mpiWaitForConfigTable: MDevMaxSGL value = 0x%08x\n", config->
MDevMaxSGL));
3181 SA_DBG1((
"mpiWaitForConfigTable: GSTOffset value = 0x%08x\n", config->
GSTOffset));
3416 SA_DBG1((
"mpiWaitForConfigTable: return 0x%x not AGSA_RC_SUCCESS warning!\n", ret));
3436 bit32 MSGUCfgTblBase;
3437 bit32 CfgTblDWIdx, GSTOffset, GSTLenMPIS;
3438 bit32 value, togglevalue;
3439 bit32 max_wait_time;
3440 bit32 max_wait_count;
3444 SA_DBG1((
"mpiUnInitConfigTable: agRoot %p\n",agRoot));
3445 SA_ASSERT(
NULL != agRoot,
"agRoot argument cannot be null");
3452 if(MSGUCfgTblBase == 0xFFFFFFFF)
3454 SA_DBG1((
"mpiUnInitConfigTable: MSGUCfgTblBase = 0x%x AGSA_RC_FAILURE\n",MSGUCfgTblBase));
3477 }
while ((value != togglevalue) && (max_wait_count -=
WAIT_INCREMENT));
3479 if (!max_wait_count)
3481 SA_DBG1((
"mpiUnInitConfigTable: TIMEOUT:IBDB value/toggle = 0x%x 0x%x\n", value, togglevalue));
3500 if(GSTOffset == 0xFFFFFFFF)
3502 SA_DBG1((
"mpiUnInitConfigTable:AGSA_RC_FAILURE GSTOffset = 0x%x\n",GSTOffset));
3513 if (!max_wait_count)
3516#if defined(SALLSDK_DEBUG)
3547 bit32 QueueTableOffset,
3589 bit32 QueueTableOffset,
3628 bit32 FerrTableOffset,
3629 bit32 lowerBaseAddress,
3630 bit32 upperBaseAddress,
3703 bit32 CFGTableOffset, TableOffset;
3704 bit32 GSTableOffset;
3712 if(0xFFFFFFFF == TableOffset)
3714 SA_ASSERT(0xFFFFFFFF == TableOffset,
"Chip PCI dead");
3716 SA_DBG1((
"mpiReadGSTable: Chip PCI dead TableOffset 0x%x\n", TableOffset));
3732 GSTableOffset = CFGTableOffset + GSTableOffset;
3746 SA_DBG4((
"mpiReadGSTable: IopTcnt 0x%x\n", mpiGSTable->
IopTcnt));
3754 TableOffset &= 0x00FFFFFF;
3755 TableOffset = TableOffset + CFGTableOffset;
3756 for (i = 0; i < 8; i++)
3759 SA_DBG4((
"mpiReadGSTable: PhyState[0x%x] 0x%x\n", i, mpiGSTable->
PhyState[i]));
3764 for (i = 0; i < 8; i++)
3767 SA_DBG4((
"mpiReadGSTable: PhyState[0x%x] 0x%x\n", i, mpiGSTable->
PhyState[i]));
3774 for (i = 0; i < 8; i++)
3810 bit32 maxNumIODevices;
3822 agRoot->
sdkData = (
void *) saRoot;
3828 SA_DBG2((
"siInitResources: [%d] saRoot->deviceLinkMem VirtPtr=%p PhysicalLo=%x Count=%x Total=%x type %x\n" ,
3837 SA_DBG2((
"siInitResources: maxNumIODevices=%d, swConfig->numDevHandles=%d \n",
3843 for ( i = 0; i < (
bit32) maxNumIODevices; i ++ )
3869 SA_DBG2((
"siInitResources: [%d] saRoot->IORequestMem VirtPtr=%p PhysicalLo=%x Count=%x Total=%x type %x\n",
3890 pRequestDesc->
HTag = i;
3912 SA_DBG2((
"siInitResources: [%d] saRoot->timerLinkMem VirtPtr=%p PhysicalLo=%x Count=%x Total=%x type %x\n",
3932 pTimerDesc->
Event = 0;
3945 for ( i = 0; i < saRoot->
phyCount; i ++ )
3959 for ( i = 0; i < saRoot->
portCount; i ++ )
3962 pPort = &(saRoot->
ports[i]);
3972 for ( j = 0; j < saRoot->
phyCount; j ++ )
3999 for ( i = 0; i < saRoot->
portCount; i ++ )
4001 pPortMap = &(saRoot->
PortMap[i]);
4021 pIOMap = &(saRoot->
IOMap[i]);
4069 bit32 CFGTableOffset, TableOffset;
4070 bit32 CALTableOffset;
4087 CALTableOffset &= 0x00FFFFFF;
4100 SA_DBG3((
"mpiReadCALTable: spaReg0 0x%x\n", mpiCALTable->
spaReg0));
4101 SA_DBG3((
"mpiReadCALTable: spaReg1 0x%x\n", mpiCALTable->
spaReg1));
4102 SA_DBG3((
"mpiReadCALTable: spaReg2 0x%x\n", mpiCALTable->
spaReg2));
4103 SA_DBG3((
"mpiReadCALTable: spaReg3 0x%x\n", mpiCALTable->
spaReg3));
4104 SA_DBG3((
"mpiReadCALTable: spaReg4 0x%x\n", mpiCALTable->
spaReg4));
4105 SA_DBG3((
"mpiReadCALTable: spaReg5 0x%x\n", mpiCALTable->
spaReg5));
4106 SA_DBG3((
"mpiReadCALTable: spaReg6 0x%x\n", mpiCALTable->
spaReg6));
4107 SA_DBG3((
"mpiReadCALTable: spaReg7 0x%x\n", mpiCALTable->
spaReg7));
4125 bit32 CFGTableOffset, TableOffset;
4126 bit32 CALTableOffset;
4145 CALTableOffset &= 0x00FFFFFF;
4199 bit32 AnalogTableBase,CFGTableOffset, value,phy;
4200 bit32 AnalogtableSize;
4207 AnalogtableSize &= 0xFF000000;
4209 AnalogTableBase &= 0x00FFFFFF;
4211 AnalogTableBase = CFGTableOffset + AnalogTableBase;
4214 SA_DBG1((
"mpiWrAnalogSetupTable:Analogtable Base Offset %08X pcibar %d\n",AnalogTableBase, pcibar ));
4218 for(phy = 0; phy < 10; phy++)
4250 bit32 CFGTableOffset, value;
4251 bit32 INTVTableOffset;
4267 INTVTableOffset &= 0x00FFFFFF;
4268 INTVTableOffset = CFGTableOffset + INTVTableOffset;
4292 SA_DBG3((
"mpiWrIntVecTable: Q %d interruptDelay 0x%X interruptThreshold 0x%X \n",i,
4295 SA_DBG3((
"mpiWrIntVecTable: %d INT_VT_Coal_CNT_TO Bar %d Offset %3X Writing 0x%08x\n",i,
4312 bit32 CFGTableOffset, value;
4313 bit32 PHYTableOffset;
4329 PHYTableOffset &=0x00FFFFFF;
4331 PHYTableOffset = CFGTableOffset + PHYTableOffset +
PHY_EVENT_OQ;
4333 SA_DBG1((
"mpiWrPhyAttrbTable: PHYTableOffset 0x%08x\n", PHYTableOffset));
4348 SA_DBG1((
"mpiWrPhyAttrbTable: OQ Event per phy[%x] 0x%x\n", i, value));
4369 bit32 value, togglevalue;
4370 bit32 max_wait_time;
4371 bit32 max_wait_count;
4373 SA_DBG2((
"Entering function:mpiFreezeInboundQueue\n"));
4374 SA_ASSERT(
NULL != agRoot,
"agRoot argument cannot be null");
4378 if (bitMapQueueNum0)
4385 value |= bitMapQueueNum0;
4389 if (bitMapQueueNum1)
4393 value |= bitMapQueueNum1;
4410 }
while ((value != togglevalue) && (max_wait_count -=
WAIT_INCREMENT));
4412 if (!max_wait_count)
4414 SA_DBG1((
"mpiFreezeInboundQueue: IBDB value/toggle = 0x%x 0x%x\n", value, togglevalue));
4436 bit32 value, togglevalue;
4437 bit32 max_wait_time;
4438 bit32 max_wait_count;
4440 SA_DBG2((
"Entering function:mpiUnFreezeInboundQueue\n"));
4441 SA_ASSERT(
NULL != agRoot,
"agRoot argument cannot be null");
4445 if (bitMapQueueNum0)
4449 value |= bitMapQueueNum0;
4453 if (bitMapQueueNum1)
4457 value |= bitMapQueueNum1;
4473 }
while ((value != togglevalue) && (max_wait_count -=
WAIT_INCREMENT));
4475 if (!max_wait_count)
4477 SA_DBG1((
"mpiUnFreezeInboundQueue: IBDB value/toggle = 0x%x 0x%x\n", value, togglevalue));
4489 bit32 hda_status = 0;
4493 SA_DBG1((
"si_check_V_HDA: hda_status 0x%08X\n",hda_status ));
4498 SA_DBG1((
"si_check_V_HDA: HDA mode, value = 0x%x\n", hda_status));
4509 bit32 max_wait_time;
4510 bit32 max_wait_count;
4512 max_wait_time = (200 * 1000);
4520 if (!max_wait_count)
4526 max_wait_time = (200 * 1000);
4534 if (!max_wait_count)
4541 max_wait_time = (200 * 1000);
4549 if (!max_wait_count)
4557 max_wait_time = (200 * 1000);
4565 if (!max_wait_count)
4588 SA_DBG1((
"siScratchDump: SCRATCH_PAD 0 0x%08x 1 0x%08x 2 0x%08x 3 0x%08x\n",SCRATCH_PAD0,SCRATCH_PAD1,SCRATCH_PAD2,SCRATCH_PAD3 ));
4598 SA_DBG1((
"siScratchDump: SCRATCH_PAD1 valid 0x%08x\n",SCRATCH_PAD0 ));
void mpiRequirementsGet(mpiConfig_t *config, mpiMemReq_t *memoryRequirement)
Retrieves the MPI layer resource requirements.
#define TX_PORT_CFG2_OFFSET
#define TX_PORT_CFG1_OFFSET
#define RV_PORT_CFG1_OFFSET
#define RV_PORT_CFG2_OFFSET
#define TX_PORT_CFG3_OFFSET
#define ANALOG_SETUP_ENTRY_SIZE
void siEnableTracing(agsaRoot_t *agRoot)
#define smTraceFuncEnter(L, I)
#define smTraceFuncExit(L, S, I)
#define AGSA_MPI_OUTBOUND_QUEUE_FAILOVER_TABLE
#define AGSA_RC_VERSION_INCOMPATIBLE
#define SA_RESERVED_REQUEST_COUNT
#define AGSA_REQ_TYPE_UNKNOWN
#define AGSA_RC_HDA_NO_FW_RUNNING
#define STSDK_LL_INTERFACE_VERSION_IGNORE_MASK
#define AGSA_MAX_VALID_PHYS
#define AGSA_MAX_OUTBOUND_Q
#define MATCHING_SPC_FW_VERSION
#define STSDK_LL_SPC_VERSION
#define MIN_FW_12G_SPCVE_VERSION_SUPPORTED
#define AGSA_RC_VERSION_UNTESTED
#define MATCHING_V_FW_VERSION
struct agsaMPIContext_s agsaMPIContext_t
data structure for set fields in MPI table. The agsaMPIContext_t data structure is used to set fields...
#define AGSA_MPI_GENERAL_STATUS_TABLE
#define AGSA_MAX_INBOUND_Q
#define SA_OUTBOUND_COALESCE
#define AGSA_MPI_INTERRUPT_VECTOR_TABLE
#define STSDK_LL_INTERFACE_VERSION
#define MATCHING_12G_V_FW_VERSION
#define AGSA_MPI_OUTBOUND_QUEUE_CONFIGURATION_TABLE
#define MIN_FW_SPCVE_VERSION_SUPPORTED
#define MAX_IO_DEVICE_ENTRIES
#define SA_PTNFE_POISION_TLP
#define MIN_FW_SPC_VERSION_SUPPORTED
#define STSDK_LL_12G_VERSION
#define AGSA_MPI_SAS_PHY_ANALOG_SETUP_TABLE
#define STSDK_LL_OLD_INTERFACE_VERSION
#define AGSA_MPI_PER_SAS_PHY_ATTRIBUTE_TABLE
#define AGSA_MPI_INBOUND_QUEUE_CONFIGURATION_TABLE
#define STSDK_LL_12G_INTERFACE_VERSION
#define SA_MDFD_MULTI_DATA_FETCH
#define AGSA_NUM_MEM_CHUNKS
#define AGSA_MPI_MAIN_CONFIGURATION_TABLE
GLOBAL bit32 saFatalInterruptHandler(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
#define IOREQLINK_MEM_INDEX
#define INBOUND_DEPTH_SIZE
#define VEN_DEV_SPC12ADPP
#define SA_USECS_PER_TICK
#define LL_IOREQ_IBQ_LOCK_PARM
#define SAS_SATA_UNKNOWN_DEVICE
#define LL_FUNCTION_TRACE
#define DEVICELINK_MEM_INDEX
#define TOTAL_MPI_MEM_CHUNKS
#define LL_IOREQ_IBQ0_LOCK
#define LL_IOREQ_IBQ_LOCK
#define MAX_ACTIVE_IO_REQUESTS
#define OUTBOUND_DEPTH_SIZE
#define HW_CFG_PICI_EFFECTIVE_ADDRESS
#define MPI_IBQ_OBQ_INDEX
#define VEN_DEV_SPC12ADPEP
#define MAX_QUEUE_EACH_MEM
#define VEN_DEV_SPC12ADPE
#define TIMERLINK_MEM_INDEX
#define VEN_DEV_SPC12SATA
This file defines global types.
GLOBAL void siHalRegWriteExt(agsaRoot_t *agRoot, bit32 generic, bit32 regOffset, bit32 regValue)
GLOBAL bit32 siGetPciBar(agsaRoot_t *agRoot)
GLOBAL bit32 siChipResetV(agsaRoot_t *agRoot, bit32 signature)
Function to Reset the SPC V Hardware.
GLOBAL bit32 siHalRegReadExt(agsaRoot_t *agRoot, bit32 generic, bit32 regOffset)
GLOBAL bit32 siSpcSoftReset(agsaRoot_t *agRoot, bit32 signature)
Function to soft/FW reset the SPC.
GLOBAL void siPCITriger(agsaRoot_t *agRoot)
GLOBAL bit32 siBar4Shift(agsaRoot_t *agRoot, bit32 shiftValue)
Function to do BAR shifting.
GLOBAL void siUpdateBarOffsetTable(agsaRoot_t *agRoot, bit32 Spc_Type)
GLOBAL bit32 siSoftReset(agsaRoot_t *agRoot, bit32 signature)
#define SPC_V_HDA_RESPONSE_OFFSET
#define SPC_V_HDAR_RSPCODE_MASK
#define SCRATCH_PAD1_V_BOOTSTATE_MASK
#define BOOTTLOADERHDA_IDLE
#define PCI_TRIGGER_INIT_TEST
#define MSGU_HOST_SCRATCH_PAD_2
#define MSGU_SCRATCH_PAD_0
#define V_Outbound_Doorbell_Mask_Set_RegisterU
#define MSGU_SCRATCH_PAD_2
#define MSGU_SCRATCH_PAD_1
#define V_Outbound_Doorbell_Set_Register
#define MSGU_SCRATCH_PAD_3
#define SPC_HDASOFT_RESET_SIGNATURE
#define V_Scratchpad_2_Register
#define V_Scratchpad_3_Register
#define HDA_CMD_CODE_OFFSET
#define SCRATCH_PAD0_OFFSET_MASK
#define SCRATCH_PAD1_V_READY
#define HDA_RSP_OFFSET1MB
#define V_Outbound_Doorbell_Set_RegisterU
#define SCRATCH_PAD2_STATE_MASK
#define V_Outbound_Doorbell_Clear_Register
#define V_Scratchpad_1_Register
#define V_SoftResetRegister
#define SCRATCH_PAD1_V_RAAE_MASK
#define SPC_SOFT_RESET_SIGNATURE
#define SCRATCH_PAD1_V_RESERVED
#define SCRATCH_PAD0_BAR_MASK
#define SCRATCH_PAD3_V_ENC_ENA_ERR
#define SCRATCH_PAD3_V_ENC_MASK
#define V_Scratchpad_0_Register
#define IBDB_IBQ_UNFREEZE
@ GEN_MSGU_HOST_SCRATCH_PAD_1
@ GEN_MSGU_HOST_SCRATCH_PAD_2
#define SCRATCH_PAD1_V_BOOTSTATE_HDA_SEEPROM
#define SCRATCH_PAD1_V_IOP0_MASK
#define SCRATCH_PAD3_V_ENC_DIS_ERR
#define SCRATCH_PAD1_V_ERROR_STATE(ScratchPad1)
#define SCRATCH_PAD1_V_ILA_MASK
#define SCRATCH_PAD1_STATE_MASK
#define V_Outbound_Doorbell_Mask_Set_Register
#define SCRATCH_PAD_STATE_MASK
#define MSGU_HOST_SCRATCH_PAD_1
#define SCRATCH_PAD1_V_IOP1_MASK
GLOBAL void mpiWrPhyAttrbTable(agsaRoot_t *agRoot, sasPhyAttribute_t *phyAttrib)
GLOBAL void mpiWrIntVecTable(agsaRoot_t *agRoot, mpiConfig_t *config)
GLOBAL void mpiReadCALTable(agsaRoot_t *agRoot, spc_SPASTable_t *mpiCALTable, bit32 index)
Reading the Phy Analog Setup Register Table.
GLOBAL void mpiWriteCALAll(agsaRoot_t *agRoot, agsaPhyAnalogSetupTable_t *mpiCALTable)
Writing the Phy Analog Setup Register Table.
GLOBAL bit32 mpiInitialize(agsaRoot_t *agRoot, mpiMemReq_t *memoryAllocated, mpiConfig_t *config)
GLOBAL bit32 siConfiguration(agsaRoot_t *agRoot, mpiConfig_t *mpiConfig, agsaHwConfig_t *hwConfig, agsaSwConfig_t *swConfig)
Routine to do SPC configuration with default or specified values.
GLOBAL void mpiUpdateIBQueueCfgTable(agsaRoot_t *agRoot, spc_inboundQueueDescriptor_t *inQueueCfg, bit32 QueueTableOffset, bit8 pcibar)
Writing to the inbound queue of the Configuration Table.
GLOBAL void mpiWriteCALTable(agsaRoot_t *agRoot, spc_SPASTable_t *mpiCALTable, bit32 index)
GLOBAL void saGetRequirements(agsaRoot_t *agRoot, agsaSwConfig_t *swConfig, agsaMemoryRequirement_t *memoryRequirement, bit32 *usecsPerTick, bit32 *maxNumLocks)
Get the memory and lock requirement from LL layer.
GLOBAL bit32 si_check_V_HDA(agsaRoot_t *agRoot)
GLOBAL void siInitResources(agsaRoot_t *agRoot, agsaMemoryRequirement_t *memoryAllocated, agsaHwConfig_t *hwConfig, agsaSwConfig_t *swConfig, bit32 usecsPerTick)
GLOBAL bit32 mpiUnInitConfigTable(agsaRoot_t *agRoot)
GLOBAL bit32 mpiGetPCIBarIndex(agsaRoot_t *agRoot, bit32 pciBar)
GLOBAL bit32 siScratchDump(agsaRoot_t *agRoot)
void si_macro_check(agsaRoot_t *agRoot)
GLOBAL bit32 saInitialize(agsaRoot_t *agRoot, agsaMemoryRequirement_t *memoryAllocated, agsaHwConfig_t *hwConfig, agsaSwConfig_t *swConfig, bit32 usecsPerTick)
Initialize the Hardware.
GLOBAL void mpiReadGSTable(agsaRoot_t *agRoot, spc_GSTableDescriptor_t *mpiGSTable)
GLOBAL void mpiUpdateFatalErrorTable(agsaRoot_t *agRoot, bit32 FerrTableOffset, bit32 lowerBaseAddress, bit32 upperBaseAddress, bit32 length, bit8 pcibar)
GLOBAL void mpiWrAnalogSetupTable(agsaRoot_t *agRoot, mpiConfig_t *config)
GLOBAL bit32 mpiWaitForConfigTable(agsaRoot_t *agRoot, spc_configMainDescriptor_t *config)
Reading and Writing the Configuration Table.
GLOBAL void mpiUpdateOBQueueCfgTable(agsaRoot_t *agRoot, spc_outboundQueueDescriptor_t *outQueueCfg, bit32 QueueTableOffset, bit8 pcibar)
Writing to the inbound queue of the Configuration Table.
GLOBAL bit32 si_check_V_Ready(agsaRoot_t *agRoot)
bit32 siOurMSIInterrupt(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to process MSI interrupts.
GLOBAL void siReenableMSIInterrupts(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to reenable MSI interrupts.
bit32 siOurLegacy_V_Interrupt(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to process Legacy V interrupts.
GLOBAL void siDisableMSIInterrupts(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to disable MSI interrupts.
GLOBAL void siDisableLegacyInterrupts(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to process Legacy interrupts.
void siReenableMSIX_V_Interrupts(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to reenable MSIX interrupts.
GLOBAL void siReenableLegacyInterrupts(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to reenable Legacy interrupts.
GLOBAL void siDisableLegacy_V_Interrupts(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to process Legacy V interrupts.
GLOBAL void siDisableMSIXInterrupts(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to disable MSIX interrupts.
void siReenableMSIXInterrupts(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to reenable MSIX interrupts.
void siDisableMSIX_V_Interrupts(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to disable MSIX V interrupts.
GLOBAL bit32 siOurMSIX_V_Interrupt(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to process MSIX V interrupts.
GLOBAL void siReenableLegacy_V_Interrupts(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to reenable Legacy V interrupts.
bit32 siOurLegacyInterrupt(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to process Legacy interrupts.
GLOBAL bit32 siOurMSIXInterrupt(agsaRoot_t *agRoot, bit32 interruptVectorIndex)
Function to process MSIX interrupts.
#define saLlinkIOInitialize(pLink)
#define saLlistIOAdd(pList, pLink)
#define saLlistAdd(pList, pLink)
saLlistAdd macro
#define saLlinkInitialize(pLink)
saLlinkInitialize macro
#define saLlistIOGetCount(pList)
#define saLlistIOInitialize(pList)
#define saLlistInitialize(pList)
saLlistInitialize macro
#define smIsCfgSpcREV_A(agr)
#define smIS_SPCV8009(agr)
#define smIS_SPCV8077(agr)
#define AGSAMEM_ELEMENT_READ(pMem, index)
AGSAMEM_ELEMENT_READ macro.
#define smIS_SPCV8071(agr)
#define smIS_spc8001(agr)
#define smIS_ADAP8088(agr)
#define smIS_SPCV8075(agr)
#define WAIT_INCREMENT_DEFAULT
#define smIS_SPCV8073(agr)
#define MAKE_MODULO(a, b)
#define smIS_ADAP8089(agr)
#define smIS_spc8081(agr)
#define smIS_SPCV8070(agr)
#define smIS_SPCV8008(agr)
#define smIS_SPCV9015(agr)
#define smIsCfgSpcREV_C(agr)
#define PHY_STATUS_SET(pPhy, value)
PHY_STATUS_SET macro.
#define smIS_SPCV8072(agr)
#define smIsCfgVREV_A(agr)
#define smIsCfgVREV_B(agr)
#define smIS_SPCV8074(agr)
#define smIS_SPCV8076(agr)
#define smIS_SPCV9060(agr)
#define smIS_SPCV8019(agr)
#define smIsCfgSpcREV_B(agr)
#define smIsCfgVREV_C(agr)
#define smIS_SPCV8018(agr)
GLOBAL FORCEINLINE bit32 ossaHwRegReadExt(agsaRoot_t *agRoot, bit32 busBaseNumber, bit32 regOffset)
GLOBAL FORCEINLINE void ossaHwRegWriteExt(agsaRoot_t *agRoot, bit32 busBaseNumber, bit32 regOffset, bit32 regValue)
GLOBAL void ossaStallThread(agsaRoot_t *agRoot, bit32 microseconds)
ossaStallThread
osGLOBAL bit32 ossaHwRegReadConfig32(agsaRoot_t *agRoot, bit32 regOffset)
GLOBAL FORCEINLINE bit32 ossaHwRegRead(agsaRoot_t *agRoot, bit32 regOffset)
GLOBAL FORCEINLINE void * si_memcpy(void *dst, void *src, bit32 count)
memcopy
GLOBAL bit32 smIS_SPC(agsaRoot_t *agRoot)
GLOBAL bit32 smIS_SPC12V(agsaRoot_t *agRoot)
GLOBAL FORCEINLINE void * si_memset(void *s, int c, bit32 n)
memset
GLOBAL bit32 smIS_SPC6V(agsaRoot_t *agRoot)
GLOBAL bit32 smIS_SPCV_2_IOP(agsaRoot_t *agRoot)
GLOBAL agsaTimerDesc_t * siTimerAdd(agsaRoot_t *agRoot, bit32 timeout, agsaCallback_t pfnTimeout, bit32 Event, void *pParm)
add a timer
GLOBAL bit32 smIS_SPCV(agsaRoot_t *agRoot)
GLOBAL void siDumpActiveIORequests(agsaRoot_t *agRoot, bit32 count)
siDumpActiveIORequests
GLOBAL bit32 smIS_HIL(agsaRoot_t *agRoot)
struct agsaLLRoot_s agsaLLRoot_t
the LLRoot
struct agsaIORequestDesc_s agsaIORequestDesc_t
the LL defined IO request descriptor
struct agsaDeviceDesc_s agsaDeviceDesc_t
the LL defined device descriptor
struct agsaTimerDesc_s agsaTimerDesc_t
the data structure of a timer
#define MAIN_FATAL_ERROR_RDUMP1_OFFSET
#define MAIN_TITNX_EVENT_PID47_OFFSET
#define GST_IOPTCNT_OFFSET
#define MAIN_PHY_ATTRIBUTE_OFFSET
#define MAIN_IOP_EVENT_LOG_ADDR_HI
#define MAIN_INTERFACE_REVISION
#define GST_PHYSTATE_OFFSET
#define MPI_FATAL_EDUMP_TABLE_LO_OFFSET
#define MAIN_ANALOG_SETUP_OFFSET
#define MAIN_OB_HW_EVENT_PID03_OFFSET
#define SPC_MSGU_CFG_TABLE_RESET
#define OB_PROPERTY_INT_ENABLE
struct spc_outboundQueueDescriptor_s spc_outboundQueueDescriptor_t
#define MAIN_OB_NCQ_EVENT_PID03_OFFSET
#define OB_DYNAMIC_COALES_OFFSET
#define IB_PIPCI_BAR_OFFSET
#define MAIN_FATAL_ERROR_INTERRUPT
#define MAIN_OB_HW_EVENT_PID47_OFFSET
#define MAIN_FATAL_ERROR_RDUMP1_LENGTH
#define OB_PROPERITY_OFFSET
#define MAIN_SEEPROM_REVSION
#define MAIN_MOQFOT_MOQFOES
#define IB_BASE_ADDR_HI_OFFSET
#define MAIN_OB_SSP_EVENT_PID03_OFFSET
#define IB_PROPERITY_OFFSET
#define MAIN_FATAL_ERROR_RDUMP0_OFFSET
#define OB_BASE_ADDR_HI_OFFSET
#define MAIN_OB_NCQ_EVENT_PID47_OFFSET
#define MAIN_EVENT_LOG_ADDR_LO
#define IB_CI_BASE_ADDR_LO_OFFSET
#define FATAL_ERROR_INT_BITS
#define MAIN_CNTRL_CAP_OFFSET
#define MPI_FATAL_EDUMP_TABLE_LENGTH
#define GST_MPI_STATE_UNINIT
#define IB_CI_BASE_ADDR_HI_OFFSET
#define GST_GPIO_PINS_OFFSET
#define MAIN_INACTIVE_ILA_REVSION
#define MPI_FATAL_EDUMP_TABLE_STATUS
#define GST_RERRINFO_OFFSET
#define MAIN_PRECTD_PRESETD
#define MPI_FATAL_EDUMP_TABLE_HANDSHAKE
#define MAIN_HDA_FLAGS_OFFSET
#define MAIN_MAX_OUTSTANDING_IO_OFFSET
#define MAIN_MAX_SGL_OFFSET
#define GST_MPI_STATE_MASK
#define GST_MSGUTCNT_OFFSET
#define OB_PI_BASE_ADDR_LO_OFFSET
#define GST_IQ_FREEZE_STATE1_OFFSET
#define MAIN_INT_VEC_TABLE_OFFSET
#define MAIN_ILAT_ILAV_ILASMRN_ILAMRN_ILAMJN
#define MAIN_IOP_EVENT_LOG_ADDR_LO
#define MAIN_EVENT_LOG_OPTION
#define OB_CIPCI_BAR_OFFSET
#define MAIN_IO_ABORT_DELAY_END_TO_END_CRC_DISABLE
#define INT_VT_Coal_CNT_TO
#define OB_PI_BASE_ADDR_HI_OFFSET
#define MAIN_IQNPPD_HPPD_OFFSET
#define GST_GSTLEN_MPIS_OFFSET
#define IB_BASE_ADDR_LO_OFFSET
#define MAIN_TITNX_EVENT_PID03_OFFSET
#define GST_IOP1TCNT_OFFSET
#define MAIN_EVENT_LOG_BUFF_SIZE
#define MAIN_OB_SSP_EVENT_PID47_OFFSET
#define GST_IQ_FREEZE_STATE0_OFFSET
#define MAIN_IOP_EVENT_LOG_OPTION
#define MAIN_IRAD_RESERVED
#define OB_INTERRUPT_COALES_OFFSET
#define MAIN_CUSTOMER_SETTING
#define OB_BASE_ADDR_LO_OFFSET
#define MAIN_AWT_MIDRANGE
#define SPC_MSGU_CFG_TABLE_UPDATE
#define MAIN_IOP_EVENT_LOG_BUFF_SIZE
#define MPI_FATAL_EDUMP_TABLE_HI_OFFSET
#define GST_MPI_STATE_INIT
struct spc_inboundQueueDescriptor_s spc_inboundQueueDescriptor_t
#define MAIN_IO_ABORT_DELAY
#define MAIN_EVENT_LOG_ADDR_HI
#define MAIN_FATAL_ERROR_RDUMP0_LENGTH
data structure stores OS specific and LL specific context
data structure for set fields in MPI table. The agsaMPIContext_t data structure is used to set fields...
MPI layer configuration parameters.
mpiInboundQueueDescriptor_t inboundQueues[MPI_MAX_INBOUND_QUEUES]
bit16 maxNumInboundQueues
agsaPhyAnalogSetupTable_t phyAnalogConfig
mpiOutboundQueueDescriptor_t outboundQueues[MPI_MAX_OUTBOUND_QUEUES]
mpiHostLLConfigDescriptor_t mainConfig
bit16 maxNumOutboundQueues
bit32 outboundTargetSSPEventPID0_3
bit32 PortRecoveryTimerPortResetTimer
bit32 InterruptVecTblOffset
bit32 InterruptReassertionDelay
bit32 FatalErrorInterrupt
bit32 FatalErrorDumpOffset0
bit32 FatalErrorDumpOffset1
bit32 phyAttributeTblOffset
bit32 outboundHWEventPID4_7
bit32 lowerIOPeventLogAddress
bit32 outboundTargetSSPEventPID4_7
bit32 outboundHWEventPID0_3
bit32 upperIOPeventLogAddress
bit32 FatalErrorDumpLength0
bit32 upperEventLogAddress
bit32 lowerEventLogAddress
bit32 analogSetupTblOffset
bit32 outboundNCQEventPID4_7
bit32 outboundTargetITNexusEventPID4_7
bit32 FatalErrorDumpLength1
bit32 outboundTargetITNexusEventPID0_3
bit32 outboundNCQEventPID0_3
Circular Queue descriptor.
Describes MPI memory requirements.
mpiMem_t region[MPI_MAX_MEM_REGIONS]
Structure that descibes memory regions.
phyAttrb_t phyAttribute[MAX_VALID_PHYS]
This structure is used for SPC MPI General Status Table.
bit32 PhyState[MAX_VALID_PHYS]
SAS Phy Analog Setup Table.
bit32 FatalErrorInterrupt
bit32 FatalErrorDumpOffset1
bit32 outboundTargetSSPEventPID4_7
bit32 InterruptVecTblOffset
bit32 outboundQueueOffset
bit32 interruptReassertionDelay
bit32 lowerEventLogAddress
bit32 outboundHWEventPID4_7
bit32 upperIOPeventLogAddress
bit32 outboundTargetITNexusEventPID0_3
bit32 FatalErrorDumpOffset0
bit32 analogSetupTblOffset
bit32 FatalErrorDumpLength1
bit32 phyAttributeTblOffset
bit32 outboundNCQEventPID0_3
bit32 outboundTargetITNexusEventPID4_7
bit32 outboundTargetSSPEventPID0_3
bit32 outboundHWEventPID0_3
bit32 outboundNCQEventPID4_7
bit32 upperEventLogAddress
bit32 lowerIOPeventLogAddress
bit32 portRecoveryResetTimer
bit32 FatalErrorDumpLength0
This structure is used to configure inbound queues.
bit32 elementPriSizeCount
This structure is used to configure outbound queues.
bit32 interruptVecCntDelay
osGLOBAL void ossaReenableInterrupts(agsaRoot_t *agRoot, bit32 outboundChannelNum)
ossaReenableInterrupts
osGLOBAL void ossaDisableInterrupts(agsaRoot_t *agRoot, bit32 outboundChannelNum)
ossaDisableInterrupts