Lines Matching full:length

50 int DMA::transferHostDataToSocket(int fd, uint32_t length, uint64_t address)  in transferHostDataToSocket()  argument
53 uint32_t numPages = length / pageSize; in transferHostDataToSocket()
56 if (length > pageAlignedLength) in transferHostDataToSocket()
96 xdmaOp.len = length; in transferHostDataToSocket()
103 …ansferring remote terminus data to socket at address '{ADDRESS}' and length '{LENGTH}' with respon… in transferHostDataToSocket()
104 "RC", rc, "ADDRESS", address, "LENGTH", length); in transferHostDataToSocket()
109 length); in transferHostDataToSocket()
122 int DMA::transferDataHost(int fd, uint32_t offset, uint32_t length, in transferDataHost() argument
126 uint32_t numPages = length / pageSize; in transferDataHost()
129 if (length > pageAlignedLength) in transferDataHost()
190 rc = read(fd, buffer.data(), length); in transferDataHost()
194 …n BMC and remote terminus with file read on upstream '{UPSTREAM}' of length '{LENGTH}' at offset '… in transferDataHost()
195 "ERROR_NUM", errno, "UPSTREAM", upstream, "LENGTH", length, in transferDataHost()
199 if (rc != static_cast<int>(length)) in transferDataHost()
202 …ed for number of characters to read on upstream '{UPSTREAM}' and the length '{LENGTH}' read and c… in transferDataHost()
203 "UPSTREAM", upstream, "LENGTH", length, "RC", rc); in transferDataHost()
213 xdmaOp.len = length; in transferDataHost()
220 …on data between BMC and remote terminus for upstream '{UPSTREAM}' of length '{LENGTH}' at address … in transferDataHost()
221 "RC", rc, "UPSTREAM", upstream, "ADDRESS", address, "LENGTH", in transferDataHost()
222 length); in transferDataHost()
236 rc = write(fd, static_cast<const char*>(vgaMemPtr.get()), length); in transferDataHost()
240 …en BMC and remote terminus where file write upstream '{UPSTREAM}' of length '{LENGTH}' at offset '… in transferDataHost()
241 "ERROR_NUM", errno, "UPSTREAM", upstream, "LENGTH", length, in transferDataHost()
255 uint8_t completion_code, uint32_t length, in encodeRWResponseHandler() argument
259 length, msg); in encodeRWResponseHandler()
269 uint32_t length, struct pldm_msg* msg) in encodeReadResponseHandler() argument
271 int rc = encode_read_file_resp(instance_id, completion_code, length, msg); in encodeReadResponseHandler()
280 uint32_t length, struct pldm_msg* msg) in encodeWriteResponseHandler() argument
282 int rc = encode_write_file_resp(instance_id, completion_code, length, msg); in encodeWriteResponseHandler()
306 uint8_t completion_code, uint32_t length, in encodeRWTypeMemoryResponseHandler() argument
310 completion_code, length, msg); in encodeRWTypeMemoryResponseHandler()
320 uint8_t completion_code, uint32_t length, in encodeRWTypeResponseHandler() argument
324 length, msg); in encodeRWTypeResponseHandler()
349 uint32_t length = 0; in readFileIntoMemory() local
357 … "Failed to read file into memory as payload length '{LENGTH}' not equal to '{REQ_LENGTH}'", in readFileIntoMemory()
358 "LENGTH", payloadLength, "REQ_LENGTH", PLDM_RW_FILE_MEM_REQ_BYTES); in readFileIntoMemory()
366 request, payloadLength, &fileHandle, &offset, &length, &address); in readFileIntoMemory()
425 if (offset + length > fileSize) in readFileIntoMemory()
427 length = fileSize - offset; in readFileIntoMemory()
430 if (!length || length % dma::minSize) in readFileIntoMemory()
432 error("Packet length '{LENGTH}' is non multiple of minimum DMA size", in readFileIntoMemory()
433 "LENGTH", length); in readFileIntoMemory()
443 offset, length, address, true, in readFileIntoMemory()
452 uint32_t length = 0; in writeFileFromMemory() local
461 … "Failed to write file from memory as payload length '{LENGTH}' not equal to '{REQ_LENGTH}'", in writeFileFromMemory()
462 "LENGTH", payloadLength, "REQ_LENGTH", PLDM_RW_FILE_MEM_REQ_BYTES); in writeFileFromMemory()
470 request, payloadLength, &fileHandle, &offset, &length, &address); in writeFileFromMemory()
478 if (!length || length % dma::minSize) in writeFileFromMemory()
480 error("Packet length '{LENGTH}' is non multiple of minimum DMA size", in writeFileFromMemory()
481 "LENGTH", length); in writeFileFromMemory()
539 offset, length, address, false, in writeFileFromMemory()
556 …"Failed to get file table as payload length '{LENGTH}' not equal to required length '{REQ_LENGTH}'… in getFileTable()
557 "LENGTH", payloadLength, "REQ_LENGTH", in getFileTable()
612 uint32_t length = 0; in readFile() local
620 "Failed to read file as payload length '{LENGTH}' not equal to '{REQ_LENGTH}'", in readFile()
621 "LENGTH", payloadLength, "REQ_LENGTH", PLDM_READ_FILE_REQ_BYTES); in readFile()
623 PLDM_ERROR_INVALID_LENGTH, length, in readFile()
629 &length); in readFile()
654 PLDM_INVALID_FILE_HANDLE, length, in readFile()
664 PLDM_INVALID_FILE_HANDLE, length, in readFile()
687 PLDM_DATA_OUT_OF_RANGE, length, responsePtr); in readFile()
691 if (offset + length > fileSize) in readFile()
693 length = fileSize - offset; in readFile()
696 response.resize(response.size() + length); in readFile()
699 fileDataPos += sizeof(pldm_msg_hdr) + sizeof(uint8_t) + sizeof(length); in readFile()
703 stream.read(fileDataPos, length); in readFile()
705 encodeReadResponseHandler(request->hdr.instance_id, PLDM_SUCCESS, length, in readFile()
715 uint32_t length = 0; in writeFile() local
724 "Failed to write file as payload length '{LENGTH}' less than '{REQ_LENGTH}'", in writeFile()
725 "LENGTH", payloadLength, "REQ_LENGTH", PLDM_WRITE_FILE_REQ_BYTES); in writeFile()
732 &offset, &length, &fileDataOffset); in writeFile()
795 stream.write(fileDataPos, length); in writeFile()
797 encodeWriteResponseHandler(request->hdr.instance_id, PLDM_SUCCESS, length, in writeFile()
814 … "Failed to read file into memory as payload length '{LENGTH}' not equal to '{REQ_LENGTH}'", in rwFileByTypeIntoMemory()
815 "LENGTH", payloadLength, "REQ_LENGTH", in rwFileByTypeIntoMemory()
826 uint32_t length{}; in rwFileByTypeIntoMemory() local
829 request, payloadLength, &fileType, &fileHandle, &offset, &length, in rwFileByTypeIntoMemory()
840 if (!length || length % dma::minSize) in rwFileByTypeIntoMemory()
843 "Packet length '{LENGTH}' is non multiple of minimum DMA size for command {CMD}", in rwFileByTypeIntoMemory()
844 "LENGTH", length, "CMD", cmd); in rwFileByTypeIntoMemory()
867 ? handler->writeFromMemory(offset, length, address, in rwFileByTypeIntoMemory()
869 : handler->readIntoMemory(offset, length, address, in rwFileByTypeIntoMemory()
871 encodeRWTypeMemoryResponseHandler(request->hdr.instance_id, cmd, rc, length, in rwFileByTypeIntoMemory()
898 "Failed to write file by type as payload length '{LENGTH}' less than '{REQ_LENGTH}'", in writeFileByType()
899 "LENGTH", payloadLength, "REQ_LENGTH", in writeFileByType()
909 uint32_t length{}; in writeFileByType() local
912 &fileHandle, &offset, &length); in writeFileByType()
940 offset, length, oemPlatformHandler); in writeFileByType()
942 PLDM_WRITE_FILE_BY_TYPE, rc, length, in writeFileByType()
955 "Failed to read file by type as payload length '{LENGTH}' less than '{REQ_LENGTH}'", in readFileByType()
956 "LENGTH", payloadLength, "REQ_LENGTH", in readFileByType()
966 uint32_t length{}; in readFileByType() local
969 &fileHandle, &offset, &length); in readFileByType()
995 rc = handler->read(offset, length, response, oemPlatformHandler); in readFileByType()
998 PLDM_READ_FILE_BY_TYPE, rc, length, in readFileByType()
1011 "Failed to do file ack as payload length '{LENGTH}' is less than '{REQ_LENGTH}'", in fileAck()
1012 "LENGTH", payloadLength, "REQ_LENGTH", PLDM_FILE_ACK_REQ_BYTES); in fileAck()
1056 "Failed to get alert status as payload length '{LENGTH}' is less than '{REQ_LENGTH}'", in getAlertStatus()
1057 "LENGTH", payloadLength, "REQ_LENGTH", in getAlertStatus()
1105 "Failed new file available as payload length '{LENGTH}' is less than '{REQ_LENGTH}'", in newFileAvailable()
1106 "LENGTH", payloadLength, "REQ_LENGTH", PLDM_NEW_FILE_REQ_BYTES); in newFileAvailable()
1111 uint64_t length{}; in newFileAvailable() local
1114 &fileHandle, &length); in newFileAvailable()
1135 rc = handler->newFileAvailable(length); in newFileAvailable()