Home
last modified time | relevance | path

Searched refs:sgt (Results 1 – 5 of 5) sorted by relevance

/optee_os/core/drivers/crypto/caam/utils/
A Dutils_sgt.c46 CAAM_SGT_ENTRY(&sgt->sgt[idx], sgt->buf[idx].paddr, in caam_sgt_fill_table()
51 CAAM_SGT_ENTRY_FINAL(&sgt->sgt[idx], sgt->buf[idx].paddr, in caam_sgt_fill_table()
86 sgt->sgt_type = (sgt->number > 1) ? true : false; in caam_sgt_derive()
95 memcpy(sgt->buf, &from->buf[st_idx], sgt->number * sizeof(*sgt->buf)); in caam_sgt_derive()
98 memcpy(sgt->sgt, &from->sgt[st_idx], in caam_sgt_derive()
99 sgt->number * sizeof(*sgt->sgt)); in caam_sgt_derive()
102 sgt_entry_offset(sgt->sgt, off); in caam_sgt_derive()
108 cache_operation(TEE_CACHECLEAN, sgt->sgt, in caam_sgt_derive()
109 sgt->number * sizeof(*sgt->sgt)); in caam_sgt_derive()
111 sgt->paddr = virt_to_phys(sgt->sgt); in caam_sgt_derive()
[all …]
A Dutils_sgt_v1.c18 SGT_TRACE("SGT[%d] (%p)", idx, &sgt->sgt[idx]); in sgt_entry_trace()
22 SGT_TRACE("SGT[%d]->ptr_ms = %" PRIx32, idx, sgt->sgt[idx].v1.ptr_ms); in sgt_entry_trace()
23 SGT_TRACE("SGT[%d]->ptr_ls = %" PRIx32, idx, sgt->sgt[idx].v1.ptr_ls); in sgt_entry_trace()
25 sgt->sgt[idx].v1.len_f_e); in sgt_entry_trace()
26 SGT_TRACE("SGT[%d]->offset = %" PRIx32, idx, sgt->sgt[idx].v1.offset); in sgt_entry_trace()
33 len_f_e = caam_read_val32(&sgt->v1.len_f_e); in sgt_entry_offset()
38 caam_write_val32(&sgt->v1.len_f_e, len_f_e); in sgt_entry_offset()
39 caam_write_val32(&sgt->v1.offset, offset); in sgt_entry_offset()
47 caam_write_val32(&sgt->v1.ptr_ls, paddr); in caam_sgt_set_entry()
51 caam_write_val32(&sgt->v1.ptr_ms, 0); in caam_sgt_set_entry()
[all …]
A Dutils_sgt_v2.c13 const struct caamsgtbuf *sgt __maybe_unused) in sgt_entry_trace()
15 SGT_TRACE("SGT[%d] (%p)", idx, &sgt->sgt[idx]); in sgt_entry_trace()
16 SGT_TRACE("SGT[%d]->data = %p", idx, sgt->buf[idx].data); in sgt_entry_trace()
17 SGT_TRACE("SGT[%d]->length = %zu", idx, sgt->buf[idx].length); in sgt_entry_trace()
19 SGT_TRACE("SGT[%d]->w1 = %" PRIx64, idx, sgt->sgt[idx].v2.w1); in sgt_entry_trace()
20 SGT_TRACE("SGT[%d]->w2 = %" PRIx64, idx, sgt->sgt[idx].v2.w2); in sgt_entry_trace()
23 void sgt_entry_offset(union caamsgt *sgt, unsigned int offset) in sgt_entry_offset() argument
29 w2 = caam_read_val64(&sgt->v2.w2); in sgt_entry_offset()
48 caam_write_val64(&sgt->v2.w2, w2); in sgt_entry_offset()
57 caam_write_val64(&sgt->v2.w1, paddr); in caam_sgt_set_entry()
[all …]
A Dutils_dmaobj.c1401 obj->sgtbuf.paddr = virt_to_phys(obj->sgtbuf.sgt); in caam_dmaobj_sgtbuf_build()
/optee_os/core/drivers/crypto/caam/include/
A Dcaam_utils_sgt.h61 union caamsgt *sgt; /* SGT Array */ member
102 void caam_sgt_set_entry(union caamsgt *sgt, vaddr_t paddr, size_t len,
105 #define CAAM_SGT_ENTRY(sgt, paddr, len) \ argument
106 caam_sgt_set_entry(sgt, paddr, len, 0, false)
107 #define CAAM_SGT_ENTRY_FINAL(sgt, paddr, len) \ argument
108 caam_sgt_set_entry(sgt, paddr, len, 0, true)
118 void caam_sgt_fill_table(struct caamsgtbuf *sgt);
129 enum caam_status caam_sgt_derive(struct caamsgtbuf *sgt,
139 void sgt_entry_trace(unsigned int idx, const struct caamsgtbuf *sgt);
147 void sgt_entry_offset(union caamsgt *sgt, unsigned int offset);

Completed in 7 milliseconds