FreeBSD kernel pms device code
|
The file implements the functions to handle port. More...
#include <sys/cdefs.h>
#include <dev/pms/config.h>
#include <dev/pms/RefTisa/sallsdk/spc/saglobal.h>
Go to the source code of this file.
Variables | |
bit32 | gFPGA_TEST |
The file implements the functions to handle port.
Definition in file saport.c.
__FBSDID | ( | "$FreeBSD$" | ) |
GLOBAL bit32 saDIFEncryptionOffloadStart | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | op, | ||
agsaDifEncPayload_t * | agsaDifEncPayload, | ||
ossaDIFEncryptionOffloadStartCB_t | agCB | ||
) |
initiate the SPCv controller offload function
saRoot | |
agContext | |
queueNum | |
op | |
agsaDifEncPayload | |
agCB |
Definition at line 1111 of file saport.c.
References AGSA_RC_FAILURE, hpDBG_VERY_LOUD, mpiDIFEncryptionOffloadCmd(), SA_DBG1, smIS_SPCV(), smTraceFuncEnter, and smTraceFuncExit.
GLOBAL bit32 saEncryptDekCacheInvalidate | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | dekTable, | ||
bit32 | dekIndex | ||
) |
Remove a DEK from the controller cache
saRoot | |
kekIndex | |
dekTable | |
dekAddrHi | |
dekAddrLo | |
dekIndex | |
dekNumberOfEntries |
Definition at line 1057 of file saport.c.
References DEK_MGMT_SUBOP_INVALIDATE, dekIndex, dekTable, hpDBG_VERY_LOUD, mpiDekManagementCmd(), OSSA_OFFSET_OF, SA_DBG2, SHIFT8, si_memset(), smTraceFuncEnter, and smTraceFuncExit.
Referenced by tiCOMEncryptDekInvalidate().
GLOBAL bit32 saEncryptDekCacheUpdate | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | kekIndex, | ||
bit32 | dekTableSelect, | ||
bit32 | dekAddrHi, | ||
bit32 | dekAddrLo, | ||
bit32 | dekIndex, | ||
bit32 | dekNumberOfEntries, | ||
bit32 | dekBlobFormat, | ||
bit32 | dekTableKeyEntrySize | ||
) |
Replace a DEK within the controller cache
saRoot | |
kekIndex | |
dekTableSelect | |
dekAddrHi | |
dekAddrLo | |
dekIndex | |
dekNumberOfEntries |
Definition at line 973 of file saport.c.
References DEK_MGMT_SUBOP_UPDATE, dekBlobFormat, dekIndex, dekTableKeyEntrySize, hpDBG_VERY_LOUD, kekIndex, mpiDekManagementCmd(), OSSA_OFFSET_OF, SA_DBG2, SHIFT24, SHIFT8, si_memset(), smTraceFuncEnter, and smTraceFuncExit.
Referenced by tiCOMEncryptDekAdd().
GLOBAL bit32 saEncryptGetMode | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
agsaEncryptInfo_t * | encryptInfo | ||
) |
Returns the status, working state and sector size registers of the encryption engine
saRoot | |
encryptInfo |
Definition at line 563 of file saport.c.
References AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_NOT_SUPPORTED, AGSA_RC_SUCCESS, agsaEncryptCipherModeXTS, agsaEncryptSMA, agsaEncryptSMB, agsaEncryptSMF, agsaEncryptInfo_s::encryptionCipherMode, agsaEncryptInfo_s::encryptionSecurityMode, agsaEncryptInfo_s::flag, hpDBG_VERY_LOUD, OperatorAuthenticationEnable_AUT, ossaHwRegRead(), ReturnToFactoryMode_ARF, SA_DBG1, SA_DBG2, SA_DBG4, SCRATCH_PAD1_V_RAAE_ERR, SCRATCH_PAD1_V_RAAE_MASK, SCRATCH_PAD3_V_ARF, SCRATCH_PAD3_V_AUT, SCRATCH_PAD3_V_ENC_DIS_ERR, SCRATCH_PAD3_V_ENC_DISABLED, SCRATCH_PAD3_V_ENC_ENA_ERR, SCRATCH_PAD3_V_ENC_MASK, SCRATCH_PAD3_V_ENC_READY, SCRATCH_PAD3_V_ERR_CODE, SCRATCH_PAD3_V_SM_MASK, SCRATCH_PAD3_V_SMA_ENABLED, SCRATCH_PAD3_V_SMB_ENABLED, SCRATCH_PAD3_V_SMF_ENABLED, SCRATCH_PAD3_V_XTS_ENABLED, SHIFT16, smIS_SPCV(), smTraceFuncEnter, smTraceFuncExit, agsaEncryptInfo_s::status, V_Scratchpad_1_Register, and V_Scratchpad_3_Register.
Referenced by tiCOMEncryptGetInfo(), and tiCOMPortInit().
GLOBAL bit32 saEncryptKekInvalidate | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | kekIndex | ||
) |
Remove a KEK from the controller
saRoot | |
flags | |
newKekIndex | |
wrapperKekIndex | |
encryptKekBlob |
Definition at line 929 of file saport.c.
References hpDBG_VERY_LOUD, KEK_MGMT_SUBOP_INVALIDATE, kekIndex, mpiKekManagementCmd(), OSSA_OFFSET_OF, SA_DBG2, SHIFT16, si_memset(), smTraceFuncEnter, and smTraceFuncExit.
GLOBAL bit32 saEncryptKekUpdate | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | flags, | ||
bit32 | newKekIndex, | ||
bit32 | wrapperKekIndex, | ||
bit32 | blobFormat, | ||
agsaEncryptKekBlob_t * | encryptKekBlob | ||
) |
Replace a KEK within the controller
saRoot | |
flags | |
newKekIndex | |
wrapperKekIndex | |
encryptKekBlob |
Definition at line 808 of file saport.c.
References blobFormat, flags, hpDBG_VERY_LOUD, KEK_MGMT_SUBOP_UPDATE, agsaEncryptKekBlob_s::kekBlob, mpiKekManagementCmd(), OSSA_OFFSET_OF, SA_DBG2, SHIFT14, SHIFT16, SHIFT24, SHIFT8, si_memset(), smTraceFuncEnter, smTraceFuncExit, and wrapperKekIndex.
Referenced by tiCOMEncryptKekAdd().
GLOBAL bit32 saEncryptSelftestExecute | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | type, | ||
bit32 | length, | ||
void * | TestDescriptor | ||
) |
Definition at line 1271 of file saport.c.
References AGSA_RC_SUCCESS, hpDBG_VERY_LOUD, mpiEncryptBistCmd(), agsaEncryptBist_s::r_subop, SA_DBG1, si_memcpy(), si_memset(), smTraceFuncEnter, smTraceFuncExit, and agsaEncryptBist_s::testDiscption.
Referenced by tdsaSendBISTIoctl(), and tiCOMEncryptSelfTest().
GLOBAL bit32 saEncryptSetMode | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaEncryptInfo_t * | mode | ||
) |
Definition at line 710 of file saport.c.
References AGSA_ENCRYPTION_CONTROL_PARM_PAGE, AGSA_RC_BUSY, AGSA_RC_NOT_SUPPORTED, agsaEncryptCipherModeXTS, agTRUE, agsaSetControllerConfigCmd_s::configPage, agsaEncryptInfo_s::encryptionCipherMode, agsaEncryptInfo_s::encryptionSecurityMode, mpiSetControllerConfigCmd(), ossaHwRegRead(), agsaSetControllerConfigCmd_s::pageCode, SA_DBG2, SCRATCH_PAD1_V_RAAE_MASK, SHIFT22, si_memset(), smIS_SPCV(), agsaEncryptInfo_s::status, agsaSetControllerConfigCmd_s::tag, and V_Scratchpad_1_Register.
Referenced by tiCOMEncryptSetMode().
GLOBAL bit32 saGetControllerConfig | ( | agsaRoot_t * | agRoot, |
bit32 | queueNum, | ||
bit32 | modePage, | ||
bit32 | flag0, | ||
bit32 | flag1, | ||
agsaContext_t * | agContext | ||
) |
Retrieve the contents of a controller mode page
saRoot | |
modePage | |
agContext |
Definition at line 1234 of file saport.c.
References AGSA_INTERRUPT_CONFIGURATION_PAGE, AGSA_RC_FAILURE, hpDBG_VERY_LOUD, agsaGetControllerConfigCmd_s::INT_VEC_MSK0, agsaGetControllerConfigCmd_s::INT_VEC_MSK1, mpiGetControllerConfigCmd(), agsaGetControllerConfigCmd_s::pageCode, SA_DBG1, SA_DBG2, si_memset(), smIS_SPCV(), smTraceFuncEnter, and smTraceFuncExit.
Referenced by tiCOMGetControllerConfig(), and tiCOMMgntIOCTL().
GLOBAL bit32 saGetOperator | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | option, | ||
bit32 | AddrHi, | ||
bit32 | AddrLo | ||
) |
Definition at line 1395 of file saport.c.
References AGSA_RC_SUCCESS, hpDBG_VERY_LOUD, mpiGetOperatorCmd(), agsaGetOperatorCmd_s::OprBufAddrHi, agsaGetOperatorCmd_s::OprBufAddrLo, agsaGetOperatorCmd_s::option, SA_DBG1, si_memset(), smTraceFuncEnter, and smTraceFuncExit.
Referenced by tiCOMGetOperator().
GLOBAL bit32 saOperatorManagement | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | flag, | ||
bit8 | role, | ||
agsaID_t * | id, | ||
agsaEncryptKekBlob_t * | kblob | ||
) |
Definition at line 1297 of file saport.c.
References AGSA_ID_SIZE, AGSA_RC_SUCCESS, hpDBG_VERY_LOUD, agsaID_s::ID, agsaOperatorMangmentCmd_s::IDString_Role, agsaOperatorMangmentCmd_s::Kblob, mpiOperatorManagementCmd(), agsaOperatorMangmentCmd_s::OPRIDX_AUTIDX_R_KBF_PKT_OMO, SA_DBG1, si_memcpy(), si_memset(), smTraceFuncEnter, and smTraceFuncExit.
Referenced by tiCOMOperatorManagement().
GLOBAL bit32 saPortControl | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaPortContext_t * | agPortContext, | ||
bit32 | portOperation, | ||
bit32 | param0, | ||
bit32 | param1 | ||
) |
Initiate a Port COntrol IOMB command.
This function is called to initiate a Port COntrol command to the SPC. The completion of this function is reported in ossaPortControlCB().
agRoot | handles for this instance of SAS/SATA hardware |
agContext | the context of this API |
queueNum | queue number |
agPortContext | point to the event source structure |
param0 | parameter 0 |
param1 | parameter 1 |
Definition at line 422 of file saport.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_PORT_CLEAN_UP, AGSA_PORT_HARD_RESET, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agTRUE, AUTO_FW_CLEANUP_DEREG_FLAG, AUTO_HARD_RESET_DEREG_FLAG, agsaLLRoot_s::autoDeregDeviceflag, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_PORT_CONTROL, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaPort_s::portId, PORTID_MASK, SA_ASSERT, SA_DBG1, SA_DBG2, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, SHIFT8, si_memset(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
Referenced by ossaHwCB().
GLOBAL bit32 saSetControllerConfig | ( | agsaRoot_t * | agRoot, |
bit32 | queueNum, | ||
bit32 | modePage, | ||
bit32 | length, | ||
void * | buffer, | ||
agsaContext_t * | agContext | ||
) |
Update a controller mode page
saRoot | |
modePage | |
length | |
buffer | |
agContext |
Definition at line 1151 of file saport.c.
References agFALSE, AGSA_ENCRYPTION_CONTROL_PARM_PAGE, AGSA_ENCRYPTION_DEK_CONFIG_PAGE, AGSA_ENCRYPTION_GENERAL_CONFIG_PAGE, AGSA_ENCRYPTION_HMAC_CONFIG_PAGE, AGSA_INTERRUPT_CONFIGURATION_PAGE, AGSA_RC_FAILURE, AGSA_SAS_PROTOCOL_TIMER_CONFIG_PAGE, hpDBG_VERY_LOUD, mpiSetControllerConfigCmd(), OSSA_OFFSET_OF, SA_DBG1, SA_DBG2, si_memset(), smIS_SPCV(), smTraceFuncEnter, smTraceFuncExit, and agsaSetControllerConfigCmd_s::tag.
Referenced by tiCOMMgntIOCTL(), tiCOMPortStart(), and tiCOMSetControllerConfig().
GLOBAL bit32 saSetOperator | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | flag, | ||
void * | cert | ||
) |
Definition at line 1356 of file saport.c.
References AGSA_RC_SUCCESS, agsaSetOperatorCmd_s::cert, hpDBG_VERY_LOUD, mpiSetOperatorCmd(), agsaSetOperatorCmd_s::OPRIDX_PIN_ACS, SA_DBG1, si_memcpy(), si_memset(), smTraceFuncEnter, and smTraceFuncExit.
Referenced by tiCOMSetOperator().
GLOBAL void siPortDeviceListRemove | ( | agsaRoot_t * | agRoot, |
agsaPort_t * | pPort, | ||
agsaDeviceDesc_t * | pDevice | ||
) |
The function to remove a device descriptor.
The function to remove a device descriptor
agRoot | handles for this instance of SAS/SATA hardware |
pPort | The pointer to the port |
pDevice | The pointer to the device |
Definition at line 370 of file saport.c.
References agNULL, agsaDeviceDesc_s::deviceType, agsaLLRoot_s::freeDevicesList, hpDBG_VERY_LOUD, agsaDeviceDesc_s::initiatorDevHandle, agsaDeviceDesc_s::linkNode, agsaPort_s::listSASATADevices, LL_DEVICE_LOCK, agsaContext_s::osData, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaPort_s::portId, agsaDeviceDesc_s::pPort, SA_ASSERT, SA_DBG3, saLlistAdd, saLlistRemove, SAS_SATA_UNKNOWN_DEVICE, agsaContext_s::sdkData, smTraceFuncEnter, smTraceFuncExit, and agsaDeviceDesc_s::targetDevHandle.
Referenced by mpiDeviceRegRsp().
GLOBAL void siPortDeviceRemove | ( | agsaRoot_t * | agRoot, |
agsaPort_t * | pPort, | ||
agsaDeviceDesc_t * | pDevice, | ||
bit32 | unmap | ||
) |
The function to remove a device descriptor.
The function to remove a device descriptor
agRoot | handles for this instance of SAS/SATA hardware |
pPort | The pointer to the port |
pDevice | The pointer to the device |
Definition at line 169 of file saport.c.
References agNULL, DEVICE_ID_BITS, agsaDeviceMap_s::DeviceHandle, agsaDeviceMap_s::DeviceIdFromFW, agsaLLRoot_s::DeviceMap, agsaDeviceDesc_s::DeviceMapIndex, agsaDeviceDesc_s::deviceType, agsaLLRoot_s::freeDevicesList, hpDBG_VERY_LOUD, agsaDeviceDesc_s::initiatorDevHandle, agsaDeviceDesc_s::linkNode, agsaPort_s::listSASATADevices, LL_DEVICE_LOCK, MAX_IO_DEVICE_ENTRIES, OS_ASSERT, agsaContext_s::osData, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaDeviceDesc_s::pPort, SA_ASSERT, SA_DBG3, saLlistAdd, saLlistRemove, SAS_SATA_UNKNOWN_DEVICE, agsaContext_s::sdkData, smTraceFuncEnter, smTraceFuncExit, and agsaDeviceDesc_s::targetDevHandle.
Referenced by mpiDeviceRegRsp(), and siRemoveDevHandle().
GLOBAL void siPortInvalid | ( | agsaRoot_t * | agRoot, |
agsaPort_t * | pPort | ||
) |
Invalid a port.
Invalid a port
agRoot | handles for this instance of SAS/SATA hardware |
pPort |
Definition at line 331 of file saport.c.
References agFALSE, agNULL, agsaLLRoot_s::freePorts, hpDBG_VERY_LOUD, agsaPort_s::linkNode, LL_PORT_LOCK, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), PORT_INVALIDATING, SA_ASSERT, saLlistAdd, saLlistRemove, agsaContext_s::sdkData, smTraceFuncEnter, smTraceFuncExit, agsaPort_s::status, agsaPort_s::tobedeleted, and agsaLLRoot_s::validPorts.
Referenced by mpiPhyStopEvent(), mpiSASHwEventAckRsp(), and siPhyStopCB().
GLOBAL agsaDeviceDesc_t * siPortSASDeviceAdd | ( | agsaRoot_t * | agRoot, |
agsaPort_t * | pPort, | ||
agsaSASIdentify_t | sasIdentify, | ||
bit32 | sasInitiator, | ||
bit32 | smpTimeout, | ||
bit32 | itNexusTimeout, | ||
bit32 | firstBurstSize, | ||
bit8 | dTypeSRate, | ||
bit32 | flag | ||
) |
Add a SAS device to the discovery list of the port.
Add a SAS device from the discovery list of the port
agRoot | handles for this instance of SAS/SATA LLL |
pPort | |
sasIdentify | |
sasInitiator | |
smpTimeout | |
itNexusTimeout | |
firstBurstSize | |
dTypeSRate | – device type and link rate |
flag |
Definition at line 60 of file saport.c.
References agNULL, agTRUE, agsaSASDeviceInfo_s::commonDevInfo, agsaDeviceDesc_s::deviceType, agsaDeviceDesc_s::devInfo, agsaDeviceInfo_s::devType_S_Rate, agsaDeviceInfo_s::firstBurstSize, agsaDeviceInfo_s::flag, agsaLLRoot_s::freeDevicesList, hpDBG_VERY_LOUD, agsaSASDeviceInfo_s::initiator_ssp_stp_smp, agsaSASIdentify_s::initiator_ssp_stp_smp, agsaDeviceDesc_s::initiatorDevHandle, agsaDeviceInfo_s::it_NexusTimeout, agsaDeviceDesc_s::linkNode, agsaPort_s::listSASATADevices, LL_DEVICE_LOCK, agsaContext_s::osData, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaDeviceDesc_s::pendingIORequests, agsaSASDeviceInfo_s::phyIdentifier, agsaSASIdentify_s::phyIdentifier, agsaDeviceDesc_s::pPort, SA_ASSERT, SA_DBG1, SA_DBG3, SA_IDFRM_GET_SAS_ADDRESSHI, SA_IDFRM_GET_SAS_ADDRESSLO, saLlistAdd, saLlistGetHead, saLlistInitialize, saLlistRemove, agsaDeviceInfo_s::sasAddressHi, agsaSASIdentify_s::sasAddressHi, agsaDeviceInfo_s::sasAddressLo, agsaSASIdentify_s::sasAddressLo, agsaSASSATADevInfo_s::sasDeviceInfo, agsaContext_s::sdkData, SHIFT4, agsaDeviceInfo_s::smpTimeout, smTraceFuncEnter, smTraceFuncExit, agsaSASDeviceInfo_s::target_ssp_stp_smp, agsaSASIdentify_s::target_ssp_stp_smp, and agsaDeviceDesc_s::targetDevHandle.
Referenced by mpiDeviceHandleArrived(), and saRegisterNewDevice().
GLOBAL agsaDeviceDesc_t * siPortSATADeviceAdd | ( | agsaRoot_t * | agRoot, |
agsaPort_t * | pPort, | ||
agsaDeviceDesc_t * | pSTPBridge, | ||
bit8 * | pSignature, | ||
bit8 | pm, | ||
bit8 | pmField, | ||
bit32 | smpReqTimeout, | ||
bit32 | itNexusTimeout, | ||
bit32 | firstBurstSize, | ||
bit8 | dTypeSRate, | ||
bit32 | flag | ||
) |
Add a SATA device to the discovery list of the port.
Add a SATA device from the discovery list of the port
agRoot | handles for this instance of SAS/SATA hardware |
pPort | |
pSTPBridge | |
pSignature | |
pm | |
pmField | |
smpReqTimeout | |
itNexusTimeout | |
firstBurstSize | |
dTypeSRate |
Definition at line 238 of file saport.c.
References agNULL, agsaSATADeviceInfo_s::commonDevInfo, agsaSATADeviceInfo_s::connection, agsaDeviceDesc_s::deviceType, agsaDeviceDesc_s::devInfo, agsaDeviceInfo_s::devType_S_Rate, agsaDeviceInfo_s::firstBurstSize, agsaDeviceInfo_s::flag, agsaLLRoot_s::freeDevicesList, hpDBG_VERY_LOUD, agsaDeviceDesc_s::initiatorDevHandle, agsaDeviceInfo_s::it_NexusTimeout, agsaDeviceDesc_s::linkNode, agsaPort_s::listSASATADevices, LL_DEVICE_LOCK, agsaContext_s::osData, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaSATADeviceInfo_s::portMultiplierField, agsaDeviceDesc_s::pPort, SA_ASSERT, SA_DBG1, SA_DBG3, saLlistAdd, saLlistGetHead, saLlistRemove, agsaDeviceInfo_s::sasAddressHi, agsaDeviceInfo_s::sasAddressLo, agsaSASSATADevInfo_s::sataDeviceInfo, agsaContext_s::sdkData, SHIFT4, agsaDeviceInfo_s::smpTimeout, smTraceFuncEnter, smTraceFuncExit, agsaSATADeviceInfo_s::stpPhyIdentifier, and agsaDeviceDesc_s::targetDevHandle.
Referenced by saRegisterNewDevice().