Lines Matching refs:mem
205 if (!cmd->ibuf[i].mem.buf) in versal_mbox_write_req()
208 if (!IS_ALIGNED((uintptr_t)cmd->ibuf[i].mem.buf, in versal_mbox_write_req()
211 cmd->ibuf[i].mem.buf); in versal_mbox_write_req()
215 if (!IS_ALIGNED(cmd->ibuf[i].mem.alloc_len, CACHELINE_LEN)) { in versal_mbox_write_req()
217 i, cmd->ibuf[i].mem.alloc_len); in versal_mbox_write_req()
221 cache_operation(TEE_CACHEFLUSH, cmd->ibuf[i].mem.buf, in versal_mbox_write_req()
222 cmd->ibuf[i].mem.alloc_len); in versal_mbox_write_req()
251 if (!cmd->ibuf[i].mem.buf) in versal_mbox_read_rsp()
254 if (!IS_ALIGNED((uintptr_t)cmd->ibuf[i].mem.buf, in versal_mbox_read_rsp()
257 i, cmd->ibuf[i].mem.buf); in versal_mbox_read_rsp()
261 if (!IS_ALIGNED(cmd->ibuf[i].mem.alloc_len, CACHELINE_LEN)) { in versal_mbox_read_rsp()
263 i, cmd->ibuf[i].mem.alloc_len); in versal_mbox_read_rsp()
268 cmd->ibuf[i].mem.buf, in versal_mbox_read_rsp()
269 cmd->ibuf[i].mem.alloc_len); in versal_mbox_read_rsp()
276 struct versal_mbox_mem *mem) in versal_mbox_alloc() argument
278 mem->buf = memalign(CACHELINE_LEN, ROUNDUP(len, CACHELINE_LEN)); in versal_mbox_alloc()
279 if (!mem->buf) in versal_mbox_alloc()
282 memset(mem->buf, 0, ROUNDUP(len, CACHELINE_LEN)); in versal_mbox_alloc()
285 memcpy(mem->buf, init, len); in versal_mbox_alloc()
287 mem->alloc_len = ROUNDUP(len, CACHELINE_LEN); in versal_mbox_alloc()
288 mem->len = len; in versal_mbox_alloc()