Lines Matching defs:c
2 * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
22 chan_t *c;
60 {"scp-fw-c.crt", UUID_SCP_FW_CONTENT_CERT},
61 {"soc-fw-c.crt", UUID_SOC_FW_CONTENT_CERT},
62 {"tos-fw-c.crt", UUID_TRUSTED_OS_FW_CONTENT_CERT},
63 {"nt-fw-c.crt", UUID_NON_TRUSTED_FW_CONTENT_CERT},
96 static int get_entry(chan_t *c, struct fip_entry *entry)
100 n = devtab[c->index]->read(c, entry, sizeof(struct fip_entry));
119 static int fipgen(chan_t *c, const dirtab_t *tab, int ntab, int n, dir_t *dir)
128 if (c->dev >= nfips) {
132 if (clone(archives[c->dev].c, &nc) == NULL) {
164 make_dir_entry(c, dir, uuidnames[i].name,
168 make_dir_entry(c, dir, unk, entry.size, n, O_READ);
174 static int fipwalk(chan_t *c, const char *name)
176 return devwalk(c, name, NULL, 0, fipgen);
179 static int fipstat(chan_t *c, const char *file, dir_t *dir)
181 return devstat(c, file, dir, NULL, 0, fipgen);
185 * This function copies at most n bytes of the FIP image referred by c into
188 static int fipread(chan_t *c, void *buf, int n)
196 assert(c->qid != CHDIR);
198 if ((c->dev >= nfips) || ((c->qid & CHDIR) != 0)) {
202 fip = &archives[c->dev];
204 if ((c->qid >= NR_FILES) || (fip->offset[c->qid] < 0)) {
208 if (clone(fip->c, &cs) == NULL) {
212 size = fip->size[c->qid];
213 if (c->offset >= size) {
221 if (n > (size - c->offset)) {
222 n = size - c->offset;
225 off = fip->offset[c->qid] + c->offset;
232 c->offset += n;
244 static chan_t *fipmount(chan_t *c, const char *spec)
268 fip->c = cspec;