FreeBSD kernel pms device code
|
The file is a MPI Libraries to implement the MPI functions. 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.
Functions | |
__FBSDID ("$FreeBSD$") | |
void | mpiRequirementsGet (mpiConfig_t *config, mpiMemReq_t *memoryRequirement) |
Retrieves the MPI layer resource requirements. More... | |
GLOBAL FORCEINLINE bit32 | mpiMsgFreeGet (mpiICQueue_t *circularQ, bit16 messageSize, void **messagePtr) |
Retrieves a free message buffer from an inbound queue. More... | |
GLOBAL FORCEINLINE bit32 | mpiMsgProduce (mpiICQueue_t *circularQ, void *messagePtr, mpiMsgCategory_t category, bit16 opCode, bit8 responseQueue, bit8 hiPriority) |
GLOBAL FORCEINLINE bit32 | mpiMsgConsume (mpiOCQueue_t *circularQ, void **messagePtr1, mpiMsgCategory_t *pCategory, bit16 *pOpCode, bit8 *pBC) |
GLOBAL FORCEINLINE bit32 | mpiMsgFreeSet (mpiOCQueue_t *circularQ, void *messagePtr1, bit8 bc) |
The file is a MPI Libraries to implement the MPI functions.
The file implements the MPI Library functions.
Definition in file mpi.c.
__FBSDID | ( | "$FreeBSD$" | ) |
GLOBAL FORCEINLINE bit32 mpiMsgConsume | ( | mpiOCQueue_t * | circularQ, |
void ** | messagePtr1, | ||
mpiMsgCategory_t * | pCategory, | ||
bit16 * | pOpCode, | ||
bit8 * | pBC | ||
) |
Definition at line 660 of file mpi.c.
References mpiOCQueue_s::agRoot, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, mpiMem_s::appHandle, BC_MASK, CAT_MASK, mpiOCQueue_s::CIPCIBar, mpiOCQueue_s::CIPCIOffset, mpiOCQueue_s::consumerIdx, mpiOCQueue_s::elementSize, HEADER_BC_MASK, HEADER_V_MASK, mpiOCQueue_s::memoryRegion, MPI_DEBUG_TRACE, MPI_DEBUG_TRACE_OBQ, MPI_DEBUG_TRACE_QNUM_ERROR, NULL, mpiOCQueue_s::numElements, OPC_OUB_SKIP_ENTRY, OPCODE_MASK, OSSA_OFFSET_OF, ossaCacheInvalidate(), ossaHwRegReadExt(), ossaHwRegWriteExt(), mpiOCQueue_s::piPointer, mpiOCQueue_s::producerIdx, mpiOCQueue_s::qNumber, SA_ASSERT, SA_DBG1, SA_DBG3, SA_DBG4, SHIFT12, SHIFT24, and mpiMem_s::virtPtr.
Referenced by siProcessOBMsg().
mpiMsgFreeGet | ( | mpiICQueue_t * | circularQ, |
bit16 | messageSize, | ||
void ** | messagePtr | ||
) |
Retrieves a free message buffer from an inbound queue.
circularQ | Pointer to an inbound circular queue |
messageSize | Requested message size in bytes - only support 64 bytes/element |
messagePtr | Pointer to the free message buffer payload (not including message header) or NULL if no free message buffers are available |
This function is used to retrieve a free message buffer for the given inbound queue of at least messageSize bytes. The caller can use the returned buffer to construct the message and then call mpiMsgProduce() to deliver the message to the device message unit or mpiMsgInvalidate() if the message buffer is not going to be used
Return: AGSA_RC_SUCCESS if messagePtr contains a valid message buffer pointer AGSA_RC_FAILURE if messageSize larger than the elementSize of queue AGSA_RC_BUSY if there are not free message buffers (Queue full)
Definition at line 228 of file mpi.c.
References mpiICQueue_s::agRoot, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, mpiICQueue_s::ciPointer, mpiICQueue_s::consumerIdx, mpiICQueue_s::elementSize, mpiMsgHeader_s::Header, hpDBG_VERY_LOUD, mpiICQueue_s::memoryRegion, MSGU_HOST_SCRATCH_PAD_0, NULL, mpiICQueue_s::numElements, ossaHwRegRead(), mpiICQueue_s::producerIdx, SA_ASSERT, SA_DBG1, SA_DBG3, SA_DBG4, smTrace, and mpiMem_s::virtPtr.
Referenced by mpiBuildCmd(), saFlashExtExecute(), saFwFlashUpdate(), saSATAAbort(), saSATAStart(), saSendSMPIoctl(), saSMPStart(), saSSPAbort(), and saSSPStart().
GLOBAL FORCEINLINE bit32 mpiMsgFreeSet | ( | mpiOCQueue_t * | circularQ, |
void * | messagePtr1, | ||
bit8 | bc | ||
) |
Definition at line 817 of file mpi.c.
References mpiOCQueue_s::agRoot, AGSA_RC_SUCCESS, mpiOCQueue_s::CIPCIBar, mpiOCQueue_s::CIPCIOffset, mpiOCQueue_s::consumerIdx, mpiOCQueue_s::elementSize, mpiMsgHeader_s::Header, HEADER_V_MASK, mpiOCQueue_s::memoryRegion, NULL, mpiOCQueue_s::numElements, ossaHwRegWriteExt(), mpiOCQueue_s::piPointer, mpiOCQueue_s::producerIdx, mpiOCQueue_s::qNumber, SA_ASSERT, SA_DBG1, SA_DBG3, SA_DBG4, SA_DBG5, and mpiMem_s::virtPtr.
Referenced by siProcessOBMsg().
GLOBAL FORCEINLINE bit32 mpiMsgProduce | ( | mpiICQueue_t * | circularQ, |
void * | messagePtr, | ||
mpiMsgCategory_t | category, | ||
bit16 | opCode, | ||
bit8 | responseQueue, | ||
bit8 | hiPriority | ||
) |
Definition at line 461 of file mpi.c.
References agNULL, mpiICQueue_s::agRoot, AGSA_RC_SUCCESS, mpiMem_s::appHandle, BC_MASK, CAT_MASK, mpiICQueue_s::consumerIdx, mpiICQueue_s::elementSize, mpiMsgHeader_s::Header, hpDBG_IOMB, hpDBG_VERY_LOUD, mpiICQueue_s::memoryRegion, MPI_DEBUG_TRACE, MPI_DEBUG_TRACE_IBQ, MPI_MAX_OUTBOUND_QUEUES, NULL, mpiICQueue_s::numElements, OBID_MASK, OPCODE_MASK, OSSA_OFFSET_OF, ossaCacheFlush(), ossaCachePreFlush(), ossaHwRegWriteExt(), ossaLogIomb, mpiICQueue_s::PIPCIBar, mpiICQueue_s::PIPCIOffset, mpiICQueue_s::priority, mpiICQueue_s::producerIdx, mpiICQueue_s::qNumber, SA_ASSERT, SA_DBG1, SA_DBG4, SA_DBG6, agsaContext_s::sdkData, SHIFT12, SHIFT16, SHIFT24, SHIFT30, SHIFT31, smTrace, smTraceFuncEnter, smTraceFuncExit, agsaLLRoot_s::timeTick, TRUE, and V_BIT.
Referenced by mpiBuildCmd(), mpiSMPCmd(), saFlashExtExecute(), saFwFlashUpdate(), saSATAAbort(), saSATAStart(), saSSPAbort(), and saSSPStart().
void mpiRequirementsGet | ( | mpiConfig_t * | config, |
mpiMemReq_t * | memoryRequirement | ||
) |
Retrieves the MPI layer resource requirements.
config | MPI configuration for the Host MPI Message Unit |
memoryRequirement | Returned data structure as defined by mpiMemReq_t that holds the different chunks of memory that are required |
The mpiRequirementsGet() function is used to determine the resource requirements for the SPC device interface
Return: None
Definition at line 67 of file mpi.c.
References AGSA_CACHED_DMA_MEM, AGSA_DMA_MEM, mpiMem_s::alignment, mpiMemReq_s::count, mpiMem_s::elementSize, mpiInboundQueueDescriptor_s::elementSize, mpiOutboundQueueDescriptor_s::elementSize, mpiHostLLConfigDescriptor_s::eventLogSize, mpiConfig_s::inboundQueues, mpiHostLLConfigDescriptor_s::IOPeventLogSize, mpiConfig_s::mainConfig, MAX_QUEUE_EACH_MEM, NULL, mpiMem_s::numElements, mpiInboundQueueDescriptor_s::numElements, mpiOutboundQueueDescriptor_s::numElements, mpiConfig_s::numInboundQueues, mpiConfig_s::numOutboundQueues, mpiConfig_s::outboundQueues, mpiMemReq_s::region, SA_ASSERT, SA_DBG2, mpiMem_s::totalLength, and mpiMem_s::type.
Referenced by saGetRequirements().